TokiCLI 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (368) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +7 -0
  4. data/README.md +56 -10
  5. data/TokiCLI.gemspec +5 -2
  6. data/lib/API/dbapi.rb +104 -67
  7. data/lib/API/helpers.rb +47 -3
  8. data/lib/TokiCLI/app.rb +88 -12
  9. data/lib/TokiCLI/version.rb +1 -1
  10. data/lib/TokiCLI/view.rb +5 -1
  11. data/lib/TokiServer/Gemfile +6 -0
  12. data/lib/TokiServer/README.md +37 -0
  13. data/lib/TokiServer/bower.json +8 -0
  14. data/lib/TokiServer/bower_components/fastclick/.bower.json +23 -0
  15. data/lib/TokiServer/bower_components/fastclick/LICENSE +22 -0
  16. data/lib/TokiServer/bower_components/fastclick/README.md +133 -0
  17. data/lib/TokiServer/bower_components/fastclick/bower.json +13 -0
  18. data/lib/TokiServer/bower_components/fastclick/lib/fastclick.js +790 -0
  19. data/lib/TokiServer/bower_components/foundation/.bower.json +30 -0
  20. data/lib/TokiServer/bower_components/foundation/bower.json +20 -0
  21. data/lib/TokiServer/bower_components/foundation/css/foundation.css +4860 -0
  22. data/lib/TokiServer/bower_components/foundation/css/normalize.css +320 -0
  23. data/lib/TokiServer/bower_components/foundation/js/foundation.js +5543 -0
  24. data/lib/TokiServer/bower_components/foundation/js/foundation.min.js +3 -0
  25. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.abide.js +299 -0
  26. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.accordion.js +59 -0
  27. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.alert.js +43 -0
  28. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.clearing.js +534 -0
  29. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.dropdown.js +311 -0
  30. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.equalizer.js +74 -0
  31. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.interchange.js +331 -0
  32. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.joyride.js +843 -0
  33. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.js +611 -0
  34. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.magellan.js +178 -0
  35. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.offcanvas.js +108 -0
  36. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.orbit.js +610 -0
  37. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.reveal.js +437 -0
  38. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.slider.js +199 -0
  39. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tab.js +167 -0
  40. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tooltip.js +298 -0
  41. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.topbar.js +425 -0
  42. data/lib/TokiServer/bower_components/foundation/js/vendor/fastclick.js +9 -0
  43. data/lib/TokiServer/bower_components/foundation/js/vendor/jquery.cookie.js +8 -0
  44. data/lib/TokiServer/bower_components/foundation/js/vendor/jquery.js +26 -0
  45. data/lib/TokiServer/bower_components/foundation/js/vendor/modernizr.js +8 -0
  46. data/lib/TokiServer/bower_components/foundation/js/vendor/placeholder.js +2 -0
  47. data/lib/TokiServer/bower_components/foundation/scss/foundation.scss +45 -0
  48. data/lib/TokiServer/bower_components/foundation/scss/foundation/_functions.scss +101 -0
  49. data/lib/TokiServer/bower_components/foundation/scss/foundation/_settings.scss +1289 -0
  50. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_accordion.scss +53 -0
  51. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +126 -0
  52. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_block-grid.scss +132 -0
  53. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +127 -0
  54. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_button-groups.scss +108 -0
  55. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_buttons.scss +222 -0
  56. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_clearing.scss +247 -0
  57. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +129 -0
  58. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown.scss +248 -0
  59. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_flex-video.scss +51 -0
  60. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_forms.scss +498 -0
  61. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_global.scss +429 -0
  62. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_grid.scss +260 -0
  63. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_inline-lists.scss +57 -0
  64. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_joyride.scss +220 -0
  65. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_keystrokes.scss +61 -0
  66. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_labels.scss +104 -0
  67. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_magellan.scss +34 -0
  68. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_offcanvas.scss +355 -0
  69. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_orbit.scss +423 -0
  70. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pagination.scss +150 -0
  71. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_panels.scss +90 -0
  72. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +150 -0
  73. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_progress-bars.scss +79 -0
  74. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_range-slider.scss +148 -0
  75. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal-new.scss +0 -0
  76. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal.scss +216 -0
  77. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_side-nav.scss +115 -0
  78. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_split-buttons.scss +191 -0
  79. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_sub-nav.scss +125 -0
  80. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_switch.scss +294 -0
  81. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tables.scss +129 -0
  82. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tabs.scss +109 -0
  83. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_thumbs.scss +68 -0
  84. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tooltips.scss +140 -0
  85. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_top-bar.scss +644 -0
  86. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_type.scss +511 -0
  87. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_visibility.scss +408 -0
  88. data/lib/TokiServer/bower_components/foundation/scss/normalize.scss +425 -0
  89. data/lib/TokiServer/bower_components/jquery-placeholder/.bower.json +17 -0
  90. data/lib/TokiServer/bower_components/jquery-placeholder/.gitattributes +1 -0
  91. data/lib/TokiServer/bower_components/jquery-placeholder/.gitignore +1 -0
  92. data/lib/TokiServer/bower_components/jquery-placeholder/LICENSE-MIT.txt +20 -0
  93. data/lib/TokiServer/bower_components/jquery-placeholder/README.md +76 -0
  94. data/lib/TokiServer/bower_components/jquery-placeholder/bower.json +5 -0
  95. data/lib/TokiServer/bower_components/jquery-placeholder/demo.html +55 -0
  96. data/lib/TokiServer/bower_components/jquery-placeholder/jquery.placeholder.js +185 -0
  97. data/lib/TokiServer/bower_components/jquery-placeholder/tests/index.html +32 -0
  98. data/lib/TokiServer/bower_components/jquery-placeholder/tests/tests.js +134 -0
  99. data/lib/TokiServer/bower_components/jquery.cookie/.bower.json +28 -0
  100. data/lib/TokiServer/bower_components/jquery.cookie/jquery.cookie.js +117 -0
  101. data/lib/TokiServer/bower_components/jquery/.bower.json +37 -0
  102. data/lib/TokiServer/bower_components/jquery/MIT-LICENSE.txt +21 -0
  103. data/lib/TokiServer/bower_components/jquery/bower.json +27 -0
  104. data/lib/TokiServer/bower_components/jquery/dist/jquery.js +9190 -0
  105. data/lib/TokiServer/bower_components/jquery/dist/jquery.min.js +5 -0
  106. data/lib/TokiServer/bower_components/jquery/dist/jquery.min.map +1 -0
  107. data/lib/TokiServer/bower_components/jquery/src/ajax.js +806 -0
  108. data/lib/TokiServer/bower_components/jquery/src/ajax/jsonp.js +89 -0
  109. data/lib/TokiServer/bower_components/jquery/src/ajax/load.js +75 -0
  110. data/lib/TokiServer/bower_components/jquery/src/ajax/parseJSON.js +13 -0
  111. data/lib/TokiServer/bower_components/jquery/src/ajax/parseXML.js +28 -0
  112. data/lib/TokiServer/bower_components/jquery/src/ajax/script.js +64 -0
  113. data/lib/TokiServer/bower_components/jquery/src/ajax/var/nonce.js +5 -0
  114. data/lib/TokiServer/bower_components/jquery/src/ajax/var/rquery.js +3 -0
  115. data/lib/TokiServer/bower_components/jquery/src/ajax/xhr.js +135 -0
  116. data/lib/TokiServer/bower_components/jquery/src/attributes.js +11 -0
  117. data/lib/TokiServer/bower_components/jquery/src/attributes/attr.js +143 -0
  118. data/lib/TokiServer/bower_components/jquery/src/attributes/classes.js +158 -0
  119. data/lib/TokiServer/bower_components/jquery/src/attributes/prop.js +96 -0
  120. data/lib/TokiServer/bower_components/jquery/src/attributes/support.js +35 -0
  121. data/lib/TokiServer/bower_components/jquery/src/attributes/val.js +163 -0
  122. data/lib/TokiServer/bower_components/jquery/src/callbacks.js +205 -0
  123. data/lib/TokiServer/bower_components/jquery/src/core.js +498 -0
  124. data/lib/TokiServer/bower_components/jquery/src/core/access.js +60 -0
  125. data/lib/TokiServer/bower_components/jquery/src/core/init.js +123 -0
  126. data/lib/TokiServer/bower_components/jquery/src/core/parseHTML.js +39 -0
  127. data/lib/TokiServer/bower_components/jquery/src/core/ready.js +97 -0
  128. data/lib/TokiServer/bower_components/jquery/src/core/var/rsingleTag.js +4 -0
  129. data/lib/TokiServer/bower_components/jquery/src/css.js +451 -0
  130. data/lib/TokiServer/bower_components/jquery/src/css/addGetHookIf.js +24 -0
  131. data/lib/TokiServer/bower_components/jquery/src/css/curCSS.js +57 -0
  132. data/lib/TokiServer/bower_components/jquery/src/css/defaultDisplay.js +70 -0
  133. data/lib/TokiServer/bower_components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  134. data/lib/TokiServer/bower_components/jquery/src/css/support.js +91 -0
  135. data/lib/TokiServer/bower_components/jquery/src/css/swap.js +28 -0
  136. data/lib/TokiServer/bower_components/jquery/src/css/var/cssExpand.js +3 -0
  137. data/lib/TokiServer/bower_components/jquery/src/css/var/getStyles.js +5 -0
  138. data/lib/TokiServer/bower_components/jquery/src/css/var/isHidden.js +13 -0
  139. data/lib/TokiServer/bower_components/jquery/src/css/var/rmargin.js +3 -0
  140. data/lib/TokiServer/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
  141. data/lib/TokiServer/bower_components/jquery/src/data.js +179 -0
  142. data/lib/TokiServer/bower_components/jquery/src/data/Data.js +181 -0
  143. data/lib/TokiServer/bower_components/jquery/src/data/accepts.js +20 -0
  144. data/lib/TokiServer/bower_components/jquery/src/data/var/data_priv.js +5 -0
  145. data/lib/TokiServer/bower_components/jquery/src/data/var/data_user.js +5 -0
  146. data/lib/TokiServer/bower_components/jquery/src/deferred.js +149 -0
  147. data/lib/TokiServer/bower_components/jquery/src/deprecated.js +13 -0
  148. data/lib/TokiServer/bower_components/jquery/src/dimensions.js +50 -0
  149. data/lib/TokiServer/bower_components/jquery/src/effects.js +649 -0
  150. data/lib/TokiServer/bower_components/jquery/src/effects/Tween.js +114 -0
  151. data/lib/TokiServer/bower_components/jquery/src/effects/animatedSelector.js +13 -0
  152. data/lib/TokiServer/bower_components/jquery/src/event.js +868 -0
  153. data/lib/TokiServer/bower_components/jquery/src/event/alias.js +39 -0
  154. data/lib/TokiServer/bower_components/jquery/src/event/support.js +9 -0
  155. data/lib/TokiServer/bower_components/jquery/src/exports/amd.js +24 -0
  156. data/lib/TokiServer/bower_components/jquery/src/exports/global.js +32 -0
  157. data/lib/TokiServer/bower_components/jquery/src/intro.js +44 -0
  158. data/lib/TokiServer/bower_components/jquery/src/jquery.js +36 -0
  159. data/lib/TokiServer/bower_components/jquery/src/manipulation.js +582 -0
  160. data/lib/TokiServer/bower_components/jquery/src/manipulation/_evalUrl.js +18 -0
  161. data/lib/TokiServer/bower_components/jquery/src/manipulation/support.js +31 -0
  162. data/lib/TokiServer/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
  163. data/lib/TokiServer/bower_components/jquery/src/offset.js +204 -0
  164. data/lib/TokiServer/bower_components/jquery/src/outro.js +1 -0
  165. data/lib/TokiServer/bower_components/jquery/src/queue.js +142 -0
  166. data/lib/TokiServer/bower_components/jquery/src/queue/delay.js +22 -0
  167. data/lib/TokiServer/bower_components/jquery/src/selector-native.js +172 -0
  168. data/lib/TokiServer/bower_components/jquery/src/selector-sizzle.js +14 -0
  169. data/lib/TokiServer/bower_components/jquery/src/selector.js +1 -0
  170. data/lib/TokiServer/bower_components/jquery/src/serialize.js +111 -0
  171. data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.js +2044 -0
  172. data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  173. data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  174. data/lib/TokiServer/bower_components/jquery/src/traversing.js +200 -0
  175. data/lib/TokiServer/bower_components/jquery/src/traversing/findFilter.js +100 -0
  176. data/lib/TokiServer/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
  177. data/lib/TokiServer/bower_components/jquery/src/var/arr.js +3 -0
  178. data/lib/TokiServer/bower_components/jquery/src/var/class2type.js +4 -0
  179. data/lib/TokiServer/bower_components/jquery/src/var/concat.js +5 -0
  180. data/lib/TokiServer/bower_components/jquery/src/var/hasOwn.js +5 -0
  181. data/lib/TokiServer/bower_components/jquery/src/var/indexOf.js +5 -0
  182. data/lib/TokiServer/bower_components/jquery/src/var/pnum.js +3 -0
  183. data/lib/TokiServer/bower_components/jquery/src/var/push.js +5 -0
  184. data/lib/TokiServer/bower_components/jquery/src/var/rnotwhite.js +3 -0
  185. data/lib/TokiServer/bower_components/jquery/src/var/slice.js +5 -0
  186. data/lib/TokiServer/bower_components/jquery/src/var/strundefined.js +3 -0
  187. data/lib/TokiServer/bower_components/jquery/src/var/support.js +4 -0
  188. data/lib/TokiServer/bower_components/jquery/src/var/toString.js +5 -0
  189. data/lib/TokiServer/bower_components/jquery/src/wrap.js +78 -0
  190. data/lib/TokiServer/bower_components/modernizr/.bower.json +14 -0
  191. data/lib/TokiServer/bower_components/modernizr/.editorconfig +10 -0
  192. data/lib/TokiServer/bower_components/modernizr/.gitignore +2 -0
  193. data/lib/TokiServer/bower_components/modernizr/.travis.yml +6 -0
  194. data/lib/TokiServer/bower_components/modernizr/feature-detects/a-download.js +8 -0
  195. data/lib/TokiServer/bower_components/modernizr/feature-detects/audio-audiodata-api.js +4 -0
  196. data/lib/TokiServer/bower_components/modernizr/feature-detects/audio-webaudio-api.js +4 -0
  197. data/lib/TokiServer/bower_components/modernizr/feature-detects/battery-api.js +8 -0
  198. data/lib/TokiServer/bower_components/modernizr/feature-detects/battery-level.js +11 -0
  199. data/lib/TokiServer/bower_components/modernizr/feature-detects/blob-constructor.js +10 -0
  200. data/lib/TokiServer/bower_components/modernizr/feature-detects/canvas-todataurl-type.js +28 -0
  201. data/lib/TokiServer/bower_components/modernizr/feature-detects/contenteditable.js +9 -0
  202. data/lib/TokiServer/bower_components/modernizr/feature-detects/contentsecuritypolicy.js +10 -0
  203. data/lib/TokiServer/bower_components/modernizr/feature-detects/contextmenu.js +11 -0
  204. data/lib/TokiServer/bower_components/modernizr/feature-detects/cookies.js +15 -0
  205. data/lib/TokiServer/bower_components/modernizr/feature-detects/cors.js +3 -0
  206. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundposition-shorthand.js +19 -0
  207. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js +15 -0
  208. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundrepeat.js +31 -0
  209. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundsizecover.js +10 -0
  210. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-boxsizing.js +9 -0
  211. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-calc.js +12 -0
  212. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-cubicbezierrange.js +8 -0
  213. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-displayrunin.js +18 -0
  214. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-displaytable.js +27 -0
  215. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-filters.js +7 -0
  216. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-hyphens.js +205 -0
  217. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-lastchild.js +11 -0
  218. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-mask.js +12 -0
  219. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-mediaqueries.js +3 -0
  220. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-objectfit.js +6 -0
  221. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-overflow-scrolling.js +9 -0
  222. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-pointerevents.js +25 -0
  223. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-positionsticky.js +13 -0
  224. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-regions.js +55 -0
  225. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-remunit.js +19 -0
  226. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-resize.js +8 -0
  227. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-scrollbars.js +19 -0
  228. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-shapes.js +4 -0
  229. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-subpixelfont.js +23 -0
  230. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-supports.js +6 -0
  231. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-userselect.js +10 -0
  232. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vhunit.js +14 -0
  233. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vmaxunit.js +14 -0
  234. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vminunit.js +14 -0
  235. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vwunit.js +14 -0
  236. data/lib/TokiServer/bower_components/modernizr/feature-detects/custom-protocol-handler.js +10 -0
  237. data/lib/TokiServer/bower_components/modernizr/feature-detects/dart.js +6 -0
  238. data/lib/TokiServer/bower_components/modernizr/feature-detects/dataview-api.js +4 -0
  239. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-classlist.js +4 -0
  240. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-createElement-attrs.js +11 -0
  241. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-dataset.js +9 -0
  242. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-microdata.js +4 -0
  243. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-datalist.js +12 -0
  244. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-details.js +25 -0
  245. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-output.js +4 -0
  246. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-progress-meter.js +11 -0
  247. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-ruby.js +53 -0
  248. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-time.js +4 -0
  249. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-track.js +11 -0
  250. data/lib/TokiServer/bower_components/modernizr/feature-detects/emoji.js +11 -0
  251. data/lib/TokiServer/bower_components/modernizr/feature-detects/es5-strictmode.js +7 -0
  252. data/lib/TokiServer/bower_components/modernizr/feature-detects/event-deviceorientation-motion.js +11 -0
  253. data/lib/TokiServer/bower_components/modernizr/feature-detects/exif-orientation.js +32 -0
  254. data/lib/TokiServer/bower_components/modernizr/feature-detects/file-api.js +12 -0
  255. data/lib/TokiServer/bower_components/modernizr/feature-detects/file-filesystem.js +9 -0
  256. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-fileinput.js +13 -0
  257. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-formattribute.js +29 -0
  258. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-inputnumber-l10n.js +32 -0
  259. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-placeholder.js +10 -0
  260. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-speechinput.js +19 -0
  261. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-validation.js +62 -0
  262. data/lib/TokiServer/bower_components/modernizr/feature-detects/fullscreen-api.js +10 -0
  263. data/lib/TokiServer/bower_components/modernizr/feature-detects/gamepad.js +12 -0
  264. data/lib/TokiServer/bower_components/modernizr/feature-detects/getusermedia.js +5 -0
  265. data/lib/TokiServer/bower_components/modernizr/feature-detects/ie8compat.js +12 -0
  266. data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-sandbox.js +5 -0
  267. data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-seamless.js +5 -0
  268. data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-srcdoc.js +5 -0
  269. data/lib/TokiServer/bower_components/modernizr/feature-detects/img-apng.js +26 -0
  270. data/lib/TokiServer/bower_components/modernizr/feature-detects/img-webp.js +20 -0
  271. data/lib/TokiServer/bower_components/modernizr/feature-detects/json.js +7 -0
  272. data/lib/TokiServer/bower_components/modernizr/feature-detects/lists-reversed.js +6 -0
  273. data/lib/TokiServer/bower_components/modernizr/feature-detects/mathml.js +23 -0
  274. data/lib/TokiServer/bower_components/modernizr/feature-detects/network-connection.js +22 -0
  275. data/lib/TokiServer/bower_components/modernizr/feature-detects/network-eventsource.js +5 -0
  276. data/lib/TokiServer/bower_components/modernizr/feature-detects/network-xhr2.js +13 -0
  277. data/lib/TokiServer/bower_components/modernizr/feature-detects/notification.js +10 -0
  278. data/lib/TokiServer/bower_components/modernizr/feature-detects/performance.js +5 -0
  279. data/lib/TokiServer/bower_components/modernizr/feature-detects/pointerlock-api.js +4 -0
  280. data/lib/TokiServer/bower_components/modernizr/feature-detects/quota-management-api.js +11 -0
  281. data/lib/TokiServer/bower_components/modernizr/feature-detects/requestanimationframe.js +7 -0
  282. data/lib/TokiServer/bower_components/modernizr/feature-detects/script-async.js +3 -0
  283. data/lib/TokiServer/bower_components/modernizr/feature-detects/script-defer.js +3 -0
  284. data/lib/TokiServer/bower_components/modernizr/feature-detects/style-scoped.js +6 -0
  285. data/lib/TokiServer/bower_components/modernizr/feature-detects/svg-filters.js +13 -0
  286. data/lib/TokiServer/bower_components/modernizr/feature-detects/unicode.js +32 -0
  287. data/lib/TokiServer/bower_components/modernizr/feature-detects/url-data-uri.js +26 -0
  288. data/lib/TokiServer/bower_components/modernizr/feature-detects/userdata.js +7 -0
  289. data/lib/TokiServer/bower_components/modernizr/feature-detects/vibration.js +4 -0
  290. data/lib/TokiServer/bower_components/modernizr/feature-detects/web-intents.js +6 -0
  291. data/lib/TokiServer/bower_components/modernizr/feature-detects/webgl-extensions.js +42 -0
  292. data/lib/TokiServer/bower_components/modernizr/feature-detects/websockets-binary.js +20 -0
  293. data/lib/TokiServer/bower_components/modernizr/feature-detects/window-framed.js +8 -0
  294. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-blobworkers.js +66 -0
  295. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-dataworkers.js +34 -0
  296. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-sharedworkers.js +3 -0
  297. data/lib/TokiServer/bower_components/modernizr/grunt.js +69 -0
  298. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.ai +292 -1
  299. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.eps +0 -0
  300. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.pdf +292 -1
  301. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.png +0 -0
  302. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.svg +35 -0
  303. data/lib/TokiServer/bower_components/modernizr/modernizr.js +1406 -0
  304. data/lib/TokiServer/bower_components/modernizr/readme.md +28 -0
  305. data/lib/TokiServer/bower_components/modernizr/test/basic.html +65 -0
  306. data/lib/TokiServer/bower_components/modernizr/test/caniuse.html +1451 -0
  307. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.eot +0 -0
  308. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.otf +0 -0
  309. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.svg +147 -0
  310. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.ttf +0 -0
  311. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.woff +0 -0
  312. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/alpha.png +0 -0
  313. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/apng_test.png +0 -0
  314. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/before-after.png +0 -0
  315. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/form_validation.html +15 -0
  316. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/ga.js +43 -0
  317. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/green5x5.png +0 -0
  318. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/hashchange.html +16 -0
  319. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/jquery.min.js +18 -0
  320. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/mathml.html +120 -0
  321. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/mathml_ref.png +0 -0
  322. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/modernizr-1.7.min.js +2 -0
  323. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/png_alpha_result.png +0 -0
  324. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/pushstate.html +40 -0
  325. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/red30x30.png +0 -0
  326. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/ruby.png +0 -0
  327. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/stroked-text.png +0 -0
  328. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/style.css +168 -0
  329. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-html-blur.png +0 -0
  330. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-img.svg +5 -0
  331. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-img.svg.1 +5 -0
  332. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg_blur.png +0 -0
  333. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/table.png +0 -0
  334. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/text-shadow1.png +0 -0
  335. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/text-shadow2.png +0 -0
  336. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/windsong_font.png +0 -0
  337. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/xhtml.html +14 -0
  338. data/lib/TokiServer/bower_components/modernizr/test/index.html +104 -0
  339. data/lib/TokiServer/bower_components/modernizr/test/js/basic.html +65 -0
  340. data/lib/TokiServer/bower_components/modernizr/test/js/dumpdata.js +75 -0
  341. data/lib/TokiServer/bower_components/modernizr/test/js/lib/detect-global.js +153 -0
  342. data/lib/TokiServer/bower_components/modernizr/test/js/lib/jquery-1.7b2.js +9279 -0
  343. data/lib/TokiServer/bower_components/modernizr/test/js/lib/jsonselect.js +279 -0
  344. data/lib/TokiServer/bower_components/modernizr/test/js/lib/polyfills.js +96 -0
  345. data/lib/TokiServer/bower_components/modernizr/test/js/lib/uaparser.js +215 -0
  346. data/lib/TokiServer/bower_components/modernizr/test/js/setup.js +44 -0
  347. data/lib/TokiServer/bower_components/modernizr/test/js/unit-caniuse.js +191 -0
  348. data/lib/TokiServer/bower_components/modernizr/test/js/unit.js +669 -0
  349. data/lib/TokiServer/bower_components/modernizr/test/qunit/qunit.css +231 -0
  350. data/lib/TokiServer/bower_components/modernizr/test/qunit/qunit.js +1932 -0
  351. data/lib/TokiServer/bower_components/modernizr/test/qunit/run-qunit.js +72 -0
  352. data/lib/TokiServer/config.rb +25 -0
  353. data/lib/TokiServer/humans.txt +8 -0
  354. data/lib/TokiServer/itunesicon.rb +60 -0
  355. data/lib/TokiServer/js/app.js +3 -0
  356. data/lib/TokiServer/public/stylesheets/app.css +8094 -0
  357. data/lib/TokiServer/robots.txt +4 -0
  358. data/lib/TokiServer/scss/_settings.scss +1240 -0
  359. data/lib/TokiServer/scss/app.scss +102 -0
  360. data/lib/TokiServer/tokiserver.rb +377 -0
  361. data/lib/TokiServer/views/apps_total.erb +28 -0
  362. data/lib/TokiServer/views/error.erb +25 -0
  363. data/lib/TokiServer/views/index.erb +191 -0
  364. data/lib/TokiServer/views/layout.erb +20 -0
  365. data/lib/TokiServer/views/name_log.erb +50 -0
  366. data/lib/TokiServer/views/name_split.erb +37 -0
  367. data/lib/TokiServer/views/name_total.erb +34 -0
  368. metadata +416 -4
@@ -0,0 +1,3 @@
1
+ !function(a,b,c,d){"use strict";function e(a){return("string"==typeof a||a instanceof String)&&(a=a.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,"")),a}var f=function(b){for(var c=b.length,d=a("head");c--;)0===d.has("."+b[c]).length&&d.append('<meta class="'+b[c]+'" />')};f(["foundation-mq-small","foundation-mq-medium","foundation-mq-large","foundation-mq-xlarge","foundation-mq-xxlarge","foundation-data-attribute-namespace"]),a(function(){"undefined"!=typeof FastClick&&"undefined"!=typeof c.body&&FastClick.attach(c.body)});var g=function(b,d){if("string"==typeof b){if(d){var e;if(d.jquery){if(e=d[0],!e)return d}else e=d;return a(e.querySelectorAll(b))}return a(c.querySelectorAll(b))}return a(b,d)},h=function(a){var b=[];return a||b.push("data"),this.namespace.length>0&&b.push(this.namespace),b.push(this.name),b.join("-")},i=function(a){for(var b=a.split("-"),c=b.length,d=[];c--;)0!==c?d.push(b[c]):this.namespace.length>0?d.push(this.namespace,b[c]):d.push(b[c]);return d.reverse().join("-")},j=function(b,c){var d=this,e=!g(this).data(this.attr_name(!0));return"string"==typeof b?this[b].call(this,c):void(g(this.scope).is("["+this.attr_name()+"]")?(g(this.scope).data(this.attr_name(!0)+"-init",a.extend({},this.settings,c||b,this.data_options(g(this.scope)))),e&&this.events(this.scope)):g("["+this.attr_name()+"]",this.scope).each(function(){var e=!g(this).data(d.attr_name(!0)+"-init");g(this).data(d.attr_name(!0)+"-init",a.extend({},d.settings,c||b,d.data_options(g(this)))),e&&d.events(this)}))},k=function(a,b){function c(){b(a[0])}function d(){if(this.one("load",c),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var a=this.attr("src"),b=a.match(/\?/)?"&":"?";b+="random="+(new Date).getTime(),this.attr("src",a+b)}}return a.attr("src")?void(a[0].complete||4===a[0].readyState?c():d.call(a)):void c()};b.matchMedia=b.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(c),function(){function a(){c&&(f(a),h&&jQuery.fx.tick())}for(var c,d=0,e=["webkit","moz"],f=b.requestAnimationFrame,g=b.cancelAnimationFrame,h="undefined"!=typeof jQuery.fx;d<e.length&&!f;d++)f=b[e[d]+"RequestAnimationFrame"],g=g||b[e[d]+"CancelAnimationFrame"]||b[e[d]+"CancelRequestAnimationFrame"];f?(b.requestAnimationFrame=f,b.cancelAnimationFrame=g,h&&(jQuery.fx.timer=function(b){b()&&jQuery.timers.push(b)&&!c&&(c=!0,a())},jQuery.fx.stop=function(){c=!1})):(b.requestAnimationFrame=function(a){var c=(new Date).getTime(),e=Math.max(0,16-(c-d)),f=b.setTimeout(function(){a(c+e)},e);return d=c+e,f},b.cancelAnimationFrame=function(a){clearTimeout(a)})}(jQuery),b.Foundation={name:"Foundation",version:"5.2.3",media_queries:{small:g(".foundation-mq-small").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),medium:g(".foundation-mq-medium").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),large:g(".foundation-mq-large").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xlarge:g(".foundation-mq-xlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,""),xxlarge:g(".foundation-mq-xxlarge").css("font-family").replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,"")},stylesheet:a("<style></style>").appendTo("head")[0].sheet,global:{namespace:d},init:function(a,b,c,d,e){var f=[a,c,d,e],h=[];if(this.rtl=/rtl/i.test(g("html").attr("dir")),this.scope=a||this.scope,this.set_namespace(),b&&"string"==typeof b&&!/reflow/i.test(b))this.libs.hasOwnProperty(b)&&h.push(this.init_lib(b,f));else for(var i in this.libs)h.push(this.init_lib(i,b));return a},init_lib:function(b,c){return this.libs.hasOwnProperty(b)?(this.patch(this.libs[b]),c&&c.hasOwnProperty(b)?("undefined"!=typeof this.libs[b].settings?a.extend(!0,this.libs[b].settings,c[b]):"undefined"!=typeof this.libs[b].defaults&&a.extend(!0,this.libs[b].defaults,c[b]),this.libs[b].init.apply(this.libs[b],[this.scope,c[b]])):(c=c instanceof Array?c:new Array(c),this.libs[b].init.apply(this.libs[b],c))):function(){}},patch:function(a){a.scope=this.scope,a.namespace=this.global.namespace,a.rtl=this.rtl,a.data_options=this.utils.data_options,a.attr_name=h,a.add_namespace=i,a.bindings=j,a.S=this.utils.S},inherit:function(a,b){for(var c=b.split(" "),d=c.length;d--;)this.utils.hasOwnProperty(c[d])&&(a[c[d]]=this.utils[c[d]])},set_namespace:function(){var b=this.global.namespace===d?a(".foundation-data-attribute-namespace").css("font-family"):this.global.namespace;this.global.namespace=b===d||/false/i.test(b)?"":b},libs:{},utils:{S:g,throttle:function(a,b){var c=null;return function(){var d=this,e=arguments;null==c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}},debounce:function(a,b,c){var d,e;return function(){var f=this,g=arguments,h=function(){d=null,c||(e=a.apply(f,g))},i=c&&!d;return clearTimeout(d),d=setTimeout(h,b),i&&(e=a.apply(f,g)),e}},data_options:function(b,c){function d(a){return!isNaN(a-0)&&null!==a&&""!==a&&a!==!1&&a!==!0}function e(b){return"string"==typeof b?a.trim(b):b}c=c||"options";var f,g,h,i={},j=function(a){var b=Foundation.global.namespace;return a.data(b.length>0?b+"-"+c:c)},k=j(b);if("object"==typeof k)return k;for(h=(k||":").split(";"),f=h.length;f--;)g=h[f].split(":"),g=[g[0],g.slice(1).join(":")],/true/i.test(g[1])&&(g[1]=!0),/false/i.test(g[1])&&(g[1]=!1),d(g[1])&&(g[1]=-1===g[1].indexOf(".")?parseInt(g[1],10):parseFloat(g[1])),2===g.length&&g[0].length>0&&(i[e(g[0])]=e(g[1]));return i},register_media:function(b,c){Foundation.media_queries[b]===d&&(a("head").append('<meta class="'+c+'">'),Foundation.media_queries[b]=e(a("."+c).css("font-family")))},add_custom_rule:function(a,b){if(b===d&&Foundation.stylesheet)Foundation.stylesheet.insertRule(a,Foundation.stylesheet.cssRules.length);else{var c=Foundation.media_queries[b];c!==d&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[b]+"{ "+a+" }")}},image_loaded:function(a,b){var c=this,d=a.length;0===d&&b(a),a.each(function(){k(c.S(this),function(){d-=1,0===d&&b(a)})})},random_str:function(){return this.fidx||(this.fidx=0),this.prefix=this.prefix||[this.name||"F",(+new Date).toString(36)].join("-"),this.prefix+(this.fidx++).toString(36)}}},a.fn.foundation=function(){var a=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(a)),this})}}(jQuery,window,window.document),function(a,b,c){"use strict";Foundation.libs.abide={name:"abide",version:"5.2.3",settings:{live_validate:!0,focus_on_invalid:!0,error_labels:!0,timeout:1e3,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:\.\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,url:/^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(a){var b=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,d=a.value,e=b===d;return e}}},timer:null,init:function(a,b,c){this.bindings(b,c)},events:function(b){var c=this,d=c.S(b).attr("novalidate","novalidate"),e=d.data(this.attr_name(!0)+"-init")||{};this.invalid_attr=this.add_namespace("data-invalid"),d.off(".abide").on("submit.fndtn.abide validate.fndtn.abide",function(a){var b=/ajax/i.test(c.S(this).attr(c.attr_name()));return c.validate(c.S(this).find("input, textarea, select").get(),a,b)}).on("reset",function(){return c.reset(a(this))}).find("input, textarea, select").off(".abide").on("blur.fndtn.abide change.fndtn.abide",function(a){c.validate([this],a)}).on("keydown.fndtn.abide",function(a){e.live_validate===!0&&(clearTimeout(c.timer),c.timer=setTimeout(function(){c.validate([this],a)}.bind(this),e.timeout))})},reset:function(b){b.removeAttr(this.invalid_attr),a(this.invalid_attr,b).removeAttr(this.invalid_attr),a(".error",b).not("small").removeClass("error")},validate:function(a,b,c){var d=this.parse_patterns(a),e=d.length,f=this.S(a[0]).closest("[data-"+this.attr_name(!0)+"]"),g=f.data(this.attr_name(!0)+"-init")||{},h=/submit/.test(b.type);f.trigger("validated");for(var i=0;e>i;i++)if(!d[i]&&(h||c))return g.focus_on_invalid&&a[i].focus(),f.trigger("invalid"),this.S(a[i]).closest("[data-"+this.attr_name(!0)+"]").attr(this.invalid_attr,""),!1;return(h||c)&&f.trigger("valid"),f.removeAttr(this.invalid_attr),c?!1:!0},parse_patterns:function(a){for(var b=a.length,c=[];b--;)c.push(this.pattern(a[b]));return this.check_validation_and_apply_styles(c)},pattern:function(a){var b=a.getAttribute("type"),c="string"==typeof a.getAttribute("required"),d=a.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(d)&&d.length>0?[a,this.settings.patterns[d],c]:d.length>0?[a,new RegExp("^"+d+"$"),c]:this.settings.patterns.hasOwnProperty(b)?[a,this.settings.patterns[b],c]:(d=/.*/,[a,d,c])},check_validation_and_apply_styles:function(b){for(var c=b.length,d=[],e=this.S(b[0][0]).closest("[data-"+this.attr_name(!0)+"]"),f=e.data(this.attr_name(!0)+"-init")||{};c--;){var g,h,i=b[c][0],j=b[c][2],k=i.value.trim(),l=this.S(i).parent(),m=i.getAttribute(this.add_namespace("data-abide-validator")),n="radio"===i.type,o="checkbox"===i.type,p=this.S('label[for="'+i.getAttribute("id")+'"]'),q=j?i.value.length>0:!0;i.getAttribute(this.add_namespace("data-equalto"))&&(m="equalTo"),g=l.is("label")?l.parent():l,n&&j?d.push(this.valid_radio(i,j)):o&&j?d.push(this.valid_checkbox(i,j)):m?(h=this.settings.validators[m].apply(this,[i,j,g]),d.push(h),h?(this.S(i).removeAttr(this.invalid_attr),g.removeClass("error")):(this.S(i).attr(this.invalid_attr,""),g.addClass("error"))):b[c][1].test(k)&&q||!j&&i.value.length<1||a(i).attr("disabled")?(this.S(i).removeAttr(this.invalid_attr),g.removeClass("error"),p.length>0&&f.error_labels&&p.removeClass("error"),d.push(!0),a(i).triggerHandler("valid")):(this.S(i).attr(this.invalid_attr,""),g.addClass("error"),p.length>0&&f.error_labels&&p.addClass("error"),d.push(!1),a(i).triggerHandler("invalid"))}return d},valid_checkbox:function(a,b){var a=this.S(a),c=a.is(":checked")||!b;return c?a.removeAttr(this.invalid_attr).parent().removeClass("error"):a.attr(this.invalid_attr,"").parent().addClass("error"),c},valid_radio:function(a){for(var b=a.getAttribute("name"),c=this.S(a).closest("[data-"+this.attr_name(!0)+"]").find("[name='"+b+"']"),d=c.length,e=!1,f=0;d>f;f++)c[f].checked&&(e=!0);for(var f=0;d>f;f++)e?this.S(c[f]).removeAttr(this.invalid_attr).parent().removeClass("error"):this.S(c[f]).attr(this.invalid_attr,"").parent().addClass("error");return e},valid_equal:function(a,b,d){var e=c.getElementById(a.getAttribute(this.add_namespace("data-equalto"))).value,f=a.value,g=e===f;return g?(this.S(a).removeAttr(this.invalid_attr),d.removeClass("error")):(this.S(a).attr(this.invalid_attr,""),d.addClass("error")),g},valid_oneof:function(a,b,c,d){var a=this.S(a),e=this.S("["+this.add_namespace("data-oneof")+"]"),f=e.filter(":checked").length>0;if(f?a.removeAttr(this.invalid_attr).parent().removeClass("error"):a.attr(this.invalid_attr,"").parent().addClass("error"),!d){var g=this;e.each(function(){g.valid_oneof.call(g,this,null,null,!0)})}return f}}}(jQuery,window,window.document),function(a){"use strict";Foundation.libs.accordion={name:"accordion",version:"5.2.3",settings:{active_class:"active",multi_expand:!1,toggleable:!0,callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(){var b=this,c=this.S;c(this.scope).off(".fndtn.accordion").on("click.fndtn.accordion","["+this.attr_name()+"] > dd > a",function(d){var e=c(this).closest("["+b.attr_name()+"]"),f=c("#"+this.href.split("#")[1]),g=c("dd > .content",e),h=a("dd",e),i=b.attr_name()+"="+e.attr(b.attr_name()),j=e.data(b.attr_name(!0)+"-init"),k=c("dd > .content."+j.active_class,e);return d.preventDefault(),e.attr(b.attr_name())&&(g=g.add("["+i+"] dd > .content"),h=h.add("["+i+"] dd")),j.toggleable&&f.is(k)?(f.parent("dd").toggleClass(j.active_class,!1),f.toggleClass(j.active_class,!1)):(j.multi_expand||(g.removeClass(j.active_class),h.removeClass(j.active_class)),f.addClass(j.active_class).parent().addClass(j.active_class),void j.callback(f))})},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs.alert={name:"alert",version:"5.2.3",settings:{callback:function(){}},init:function(a,b,c){this.bindings(b,c)},events:function(){var c=this,d=this.S;a(this.scope).off(".alert").on("click.fndtn.alert","["+this.attr_name()+"] a.close",function(a){var e=d(this).closest("["+c.attr_name()+"]"),f=e.data(c.attr_name(!0)+"-init")||c.settings;a.preventDefault(),"transitionend"in b||"webkitTransitionEnd"in b||"oTransitionEnd"in b?(e.addClass("alert-close"),e.on("transitionend webkitTransitionEnd oTransitionEnd",function(){d(this).trigger("close").remove(),f.callback()})):e.fadeOut(300,function(){d(this).trigger("close").remove(),f.callback()})})},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.clearing={name:"clearing",version:"5.2.3",settings:{templates:{viewing:'<a href="#" class="clearing-close">&times;</a><div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" /><p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a><a href="#" class="clearing-main-next"><span></span></a></div>'},close_selectors:".clearing-close",touch_label:"",init:!1,locked:!1},init:function(a,b,c){var d=this;Foundation.inherit(this,"throttle image_loaded"),this.bindings(b,c),d.S(this.scope).is("["+this.attr_name()+"]")?this.assemble(d.S("li",this.scope)):d.S("["+this.attr_name()+"]",this.scope).each(function(){d.assemble(d.S("li",this))})},events:function(d){var e=this,f=e.S,g=a(".scroll-container");g.length>0&&(this.scope=g),f(this.scope).off(".clearing").on("click.fndtn.clearing","ul["+this.attr_name()+"] li",function(a,b,c){var b=b||f(this),c=c||b,d=b.next("li"),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init"),h=f(a.target);a.preventDefault(),g||(e.init(),g=b.closest("["+e.attr_name()+"]").data(e.attr_name(!0)+"-init")),c.hasClass("visible")&&b[0]===c[0]&&d.length>0&&e.is_open(b)&&(c=d,h=f("img",c)),e.open(h,b,c),e.update_paddles(c)}).on("click.fndtn.clearing",".clearing-main-next",function(a){e.nav(a,"next")}).on("click.fndtn.clearing",".clearing-main-prev",function(a){e.nav(a,"prev")}).on("click.fndtn.clearing",this.settings.close_selectors,function(a){Foundation.libs.clearing.close(a,this)}),a(c).on("keydown.fndtn.clearing",function(a){e.keydown(a)}),f(b).off(".clearing").on("resize.fndtn.clearing",function(){e.resize()}),this.swipe_events(d)},swipe_events:function(){var a=this,b=a.S;b(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(a){a.touches||(a=a.originalEvent);var c={start_page_x:a.touches[0].pageX,start_page_y:a.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:d};b(this).data("swipe-transition",c),a.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(c){if(c.touches||(c=c.originalEvent),!(c.touches.length>1||c.scale&&1!==c.scale)){var d=b(this).data("swipe-transition");if("undefined"==typeof d&&(d={}),d.delta_x=c.touches[0].pageX-d.start_page_x,"undefined"==typeof d.is_scrolling&&(d.is_scrolling=!!(d.is_scrolling||Math.abs(d.delta_x)<Math.abs(c.touches[0].pageY-d.start_page_y))),!d.is_scrolling&&!d.active){c.preventDefault();var e=d.delta_x<0?"next":"prev";d.active=!0,a.nav(c,e)}}}).on("touchend.fndtn.clearing",".visible-img",function(a){b(this).data("swipe-transition",{}),a.stopPropagation()})},assemble:function(b){var c=b.parent();if(!c.parent().hasClass("carousel")){c.after('<div id="foundationClearingHolder"></div>');var d=c.detach(),e="";if(null!=d[0]){e=d[0].outerHTML;var f=this.S("#foundationClearingHolder"),g=c.data(this.attr_name(!0)+"-init"),h={grid:'<div class="carousel">'+e+"</div>",viewing:g.templates.viewing},i='<div class="clearing-assembled"><div>'+h.viewing+h.grid+"</div></div>",j=this.settings.touch_label;Modernizr.touch&&(i=a(i).find(".clearing-touch-label").html(j).end()),f.after(i).remove()}}},open:function(b,d,e){function f(){setTimeout(function(){this.image_loaded(m,function(){1!==m.outerWidth()||o?g.call(this,m):f.call(this)}.bind(this))}.bind(this),50)}function g(b){var c=a(b);c.css("visibility","visible"),i.css("overflow","hidden"),j.addClass("clearing-blackout"),k.addClass("clearing-container"),l.show(),this.fix_height(e).caption(h.S(".clearing-caption",l),h.S("img",e)).center_and_label(b,n).shift(d,e,function(){e.siblings().removeClass("visible"),e.addClass("visible")}),l.trigger("opened.fndtn.clearing")}var h=this,i=a(c.body),j=e.closest(".clearing-assembled"),k=h.S("div",j).first(),l=h.S(".visible-img",k),m=h.S("img",l).not(b),n=h.S(".clearing-touch-label",k),o=!1;m.error(function(){o=!0}),this.locked()||(l.trigger("open.fndtn.clearing"),m.attr("src",this.load(b)).css("visibility","hidden"),f.call(this))},close:function(b,d){b.preventDefault();var e,f,g=function(a){return/blackout/.test(a.selector)?a:a.closest(".clearing-blackout")}(a(d)),h=a(c.body);return d===b.target&&g&&(h.css("overflow",""),e=a("div",g).first(),f=a(".visible-img",e),f.trigger("close.fndtn.clearing"),this.settings.prev_index=0,a("ul["+this.attr_name()+"]",g).attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),e.removeClass("clearing-container"),f.hide(),f.trigger("closed.fndtn.clearing")),!1},is_open:function(a){return a.parent().prop("style").length>0},keydown:function(b){var c=a(".clearing-blackout ul["+this.attr_name()+"]"),d=this.rtl?37:39,e=this.rtl?39:37,f=27;b.which===d&&this.go(c,"next"),b.which===e&&this.go(c,"prev"),b.which===f&&this.S("a.clearing-close").trigger("click")},nav:function(b,c){var d=a("ul["+this.attr_name()+"]",".clearing-blackout");b.preventDefault(),this.go(d,c)},resize:function(){var b=a("img",".clearing-blackout .visible-img"),c=a(".clearing-touch-label",".clearing-blackout");b.length&&(this.center_and_label(b,c),b.trigger("resized.fndtn.clearing"))},fix_height:function(a){var b=a.parent().children(),c=this;return b.each(function(){var a=c.S(this),b=a.find("img");a.height()>b.outerHeight()&&a.addClass("fix-height")}).closest("ul").width(100*b.length+"%"),this},update_paddles:function(a){var b=a.closest(".carousel").siblings(".visible-img");a.next().length>0?this.S(".clearing-main-next",b).removeClass("disabled"):this.S(".clearing-main-next",b).addClass("disabled"),a.prev().length>0?this.S(".clearing-main-prev",b).removeClass("disabled"):this.S(".clearing-main-prev",b).addClass("disabled")},center_and_label:function(a,b){return this.rtl?(a.css({marginRight:-(a.outerWidth()/2),marginTop:-(a.outerHeight()/2),left:"auto",right:"50%"}),b.length>0&&b.css({marginRight:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10,left:"auto",right:"50%"})):(a.css({marginLeft:-(a.outerWidth()/2),marginTop:-(a.outerHeight()/2)}),b.length>0&&b.css({marginLeft:-(b.outerWidth()/2),marginTop:-(a.outerHeight()/2)-b.outerHeight()-10})),this},load:function(a){var b;return b="A"===a[0].nodeName?a.attr("href"):a.parent().attr("href"),this.preload(a),b?b:a.attr("src")},preload:function(a){this.img(a.closest("li").next()).img(a.closest("li").prev())},img:function(a){if(a.length){var b=new Image,c=this.S("a",a);b.src=c.length?c.attr("href"):this.S("img",a).attr("src")}return this},caption:function(a,b){var c=b.attr("data-caption");return c?a.html(c).show():a.text("").hide(),this},go:function(a,b){var c=this.S(".visible",a),d=c[b]();d.length&&this.S("img",d).trigger("click",[c,d]).trigger("change.fndtn.clearing")},shift:function(a,b,c){var d,e=b.parent(),f=this.settings.prev_index||b.index(),g=this.direction(e,a,b),h=this.rtl?"right":"left",i=parseInt(e.css("left"),10),j=b.outerWidth(),k={};b.index()===f||/skip/.test(g)?/skip/.test(g)&&(d=b.index()-this.settings.up_count,this.lock(),d>0?(k[h]=-(d*j),e.animate(k,300,this.unlock())):(k[h]=0,e.animate(k,300,this.unlock()))):/left/.test(g)?(this.lock(),k[h]=i+j,e.animate(k,300,this.unlock())):/right/.test(g)&&(this.lock(),k[h]=i-j,e.animate(k,300,this.unlock())),c()},direction:function(a,b,c){var d,e=this.S("li",a),f=e.outerWidth()+e.outerWidth()/4,g=Math.floor(this.S(".clearing-container").outerWidth()/f)-1,h=e.index(c);return this.settings.up_count=g,d=this.adjacent(this.settings.prev_index,h)?h>g&&h>this.settings.prev_index?"right":h>g-1&&h<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=h,d},adjacent:function(a,b){for(var c=b+1;c>=b-1;c--)if(c===a)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},off:function(){this.S(this.scope).off(".fndtn.clearing"),this.S(b).off(".fndtn.clearing")},reflow:function(){this.init()}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"5.2.3",settings:{active_class:"open",align:"bottom",is_hover:!1,opened:function(){},closed:function(){}},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c)},events:function(){var c=this,d=c.S;d(this.scope).off(".dropdown").on("click.fndtn.dropdown","["+this.attr_name()+"]",function(b){var e=d(this).data(c.attr_name(!0)+"-init")||c.settings;(!e.is_hover||Modernizr.touch)&&(b.preventDefault(),c.toggle(a(this)))}).on("mouseenter.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(a){var b,e,f=d(this);clearTimeout(c.timeout),f.data(c.data_attr())?(b=d("#"+f.data(c.data_attr())),e=f):(b=f,e=d("["+c.attr_name()+"='"+b.attr("id")+"']"));var g=e.data(c.attr_name(!0)+"-init")||c.settings;d(a.target).data(c.data_attr())&&g.is_hover&&c.closeall.call(c),g.is_hover&&c.open.apply(c,[b,e])}).on("mouseleave.fndtn.dropdown","["+this.attr_name()+"], ["+this.attr_name()+"-content]",function(){var a=d(this);c.timeout=setTimeout(function(){if(a.data(c.data_attr())){var b=a.data(c.data_attr(!0)+"-init")||c.settings;b.is_hover&&c.close.call(c,d("#"+a.data(c.data_attr())))}else{var e=d("["+c.attr_name()+'="'+d(this).attr("id")+'"]'),b=e.data(c.attr_name(!0)+"-init")||c.settings;b.is_hover&&c.close.call(c,a)}}.bind(this),150)}).on("click.fndtn.dropdown",function(b){var e=d(b.target).closest("["+c.attr_name()+"-content]");if(!d(b.target).data(c.data_attr())&&!d(b.target).parent().data(c.data_attr()))return!d(b.target).data("revealId")&&e.length>0&&(d(b.target).is("["+c.attr_name()+"-content]")||a.contains(e.first()[0],b.target))?void b.stopPropagation():void c.close.call(c,d("["+c.attr_name()+"-content]"))}).on("opened.fndtn.dropdown","["+c.attr_name()+"-content]",function(){c.settings.opened.call(this)}).on("closed.fndtn.dropdown","["+c.attr_name()+"-content]",function(){c.settings.closed.call(this)}),d(b).off(".dropdown").on("resize.fndtn.dropdown",c.throttle(function(){c.resize.call(c)},50)),this.resize()},close:function(a){var b=this;a.each(function(){b.S(this).hasClass(b.settings.active_class)&&(b.S(this).css(Foundation.rtl?"right":"left","-99999px").removeClass(b.settings.active_class).prev("["+b.attr_name()+"]").removeClass(b.settings.active_class).removeData("target"),b.S(this).trigger("closed",[a]))})},closeall:function(){var b=this;a.each(b.S("["+this.attr_name()+"-content]"),function(){b.close.call(b,b.S(this))})},open:function(a,b){this.css(a.addClass(this.settings.active_class),b),a.prev("["+this.attr_name()+"]").addClass(this.settings.active_class),a.data("target",b.get(0)).trigger("opened",[a,b])},data_attr:function(){return this.namespace.length>0?this.namespace+"-"+this.name:this.name},toggle:function(a){var b=this.S("#"+a.data(this.data_attr()));0!==b.length&&(this.close.call(this,this.S("["+this.attr_name()+"-content]").not(b)),b.hasClass(this.settings.active_class)?(this.close.call(this,b),b.data("target")!==a.get(0)&&this.open.call(this,b,a)):this.open.call(this,b,a))},resize:function(){var a=this.S("["+this.attr_name()+"-content].open"),b=this.S("["+this.attr_name()+"='"+a.attr("id")+"']");a.length&&b.length&&this.css(a,b)},css:function(a,b){if(this.clear_idx(),this.small()){var c=this.dirs.bottom.call(a,b);a.attr("style","").removeClass("drop-left drop-right drop-top").css({position:"absolute",width:"95%","max-width":"none",top:c.top}),a.css(Foundation.rtl?"right":"left","2.5%")}else{var d=b.data(this.attr_name(!0)+"-init")||this.settings;this.style(a,b,d)}return a},style:function(b,c,d){var e=a.extend({position:"absolute"},this.dirs[d.align].call(b,c,d));b.attr("style","").css(e)},dirs:{_base:function(a){var b=this.offsetParent(),c=b.offset(),d=a.offset();return d.top-=c.top,d.left-=c.left,d},top:function(a){var b=Foundation.libs.dropdown,c=b.dirs._base.call(this,a),d=a.outerWidth()/2-8;return this.addClass("drop-top"),(a.outerWidth()<this.outerWidth()||b.small())&&b.adjust_pip(d,c),Foundation.rtl?{left:c.left-this.outerWidth()+a.outerWidth(),top:c.top-this.outerHeight()}:{left:c.left,top:c.top-this.outerHeight()}},bottom:function(a){var b=Foundation.libs.dropdown,c=b.dirs._base.call(this,a),d=a.outerWidth()/2-8;return(a.outerWidth()<this.outerWidth()||b.small())&&b.adjust_pip(d,c),b.rtl?{left:c.left-this.outerWidth()+a.outerWidth(),top:c.top+a.outerHeight()}:{left:c.left,top:c.top+a.outerHeight()}},left:function(a){var b=Foundation.libs.dropdown.dirs._base.call(this,a);return this.addClass("drop-left"),{left:b.left-this.outerWidth(),top:b.top}},right:function(a){var b=Foundation.libs.dropdown.dirs._base.call(this,a);return this.addClass("drop-right"),{left:b.left+a.outerWidth(),top:b.top}}},adjust_pip:function(a,b){var c=Foundation.stylesheet;this.small()&&(a+=b.left-8),this.rule_idx=c.cssRules.length;var d=".f-dropdown.open:before",e=".f-dropdown.open:after",f="left: "+a+"px;",g="left: "+(a-1)+"px;";c.insertRule?(c.insertRule([d,"{",f,"}"].join(" "),this.rule_idx),c.insertRule([e,"{",g,"}"].join(" "),this.rule_idx+1)):(c.addRule(d,f,this.rule_idx),c.addRule(e,g,this.rule_idx+1))},clear_idx:function(){var a=Foundation.stylesheet;this.rule_idx&&(a.deleteRule(this.rule_idx),a.deleteRule(this.rule_idx),delete this.rule_idx)},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},off:function(){this.S(this.scope).off(".fndtn.dropdown"),this.S("html, body").off(".fndtn.dropdown"),this.S(b).off(".fndtn.dropdown"),this.S("[data-dropdown-content]").off(".fndtn.dropdown")},reflow:function(){}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs.equalizer={name:"equalizer",version:"5.2.3",settings:{use_tallest:!0,before_height_change:a.noop,after_height_change:a.noop,equalize_on_stack:!1},init:function(a,b,c){Foundation.inherit(this,"image_loaded"),this.bindings(b,c),this.reflow()},events:function(){this.S(b).off(".equalizer").on("resize.fndtn.equalizer",function(){this.reflow()}.bind(this))},equalize:function(b){var c=!1,d=b.find("["+this.attr_name()+"-watch]:visible"),e=b.data(this.attr_name(!0)+"-init");if(0!==d.length){var f=d.first().offset().top;if(e.before_height_change(),b.trigger("before-height-change"),d.height("inherit"),d.each(function(){var b=a(this);b.offset().top!==f&&(c=!0)}),e.equalize_on_stack!==!1||!c){var g=d.map(function(){return a(this).outerHeight(!1)}).get();if(e.use_tallest){var h=Math.max.apply(null,g);d.css("height",h)}else{var i=Math.min.apply(null,g);d.css("height",i)}e.after_height_change(),b.trigger("after-height-change")}}},reflow:function(){var b=this;this.S("["+this.attr_name()+"]",this.scope).each(function(){var c=a(this);b.image_loaded(b.S("img",this),function(){b.equalize(c)})})}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs.interchange={name:"interchange",version:"5.2.3",cache:{},images_loaded:!1,nodes_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen",small:Foundation.media_queries.small,medium:Foundation.media_queries.medium,large:Foundation.media_queries.large,xlarge:Foundation.media_queries.xlarge,xxlarge:Foundation.media_queries.xxlarge,landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(b,c,d){if(/IMG/.test(b[0].nodeName)){var e=b[0].src;if(new RegExp(c,"i").test(e))return;return b[0].src=c,d(b[0].src)}var f=b.data(this.data_attr+"-last-path");if(f!=c)return/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(c)?(a(b).css("background-image","url("+c+")"),b.data("interchange-last-path",c),d(c)):a.get(c,function(a){b.html(a),b.data(this.data_attr+"-last-path",c),d()})}}},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.data_attr=this.set_data_attr(),a.extend(!0,this.settings,c,d),this.bindings(c,d),this.load("images"),this.load("nodes")},get_media_hash:function(){var a="";for(var b in this.settings.named_queries)a+=matchMedia(this.settings.named_queries[b]).matches.toString();return a},events:function(){var c,d=this;return a(b).off(".interchange").on("resize.fndtn.interchange",d.throttle(function(){var a=d.get_media_hash();a!==c&&d.resize(),c=a},50)),this},resize:function(){var b=this.cache;if(!this.images_loaded||!this.nodes_loaded)return void setTimeout(a.proxy(this.resize,this),50);for(var c in b)if(b.hasOwnProperty(c)){var d=this.results(c,b[c]);d&&this.settings.directives[d.scenario[1]].call(this,d.el,d.scenario[0],function(){if(arguments[0]instanceof Array)var a=arguments[0];else var a=Array.prototype.slice.call(arguments,0);d.el.trigger(d.scenario[1],a)
2
+ })}},results:function(a,b){var c=b.length;if(c>0)for(var d=this.S("["+this.add_namespace("data-uuid")+'="'+a+'"]');c--;){var e,f=b[c][2];if(e=matchMedia(this.settings.named_queries.hasOwnProperty(f)?this.settings.named_queries[f]:f),e.matches)return{el:d,scenario:b[c]}}return!1},load:function(a,b){return("undefined"==typeof this["cached_"+a]||b)&&this["update_"+a](),this["cached_"+a]},update_images:function(){var a=this.S("img["+this.data_attr+"]"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cache={},this.cached_images=[],this.images_loaded=0===b;c--;){if(d++,a[c]){var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_images.push(a[c])}d===b&&(this.images_loaded=!0,this.enhance("images"))}return this},update_nodes:function(){var a=this.S("["+this.data_attr+"]").not("img"),b=a.length,c=b,d=0,e=this.data_attr;for(this.cached_nodes=[],this.nodes_loaded=0===b;c--;){d++;var f=a[c].getAttribute(e)||"";f.length>0&&this.cached_nodes.push(a[c]),d===b&&(this.nodes_loaded=!0,this.enhance("nodes"))}return this},enhance:function(c){for(var d=this["cached_"+c].length;d--;)this.object(a(this["cached_"+c][d]));return a(b).trigger("resize")},parse_params:function(a,b,c){return[this.trim(a),this.convert_directive(b),this.trim(c)]},convert_directive:function(a){var b=this.trim(a);return b.length>0?b:"replace"},object:function(a){var b=this.parse_data_attr(a),c=[],d=b.length;if(d>0)for(;d--;){var e=b[d].split(/\((.*?)(\))$/);if(e.length>1){var f=e[0].split(/\, /),g=this.parse_params(f[0],f[1],e[1]);c.push(g)}}return this.store(a,c)},store:function(a,b){var c=this.random_str(),d=a.data(this.add_namespace("uuid",!0));return this.cache[d]?this.cache[d]:(a.attr(this.add_namespace("data-uuid"),c),this.cache[c]=b)},trim:function(b){return"string"==typeof b?a.trim(b):b},set_data_attr:function(a){return a?this.namespace.length>0?this.namespace+"-"+this.settings.load_attr:this.settings.load_attr:this.namespace.length>0?"data-"+this.namespace+"-"+this.settings.load_attr:"data-"+this.settings.load_attr},parse_data_attr:function(a){for(var b=a.attr(this.attr_name()).split(/\[(.*?)\]/),c=b.length,d=[];c--;)b[c].replace(/[\W\d]+/,"").length>4&&d.push(b[c]);return d},reflow:function(){this.load("images",!0),this.load("nodes",!0)}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.joyride={name:"joyride",version:"5.2.3",defaults:{expose:!1,modal:!0,tip_location:"bottom",nub_position:"auto",scroll_speed:1500,scroll_animation:"linear",timer:0,start_timer_on_click:!0,start_offset:0,next_button:!0,tip_animation:"fade",pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:!1,cookie_name:"joyride",cookie_domain:!1,cookie_expires:365,tip_container:"body",abort_on_close:!0,tip_location_patterns:{top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'<a href="#close" class="joyride-close-tip">&times;</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',tip:'<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',wrapper:'<div class="joyride-content-wrapper"></div>',button:'<a href="#" class="small button joyride-next-tip"></a>',modal:'<div class="joyride-modal-bg"></div>',expose:'<div class="joyride-expose-wrapper"></div>',expose_cover:'<div class="joyride-expose-cover"></div>'},expose_add_class:""},init:function(b,c,d){Foundation.inherit(this,"throttle random_str"),this.settings=this.settings||a.extend({},this.defaults,d||c),this.bindings(c,d)},events:function(){var c=this;a(this.scope).off(".joyride").on("click.fndtn.joyride",".joyride-next-tip, .joyride-modal-bg",function(a){a.preventDefault(),this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())}.bind(this)).on("click.fndtn.joyride",".joyride-close-tip",function(a){a.preventDefault(),this.end(this.settings.abort_on_close)}.bind(this)),a(b).off(".joyride").on("resize.fndtn.joyride",c.throttle(function(){if(a("["+c.attr_name()+"]").length>0&&c.settings.$next_tip){if(c.settings.exposed.length>0){var b=a(c.settings.exposed);b.each(function(){var b=a(this);c.un_expose(b),c.expose(b)})}c.is_phone()?c.pos_phone():c.pos_default(!1)}},100))},start:function(){var b=this,c=a("["+this.attr_name()+"]",this.scope),d=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],e=d.length;!c.length>0||(this.settings.init||this.events(),this.settings=c.data(this.attr_name(!0)+"-init"),this.settings.$content_el=c,this.settings.$body=a(this.settings.tip_container),this.settings.body_offset=a(this.settings.tip_container).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,"function"!=typeof a.cookie&&(this.settings.cookie_monster=!1),(!this.settings.cookie_monster||this.settings.cookie_monster&&!a.cookie(this.settings.cookie_name))&&(this.settings.$tip_content.each(function(c){var f=a(this);this.settings=a.extend({},b.defaults,b.data_options(f));for(var g=e;g--;)b.settings[d[g]]=parseInt(b.settings[d[g]],10);b.create({$li:f,index:c})}),!this.settings.start_timer_on_click&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")))},resume:function(){this.set_li(),this.show()},tip_template:function(b){var c,d;return b.tip_class=b.tip_class||"",c=a(this.settings.template.tip).addClass(b.tip_class),d=a.trim(a(b.li).html())+this.button_text(b.button_text)+this.settings.template.link+this.timer_instance(b.index),c.append(a(this.settings.template.wrapper)),c.first().attr(this.add_namespace("data-index"),b.index),a(".joyride-content-wrapper",c).append(d),c[0]},timer_instance:function(b){var c;return c=0===b&&this.settings.start_timer_on_click&&this.settings.timer>0||0===this.settings.timer?"":a(this.settings.template.timer)[0].outerHTML},button_text:function(b){return this.settings.next_button?(b=a.trim(b)||"Next",b=a(this.settings.template.button).append(b)[0].outerHTML):b="",b},create:function(b){var c=b.$li.attr(this.add_namespace("data-button"))||b.$li.attr(this.add_namespace("data-text")),d=b.$li.attr("class"),e=a(this.tip_template({tip_class:d,index:b.index,button_text:c,li:b.$li}));a(this.settings.tip_container).append(e)},show:function(b){var c=null;this.settings.$li===d||-1===a.inArray(this.settings.$li.index(),this.settings.pause_after)?(this.settings.paused?this.settings.paused=!1:this.set_li(b),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0?(b&&(this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tip_settings=a.extend({},this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location],/body/i.test(this.settings.$target.selector)||this.scroll_to(),this.is_phone()?this.pos_phone(!0):this.pos_default(!0),c=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tip_animation)?(c.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),setTimeout(function(){c.animate({width:c.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tip_animation)&&(c.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show(),setTimeout(function(){c.animate({width:c.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tip_animation_fade_speed)):this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed)),this.settings.$current_tip=this.settings.$next_tip):this.settings.$li&&this.settings.$target.length<1?this.show():this.end()):this.settings.paused=!0},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||a(".joyride-modal-bg").hide(),this.settings.$current_tip.css("visibility","hidden"),setTimeout(a.proxy(function(){this.hide(),this.css("visibility","visible")},this.settings.$current_tip),0),this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(a){a?(this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(this.settings.$li=this.settings.$li.next(),this.set_next_tip()),this.set_target()},set_next_tip:function(){this.settings.$next_tip=a(".joyride-tip-guide").eq(this.settings.$li.index()),this.settings.$next_tip.data("closed","")},set_target:function(){var b=this.settings.$li.attr(this.add_namespace("data-class")),d=this.settings.$li.attr(this.add_namespace("data-id")),e=function(){return d?a(c.getElementById(d)):b?a("."+b).first():a("body")};this.settings.$target=e()},scroll_to:function(){var c,d;c=a(b).height()/2,d=Math.ceil(this.settings.$target.offset().top-c+this.settings.$next_tip.outerHeight()),0!=d&&a("html, body").stop().animate({scrollTop:d},this.settings.scroll_speed,"swing")},paused:function(){return-1===a.inArray(this.settings.$li.index()+1,this.settings.pause_after)},restart:function(){this.hide(),this.settings.$li=d,this.show("init")},pos_default:function(a){var b=this.settings.$next_tip.find(".joyride-nub"),c=Math.ceil(b.outerWidth()/2),d=Math.ceil(b.outerHeight()/2),e=a||!1;e&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(b):(this.bottom()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight(),left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top+d+this.settings.$target.outerHeight(),left:this.settings.$target.offset().left}),this.nub_position(b,this.settings.tip_settings.nub_position,"top")):this.top()?(this.settings.$next_tip.css(this.rtl?{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d,left:this.settings.$target.offset().left+this.settings.$target.outerWidth()-this.settings.$next_tip.outerWidth()}:{top:this.settings.$target.offset().top-this.settings.$next_tip.outerHeight()-d,left:this.settings.$target.offset().left}),this.nub_position(b,this.settings.tip_settings.nub_position,"bottom")):this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.settings.$target.outerWidth()+this.settings.$target.offset().left+c}),this.nub_position(b,this.settings.tip_settings.nub_position,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.settings.$target.offset().left-this.settings.$next_tip.outerWidth()-c}),this.nub_position(b,this.settings.tip_settings.nub_position,"right")),!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tip_settings.tip_location_pattern.length&&(b.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tip_settings.tip_location=this.settings.tip_settings.tip_location_pattern[this.settings.attempts],this.settings.attempts++,this.pos_default())),e&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(b){var c=this.settings.$next_tip.outerHeight(),d=(this.settings.$next_tip.offset(),this.settings.$target.outerHeight()),e=a(".joyride-nub",this.settings.$next_tip),f=Math.ceil(e.outerHeight()/2),g=b||!1;e.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),g&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),/body/i.test(this.settings.$target.selector)?this.settings.$li.length&&this.pos_modal(e):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-c-f}),e.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+d+f}),e.addClass("top")),g&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(a){this.center(),a.hide(),this.show_modal()},show_modal:function(){if(!this.settings.$next_tip.data("closed")){var b=a(".joyride-modal-bg");b.length<1&&a("body").append(this.settings.template.modal).show(),/pop/i.test(this.settings.tip_animation)?b.show():b.fadeIn(this.settings.tip_animation_fade_speed)}},expose:function(){var c,d,e,f,g,h="expose-"+this.random_str(6);if(arguments.length>0&&arguments[0]instanceof a)e=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;e=this.settings.$target}return e.length<1?(b.console&&console.error("element not valid",e),!1):(c=a(this.settings.template.expose),this.settings.$body.append(c),c.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),d=a(this.settings.template.expose_cover),f={zIndex:e.css("z-index"),position:e.css("position")},g=null==e.attr("class")?"":e.attr("class"),e.css("z-index",parseInt(c.css("z-index"))+1),"static"==f.position&&e.css("position","relative"),e.data("expose-css",f),e.data("orig-class",g),e.attr("class",g+" "+this.settings.expose_add_class),d.css({top:e.offset().top,left:e.offset().left,width:e.outerWidth(!0),height:e.outerHeight(!0)}),this.settings.modal&&this.show_modal(),this.settings.$body.append(d),c.addClass(h),d.addClass(h),e.data("expose",h),this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,e),void this.add_exposed(e))},un_expose:function(){var c,d,e,f,g,h=!1;if(arguments.length>0&&arguments[0]instanceof a)d=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;d=this.settings.$target}return d.length<1?(b.console&&console.error("element not valid",d),!1):(c=d.data("expose"),e=a("."+c),arguments.length>1&&(h=arguments[1]),h===!0?a(".joyride-expose-wrapper,.joyride-expose-cover").remove():e.remove(),f=d.data("expose-css"),"auto"==f.zIndex?d.css("z-index",""):d.css("z-index",f.zIndex),f.position!=d.css("position")&&("static"==f.position?d.css("position",""):d.css("position",f.position)),g=d.data("orig-class"),d.attr("class",g),d.removeData("orig-classes"),d.removeData("expose"),d.removeData("expose-z-index"),void this.remove_exposed(d))},add_exposed:function(b){this.settings.exposed=this.settings.exposed||[],b instanceof a||"object"==typeof b?this.settings.exposed.push(b[0]):"string"==typeof b&&this.settings.exposed.push(b)},remove_exposed:function(b){var c,d;for(b instanceof a?c=b[0]:"string"==typeof b&&(c=b),this.settings.exposed=this.settings.exposed||[],d=this.settings.exposed.length;d--;)if(this.settings.exposed[d]==c)return void this.settings.exposed.splice(d,1)},center:function(){var c=a(b);return this.settings.$next_tip.css({top:(c.height()-this.settings.$next_tip.outerHeight())/2+c.scrollTop(),left:(c.width()-this.settings.$next_tip.outerWidth())/2+c.scrollLeft()}),!0},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location)},top:function(){return/top/i.test(this.settings.tip_settings.tip_location)},right:function(){return/right/i.test(this.settings.tip_settings.tip_location)},left:function(){return/left/i.test(this.settings.tip_settings.tip_location)},corners:function(c){var d=a(b),e=d.height()/2,f=Math.ceil(this.settings.$target.offset().top-e+this.settings.$next_tip.outerHeight()),g=d.width()+d.scrollLeft(),h=d.height()+f,i=d.height()+d.scrollTop(),j=d.scrollTop();return j>f&&(j=0>f?0:f),h>i&&(i=h),[c.offset().top<j,g<c.offset().left+c.outerWidth(),i<c.offset().top+c.outerHeight(),d.scrollLeft()>c.offset().left]},visible:function(a){for(var b=a.length;b--;)if(a[b])return!1;return!0},nub_position:function(a,b,c){a.addClass("auto"===b?c:b)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide(),this.show(),this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(b){this.settings.cookie_monster&&a.cookie(this.settings.cookie_name,"ridden",{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.$next_tip.data("closed",!0),a(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),("undefined"==typeof b||b===!1)&&(this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip),this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip)),a(".joyride-tip-guide").remove()},off:function(){a(this.scope).off(".joyride"),a(b).off(".joyride"),a(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),a(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs["magellan-expedition"]={name:"magellan-expedition",version:"5.2.3",settings:{active_class:"active",threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c)},events:function(){var c=this,d=c.S,e=c.settings;c.set_expedition_position(),d(c.scope).off(".magellan").on("click.fndtn.magellan","["+c.add_namespace("data-magellan-arrival")+'] a[href^="#"]',function(b){b.preventDefault();var d=a(this).closest("["+c.attr_name()+"]"),e=(d.data("magellan-expedition-init"),this.hash.split("#").join("")),f=a("a[name='"+e+"']");0===f.length&&(f=a("#"+e));var g=f.offset().top;g-=d.outerHeight(),a("html, body").stop().animate({scrollTop:g},700,"swing",function(){history.pushState?history.pushState(null,null,"#"+e):location.hash="#"+e})}).on("scroll.fndtn.magellan",c.throttle(this.check_for_arrivals.bind(this),e.throttle_delay)),a(b).on("resize.fndtn.magellan",c.throttle(this.set_expedition_position.bind(this),e.throttle_delay))},check_for_arrivals:function(){var a=this;a.update_arrivals(),a.update_expedition_positions()},set_expedition_position:function(){var b=this;a("["+this.attr_name()+"=fixed]",b.scope).each(function(){var c,d=a(this),e=d.attr("styles");d.attr("style",""),c=d.offset().top+b.settings.threshold,d.data(b.data_attr("magellan-top-offset"),c),d.attr("style",e)})},update_expedition_positions:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"=fixed]",c.scope).each(function(){var b=a(this),e=b.data("magellan-top-offset");if(d>=e){var f=b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]");0===f.length&&(f=b.clone(),f.removeAttr(c.attr_name()),f.attr(c.add_namespace("data-magellan-expedition-clone"),""),b.before(f)),b.css({position:"fixed",top:c.settings.fixed_top})}else b.prev("["+c.add_namespace("data-magellan-expedition-clone")+"]").remove(),b.attr("style","").removeClass("fixed")})},update_arrivals:function(){var c=this,d=a(b).scrollTop();a("["+this.attr_name()+"]",c.scope).each(function(){var b=a(this),e=b.data(c.attr_name(!0)+"-init"),f=c.offsets(b,d),g=b.find("["+c.add_namespace("data-magellan-arrival")+"]"),h=!1;f.each(function(a,d){if(d.viewport_offset>=d.top_offset){var f=b.find("["+c.add_namespace("data-magellan-arrival")+"]");return f.not(d.arrival).removeClass(e.active_class),d.arrival.addClass(e.active_class),h=!0,!0}}),h||g.removeClass(e.active_class)})},offsets:function(b,c){var d=this,e=b.data(d.attr_name(!0)+"-init"),f=c;return b.find("["+d.add_namespace("data-magellan-arrival")+"]").map(function(){var c=a(this).data(d.data_attr("magellan-arrival")),g=a("["+d.add_namespace("data-magellan-destination")+"="+c+"]");if(g.length>0){var h=g.offset().top-e.destination_threshold-b.outerHeight();return{destination:g,arrival:a(this),top_offset:h,viewport_offset:f}}}).sort(function(a,b){return a.top_offset<b.top_offset?-1:a.top_offset>b.top_offset?1:0})},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){this.S(this.scope).off(".magellan"),this.S(b).off(".magellan")},reflow:function(){var b=this;a("["+b.add_namespace("data-magellan-expedition-clone")+"]",b.scope).remove()}}}(jQuery,window,window.document),function(){"use strict";Foundation.libs.offcanvas={name:"offcanvas",version:"5.2.3",settings:{open_method:"move",close_on_click:!0},init:function(a,b,c){this.bindings(b,c)},events:function(){var a=this,b=a.S,c="",d="",e="";"move"===this.settings.open_method?(c="move-",d="right",e="left"):"overlap"===this.settings.open_method&&(c="offcanvas-overlap"),b(this.scope).off(".offcanvas").on("click.fndtn.offcanvas",".left-off-canvas-toggle",function(b){a.click_toggle_class(b,c+d)}).on("click.fndtn.offcanvas",".left-off-canvas-menu a",function(b){var e=a.get_settings(b);e.close_on_click&&a.hide.call(a,c+d,a.get_wrapper(b))}).on("click.fndtn.offcanvas",".right-off-canvas-toggle",function(b){a.click_toggle_class(b,c+e)}).on("click.fndtn.offcanvas",".right-off-canvas-menu a",function(b){var d=a.get_settings(b);d.close_on_click&&a.hide.call(a,c+e,a.get_wrapper(b))}).on("click.fndtn.offcanvas",".exit-off-canvas",function(b){a.click_remove_class(b,c+e),d&&a.click_remove_class(b,c+d)})},toggle:function(a,b){b=b||this.get_wrapper(),b.is("."+a)?this.hide(a,b):this.show(a,b)},show:function(a,b){b=b||this.get_wrapper(),b.trigger("open"),b.addClass(a)},hide:function(a,b){b=b||this.get_wrapper(),b.trigger("close"),b.removeClass(a)},click_toggle_class:function(a,b){a.preventDefault();var c=this.get_wrapper(a);this.toggle(b,c)},click_remove_class:function(a,b){a.preventDefault();var c=this.get_wrapper(a);this.hide(b,c)},get_settings:function(a){var b=this.S(a.target).closest("["+this.attr_name()+"]");return b.data(this.attr_name(!0)+"-init")||this.settings},get_wrapper:function(a){var b=this.S(a?a.target:this.scope).closest(".off-canvas-wrap");return 0===b.length&&(b=this.S(".off-canvas-wrap")),b},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c){"use strict";var d=function(){},e=function(d,e){if(d.hasClass(e.slides_container_class))return this;var h,i,j,k,l,m=this,n=d,o=0,p=n.find("."+e.active_slide_class).length>0;m.cache={},m.slides=function(){return n.children(e.slide_selector)},p||m.slides().first().addClass(e.active_slide_class),m.update_slide_number=function(b){e.slide_number&&(i.find("span:first").text(parseInt(b)+1),i.find("span:last").text(m.slides().length)),e.bullets&&(j.children().removeClass(e.bullets_active_class),a(j.children().get(b)).addClass(e.bullets_active_class))},m.update_active_link=function(b){var c=a('[data-orbit-link="'+m.slides().eq(b).attr("data-orbit-slide")+'"]');c.siblings().removeClass(e.bullets_active_class),c.addClass(e.bullets_active_class)},m.build_markup=function(){n.wrap('<div class="'+e.container_class+'"></div>'),h=n.parent(),n.addClass(e.slides_container_class),n.addClass(e.animation),e.stack_on_small&&h.addClass(e.stack_on_small_class),e.navigation_arrows&&(h.append(a('<a href="#"><span></span></a>').addClass(e.prev_class)),h.append(a('<a href="#"><span></span></a>').addClass(e.next_class))),e.timer&&(k=a("<div>").addClass(e.timer_container_class),k.append("<span>"),e.timer_show_progress_bar&&k.append(a("<div>").addClass(e.timer_progress_class)),k.addClass(e.timer_paused_class),h.append(k)),e.slide_number&&(i=a("<div>").addClass(e.slide_number_class),i.append("<span></span> "+e.slide_number_text+" <span></span>"),h.append(i)),e.bullets&&(j=a("<ol>").addClass(e.bullets_container_class),h.append(j),j.wrap('<div class="orbit-bullets-container"></div>'),m.slides().each(function(b){var c=a("<li>").attr("data-orbit-slide",b).on("click",m.link_bullet);j.append(c)}))},m._prepare_direction=function(b){var c="next";o>=b&&(c="prev"),"slide"===e.animation&&setTimeout(function(){n.removeClass("swipe-prev swipe-next"),"next"===c?n.addClass("swipe-next"):"prev"===c&&n.addClass("swipe-prev")},0);var d=m.slides();if(b>=d.length){if(!e.circular)return!1;b=0}else if(0>b){if(!e.circular)return!1;b=d.length-1}var f=a(d.get(o)),g=a(d.get(b));return[c,f,g,b]},m._goto=function(a,b){if(null===a)return!1;if(m.cache.animating)return!1;if(a===o)return!1;"object"==typeof m.cache.timer&&m.cache.timer.restart();var c=m.slides();m.cache.animating=!0;var d=m._prepare_direction(a),f=d[0],g=d[1],h=d[2],a=d[3];if(d===!1)return!1;n.trigger("before-slide-change.fndtn.orbit"),e.before_slide_change(),o=a,g.css("transitionDuration",e.animation_speed+"ms"),h.css("transitionDuration",e.animation_speed+"ms");var i=function(){var d=function(){b===!0&&m.cache.timer.restart(),m.update_slide_number(o),h.removeClass("animate-in"),h.addClass(e.active_slide_class),m.update_active_link(a),n.trigger("after-slide-change.fndtn.orbit",[{slide_number:o,total_slides:c.length}]),e.after_slide_change(o,c.length),setTimeout(function(){m.cache.animating=!1},100)};n.height()!=h.height()&&e.variable_height?n.animate({"min-height":h.height()},250,"linear",d):d()};if(1===c.length)return i(),!1;var j=function(){"next"===f&&l.next(g,h,i),"prev"===f&&l.prev(g,h,i)};h.height()>n.height()&&e.variable_height?n.animate({"min-height":h.height()},250,"linear",j):j()},m.next=function(a){a.stopImmediatePropagation(),a.preventDefault(),m._prepare_direction(o+1),setTimeout(function(){m._goto(o+1)},100)},m.prev=function(a){a.stopImmediatePropagation(),a.preventDefault(),m._prepare_direction(o-1),setTimeout(function(){m._goto(o-1)},100)},m.link_custom=function(b){b.preventDefault();var c=a(this).attr("data-orbit-link");if("string"==typeof c&&""!=(c=a.trim(c))){var d=h.find("[data-orbit-slide="+c+"]");-1!=d.index()&&setTimeout(function(){m._goto(d.index())},100)}},m.link_bullet=function(){var b=a(this).attr("data-orbit-slide");if("string"==typeof b&&""!=(b=a.trim(b)))if(isNaN(parseInt(b))){var c=h.find("[data-orbit-slide="+b+"]");-1!=c.index()&&(b=c.index()+1,m._prepare_direction(b),setTimeout(function(){m._goto(b)},100))}else b=parseInt(b),m._prepare_direction(b),setTimeout(function(){m._goto(b)},100)},m.timer_callback=function(){m._goto(o+1,!0)},m.compute_dimensions=function(){var b=a(m.slides().get(o)),c=b.height();e.variable_height||m.slides().each(function(){a(this).height()>c&&(c=a(this).height())}),n.css("minHeight",String(c)+"px")},m.create_timer=function(){var a=new f(h.find("."+e.timer_container_class),e,m.timer_callback);return a},m.stop_timer=function(){"object"==typeof m.cache.timer&&m.cache.timer.stop()},m.toggle_timer=function(){var a=h.find("."+e.timer_container_class);a.hasClass(e.timer_paused_class)?("undefined"==typeof m.cache.timer&&(m.cache.timer=m.create_timer()),m.cache.timer.start()):"object"==typeof m.cache.timer&&m.cache.timer.stop()},m.init=function(){if(m.build_markup(),e.timer&&(m.cache.timer=m.create_timer(),Foundation.utils.image_loaded(this.slides().find("img"),m.cache.timer.start)),l=new g(e,n),p){var d=n.find("."+e.active_slide_class),f=e.animation_speed;e.animation_speed=1,d.removeClass("active"),m._goto(d.index()),e.animation_speed=f}h.on("click","."+e.next_class,m.next),h.on("click","."+e.prev_class,m.prev),e.next_on_click&&h.on("click","."+e.slides_container_class+" [data-orbit-slide]",m.link_bullet),h.on("click",m.toggle_timer),e.swipe&&n.on("touchstart.fndtn.orbit",function(a){m.cache.animating||(a.touches||(a=a.originalEvent),a.preventDefault(),a.stopPropagation(),m.cache.start_page_x=a.touches[0].pageX,m.cache.start_page_y=a.touches[0].pageY,m.cache.start_time=(new Date).getTime(),m.cache.delta_x=0,m.cache.is_scrolling=null,m.cache.direction=null,m.stop_timer())}).on("touchmove.fndtn.orbit",function(a){Math.abs(m.cache.delta_x)>5&&(a.preventDefault(),a.stopPropagation()),m.cache.animating||requestAnimationFrame(function(){if(a.touches||(a=a.originalEvent),!(a.touches.length>1||a.scale&&1!==a.scale||(m.cache.delta_x=a.touches[0].pageX-m.cache.start_page_x,null===m.cache.is_scrolling&&(m.cache.is_scrolling=!!(m.cache.is_scrolling||Math.abs(m.cache.delta_x)<Math.abs(a.touches[0].pageY-m.cache.start_page_y))),m.cache.is_scrolling))){var b=m.cache.delta_x<0?o+1:o-1;if(m.cache.direction!==b){var c=m._prepare_direction(b);m.cache.direction=b,m.cache.dir=c[0],m.cache.current=c[1],m.cache.next=c[2]}if("slide"===e.animation){var d,f;d=m.cache.delta_x/h.width()*100,f=d>=0?-(100-d):100+d,m.cache.current.css("transform","translate3d("+d+"%,0,0)"),m.cache.next.css("transform","translate3d("+f+"%,0,0)")}}})}).on("touchend.fndtn.orbit",function(a){m.cache.animating||(a.preventDefault(),a.stopPropagation(),setTimeout(function(){m._goto(m.cache.direction)},50))}),h.on("mouseenter.fndtn.orbit",function(){e.timer&&e.pause_on_hover&&m.stop_timer()}).on("mouseleave.fndtn.orbit",function(){e.timer&&e.resume_on_mouseout&&m.cache.timer.start()}),a(c).on("click","[data-orbit-link]",m.link_custom),a(b).on("load resize",m.compute_dimensions);var i=this.slides().find("img");Foundation.utils.image_loaded(i,m.compute_dimensions),Foundation.utils.image_loaded(i,function(){h.prev("."+e.preloader_class).css("display","none"),m.update_slide_number(o),m.update_active_link(o),n.trigger("ready.fndtn.orbit")})},m.init()},f=function(a,b,c){var d,e,f=this,g=b.timer_speed,h=a.find("."+b.timer_progress_class),i=h&&"none"!=h.css("display"),j=-1;this.update_progress=function(a){var b=h.clone();b.attr("style",""),b.css("width",a+"%"),h.replaceWith(b),h=b},this.restart=function(){clearTimeout(e),a.addClass(b.timer_paused_class),j=-1,i&&f.update_progress(0),f.start()},this.start=function(){return a.hasClass(b.timer_paused_class)?(j=-1===j?g:j,a.removeClass(b.timer_paused_class),i&&(d=(new Date).getTime(),h.animate({width:"100%"},j,"linear")),e=setTimeout(function(){f.restart(),c()},j),void a.trigger("timer-started.fndtn.orbit")):!0},this.stop=function(){if(a.hasClass(b.timer_paused_class))return!0;if(clearTimeout(e),a.addClass(b.timer_paused_class),i){var c=(new Date).getTime();j-=c-d;var h=100-j/g*100;f.update_progress(h)}a.trigger("timer-stopped.fndtn.orbit")}},g=function(a,b){var c="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";this.next=function(d,e,f){Modernizr.csstransitions?e.on(c,function(){e.unbind(c),d.removeClass("active animate-out"),b.children().css({transform:"","-ms-transform":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-transition-duration":"","transition-duration":""}),f()}):setTimeout(function(){d.removeClass("active animate-out"),b.children().css({transform:"","-ms-transform":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-transition-duration":"","transition-duration":""}),f()},a.animation_speed),b.children().css({transform:"","-ms-transform":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-transition-duration":"","transition-duration":""}),d.addClass("animate-out"),e.addClass("animate-in")},this.prev=function(d,e,f){Modernizr.csstransitions?e.on(c,function(){e.unbind(c),d.removeClass("active animate-out"),b.children().css({transform:"","-ms-transform":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-transition-duration":"","transition-duration":""}),f()}):setTimeout(function(){d.removeClass("active animate-out"),b.children().css({transform:"","-ms-transform":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-transition-duration":"","transition-duration":""}),f()},a.animation_speed),b.children().css({transform:"","-ms-transform":"","-webkit-transition-duration":"","-moz-transition-duration":"","-o-transition-duration":"","transition-duration":""}),d.addClass("animate-out"),e.addClass("animate-in")
3
+ }};Foundation.libs=Foundation.libs||{},Foundation.libs.orbit={name:"orbit",version:"5.2.3",settings:{animation:"slide",timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,next_on_click:!0,animation_speed:500,stack_on_small:!1,navigation_arrows:!0,slide_number:!0,slide_number_text:"of",container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",timer_show_progress_bar:!0,slides_container_class:"orbit-slides-container",preloader_class:"preloader",slide_selector:"*",bullets_container_class:"orbit-bullets",bullets_active_class:"active",slide_number_class:"orbit-slide-number",caption_class:"orbit-caption",active_slide_class:"active",orbit_transition_class:"orbit-transitioning",bullets:!0,circular:!0,timer:!0,variable_height:!1,swipe:!0,before_slide_change:d,after_slide_change:d},init:function(a,b,c){this.bindings(b,c)},events:function(a){var b=this,c=new e(this.S(a),this.S(a).data("orbit-init"));this.S(a).data(b.name+"-instance",c)},reflow:function(){var a=this;if(a.S(a.scope).is("[data-orbit]")){var b=a.S(a.scope),c=b.data(a.name+"-instance");c.compute_dimensions()}else a.S("[data-orbit]",a.scope).each(function(b,c){var d=a.S(c),e=(a.data_options(d),d.data(a.name+"-instance"));e.compute_dimensions()})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";function e(a){var b=/fade/i.test(a),c=/pop/i.test(a);return{animate:b||c,pop:c,fade:b}}Foundation.libs.reveal={name:"reveal",version:"5.2.3",locked:!1,settings:{animation:"fadeAndPop",animation_speed:250,close_on_background_click:!0,close_on_esc:!0,dismiss_modal_class:"close-reveal-modal",bg_class:"reveal-modal-bg",open:function(){},opened:function(){},close:function(){},closed:function(){},bg:a(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(b,c,d){a.extend(!0,this.settings,c,d),this.bindings(c,d)},events:function(){var a=this,b=a.S;return b(this.scope).off(".reveal").on("click.fndtn.reveal","["+this.add_namespace("data-reveal-id")+"]",function(c){if(c.preventDefault(),!a.locked){var d=b(this),e=d.data(a.data_attr("reveal-ajax"));if(a.locked=!0,"undefined"==typeof e)a.open.call(a,d);else{var f=e===!0?d.attr("href"):e;a.open.call(a,d,{url:f})}}}),b(c).on("touchend.fndtn.reveal click.fndtn.reveal",this.close_targets(),function(c){if(c.preventDefault(),!a.locked){var d=b("["+a.attr_name()+"].open").data(a.attr_name(!0)+"-init"),e=b(c.target)[0]===b("."+d.bg_class)[0];if(e){if(!d.close_on_background_click)return;c.stopPropagation()}a.locked=!0,a.close.call(a,e?b("["+a.attr_name()+"].open"):b(this).closest("["+a.attr_name()+"]"))}}),b("["+a.attr_name()+"]",this.scope).length>0?b(this.scope).on("open.fndtn.reveal",this.settings.open).on("opened.fndtn.reveal",this.settings.opened).on("opened.fndtn.reveal",this.open_video).on("close.fndtn.reveal",this.settings.close).on("closed.fndtn.reveal",this.settings.closed).on("closed.fndtn.reveal",this.close_video):b(this.scope).on("open.fndtn.reveal","["+a.attr_name()+"]",this.settings.open).on("opened.fndtn.reveal","["+a.attr_name()+"]",this.settings.opened).on("opened.fndtn.reveal","["+a.attr_name()+"]",this.open_video).on("close.fndtn.reveal","["+a.attr_name()+"]",this.settings.close).on("closed.fndtn.reveal","["+a.attr_name()+"]",this.settings.closed).on("closed.fndtn.reveal","["+a.attr_name()+"]",this.close_video),!0},key_up_on:function(){var a=this;return a.S("body").off("keyup.fndtn.reveal").on("keyup.fndtn.reveal",function(b){var c=a.S("["+a.attr_name()+"].open"),d=c.data(a.attr_name(!0)+"-init");d&&27===b.which&&d.close_on_esc&&!a.locked&&a.close.call(a,c)}),!0},key_up_off:function(){return this.S("body").off("keyup.fndtn.reveal"),!0},open:function(b,c){var d,e=this;b?"undefined"!=typeof b.selector?d=e.S("#"+b.data(e.data_attr("reveal-id"))).first():(d=e.S(this.scope),c=b):d=e.S(this.scope);var f=d.data(e.attr_name(!0)+"-init");if(f=f||this.settings,!d.hasClass("open")){var g=e.S("["+e.attr_name()+"].open");if("undefined"==typeof d.data("css-top")&&d.data("css-top",parseInt(d.css("top"),10)).data("offset",this.cache_offset(d)),this.key_up_on(d),d.trigger("open"),g.length<1&&this.toggle_bg(d,!0),"string"==typeof c&&(c={url:c}),"undefined"!=typeof c&&c.url){var h="undefined"!=typeof c.success?c.success:null;a.extend(c,{success:function(b,c,i){a.isFunction(h)&&h(b,c,i),d.html(b),e.S(d).foundation("section","reflow"),e.S(d).children().foundation(),g.length>0&&e.hide(g,f.css.close),e.show(d,f.css.open)}}),a.ajax(c)}else g.length>0&&this.hide(g,f.css.close),this.show(d,f.css.open)}},close:function(a){var a=a&&a.length?a:this.S(this.scope),b=this.S("["+this.attr_name()+"].open"),c=a.data(this.attr_name(!0)+"-init")||this.settings;b.length>0&&(this.locked=!0,this.key_up_off(a),a.trigger("close"),this.toggle_bg(a,!1),this.hide(b,c.css.close,c))},close_targets:function(){var a="."+this.settings.dismiss_modal_class;return this.settings.close_on_background_click?a+", ."+this.settings.bg_class:a},toggle_bg:function(b,c){0===this.S("."+this.settings.bg_class).length&&(this.settings.bg=a("<div />",{"class":this.settings.bg_class}).appendTo("body").hide());var e=this.settings.bg.filter(":visible").length>0;c!=e&&((c==d?e:!c)?this.hide(this.settings.bg):this.show(this.settings.bg))},show:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init");if(f=f||this.settings,0===c.parent("body").length){var g=c.wrap('<div style="display: none;" />').parent(),h=this.settings.rootElement||"body";c.on("closed.fndtn.reveal.wrapped",function(){c.detach().appendTo(g),c.unwrap().unbind("closed.fndtn.reveal.wrapped")}),c.detach().appendTo(h)}var i=e(f.animation);if(i.animate||(this.locked=!1),i.pop){d.top=a(b).scrollTop()-c.data("offset")+"px";var j={top:a(b).scrollTop()+c.data("css-top")+"px",opacity:1};return setTimeout(function(){return c.css(d).animate(j,f.animation_speed,"linear",function(){this.locked=!1,c.trigger("opened")}.bind(this)).addClass("open")}.bind(this),f.animation_speed/2)}if(i.fade){d.top=a(b).scrollTop()+c.data("css-top")+"px";var j={opacity:1};return setTimeout(function(){return c.css(d).animate(j,f.animation_speed,"linear",function(){this.locked=!1,c.trigger("opened")}.bind(this)).addClass("open")}.bind(this),f.animation_speed/2)}return c.css(d).show().css({opacity:1}).addClass("open").trigger("opened")}var f=this.settings;return e(f.animation).fade?c.fadeIn(f.animation_speed/2):(this.locked=!1,c.show())},hide:function(c,d){if(d){var f=c.data(this.attr_name(!0)+"-init");f=f||this.settings;var g=e(f.animation);if(g.animate||(this.locked=!1),g.pop){var h={top:-a(b).scrollTop()-c.data("offset")+"px",opacity:0};return setTimeout(function(){return c.animate(h,f.animation_speed,"linear",function(){this.locked=!1,c.css(d).trigger("closed")}.bind(this)).removeClass("open")}.bind(this),f.animation_speed/2)}if(g.fade){var h={opacity:0};return setTimeout(function(){return c.animate(h,f.animation_speed,"linear",function(){this.locked=!1,c.css(d).trigger("closed")}.bind(this)).removeClass("open")}.bind(this),f.animation_speed/2)}return c.hide().css(d).removeClass("open").trigger("closed")}var f=this.settings;return e(f.animation).fade?c.fadeOut(f.animation_speed/2):c.hide()},close_video:function(b){var c=a(".flex-video",b.target),d=a("iframe",c);d.length>0&&(d.attr("data-src",d[0].src),d.attr("src","about:blank"),c.hide())},open_video:function(b){var c=a(".flex-video",b.target),e=c.find("iframe");if(e.length>0){var f=e.attr("data-src");if("string"==typeof f)e[0].src=e.attr("data-src");else{var g=e[0].src;e[0].src=d,e[0].src=g}c.show()}},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},cache_offset:function(a){var b=a.show().height()+parseInt(a.css("top"),10);return a.hide(),b},off:function(){a(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs.slider={name:"slider",version:"5.2.3",settings:{start:0,end:100,step:1,initial:null,display_selector:"",on_change:function(){}},cache:{},init:function(a,b,c){Foundation.inherit(this,"throttle"),this.bindings(b,c),this.reflow()},events:function(){var c=this;a(this.scope).off(".slider").on("mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider","["+c.attr_name()+"] .range-slider-handle",function(b){c.cache.active||(b.preventDefault(),c.set_active_slider(a(b.target)))}).on("mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider",function(a){c.cache.active&&(a.preventDefault(),c.calculate_position(c.cache.active,a.pageX||a.originalEvent.clientX||a.originalEvent.touches[0].clientX||a.currentPoint.x))}).on("mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider",function(){c.remove_active_slider()}).on("change.fndtn.slider",function(){c.settings.on_change()}),c.S(b).on("resize.fndtn.slider",c.throttle(function(){c.reflow()},300))},set_active_slider:function(a){this.cache.active=a},remove_active_slider:function(){this.cache.active=null},calculate_position:function(b,c){var d=this,e=a.extend({},d.settings,d.data_options(b.parent())),f=(a.data(b[0],"handle_w"),a.data(b[0],"handle_o"),a.data(b[0],"bar_w")),g=a.data(b[0],"bar_o");requestAnimationFrame(function(){var a;a=Foundation.rtl?d.limit_to((g+f-c)/f,0,1):d.limit_to((c-g)/f,0,1);var h=d.normalized_value(a,e.start,e.end,e.step);d.set_ui(b,h)})},set_ui:function(b,c){var d=a.extend({},this.settings,this.data_options(b.parent())),e=a.data(b[0],"handle_w"),f=a.data(b[0],"bar_w"),g=this.normalized_percentage(c,d.start,d.end),h=g*(f-e)-1,i=100*g;Foundation.rtl&&(h=-h),this.set_translate(b,h),b.siblings(".range-slider-active-segment").css("width",i+"%"),b.parent().attr(this.attr_name(),c),b.parent().trigger("change"),b.parent().children("input[type=hidden]").val(c),""!=d.input_id&&a(d.display_selector).each(function(){this.hasOwnProperty("value")?a(this).val(c):a(this).text(c)})},normalized_percentage:function(a,b,c){return(a-b)/(c-b)},normalized_value:function(a,b,c,d){var e=c-b,f=a*e,g=(f-f%d)/d,h=f%d,i=h>=.5*d?d:0;return g*d+i+b},set_translate:function(b,c,d){d?a(b).css("-webkit-transform","translateY("+c+"px)").css("-moz-transform","translateY("+c+"px)").css("-ms-transform","translateY("+c+"px)").css("-o-transform","translateY("+c+"px)").css("transform","translateY("+c+"px)"):a(b).css("-webkit-transform","translateX("+c+"px)").css("-moz-transform","translateX("+c+"px)").css("-ms-transform","translateX("+c+"px)").css("-o-transform","translateX("+c+"px)").css("transform","translateX("+c+"px)")},limit_to:function(a,b,c){return Math.min(Math.max(a,b),c)},initialize_settings:function(b){a.data(b,"bar",a(b).parent()),a.data(b,"bar_o",a(b).parent().offset().left),a.data(b,"bar_w",a(b).parent().outerWidth()),a.data(b,"handle_o",a(b).offset().left),a.data(b,"handle_w",a(b).outerWidth()),a.data(b,"settings",a.extend({},this.settings,this.data_options(a(b).parent())))},set_initial_position:function(b){var c=a.data(b.children(".range-slider-handle")[0],"settings"),d=c.initial?c.initial:Math.floor(.5*(c.end-c.start)/c.step)*c.step+c.start,e=b.children(".range-slider-handle");this.set_ui(e,d)},set_value:function(b){var c=this;a("["+c.attr_name()+"]",this.scope).each(function(){a(this).attr(c.attr_name(),b)}),a(this.scope).attr(c.attr_name())&&a(this.scope).attr(c.attr_name(),b),c.reflow()},reflow:function(){var b=this;b.S("["+this.attr_name()+"]").each(function(){var c=a(this).children(".range-slider-handle")[0],d=a(this).attr(b.attr_name());b.initialize_settings(c),d?b.set_ui(a(c),parseFloat(d)):b.set_initial_position(a(this))})}}}(jQuery,window,window.document),function(a,b,c,d){"use strict";Foundation.libs.tab={name:"tab",version:"5.2.3",settings:{active_class:"active",callback:function(){},deep_linking:!1,scroll_to_content:!0,is_hover:!1},default_tab_hashes:[],init:function(a,b,c){var d=this,e=this.S;this.bindings(b,c),this.handle_location_hash_change(),e("["+this.attr_name()+"] > .active > a",this.scope).each(function(){d.default_tab_hashes.push(this.hash)})},events:function(){var a=this,c=this.S;c(this.scope).off(".tab").on("click.fndtn.tab","["+this.attr_name()+"] > * > a",function(b){var d=c(this).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");(!d.is_hover||Modernizr.touch)&&(b.preventDefault(),b.stopPropagation(),a.toggle_active_tab(c(this).parent()))}).on("mouseenter.fndtn.tab","["+this.attr_name()+"] > * > a",function(){var b=c(this).closest("["+a.attr_name()+"]").data(a.attr_name(!0)+"-init");b.is_hover&&a.toggle_active_tab(c(this).parent())}),c(b).on("hashchange.fndtn.tab",function(b){b.preventDefault(),a.handle_location_hash_change()})},handle_location_hash_change:function(){var b=this,c=this.S;c("["+this.attr_name()+"]",this.scope).each(function(){var e=c(this).data(b.attr_name(!0)+"-init");if(e.deep_linking){var f=b.scope.location.hash;if(""!=f){var g=c(f);if(g.hasClass("content")&&g.parent().hasClass("tab-content"))b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+f+"]").parent());else{var h=g.closest(".content").attr("id");h!=d&&b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href=#"+h+"]").parent(),f)}}else for(var i in b.default_tab_hashes)b.toggle_active_tab(a("["+b.attr_name()+"] > * > a[href="+b.default_tab_hashes[i]+"]").parent())}})},toggle_active_tab:function(c,e){var f=this.S,g=c.closest("["+this.attr_name()+"]"),h=c.children("a").first(),i="#"+h.attr("href").split("#")[1],j=f(i),k=c.siblings(),l=g.data(this.attr_name(!0)+"-init");if(f(this).data(this.data_attr("tab-content"))&&(i="#"+f(this).data(this.data_attr("tab-content")).split("#")[1],j=f(i)),l.deep_linking){var m=a("body,html").scrollTop();b.location.hash=e!=d?e:i,l.scroll_to_content?e==d||e==i?c.parent()[0].scrollIntoView():f(i)[0].scrollIntoView():(e==d||e==i)&&a("body,html").scrollTop(m)}c.addClass(l.active_class).triggerHandler("opened"),k.removeClass(l.active_class),j.siblings().removeClass(l.active_class).end().addClass(l.active_class),l.callback(c),j.triggerHandler("toggled",[c]),g.triggerHandler("toggled",[j])},data_attr:function(a){return this.namespace.length>0?this.namespace+"-"+a:a},off:function(){},reflow:function(){}}}(jQuery,window,window.document),function(a,b){"use strict";Foundation.libs.tooltip={name:"tooltip",version:"5.2.3",settings:{additional_inheritable_classes:[],tooltip_class:".tooltip",append_to:"body",touch_close_text:"Tap To Close",disable_for_touch:!1,hover_delay:200,show_on:"all",tip_template:function(a,b){return'<span data-selector="'+a+'" class="'+Foundation.libs.tooltip.settings.tooltip_class.substring(1)+'">'+b+'<span class="nub"></span></span>'}},cache:{},init:function(a,b,c){Foundation.inherit(this,"random_str"),this.bindings(b,c)},should_show:function(b){var c=a.extend({},this.settings,this.data_options(b));return"all"===c.show_on?!0:this.small()&&"small"===c.show_on?!0:this.medium()&&"medium"===c.show_on?!0:this.large()&&"large"===c.show_on?!0:!1},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},events:function(b){var c=this,d=c.S;c.create(this.S(b)),a(this.scope).off(".tooltip").on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"]",function(b){var e=d(this),f=a.extend({},c.settings,c.data_options(e)),g=!1;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&d(b.target).is("a"))return!1;if(/mouse/i.test(b.type)&&c.ie_touch(b))return!1;if(e.hasClass("open"))Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&b.preventDefault(),c.hide(e);else{if(f.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type))return;!f.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(b.type)&&(b.preventDefault(),d(f.tooltip_class+".open").hide(),g=!0),/enter|over/i.test(b.type)?this.timer=setTimeout(function(){c.showTip(e)}.bind(this),c.settings.hover_delay):"mouseout"===b.type||"mouseleave"===b.type?(clearTimeout(this.timer),c.hide(e)):c.showTip(e)}}).on("mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip","["+this.attr_name()+"].open",function(b){return/mouse/i.test(b.type)&&c.ie_touch(b)?!1:void(("touch"!=a(this).data("tooltip-open-event-type")||"mouseleave"!=b.type)&&("mouse"==a(this).data("tooltip-open-event-type")&&/MSPointerDown|touchstart/i.test(b.type)?c.convert_to_touch(a(this)):c.hide(a(this))))}).on("DOMNodeRemoved DOMAttrModified","["+this.attr_name()+"]:not(a)",function(){c.hide(d(this))})},ie_touch:function(){return!1},showTip:function(a){var b=this.getTip(a);return this.should_show(a,b)?this.show(a):void 0},getTip:function(b){var c=this.selector(b),d=a.extend({},this.settings,this.data_options(b)),e=null;return c&&(e=this.S('span[data-selector="'+c+'"]'+d.tooltip_class)),"object"==typeof e?e:!1},selector:function(a){var b=a.attr("id"),c=a.attr(this.attr_name())||a.attr("data-selector");return(b&&b.length<1||!b)&&"string"!=typeof c&&(c=this.random_str(6),a.attr("data-selector",c)),b&&b.length>0?b:c},create:function(c){var d=this,e=a.extend({},this.settings,this.data_options(c)),f=this.settings.tip_template;"string"==typeof e.tip_template&&b.hasOwnProperty(e.tip_template)&&(f=b[e.tip_template]);var g=a(f(this.selector(c),a("<div></div>").html(c.attr("title")).html())),h=this.inheritable_classes(c);g.addClass(h).appendTo(e.append_to),Modernizr.touch&&(g.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),g.on("touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip",function(){d.hide(c)})),c.removeAttr("title").attr("title","")},reposition:function(b,c,d){var e,f,g,h,i;if(c.css("visibility","hidden").show(),e=b.data("width"),f=c.children(".nub"),g=f.outerHeight(),h=f.outerHeight(),c.css(this.small()?{width:"100%"}:{width:e?e:"auto"}),i=function(a,b,c,d,e){return a.css({top:b?b:"auto",bottom:d?d:"auto",left:e?e:"auto",right:c?c:"auto"}).end()},i(c,b.offset().top+b.outerHeight()+10,"auto","auto",b.offset().left),this.small())i(c,b.offset().top+b.outerHeight()+10,"auto","auto",12.5,a(this.scope).width()),c.addClass("tip-override"),i(f,-g,"auto","auto",b.offset().left);else{var j=b.offset().left;Foundation.rtl&&(f.addClass("rtl"),j=b.offset().left+b.outerWidth()-c.outerWidth()),i(c,b.offset().top+b.outerHeight()+10,"auto","auto",j),c.removeClass("tip-override"),d&&d.indexOf("tip-top")>-1?(Foundation.rtl&&f.addClass("rtl"),i(c,b.offset().top-c.outerHeight(),"auto","auto",j).removeClass("tip-override")):d&&d.indexOf("tip-left")>-1?(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left-c.outerWidth()-g).removeClass("tip-override"),f.removeClass("rtl")):d&&d.indexOf("tip-right")>-1&&(i(c,b.offset().top+b.outerHeight()/2-c.outerHeight()/2,"auto","auto",b.offset().left+b.outerWidth()+g).removeClass("tip-override"),f.removeClass("rtl"))}c.css("visibility","visible").hide()},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches},inheritable_classes:function(b){var c=a.extend({},this.settings,this.data_options(b)),d=["tip-top","tip-left","tip-bottom","tip-right","radius","round"].concat(c.additional_inheritable_classes),e=b.attr("class"),f=e?a.map(e.split(" "),function(b){return-1!==a.inArray(b,d)?b:void 0}).join(" "):"";return a.trim(f)},convert_to_touch:function(b){var c=this,d=c.getTip(b),e=a.extend({},c.settings,c.data_options(b));0===d.find(".tap-to-close").length&&(d.append('<span class="tap-to-close">'+e.touch_close_text+"</span>"),d.on("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose",function(){c.hide(b)})),b.data("tooltip-open-event-type","touch")},show:function(a){var b=this.getTip(a);"touch"==a.data("tooltip-open-event-type")&&this.convert_to_touch(a),this.reposition(a,b,a.attr("class")),a.addClass("open"),b.fadeIn(150)},hide:function(a){var b=this.getTip(a);b.fadeOut(150,function(){b.find(".tap-to-close").remove(),b.off("click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose"),a.removeClass("open")})},off:function(){var b=this;this.S(this.scope).off(".fndtn.tooltip"),this.S(this.settings.tooltip_class).each(function(c){a("["+b.attr_name()+"]").eq(c).attr("title",a(this).text())}).remove()},reflow:function(){}}}(jQuery,window,window.document),function(a,b,c){"use strict";Foundation.libs.topbar={name:"topbar",version:"5.2.3",settings:{index:0,sticky_class:"sticky",custom_back_text:!0,back_text:"Back",is_hover:!0,mobile_show_parent_link:!1,scrolltop:!0,sticky_on:"all"},init:function(b,c,d){Foundation.inherit(this,"add_custom_rule register_media throttle");var e=this;e.register_media("topbar","foundation-mq-topbar"),this.bindings(c,d),e.S("["+this.attr_name()+"]",this.scope).each(function(){{var b=a(this),c=b.data(e.attr_name(!0)+"-init");e.S("section",this)}b.data("index",0);var d=b.parent();d.hasClass("fixed")||e.is_sticky(b,d,c)?(e.settings.sticky_class=c.sticky_class,e.settings.sticky_topbar=b,b.data("height",d.outerHeight()),b.data("stickyoffset",d.offset().top)):b.data("height",b.outerHeight()),c.assembled||e.assemble(b),c.is_hover?e.S(".has-dropdown",b).addClass("not-click"):e.S(".has-dropdown",b).removeClass("not-click"),e.add_custom_rule(".f-topbar-fixed { padding-top: "+b.data("height")+"px }"),d.hasClass("fixed")&&e.S("body").addClass("f-topbar-fixed")})},is_sticky:function(a,b,c){var d=b.hasClass(c.sticky_class);return d&&"all"===c.sticky_on?!0:d&&this.small()&&"small"===c.sticky_on?!0:d&&this.medium()&&"medium"===c.sticky_on?!0:d&&this.large()&&"large"===c.sticky_on?!0:!1},toggle:function(c){var d,e=this;d=c?e.S(c).closest("["+this.attr_name()+"]"):e.S("["+this.attr_name()+"]");var f=d.data(this.attr_name(!0)+"-init"),g=e.S("section, .section",d);e.breakpoint()&&(e.rtl?(g.css({right:"0%"}),a(">.name",g).css({right:"100%"})):(g.css({left:"0%"}),a(">.name",g).css({left:"100%"})),e.S("li.moved",g).removeClass("moved"),d.data("index",0),d.toggleClass("expanded").css("height","")),f.scrolltop?d.hasClass("expanded")?d.parent().hasClass("fixed")&&(f.scrolltop?(d.parent().removeClass("fixed"),d.addClass("fixed"),e.S("body").removeClass("f-topbar-fixed"),b.scrollTo(0,0)):d.parent().removeClass("expanded")):d.hasClass("fixed")&&(d.parent().addClass("fixed"),d.removeClass("fixed"),e.S("body").addClass("f-topbar-fixed")):(e.is_sticky(d,d.parent(),f)&&d.parent().addClass("fixed"),d.parent().hasClass("fixed")&&(d.hasClass("expanded")?(d.addClass("fixed"),d.parent().addClass("expanded"),e.S("body").addClass("f-topbar-fixed")):(d.removeClass("fixed"),d.parent().removeClass("expanded"),e.update_sticky_positioning())))},timer:null,events:function(){var c=this,d=this.S;d(this.scope).off(".topbar").on("click.fndtn.topbar","["+this.attr_name()+"] .toggle-topbar",function(a){a.preventDefault(),c.toggle(this)}).on("click.fndtn.topbar",'.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(){var b=a(this).closest("li");!c.breakpoint()||b.hasClass("back")||b.hasClass("has-dropdown")||c.toggle()}).on("click.fndtn.topbar","["+this.attr_name()+"] li.has-dropdown",function(b){var e=d(this),f=d(b.target),g=e.closest("["+c.attr_name()+"]"),h=g.data(c.attr_name(!0)+"-init");return f.data("revealId")?void c.toggle():void(c.breakpoint()||(!h.is_hover||Modernizr.touch)&&(b.stopImmediatePropagation(),e.hasClass("hover")?(e.removeClass("hover").find("li").removeClass("hover"),e.parents("li.hover").removeClass("hover")):(e.addClass("hover"),a(e).siblings().removeClass("hover"),"A"===f[0].nodeName&&f.parent().hasClass("has-dropdown")&&b.preventDefault())))}).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown>a",function(a){if(c.breakpoint()){a.preventDefault();var b=d(this),e=b.closest("["+c.attr_name()+"]"),f=e.find("section, .section"),g=(b.next(".dropdown").outerHeight(),b.closest("li"));e.data("index",e.data("index")+1),g.addClass("moved"),c.rtl?(f.css({right:-(100*e.data("index"))+"%"}),f.find(">.name").css({right:100*e.data("index")+"%"})):(f.css({left:-(100*e.data("index"))+"%"}),f.find(">.name").css({left:100*e.data("index")+"%"})),e.css("height",b.siblings("ul").outerHeight(!0)+e.data("height"))}}),d(b).off(".topbar").on("resize.fndtn.topbar",c.throttle(function(){c.resize.call(c)},50)).trigger("resize"),d("body").off(".topbar").on("click.fndtn.topbar touchstart.fndtn.topbar",function(a){var b=d(a.target).closest("li").closest("li.hover");b.length>0||d("["+c.attr_name()+"] li.hover").removeClass("hover")}),d(this.scope).on("click.fndtn.topbar","["+this.attr_name()+"] .has-dropdown .back",function(a){a.preventDefault();var b=d(this),e=b.closest("["+c.attr_name()+"]"),f=e.find("section, .section"),g=(e.data(c.attr_name(!0)+"-init"),b.closest("li.moved")),h=g.parent();e.data("index",e.data("index")-1),c.rtl?(f.css({right:-(100*e.data("index"))+"%"}),f.find(">.name").css({right:100*e.data("index")+"%"})):(f.css({left:-(100*e.data("index"))+"%"}),f.find(">.name").css({left:100*e.data("index")+"%"})),0===e.data("index")?e.css("height",""):e.css("height",h.outerHeight(!0)+e.data("height")),setTimeout(function(){g.removeClass("moved")},300)})},resize:function(){var a=this;a.S("["+this.attr_name()+"]").each(function(){var b,d=a.S(this),e=d.data(a.attr_name(!0)+"-init"),f=d.parent("."+a.settings.sticky_class);if(!a.breakpoint()){var g=d.hasClass("expanded");d.css("height","").removeClass("expanded").find("li").removeClass("hover"),g&&a.toggle(d)}a.is_sticky(d,f,e)&&(f.hasClass("fixed")?(f.removeClass("fixed"),b=f.offset().top,a.S(c.body).hasClass("f-topbar-fixed")&&(b-=d.data("height")),d.data("stickyoffset",b),f.addClass("fixed")):(b=f.offset().top,d.data("stickyoffset",b)))})},breakpoint:function(){return!matchMedia(Foundation.media_queries.topbar).matches},small:function(){return matchMedia(Foundation.media_queries.small).matches},medium:function(){return matchMedia(Foundation.media_queries.medium).matches},large:function(){return matchMedia(Foundation.media_queries.large).matches},assemble:function(b){var c=this,d=b.data(this.attr_name(!0)+"-init"),e=c.S("section",b);e.detach(),c.S(".has-dropdown>a",e).each(function(){var b,e=c.S(this),f=e.siblings(".dropdown"),g=e.attr("href");f.find(".title.back").length||(b=a(d.mobile_show_parent_link&&g&&g.length>1?'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li><a class="parent-link js-generated" href="'+g+'">'+e.text()+"</a></li>":'<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li>'),a("h5>a",b).html(1==d.custom_back_text?d.back_text:"&laquo; "+e.html()),f.prepend(b))}),e.appendTo(b),this.sticky(),this.assembled(b)},assembled:function(b){b.data(this.attr_name(!0),a.extend({},b.data(this.attr_name(!0)),{assembled:!0}))},height:function(b){var c=0,d=this;return a("> li",b).each(function(){c+=d.S(this).outerHeight(!0)}),c},sticky:function(){var a=this;this.S(b).on("scroll",function(){a.update_sticky_positioning()})},update_sticky_positioning:function(){var a="."+this.settings.sticky_class,c=this.S(b),d=this;if(d.settings.sticky_topbar&&d.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var e=this.settings.sticky_topbar.data("stickyoffset");d.S(a).hasClass("expanded")||(c.scrollTop()>e?d.S(a).hasClass("fixed")||(d.S(a).addClass("fixed"),d.S("body").addClass("f-topbar-fixed")):c.scrollTop()<=e&&d.S(a).hasClass("fixed")&&(d.S(a).removeClass("fixed"),d.S("body").removeClass("f-topbar-fixed")))}},off:function(){this.S(this.scope).off(".fndtn.topbar"),this.S(b).off(".fndtn.topbar")},reflow:function(){}}}(jQuery,this,this.document);
@@ -0,0 +1,299 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.abide = {
5
+ name : 'abide',
6
+
7
+ version : '5.2.3',
8
+
9
+ settings : {
10
+ live_validate : true,
11
+ focus_on_invalid : true,
12
+ error_labels: true, // labels with a for="inputId" will recieve an `error` class
13
+ timeout : 1000,
14
+ patterns : {
15
+ alpha: /^[a-zA-Z]+$/,
16
+ alpha_numeric : /^[a-zA-Z0-9]+$/,
17
+ integer: /^[-+]?\d+$/,
18
+ number: /^[-+]?\d*(?:\.\d+)?$/,
19
+
20
+ // amex, visa, diners
21
+ card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
22
+ cvv : /^([0-9]){3,4}$/,
23
+
24
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
25
+ email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,
26
+
27
+ url: /^(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
28
+ // abc.de
29
+ domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/,
30
+
31
+ datetime: /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
32
+ // YYYY-MM-DD
33
+ date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
34
+ // HH:MM:SS
35
+ time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
36
+ dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
37
+ // MM/DD/YYYY
38
+ month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
39
+
40
+ // #FFF or #FFFFFF
41
+ color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
42
+ },
43
+ validators : {
44
+ equalTo: function(el, required, parent) {
45
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
46
+ to = el.value,
47
+ valid = (from === to);
48
+
49
+ return valid;
50
+ }
51
+ }
52
+ },
53
+
54
+ timer : null,
55
+
56
+ init : function (scope, method, options) {
57
+ this.bindings(method, options);
58
+ },
59
+
60
+ events : function (scope) {
61
+ var self = this,
62
+ form = self.S(scope).attr('novalidate', 'novalidate'),
63
+ settings = form.data(this.attr_name(true) + '-init') || {};
64
+
65
+ this.invalid_attr = this.add_namespace('data-invalid');
66
+
67
+ form
68
+ .off('.abide')
69
+ .on('submit.fndtn.abide validate.fndtn.abide', function (e) {
70
+ var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
71
+ return self.validate(self.S(this).find('input, textarea, select').get(), e, is_ajax);
72
+ })
73
+ .on('reset', function() {
74
+ return self.reset($(this));
75
+ })
76
+ .find('input, textarea, select')
77
+ .off('.abide')
78
+ .on('blur.fndtn.abide change.fndtn.abide', function (e) {
79
+ self.validate([this], e);
80
+ })
81
+ .on('keydown.fndtn.abide', function (e) {
82
+ if (settings.live_validate === true) {
83
+ clearTimeout(self.timer);
84
+ self.timer = setTimeout(function () {
85
+ self.validate([this], e);
86
+ }.bind(this), settings.timeout);
87
+ }
88
+ });
89
+ },
90
+
91
+ reset : function (form) {
92
+ form.removeAttr(this.invalid_attr);
93
+ $(this.invalid_attr, form).removeAttr(this.invalid_attr);
94
+ $('.error', form).not('small').removeClass('error');
95
+ },
96
+
97
+ validate : function (els, e, is_ajax) {
98
+ var validations = this.parse_patterns(els),
99
+ validation_count = validations.length,
100
+ form = this.S(els[0]).closest('[data-' + this.attr_name(true) + ']'),
101
+ settings = form.data(this.attr_name(true) + '-init') || {},
102
+ submit_event = /submit/.test(e.type);
103
+
104
+ form.trigger('validated');
105
+ // Has to count up to make sure the focus gets applied to the top error
106
+ for (var i=0; i < validation_count; i++) {
107
+ if (!validations[i] && (submit_event || is_ajax)) {
108
+ if (settings.focus_on_invalid) els[i].focus();
109
+ form.trigger('invalid');
110
+ this.S(els[i]).closest('[data-' + this.attr_name(true) + ']').attr(this.invalid_attr, '');
111
+ return false;
112
+ }
113
+ }
114
+
115
+ if (submit_event || is_ajax) {
116
+ form.trigger('valid');
117
+ }
118
+
119
+ form.removeAttr(this.invalid_attr);
120
+
121
+ if (is_ajax) return false;
122
+
123
+ return true;
124
+ },
125
+
126
+ parse_patterns : function (els) {
127
+ var i = els.length,
128
+ el_patterns = [];
129
+
130
+ while (i--) {
131
+ el_patterns.push(this.pattern(els[i]));
132
+ }
133
+
134
+ return this.check_validation_and_apply_styles(el_patterns);
135
+ },
136
+
137
+ pattern : function (el) {
138
+ var type = el.getAttribute('type'),
139
+ required = typeof el.getAttribute('required') === 'string';
140
+
141
+ var pattern = el.getAttribute('pattern') || '';
142
+
143
+ if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
144
+ return [el, this.settings.patterns[pattern], required];
145
+ } else if (pattern.length > 0) {
146
+ return [el, new RegExp('^'+pattern+'$'), required];
147
+ }
148
+
149
+ if (this.settings.patterns.hasOwnProperty(type)) {
150
+ return [el, this.settings.patterns[type], required];
151
+ }
152
+
153
+ pattern = /.*/;
154
+
155
+ return [el, pattern, required];
156
+ },
157
+
158
+ check_validation_and_apply_styles : function (el_patterns) {
159
+ var i = el_patterns.length,
160
+ validations = [],
161
+ form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
162
+ settings = form.data(this.attr_name(true) + '-init') || {};
163
+
164
+ while (i--) {
165
+ var el = el_patterns[i][0],
166
+ required = el_patterns[i][2],
167
+ value = el.value.trim(),
168
+ direct_parent = this.S(el).parent(),
169
+ validator = el.getAttribute(this.add_namespace('data-abide-validator')),
170
+ is_radio = el.type === "radio",
171
+ is_checkbox = el.type === "checkbox",
172
+ label = this.S('label[for="' + el.getAttribute('id') + '"]'),
173
+ valid_length = (required) ? (el.value.length > 0) : true;
174
+
175
+ var parent, valid;
176
+
177
+ // support old way to do equalTo validations
178
+ if(el.getAttribute(this.add_namespace('data-equalto'))) { validator = "equalTo" }
179
+
180
+ if (!direct_parent.is('label')) {
181
+ parent = direct_parent;
182
+ } else {
183
+ parent = direct_parent.parent();
184
+ }
185
+
186
+ if (is_radio && required) {
187
+ validations.push(this.valid_radio(el, required));
188
+ } else if (is_checkbox && required) {
189
+ validations.push(this.valid_checkbox(el, required));
190
+ } else if (validator) {
191
+ valid = this.settings.validators[validator].apply(this, [el, required, parent])
192
+ validations.push(valid);
193
+
194
+ if (valid) {
195
+ this.S(el).removeAttr(this.invalid_attr);
196
+ parent.removeClass('error');
197
+ } else {
198
+ this.S(el).attr(this.invalid_attr, '');
199
+ parent.addClass('error');
200
+ }
201
+
202
+ } else {
203
+
204
+ if (el_patterns[i][1].test(value) && valid_length ||
205
+ !required && el.value.length < 1 || $(el).attr('disabled')) {
206
+ this.S(el).removeAttr(this.invalid_attr);
207
+ parent.removeClass('error');
208
+ if (label.length > 0 && settings.error_labels) label.removeClass('error');
209
+
210
+ validations.push(true);
211
+ $(el).triggerHandler('valid');
212
+ } else {
213
+ this.S(el).attr(this.invalid_attr, '');
214
+ parent.addClass('error');
215
+ if (label.length > 0 && settings.error_labels) label.addClass('error');
216
+
217
+ validations.push(false);
218
+ $(el).triggerHandler('invalid');
219
+ }
220
+ }
221
+ }
222
+
223
+ return validations;
224
+ },
225
+
226
+ valid_checkbox : function(el, required) {
227
+ var el = this.S(el),
228
+ valid = (el.is(':checked') || !required);
229
+
230
+ if (valid) {
231
+ el.removeAttr(this.invalid_attr).parent().removeClass('error');
232
+ } else {
233
+ el.attr(this.invalid_attr, '').parent().addClass('error');
234
+ }
235
+
236
+ return valid;
237
+ },
238
+
239
+ valid_radio : function (el, required) {
240
+ var name = el.getAttribute('name'),
241
+ group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='"+name+"']"),
242
+ count = group.length,
243
+ valid = false;
244
+
245
+ // Has to count up to make sure the focus gets applied to the top error
246
+ for (var i=0; i < count; i++) {
247
+ if (group[i].checked) valid = true;
248
+ }
249
+
250
+ // Has to count up to make sure the focus gets applied to the top error
251
+ for (var i=0; i < count; i++) {
252
+ if (valid) {
253
+ this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass('error');
254
+ } else {
255
+ this.S(group[i]).attr(this.invalid_attr, '').parent().addClass('error');
256
+ }
257
+ }
258
+
259
+ return valid;
260
+ },
261
+
262
+ valid_equal: function(el, required, parent) {
263
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
264
+ to = el.value,
265
+ valid = (from === to);
266
+
267
+ if (valid) {
268
+ this.S(el).removeAttr(this.invalid_attr);
269
+ parent.removeClass('error');
270
+ } else {
271
+ this.S(el).attr(this.invalid_attr, '');
272
+ parent.addClass('error');
273
+ }
274
+
275
+ return valid;
276
+ },
277
+
278
+ valid_oneof: function(el, required, parent, doNotValidateOthers) {
279
+ var el = this.S(el),
280
+ others = this.S('[' + this.add_namespace('data-oneof') + ']'),
281
+ valid = others.filter(':checked').length > 0;
282
+
283
+ if (valid) {
284
+ el.removeAttr(this.invalid_attr).parent().removeClass('error');
285
+ } else {
286
+ el.attr(this.invalid_attr, '').parent().addClass('error');
287
+ }
288
+
289
+ if (!doNotValidateOthers) {
290
+ var _this = this;
291
+ others.each(function() {
292
+ _this.valid_oneof.call(_this, this, null, null, true);
293
+ });
294
+ }
295
+
296
+ return valid;
297
+ }
298
+ };
299
+ }(jQuery, window, window.document));
@@ -0,0 +1,59 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.accordion = {
5
+ name : 'accordion',
6
+
7
+ version : '5.2.3',
8
+
9
+ settings : {
10
+ active_class: 'active',
11
+ multi_expand: false,
12
+ toggleable: true,
13
+ callback : function () {}
14
+ },
15
+
16
+ init : function (scope, method, options) {
17
+ this.bindings(method, options);
18
+ },
19
+
20
+ events : function () {
21
+ var self = this;
22
+ var S = this.S;
23
+ S(this.scope)
24
+ .off('.fndtn.accordion')
25
+ .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a', function (e) {
26
+ var accordion = S(this).closest('[' + self.attr_name() + ']'),
27
+ target = S('#' + this.href.split('#')[1]),
28
+ siblings = S('dd > .content', accordion),
29
+ aunts = $('dd', accordion),
30
+ groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
31
+ settings = accordion.data(self.attr_name(true) + '-init'),
32
+ active_content = S('dd > .content.' + settings.active_class, accordion);
33
+ e.preventDefault();
34
+
35
+ if (accordion.attr(self.attr_name())) {
36
+ siblings = siblings.add('[' + groupSelector + '] dd > .content');
37
+ aunts = aunts.add('[' + groupSelector + '] dd');
38
+ }
39
+
40
+ if (settings.toggleable && target.is(active_content)) {
41
+ target.parent('dd').toggleClass(settings.active_class, false);
42
+ return target.toggleClass(settings.active_class, false);
43
+ }
44
+
45
+ if (!settings.multi_expand) {
46
+ siblings.removeClass(settings.active_class);
47
+ aunts.removeClass(settings.active_class);
48
+ }
49
+
50
+ target.addClass(settings.active_class).parent().addClass(settings.active_class);
51
+ settings.callback(target);
52
+ });
53
+ },
54
+
55
+ off : function () {},
56
+
57
+ reflow : function () {}
58
+ };
59
+ }(jQuery, window, window.document));
@@ -0,0 +1,43 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.alert = {
5
+ name : 'alert',
6
+
7
+ version : '5.2.3',
8
+
9
+ settings : {
10
+ callback: function (){}
11
+ },
12
+
13
+ init : function (scope, method, options) {
14
+ this.bindings(method, options);
15
+ },
16
+
17
+ events : function () {
18
+ var self = this,
19
+ S = this.S;
20
+
21
+ $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] a.close', function (e) {
22
+ var alertBox = S(this).closest('[' + self.attr_name() + ']'),
23
+ settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
24
+
25
+ e.preventDefault();
26
+ if ('transitionend' in window || 'webkitTransitionEnd' in window || 'oTransitionEnd' in window) {
27
+ alertBox.addClass("alert-close");
28
+ alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
29
+ S(this).trigger('close').remove();
30
+ settings.callback();
31
+ });
32
+ } else {
33
+ alertBox.fadeOut(300, function () {
34
+ S(this).trigger('close').remove();
35
+ settings.callback();
36
+ });
37
+ }
38
+ });
39
+ },
40
+
41
+ reflow : function () {}
42
+ };
43
+ }(jQuery, window, window.document));
@@ -0,0 +1,534 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.clearing = {
5
+ name : 'clearing',
6
+
7
+ version: '5.2.3',
8
+
9
+ settings : {
10
+ templates : {
11
+ viewing : '<a href="#" class="clearing-close">&times;</a>' +
12
+ '<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
13
+ '<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
14
+ '<a href="#" class="clearing-main-next"><span></span></a></div>'
15
+ },
16
+
17
+ // comma delimited list of selectors that, on click, will close clearing,
18
+ // add 'div.clearing-blackout, div.visible-img' to close on background click
19
+ close_selectors : '.clearing-close',
20
+
21
+ touch_label : '',
22
+
23
+ // event initializers and locks
24
+ init : false,
25
+ locked : false
26
+ },
27
+
28
+ init : function (scope, method, options) {
29
+ var self = this;
30
+ Foundation.inherit(this, 'throttle image_loaded');
31
+
32
+ this.bindings(method, options);
33
+
34
+ if (self.S(this.scope).is('[' + this.attr_name() + ']')) {
35
+ this.assemble(self.S('li', this.scope));
36
+ } else {
37
+ self.S('[' + this.attr_name() + ']', this.scope).each(function () {
38
+ self.assemble(self.S('li', this));
39
+ });
40
+ }
41
+ },
42
+
43
+ events : function (scope) {
44
+ var self = this,
45
+ S = self.S,
46
+ $scroll_container = $('.scroll-container');
47
+
48
+ if ($scroll_container.length > 0) {
49
+ this.scope = $scroll_container;
50
+ }
51
+
52
+ S(this.scope)
53
+ .off('.clearing')
54
+ .on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li',
55
+ function (e, current, target) {
56
+ var current = current || S(this),
57
+ target = target || current,
58
+ next = current.next('li'),
59
+ settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'),
60
+ image = S(e.target);
61
+
62
+ e.preventDefault();
63
+
64
+ if (!settings) {
65
+ self.init();
66
+ settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
67
+ }
68
+
69
+ // if clearing is open and the current image is
70
+ // clicked, go to the next image in sequence
71
+ if (target.hasClass('visible') &&
72
+ current[0] === target[0] &&
73
+ next.length > 0 && self.is_open(current)) {
74
+ target = next;
75
+ image = S('img', target);
76
+ }
77
+
78
+ // set current and target to the clicked li if not otherwise defined.
79
+ self.open(image, current, target);
80
+ self.update_paddles(target);
81
+ })
82
+
83
+ .on('click.fndtn.clearing', '.clearing-main-next',
84
+ function (e) { self.nav(e, 'next') })
85
+ .on('click.fndtn.clearing', '.clearing-main-prev',
86
+ function (e) { self.nav(e, 'prev') })
87
+ .on('click.fndtn.clearing', this.settings.close_selectors,
88
+ function (e) { Foundation.libs.clearing.close(e, this) });
89
+
90
+ $(document).on('keydown.fndtn.clearing',
91
+ function (e) { self.keydown(e) });
92
+
93
+ S(window).off('.clearing').on('resize.fndtn.clearing',
94
+ function () { self.resize() });
95
+
96
+ this.swipe_events(scope);
97
+ },
98
+
99
+ swipe_events : function (scope) {
100
+ var self = this,
101
+ S = self.S;
102
+
103
+ S(this.scope)
104
+ .on('touchstart.fndtn.clearing', '.visible-img', function(e) {
105
+ if (!e.touches) { e = e.originalEvent; }
106
+ var data = {
107
+ start_page_x: e.touches[0].pageX,
108
+ start_page_y: e.touches[0].pageY,
109
+ start_time: (new Date()).getTime(),
110
+ delta_x: 0,
111
+ is_scrolling: undefined
112
+ };
113
+
114
+ S(this).data('swipe-transition', data);
115
+ e.stopPropagation();
116
+ })
117
+ .on('touchmove.fndtn.clearing', '.visible-img', function(e) {
118
+ if (!e.touches) { e = e.originalEvent; }
119
+ // Ignore pinch/zoom events
120
+ if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
121
+
122
+ var data = S(this).data('swipe-transition');
123
+
124
+ if (typeof data === 'undefined') {
125
+ data = {};
126
+ }
127
+
128
+ data.delta_x = e.touches[0].pageX - data.start_page_x;
129
+
130
+ if ( typeof data.is_scrolling === 'undefined') {
131
+ data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
132
+ }
133
+
134
+ if (!data.is_scrolling && !data.active) {
135
+ e.preventDefault();
136
+ var direction = (data.delta_x < 0) ? 'next' : 'prev';
137
+ data.active = true;
138
+ self.nav(e, direction);
139
+ }
140
+ })
141
+ .on('touchend.fndtn.clearing', '.visible-img', function(e) {
142
+ S(this).data('swipe-transition', {});
143
+ e.stopPropagation();
144
+ });
145
+ },
146
+
147
+ assemble : function ($li) {
148
+ var $el = $li.parent();
149
+
150
+ if ($el.parent().hasClass('carousel')) {
151
+ return;
152
+ }
153
+
154
+ $el.after('<div id="foundationClearingHolder"></div>');
155
+
156
+ var grid = $el.detach(),
157
+ grid_outerHTML = '';
158
+
159
+ if (grid[0] == null) {
160
+ return;
161
+ } else {
162
+ grid_outerHTML = grid[0].outerHTML;
163
+ }
164
+
165
+ var holder = this.S('#foundationClearingHolder'),
166
+ settings = $el.data(this.attr_name(true) + '-init'),
167
+ data = {
168
+ grid: '<div class="carousel">' + grid_outerHTML + '</div>',
169
+ viewing: settings.templates.viewing
170
+ },
171
+ wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
172
+ data.grid + '</div></div>',
173
+ touch_label = this.settings.touch_label;
174
+
175
+ if (Modernizr.touch) {
176
+ wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
177
+ }
178
+
179
+ holder.after(wrapper).remove();
180
+ },
181
+
182
+ open : function ($image, current, target) {
183
+ var self = this,
184
+ body = $(document.body),
185
+ root = target.closest('.clearing-assembled'),
186
+ container = self.S('div', root).first(),
187
+ visible_image = self.S('.visible-img', container),
188
+ image = self.S('img', visible_image).not($image),
189
+ label = self.S('.clearing-touch-label', container),
190
+ error = false;
191
+
192
+ image.error(function () {
193
+ error = true;
194
+ });
195
+
196
+ function startLoad() {
197
+ setTimeout(function () {
198
+ this.image_loaded(image, function () {
199
+ if (image.outerWidth() === 1 && !error) {
200
+ startLoad.call(this);
201
+ } else {
202
+ cb.call(this, image);
203
+ }
204
+ }.bind(this));
205
+ }.bind(this), 50);
206
+ }
207
+
208
+ function cb (image) {
209
+ var $image = $(image);
210
+ $image.css('visibility', 'visible');
211
+ // toggle the gallery
212
+ body.css('overflow', 'hidden');
213
+ root.addClass('clearing-blackout');
214
+ container.addClass('clearing-container');
215
+ visible_image.show();
216
+ this.fix_height(target)
217
+ .caption(self.S('.clearing-caption', visible_image), self.S('img', target))
218
+ .center_and_label(image, label)
219
+ .shift(current, target, function () {
220
+ target.siblings().removeClass('visible');
221
+ target.addClass('visible');
222
+ });
223
+ visible_image.trigger('opened.fndtn.clearing')
224
+ }
225
+
226
+ if (!this.locked()) {
227
+ visible_image.trigger('open.fndtn.clearing');
228
+ // set the image to the selected thumbnail
229
+ image
230
+ .attr('src', this.load($image))
231
+ .css('visibility', 'hidden');
232
+
233
+ startLoad.call(this);
234
+ }
235
+ },
236
+
237
+ close : function (e, el) {
238
+ e.preventDefault();
239
+
240
+ var root = (function (target) {
241
+ if (/blackout/.test(target.selector)) {
242
+ return target;
243
+ } else {
244
+ return target.closest('.clearing-blackout');
245
+ }
246
+ }($(el))),
247
+ body = $(document.body), container, visible_image;
248
+
249
+ if (el === e.target && root) {
250
+ body.css('overflow', '');
251
+ container = $('div', root).first();
252
+ visible_image = $('.visible-img', container);
253
+ visible_image.trigger('close.fndtn.clearing');
254
+ this.settings.prev_index = 0;
255
+ $('ul[' + this.attr_name() + ']', root)
256
+ .attr('style', '').closest('.clearing-blackout')
257
+ .removeClass('clearing-blackout');
258
+ container.removeClass('clearing-container');
259
+ visible_image.hide();
260
+ visible_image.trigger('closed.fndtn.clearing');
261
+ }
262
+
263
+ return false;
264
+ },
265
+
266
+ is_open : function (current) {
267
+ return current.parent().prop('style').length > 0;
268
+ },
269
+
270
+ keydown : function (e) {
271
+ var clearing = $('.clearing-blackout ul[' + this.attr_name() + ']'),
272
+ NEXT_KEY = this.rtl ? 37 : 39,
273
+ PREV_KEY = this.rtl ? 39 : 37,
274
+ ESC_KEY = 27;
275
+
276
+ if (e.which === NEXT_KEY) this.go(clearing, 'next');
277
+ if (e.which === PREV_KEY) this.go(clearing, 'prev');
278
+ if (e.which === ESC_KEY) this.S('a.clearing-close').trigger('click');
279
+ },
280
+
281
+ nav : function (e, direction) {
282
+ var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');
283
+
284
+ e.preventDefault();
285
+ this.go(clearing, direction);
286
+ },
287
+
288
+ resize : function () {
289
+ var image = $('img', '.clearing-blackout .visible-img'),
290
+ label = $('.clearing-touch-label', '.clearing-blackout');
291
+
292
+ if (image.length) {
293
+ this.center_and_label(image, label);
294
+ image.trigger('resized.fndtn.clearing')
295
+ }
296
+ },
297
+
298
+ // visual adjustments
299
+ fix_height : function (target) {
300
+ var lis = target.parent().children(),
301
+ self = this;
302
+
303
+ lis.each(function () {
304
+ var li = self.S(this),
305
+ image = li.find('img');
306
+
307
+ if (li.height() > image.outerHeight()) {
308
+ li.addClass('fix-height');
309
+ }
310
+ })
311
+ .closest('ul')
312
+ .width(lis.length * 100 + '%');
313
+
314
+ return this;
315
+ },
316
+
317
+ update_paddles : function (target) {
318
+ var visible_image = target
319
+ .closest('.carousel')
320
+ .siblings('.visible-img');
321
+
322
+ if (target.next().length > 0) {
323
+ this.S('.clearing-main-next', visible_image).removeClass('disabled');
324
+ } else {
325
+ this.S('.clearing-main-next', visible_image).addClass('disabled');
326
+ }
327
+
328
+ if (target.prev().length > 0) {
329
+ this.S('.clearing-main-prev', visible_image).removeClass('disabled');
330
+ } else {
331
+ this.S('.clearing-main-prev', visible_image).addClass('disabled');
332
+ }
333
+ },
334
+
335
+ center_and_label : function (target, label) {
336
+ if (!this.rtl) {
337
+ target.css({
338
+ marginLeft : -(target.outerWidth() / 2),
339
+ marginTop : -(target.outerHeight() / 2)
340
+ });
341
+
342
+ if (label.length > 0) {
343
+ label.css({
344
+ marginLeft : -(label.outerWidth() / 2),
345
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
346
+ });
347
+ }
348
+ } else {
349
+ target.css({
350
+ marginRight : -(target.outerWidth() / 2),
351
+ marginTop : -(target.outerHeight() / 2),
352
+ left: 'auto',
353
+ right: '50%'
354
+ });
355
+
356
+ if (label.length > 0) {
357
+ label.css({
358
+ marginRight : -(label.outerWidth() / 2),
359
+ marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
360
+ left: 'auto',
361
+ right: '50%'
362
+ });
363
+ }
364
+ }
365
+ return this;
366
+ },
367
+
368
+ // image loading and preloading
369
+
370
+ load : function ($image) {
371
+ var href;
372
+
373
+ if ($image[0].nodeName === "A") {
374
+ href = $image.attr('href');
375
+ } else {
376
+ href = $image.parent().attr('href');
377
+ }
378
+
379
+ this.preload($image);
380
+
381
+ if (href) return href;
382
+ return $image.attr('src');
383
+ },
384
+
385
+ preload : function ($image) {
386
+ this
387
+ .img($image.closest('li').next())
388
+ .img($image.closest('li').prev());
389
+ },
390
+
391
+ img : function (img) {
392
+ if (img.length) {
393
+ var new_img = new Image(),
394
+ new_a = this.S('a', img);
395
+
396
+ if (new_a.length) {
397
+ new_img.src = new_a.attr('href');
398
+ } else {
399
+ new_img.src = this.S('img', img).attr('src');
400
+ }
401
+ }
402
+ return this;
403
+ },
404
+
405
+ // image caption
406
+
407
+ caption : function (container, $image) {
408
+ var caption = $image.attr('data-caption');
409
+
410
+ if (caption) {
411
+ container
412
+ .html(caption)
413
+ .show();
414
+ } else {
415
+ container
416
+ .text('')
417
+ .hide();
418
+ }
419
+ return this;
420
+ },
421
+
422
+ // directional methods
423
+
424
+ go : function ($ul, direction) {
425
+ var current = this.S('.visible', $ul),
426
+ target = current[direction]();
427
+
428
+ if (target.length) {
429
+ this.S('img', target)
430
+ .trigger('click', [current, target])
431
+ .trigger('change.fndtn.clearing');
432
+ }
433
+ },
434
+
435
+ shift : function (current, target, callback) {
436
+ var clearing = target.parent(),
437
+ old_index = this.settings.prev_index || target.index(),
438
+ direction = this.direction(clearing, current, target),
439
+ dir = this.rtl ? 'right' : 'left',
440
+ left = parseInt(clearing.css('left'), 10),
441
+ width = target.outerWidth(),
442
+ skip_shift;
443
+
444
+ var dir_obj = {};
445
+
446
+ // we use jQuery animate instead of CSS transitions because we
447
+ // need a callback to unlock the next animation
448
+ // needs support for RTL **
449
+ if (target.index() !== old_index && !/skip/.test(direction)){
450
+ if (/left/.test(direction)) {
451
+ this.lock();
452
+ dir_obj[dir] = left + width;
453
+ clearing.animate(dir_obj, 300, this.unlock());
454
+ } else if (/right/.test(direction)) {
455
+ this.lock();
456
+ dir_obj[dir] = left - width;
457
+ clearing.animate(dir_obj, 300, this.unlock());
458
+ }
459
+ } else if (/skip/.test(direction)) {
460
+ // the target image is not adjacent to the current image, so
461
+ // do we scroll right or not
462
+ skip_shift = target.index() - this.settings.up_count;
463
+ this.lock();
464
+
465
+ if (skip_shift > 0) {
466
+ dir_obj[dir] = -(skip_shift * width);
467
+ clearing.animate(dir_obj, 300, this.unlock());
468
+ } else {
469
+ dir_obj[dir] = 0;
470
+ clearing.animate(dir_obj, 300, this.unlock());
471
+ }
472
+ }
473
+
474
+ callback();
475
+ },
476
+
477
+ direction : function ($el, current, target) {
478
+ var lis = this.S('li', $el),
479
+ li_width = lis.outerWidth() + (lis.outerWidth() / 4),
480
+ up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,
481
+ target_index = lis.index(target),
482
+ response;
483
+
484
+ this.settings.up_count = up_count;
485
+
486
+ if (this.adjacent(this.settings.prev_index, target_index)) {
487
+ if ((target_index > up_count) && target_index > this.settings.prev_index) {
488
+ response = 'right';
489
+ } else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {
490
+ response = 'left';
491
+ } else {
492
+ response = false;
493
+ }
494
+ } else {
495
+ response = 'skip';
496
+ }
497
+
498
+ this.settings.prev_index = target_index;
499
+
500
+ return response;
501
+ },
502
+
503
+ adjacent : function (current_index, target_index) {
504
+ for (var i = target_index + 1; i >= target_index - 1; i--) {
505
+ if (i === current_index) return true;
506
+ }
507
+ return false;
508
+ },
509
+
510
+ // lock management
511
+
512
+ lock : function () {
513
+ this.settings.locked = true;
514
+ },
515
+
516
+ unlock : function () {
517
+ this.settings.locked = false;
518
+ },
519
+
520
+ locked : function () {
521
+ return this.settings.locked;
522
+ },
523
+
524
+ off : function () {
525
+ this.S(this.scope).off('.fndtn.clearing');
526
+ this.S(window).off('.fndtn.clearing');
527
+ },
528
+
529
+ reflow : function () {
530
+ this.init();
531
+ }
532
+ };
533
+
534
+ }(jQuery, window, window.document));