va_common 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/README.md +66 -0
- data/Rakefile +1 -0
- data/app/assets/fonts/merriweather-bold-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-bold-webfont.svg +294 -0
- data/app/assets/fonts/merriweather-bold-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-bold-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-bold-webfont.woff2 +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.svg +283 -0
- data/app/assets/fonts/merriweather-italic-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-italic-webfont.woff2 +0 -0
- data/app/assets/fonts/merriweather-light-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-light-webfont.svg +299 -0
- data/app/assets/fonts/merriweather-light-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-light-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-light-webfont.woff2 +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.eot +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.svg +294 -0
- data/app/assets/fonts/merriweather-regular-webfont.ttf +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.woff +0 -0
- data/app/assets/fonts/merriweather-regular-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.svg +965 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-bold-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.svg +853 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-italic-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.svg +915 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-light-webfont.woff2 +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.eot +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.svg +989 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.ttf +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.woff +0 -0
- data/app/assets/fonts/sourcesanspro-regular-webfont.woff2 +0 -0
- data/app/assets/images/design/background/thread.png +0 -0
- data/app/assets/images/design/logo/logo-alt-hover.png +0 -0
- data/app/assets/images/design/logo/logo-alt.png +0 -0
- data/app/assets/images/design/logo/logo-hover.png +0 -0
- data/app/assets/images/design/logo/logo-small.png +0 -0
- data/app/assets/images/design/logo/logo.png +0 -0
- data/app/assets/images/design/logo/og-image.jpg +0 -0
- data/app/assets/images/design/seal/seal-footer.png +0 -0
- data/app/assets/images/design/seal/seal-footer.svg +1 -0
- data/app/assets/images/design/seal/seal.png +0 -0
- data/app/assets/images/design/seal/stars.png +0 -0
- data/app/assets/images/icons/apple-touch-icon-114x114.png +0 -0
- data/app/assets/images/icons/apple-touch-icon-152x152.png +0 -0
- data/app/assets/images/icons/apple-touch-icon-72x72.png +0 -0
- data/app/assets/images/icons/apple-touch-icon.png +0 -0
- data/app/assets/images/icons/favicon.ico +0 -0
- data/app/assets/images/icons/va.png +0 -0
- data/app/assets/images/icons/watermark.png +0 -0
- data/app/assets/images/icons/wrench.png +0 -0
- data/app/assets/images/social-icons/png/facebook25.png +0 -0
- data/app/assets/images/social-icons/png/rss25.png +0 -0
- data/app/assets/images/social-icons/png/twitter16.png +0 -0
- data/app/assets/images/social-icons/png/youtube15.png +0 -0
- data/app/assets/images/social-icons/svg/facebook25.svg +11 -0
- data/app/assets/images/social-icons/svg/rss25.svg +1 -0
- data/app/assets/images/social-icons/svg/twitter16.svg +15 -0
- data/app/assets/images/social-icons/svg/youtube15.svg +1 -0
- data/app/assets/js/components.js +376 -0
- data/app/assets/js/foundation/foundation.abide.js +408 -0
- data/app/assets/js/foundation/foundation.accordion.js +88 -0
- data/app/assets/js/foundation/foundation.alert.js +43 -0
- data/app/assets/js/foundation/foundation.clearing.js +586 -0
- data/app/assets/js/foundation/foundation.dropdown.js +463 -0
- data/app/assets/js/foundation/foundation.equalizer.js +104 -0
- data/app/assets/js/foundation/foundation.interchange.js +359 -0
- data/app/assets/js/foundation/foundation.joyride.js +932 -0
- data/app/assets/js/foundation/foundation.js +725 -0
- data/app/assets/js/foundation/foundation.magellan.js +215 -0
- data/app/assets/js/foundation/foundation.offcanvas.js +152 -0
- data/app/assets/js/foundation/foundation.orbit.js +476 -0
- data/app/assets/js/foundation/foundation.reveal.js +498 -0
- data/app/assets/js/foundation/foundation.slider.js +281 -0
- data/app/assets/js/foundation/foundation.tab.js +249 -0
- data/app/assets/js/foundation/foundation.tooltip.js +339 -0
- data/app/assets/js/foundation/foundation.topbar.js +458 -0
- data/app/assets/js/foundation.min.js +6376 -0
- data/app/assets/js/scripts-no-touch.js +33 -0
- data/app/assets/js/scripts-touch.js +33 -0
- data/app/assets/js/va_common_main.js +1 -0
- data/app/assets/js/vendor/classie.js +80 -0
- data/app/assets/js/vendor/html5shiv.js +8 -0
- data/app/assets/js/vendor/jquery-1.11.0.min.js +4 -0
- data/app/assets/js/vendor/jquery.js +9789 -0
- data/app/assets/js/vendor/jquery.smooth-scroll.js +255 -0
- data/app/assets/js/vendor/jquery.stellar.js +651 -0
- data/app/assets/js/vendor/jquery.tipsy.js +258 -0
- data/app/assets/js/vendor/menu.js +40 -0
- data/app/assets/js/vendor/modernizr.custom.js +4 -0
- data/app/assets/js/vendor/nwmatcher-1.2.5-min.js +7 -0
- data/app/assets/js/vendor/respond.min.js +6 -0
- data/app/assets/js/vendor/scroll-settings.js +3 -0
- data/app/assets/js/vendor/selectivizr-1.0.3b.js +560 -0
- data/app/assets/js/vendor/stellar-settings.js +8 -0
- data/app/assets/js/vendor/svg-injector.js +450 -0
- data/app/assets/js/vendor/tota11y.min.js +28 -0
- data/app/assets/js/vendor/wow.min.js +2 -0
- data/app/assets/stylesheets/_va.scss +2377 -0
- data/app/assets/stylesheets/components/_accordions.scss +98 -0
- data/app/assets/stylesheets/core/_base.scss +20 -0
- data/app/assets/stylesheets/core/_defaults.scss +92 -0
- data/app/assets/stylesheets/core/_grid-settings.scss +10 -0
- data/app/assets/stylesheets/core/_grid.scss +116 -0
- data/app/assets/stylesheets/core/_utilities.scss +105 -0
- data/app/assets/stylesheets/core/_variables.scss +88 -0
- data/app/assets/stylesheets/elements/_buttons.scss +189 -0
- data/app/assets/stylesheets/elements/_figure.scss +9 -0
- data/app/assets/stylesheets/elements/_inputs.scss +328 -0
- data/app/assets/stylesheets/elements/_labels.scss +39 -0
- data/app/assets/stylesheets/elements/_list.scss +82 -0
- data/app/assets/stylesheets/elements/_table.scss +39 -0
- data/app/assets/stylesheets/elements/_typography.scss +220 -0
- data/app/assets/stylesheets/foundation/_functions.scss +146 -0
- data/app/assets/stylesheets/foundation/_settings.scss +1467 -0
- data/app/assets/stylesheets/foundation/_variables.scss +1286 -0
- data/app/assets/stylesheets/foundation/components/_accordion.scss +157 -0
- data/app/assets/stylesheets/foundation/components/_alert-boxes.scss +128 -0
- data/app/assets/stylesheets/foundation/components/_block-grid.scss +132 -0
- data/app/assets/stylesheets/foundation/components/_breadcrumbs.scss +132 -0
- data/app/assets/stylesheets/foundation/components/_button-groups.scss +200 -0
- data/app/assets/stylesheets/foundation/components/_buttons.scss +259 -0
- data/app/assets/stylesheets/foundation/components/_clearing.scss +256 -0
- data/app/assets/stylesheets/foundation/components/_dropdown-buttons.scss +131 -0
- data/app/assets/stylesheets/foundation/components/_dropdown.scss +262 -0
- data/app/assets/stylesheets/foundation/components/_flex-video.scss +51 -0
- data/app/assets/stylesheets/foundation/components/_forms.scss +570 -0
- data/app/assets/stylesheets/foundation/components/_global.scss +481 -0
- data/app/assets/stylesheets/foundation/components/_grid.scss +289 -0
- data/app/assets/stylesheets/foundation/components/_icon-bar.scss +358 -0
- data/app/assets/stylesheets/foundation/components/_inline-lists.scss +57 -0
- data/app/assets/stylesheets/foundation/components/_joyride.scss +222 -0
- data/app/assets/stylesheets/foundation/components/_keystrokes.scss +61 -0
- data/app/assets/stylesheets/foundation/components/_labels.scss +106 -0
- data/app/assets/stylesheets/foundation/components/_magellan.scss +34 -0
- data/app/assets/stylesheets/foundation/components/_offcanvas.scss +515 -0
- data/app/assets/stylesheets/foundation/components/_orbit.scss +368 -0
- data/app/assets/stylesheets/foundation/components/_pagination.scss +162 -0
- data/app/assets/stylesheets/foundation/components/_panels.scss +101 -0
- data/app/assets/stylesheets/foundation/components/_pricing-tables.scss +150 -0
- data/app/assets/stylesheets/foundation/components/_progress-bars.scss +79 -0
- data/app/assets/stylesheets/foundation/components/_range-slider.scss +169 -0
- data/app/assets/stylesheets/foundation/components/_reveal.scss +202 -0
- data/app/assets/stylesheets/foundation/components/_side-nav.scss +116 -0
- data/app/assets/stylesheets/foundation/components/_split-buttons.scss +199 -0
- data/app/assets/stylesheets/foundation/components/_sub-nav.scss +123 -0
- data/app/assets/stylesheets/foundation/components/_switches.scss +238 -0
- data/app/assets/stylesheets/foundation/components/_tables.scss +135 -0
- data/app/assets/stylesheets/foundation/components/_tabs.scss +123 -0
- data/app/assets/stylesheets/foundation/components/_thumbs.scss +66 -0
- data/app/assets/stylesheets/foundation/components/_toolbar.scss +70 -0
- data/app/assets/stylesheets/foundation/components/_tooltips.scss +142 -0
- data/app/assets/stylesheets/foundation/components/_top-bar.scss +691 -0
- data/app/assets/stylesheets/foundation/components/_type.scss +525 -0
- data/app/assets/stylesheets/foundation/components/_visibility.scss +408 -0
- data/app/assets/stylesheets/functions/_new-breakpoint.scss +49 -0
- data/app/assets/stylesheets/functions/_private.scss +114 -0
- data/app/assets/stylesheets/lib/_normalize.scss +427 -0
- data/app/assets/stylesheets/lib/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
- data/app/assets/stylesheets/lib/bourbon/_bourbon.scss +87 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-color.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-radius.scss +48 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-style.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_border-width.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_buttons.scss +64 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_clearfix.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_ellipsis.scss +30 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_font-stacks.scss +31 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_hide-text.scss +27 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_margin.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_padding.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_position.scss +48 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_prefixer.scss +66 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_retina-image.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_size.scss +51 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_text-inputs.scss +112 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_timing-functions.scss +34 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_triangle.scss +63 -0
- data/app/assets/stylesheets/lib/bourbon/addons/_word-wrap.scss +29 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_animation.scss +43 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_appearance.scss +3 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_backface-visibility.scss +3 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_background-image.scss +42 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_background.scss +55 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_border-image.scss +59 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_calc.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_columns.scss +47 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_filter.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_flex-box.scss +287 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_font-face.scss +24 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_font-feature-settings.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_hyphens.scss +4 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_image-rendering.scss +14 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_keyframes.scss +36 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_linear-gradient.scss +38 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_perspective.scss +8 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_placeholder.scss +8 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_radial-gradient.scss +39 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_selection.scss +42 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_text-decoration.scss +19 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_transform.scss +15 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_transition.scss +71 -0
- data/app/assets/stylesheets/lib/bourbon/css3/_user-select.scss +3 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_assign-inputs.scss +11 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_contains-falsy.scss +20 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_contains.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-length.scss +11 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-light.scss +21 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-number.scss +11 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_is-size.scss +13 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_modular-scale.scss +69 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_px-to-em.scss +13 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_px-to-rem.scss +15 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_shade.scss +24 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_strip-units.scss +17 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_tint.scss +24 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_transition-property-name.scss +22 -0
- data/app/assets/stylesheets/lib/bourbon/functions/_unpack.scss +27 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_convert-units.scss +21 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_directional-values.scss +96 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_font-source-declaration.scss +43 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_render-gradients.scss +26 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/app/assets/stylesheets/lib/bourbon/helpers/_str-to-num.scss +50 -0
- data/app/assets/stylesheets/lib/bourbon/settings/_asset-pipeline.scss +7 -0
- data/app/assets/stylesheets/lib/bourbon/settings/_prefixer.scss +9 -0
- data/app/assets/stylesheets/lib/bourbon/settings/_px-to-em.scss +1 -0
- data/app/assets/stylesheets/lib/neat/_neat-helpers.scss +8 -0
- data/app/assets/stylesheets/lib/neat/_neat.scss +23 -0
- data/app/assets/stylesheets/lib/neat/functions/_new-breakpoint.scss +49 -0
- data/app/assets/stylesheets/lib/neat/functions/_private.scss +114 -0
- data/app/assets/stylesheets/lib/neat/grid/_box-sizing.scss +15 -0
- data/app/assets/stylesheets/lib/neat/grid/_direction-context.scss +33 -0
- data/app/assets/stylesheets/lib/neat/grid/_display-context.scss +28 -0
- data/app/assets/stylesheets/lib/neat/grid/_fill-parent.scss +22 -0
- data/app/assets/stylesheets/lib/neat/grid/_media.scss +92 -0
- data/app/assets/stylesheets/lib/neat/grid/_omega.scss +87 -0
- data/app/assets/stylesheets/lib/neat/grid/_outer-container.scss +38 -0
- data/app/assets/stylesheets/lib/neat/grid/_pad.scss +25 -0
- data/app/assets/stylesheets/lib/neat/grid/_private.scss +35 -0
- data/app/assets/stylesheets/lib/neat/grid/_row.scss +52 -0
- data/app/assets/stylesheets/lib/neat/grid/_shift.scss +50 -0
- data/app/assets/stylesheets/lib/neat/grid/_span-columns.scss +94 -0
- data/app/assets/stylesheets/lib/neat/grid/_to-deprecate.scss +97 -0
- data/app/assets/stylesheets/lib/neat/grid/_visual-grid.scss +42 -0
- data/app/assets/stylesheets/lib/neat/settings/_disable-warnings.scss +13 -0
- data/app/assets/stylesheets/lib/neat/settings/_grid.scss +51 -0
- data/app/assets/stylesheets/lib/neat/settings/_visual-grid.scss +27 -0
- data/app/assets/stylesheets/va_common_main.css.scss +18 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/generators/files/_footer.html.erb +89 -0
- data/lib/generators/files/_header.html.erb +7 -0
- data/lib/generators/va_common_generator.rb +6 -0
- data/lib/generators/va_footer_generator.rb +7 -0
- data/lib/generators/va_header_generator.rb +7 -0
- data/lib/va_common/engine.rb +4 -0
- data/lib/va_common/version.rb +3 -0
- data/lib/va_common.rb +2 -0
- data/va_common.gemspec +22 -0
- metadata +354 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
;(function ($, window, document, undefined) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var noop = function () {};
|
|
5
|
+
|
|
6
|
+
var Orbit = function (el, settings) {
|
|
7
|
+
// Don't reinitialize plugin
|
|
8
|
+
if (el.hasClass(settings.slides_container_class)) {
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var self = this,
|
|
13
|
+
container,
|
|
14
|
+
slides_container = el,
|
|
15
|
+
number_container,
|
|
16
|
+
bullets_container,
|
|
17
|
+
timer_container,
|
|
18
|
+
idx = 0,
|
|
19
|
+
animate,
|
|
20
|
+
timer,
|
|
21
|
+
locked = false,
|
|
22
|
+
adjust_height_after = false;
|
|
23
|
+
|
|
24
|
+
self.slides = function () {
|
|
25
|
+
return slides_container.children(settings.slide_selector);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
self.slides().first().addClass(settings.active_slide_class);
|
|
29
|
+
|
|
30
|
+
self.update_slide_number = function (index) {
|
|
31
|
+
if (settings.slide_number) {
|
|
32
|
+
number_container.find('span:first').text(parseInt(index) + 1);
|
|
33
|
+
number_container.find('span:last').text(self.slides().length);
|
|
34
|
+
}
|
|
35
|
+
if (settings.bullets) {
|
|
36
|
+
bullets_container.children().removeClass(settings.bullets_active_class);
|
|
37
|
+
$(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
self.update_active_link = function (index) {
|
|
42
|
+
var link = $('[data-orbit-link="' + self.slides().eq(index).attr('data-orbit-slide') + '"]');
|
|
43
|
+
link.siblings().removeClass(settings.bullets_active_class);
|
|
44
|
+
link.addClass(settings.bullets_active_class);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
self.build_markup = function () {
|
|
48
|
+
slides_container.wrap('<div class="' + settings.container_class + '"></div>');
|
|
49
|
+
container = slides_container.parent();
|
|
50
|
+
slides_container.addClass(settings.slides_container_class);
|
|
51
|
+
|
|
52
|
+
if (settings.stack_on_small) {
|
|
53
|
+
container.addClass(settings.stack_on_small_class);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (settings.navigation_arrows) {
|
|
57
|
+
container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
|
|
58
|
+
container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (settings.timer) {
|
|
62
|
+
timer_container = $('<div>').addClass(settings.timer_container_class);
|
|
63
|
+
timer_container.append('<span>');
|
|
64
|
+
timer_container.append($('<div>').addClass(settings.timer_progress_class));
|
|
65
|
+
timer_container.addClass(settings.timer_paused_class);
|
|
66
|
+
container.append(timer_container);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (settings.slide_number) {
|
|
70
|
+
number_container = $('<div>').addClass(settings.slide_number_class);
|
|
71
|
+
number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
|
|
72
|
+
container.append(number_container);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (settings.bullets) {
|
|
76
|
+
bullets_container = $('<ol>').addClass(settings.bullets_container_class);
|
|
77
|
+
container.append(bullets_container);
|
|
78
|
+
bullets_container.wrap('<div class="orbit-bullets-container"></div>');
|
|
79
|
+
self.slides().each(function (idx, el) {
|
|
80
|
+
var bullet = $('<li>').attr('data-orbit-slide', idx).on('click', self.link_bullet);;
|
|
81
|
+
bullets_container.append(bullet);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
self._goto = function (next_idx, start_timer) {
|
|
88
|
+
// if (locked) {return false;}
|
|
89
|
+
if (next_idx === idx) {return false;}
|
|
90
|
+
if (typeof timer === 'object') {timer.restart();}
|
|
91
|
+
var slides = self.slides();
|
|
92
|
+
|
|
93
|
+
var dir = 'next';
|
|
94
|
+
locked = true;
|
|
95
|
+
if (next_idx < idx) {dir = 'prev';}
|
|
96
|
+
if (next_idx >= slides.length) {
|
|
97
|
+
if (!settings.circular) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
next_idx = 0;
|
|
101
|
+
} else if (next_idx < 0) {
|
|
102
|
+
if (!settings.circular) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
next_idx = slides.length - 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var current = $(slides.get(idx));
|
|
109
|
+
var next = $(slides.get(next_idx));
|
|
110
|
+
|
|
111
|
+
current.css('zIndex', 2);
|
|
112
|
+
current.removeClass(settings.active_slide_class);
|
|
113
|
+
next.css('zIndex', 4).addClass(settings.active_slide_class);
|
|
114
|
+
|
|
115
|
+
slides_container.trigger('before-slide-change.fndtn.orbit');
|
|
116
|
+
settings.before_slide_change();
|
|
117
|
+
self.update_active_link(next_idx);
|
|
118
|
+
|
|
119
|
+
var callback = function () {
|
|
120
|
+
var unlock = function () {
|
|
121
|
+
idx = next_idx;
|
|
122
|
+
locked = false;
|
|
123
|
+
if (start_timer === true) {timer = self.create_timer(); timer.start();}
|
|
124
|
+
self.update_slide_number(idx);
|
|
125
|
+
slides_container.trigger('after-slide-change.fndtn.orbit', [{slide_number : idx, total_slides : slides.length}]);
|
|
126
|
+
settings.after_slide_change(idx, slides.length);
|
|
127
|
+
};
|
|
128
|
+
if (slides_container.outerHeight() != next.outerHeight() && settings.variable_height) {
|
|
129
|
+
slides_container.animate({'height': next.outerHeight()}, 250, 'linear', unlock);
|
|
130
|
+
} else {
|
|
131
|
+
unlock();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
if (slides.length === 1) {callback(); return false;}
|
|
136
|
+
|
|
137
|
+
var start_animation = function () {
|
|
138
|
+
if (dir === 'next') {animate.next(current, next, callback);}
|
|
139
|
+
if (dir === 'prev') {animate.prev(current, next, callback);}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
if (next.outerHeight() > slides_container.outerHeight() && settings.variable_height) {
|
|
143
|
+
slides_container.animate({'height': next.outerHeight()}, 250, 'linear', start_animation);
|
|
144
|
+
} else {
|
|
145
|
+
start_animation();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
self.next = function (e) {
|
|
150
|
+
e.stopImmediatePropagation();
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
self._goto(idx + 1);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
self.prev = function (e) {
|
|
156
|
+
e.stopImmediatePropagation();
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
self._goto(idx - 1);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
self.link_custom = function (e) {
|
|
162
|
+
e.preventDefault();
|
|
163
|
+
var link = $(this).attr('data-orbit-link');
|
|
164
|
+
if ((typeof link === 'string') && (link = $.trim(link)) != '') {
|
|
165
|
+
var slide = container.find('[data-orbit-slide=' + link + ']');
|
|
166
|
+
if (slide.index() != -1) {self._goto(slide.index());}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
self.link_bullet = function (e) {
|
|
171
|
+
var index = $(this).attr('data-orbit-slide');
|
|
172
|
+
if ((typeof index === 'string') && (index = $.trim(index)) != '') {
|
|
173
|
+
if (isNaN(parseInt(index))) {
|
|
174
|
+
var slide = container.find('[data-orbit-slide=' + index + ']');
|
|
175
|
+
if (slide.index() != -1) {self._goto(slide.index() + 1);}
|
|
176
|
+
} else {
|
|
177
|
+
self._goto(parseInt(index));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
self.timer_callback = function () {
|
|
184
|
+
self._goto(idx + 1, true);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
self.compute_dimensions = function () {
|
|
188
|
+
var current = $(self.slides().get(idx));
|
|
189
|
+
var h = current.outerHeight();
|
|
190
|
+
if (!settings.variable_height) {
|
|
191
|
+
self.slides().each(function(){
|
|
192
|
+
if ($(this).outerHeight() > h) { h = $(this).outerHeight(); }
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
slides_container.height(h);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
self.create_timer = function () {
|
|
199
|
+
var t = new Timer(
|
|
200
|
+
container.find('.' + settings.timer_container_class),
|
|
201
|
+
settings,
|
|
202
|
+
self.timer_callback
|
|
203
|
+
);
|
|
204
|
+
return t;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
self.stop_timer = function () {
|
|
208
|
+
if (typeof timer === 'object') {
|
|
209
|
+
timer.stop();
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
self.toggle_timer = function () {
|
|
214
|
+
var t = container.find('.' + settings.timer_container_class);
|
|
215
|
+
if (t.hasClass(settings.timer_paused_class)) {
|
|
216
|
+
if (typeof timer === 'undefined') {timer = self.create_timer();}
|
|
217
|
+
timer.start();
|
|
218
|
+
} else {
|
|
219
|
+
if (typeof timer === 'object') {timer.stop();}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
self.init = function () {
|
|
224
|
+
self.build_markup();
|
|
225
|
+
if (settings.timer) {
|
|
226
|
+
timer = self.create_timer();
|
|
227
|
+
Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
|
|
228
|
+
}
|
|
229
|
+
animate = new FadeAnimation(settings, slides_container);
|
|
230
|
+
if (settings.animation === 'slide') {
|
|
231
|
+
animate = new SlideAnimation(settings, slides_container);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
container.on('click', '.' + settings.next_class, self.next);
|
|
235
|
+
container.on('click', '.' + settings.prev_class, self.prev);
|
|
236
|
+
|
|
237
|
+
if (settings.next_on_click) {
|
|
238
|
+
container.on('click', '.' + settings.slides_container_class + ' [data-orbit-slide]', self.link_bullet);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
container.on('click', self.toggle_timer);
|
|
242
|
+
if (settings.swipe) {
|
|
243
|
+
container.on('touchstart.fndtn.orbit', function (e) {
|
|
244
|
+
if (!e.touches) {e = e.originalEvent;}
|
|
245
|
+
var data = {
|
|
246
|
+
start_page_x : e.touches[0].pageX,
|
|
247
|
+
start_page_y : e.touches[0].pageY,
|
|
248
|
+
start_time : (new Date()).getTime(),
|
|
249
|
+
delta_x : 0,
|
|
250
|
+
is_scrolling : undefined
|
|
251
|
+
};
|
|
252
|
+
container.data('swipe-transition', data);
|
|
253
|
+
e.stopPropagation();
|
|
254
|
+
})
|
|
255
|
+
.on('touchmove.fndtn.orbit', function (e) {
|
|
256
|
+
if (!e.touches) {
|
|
257
|
+
e = e.originalEvent;
|
|
258
|
+
}
|
|
259
|
+
// Ignore pinch/zoom events
|
|
260
|
+
if (e.touches.length > 1 || e.scale && e.scale !== 1) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
var data = container.data('swipe-transition');
|
|
265
|
+
if (typeof data === 'undefined') {data = {};}
|
|
266
|
+
|
|
267
|
+
data.delta_x = e.touches[0].pageX - data.start_page_x;
|
|
268
|
+
|
|
269
|
+
if ( typeof data.is_scrolling === 'undefined') {
|
|
270
|
+
data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (!data.is_scrolling && !data.active) {
|
|
274
|
+
e.preventDefault();
|
|
275
|
+
var direction = (data.delta_x < 0) ? (idx + 1) : (idx - 1);
|
|
276
|
+
data.active = true;
|
|
277
|
+
self._goto(direction);
|
|
278
|
+
}
|
|
279
|
+
})
|
|
280
|
+
.on('touchend.fndtn.orbit', function (e) {
|
|
281
|
+
container.data('swipe-transition', {});
|
|
282
|
+
e.stopPropagation();
|
|
283
|
+
})
|
|
284
|
+
}
|
|
285
|
+
container.on('mouseenter.fndtn.orbit', function (e) {
|
|
286
|
+
if (settings.timer && settings.pause_on_hover) {
|
|
287
|
+
self.stop_timer();
|
|
288
|
+
}
|
|
289
|
+
})
|
|
290
|
+
.on('mouseleave.fndtn.orbit', function (e) {
|
|
291
|
+
if (settings.timer && settings.resume_on_mouseout) {
|
|
292
|
+
timer.start();
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
$(document).on('click', '[data-orbit-link]', self.link_custom);
|
|
297
|
+
$(window).on('load resize', self.compute_dimensions);
|
|
298
|
+
Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
|
|
299
|
+
Foundation.utils.image_loaded(this.slides().children('img'), function () {
|
|
300
|
+
container.prev('.' + settings.preloader_class).css('display', 'none');
|
|
301
|
+
self.update_slide_number(0);
|
|
302
|
+
self.update_active_link(0);
|
|
303
|
+
slides_container.trigger('ready.fndtn.orbit');
|
|
304
|
+
});
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
self.init();
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
var Timer = function (el, settings, callback) {
|
|
311
|
+
var self = this,
|
|
312
|
+
duration = settings.timer_speed,
|
|
313
|
+
progress = el.find('.' + settings.timer_progress_class),
|
|
314
|
+
start,
|
|
315
|
+
timeout,
|
|
316
|
+
left = -1;
|
|
317
|
+
|
|
318
|
+
this.update_progress = function (w) {
|
|
319
|
+
var new_progress = progress.clone();
|
|
320
|
+
new_progress.attr('style', '');
|
|
321
|
+
new_progress.css('width', w + '%');
|
|
322
|
+
progress.replaceWith(new_progress);
|
|
323
|
+
progress = new_progress;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
this.restart = function () {
|
|
327
|
+
clearTimeout(timeout);
|
|
328
|
+
el.addClass(settings.timer_paused_class);
|
|
329
|
+
left = -1;
|
|
330
|
+
self.update_progress(0);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
this.start = function () {
|
|
334
|
+
if (!el.hasClass(settings.timer_paused_class)) {return true;}
|
|
335
|
+
left = (left === -1) ? duration : left;
|
|
336
|
+
el.removeClass(settings.timer_paused_class);
|
|
337
|
+
start = new Date().getTime();
|
|
338
|
+
progress.animate({'width' : '100%'}, left, 'linear');
|
|
339
|
+
timeout = setTimeout(function () {
|
|
340
|
+
self.restart();
|
|
341
|
+
callback();
|
|
342
|
+
}, left);
|
|
343
|
+
el.trigger('timer-started.fndtn.orbit')
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
this.stop = function () {
|
|
347
|
+
if (el.hasClass(settings.timer_paused_class)) {return true;}
|
|
348
|
+
clearTimeout(timeout);
|
|
349
|
+
el.addClass(settings.timer_paused_class);
|
|
350
|
+
var end = new Date().getTime();
|
|
351
|
+
left = left - (end - start);
|
|
352
|
+
var w = 100 - ((left / duration) * 100);
|
|
353
|
+
self.update_progress(w);
|
|
354
|
+
el.trigger('timer-stopped.fndtn.orbit');
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
var SlideAnimation = function (settings, container) {
|
|
359
|
+
var duration = settings.animation_speed;
|
|
360
|
+
var is_rtl = ($('html[dir=rtl]').length === 1);
|
|
361
|
+
var margin = is_rtl ? 'marginRight' : 'marginLeft';
|
|
362
|
+
var animMargin = {};
|
|
363
|
+
animMargin[margin] = '0%';
|
|
364
|
+
|
|
365
|
+
this.next = function (current, next, callback) {
|
|
366
|
+
current.animate({marginLeft : '-100%'}, duration);
|
|
367
|
+
next.animate(animMargin, duration, function () {
|
|
368
|
+
current.css(margin, '100%');
|
|
369
|
+
callback();
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
this.prev = function (current, prev, callback) {
|
|
374
|
+
current.animate({marginLeft : '100%'}, duration);
|
|
375
|
+
prev.css(margin, '-100%');
|
|
376
|
+
prev.animate(animMargin, duration, function () {
|
|
377
|
+
current.css(margin, '100%');
|
|
378
|
+
callback();
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
var FadeAnimation = function (settings, container) {
|
|
384
|
+
var duration = settings.animation_speed;
|
|
385
|
+
var is_rtl = ($('html[dir=rtl]').length === 1);
|
|
386
|
+
var margin = is_rtl ? 'marginRight' : 'marginLeft';
|
|
387
|
+
|
|
388
|
+
this.next = function (current, next, callback) {
|
|
389
|
+
next.css({'margin' : '0%', 'opacity' : '0.01'});
|
|
390
|
+
next.animate({'opacity' :'1'}, duration, 'linear', function () {
|
|
391
|
+
current.css('margin', '100%');
|
|
392
|
+
callback();
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
this.prev = function (current, prev, callback) {
|
|
397
|
+
prev.css({'margin' : '0%', 'opacity' : '0.01'});
|
|
398
|
+
prev.animate({'opacity' : '1'}, duration, 'linear', function () {
|
|
399
|
+
current.css('margin', '100%');
|
|
400
|
+
callback();
|
|
401
|
+
});
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
Foundation.libs = Foundation.libs || {};
|
|
406
|
+
|
|
407
|
+
Foundation.libs.orbit = {
|
|
408
|
+
name : 'orbit',
|
|
409
|
+
|
|
410
|
+
version : '5.5.2',
|
|
411
|
+
|
|
412
|
+
settings : {
|
|
413
|
+
animation : 'slide',
|
|
414
|
+
timer_speed : 10000,
|
|
415
|
+
pause_on_hover : true,
|
|
416
|
+
resume_on_mouseout : false,
|
|
417
|
+
next_on_click : true,
|
|
418
|
+
animation_speed : 500,
|
|
419
|
+
stack_on_small : false,
|
|
420
|
+
navigation_arrows : true,
|
|
421
|
+
slide_number : true,
|
|
422
|
+
slide_number_text : 'of',
|
|
423
|
+
container_class : 'orbit-container',
|
|
424
|
+
stack_on_small_class : 'orbit-stack-on-small',
|
|
425
|
+
next_class : 'orbit-next',
|
|
426
|
+
prev_class : 'orbit-prev',
|
|
427
|
+
timer_container_class : 'orbit-timer',
|
|
428
|
+
timer_paused_class : 'paused',
|
|
429
|
+
timer_progress_class : 'orbit-progress',
|
|
430
|
+
slides_container_class : 'orbit-slides-container',
|
|
431
|
+
preloader_class : 'preloader',
|
|
432
|
+
slide_selector : '*',
|
|
433
|
+
bullets_container_class : 'orbit-bullets',
|
|
434
|
+
bullets_active_class : 'active',
|
|
435
|
+
slide_number_class : 'orbit-slide-number',
|
|
436
|
+
caption_class : 'orbit-caption',
|
|
437
|
+
active_slide_class : 'active',
|
|
438
|
+
orbit_transition_class : 'orbit-transitioning',
|
|
439
|
+
bullets : true,
|
|
440
|
+
circular : true,
|
|
441
|
+
timer : true,
|
|
442
|
+
variable_height : false,
|
|
443
|
+
swipe : true,
|
|
444
|
+
before_slide_change : noop,
|
|
445
|
+
after_slide_change : noop
|
|
446
|
+
},
|
|
447
|
+
|
|
448
|
+
init : function (scope, method, options) {
|
|
449
|
+
var self = this;
|
|
450
|
+
this.bindings(method, options);
|
|
451
|
+
},
|
|
452
|
+
|
|
453
|
+
events : function (instance) {
|
|
454
|
+
var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
|
|
455
|
+
this.S(instance).data(this.name + '-instance', orbit_instance);
|
|
456
|
+
},
|
|
457
|
+
|
|
458
|
+
reflow : function () {
|
|
459
|
+
var self = this;
|
|
460
|
+
|
|
461
|
+
if (self.S(self.scope).is('[data-orbit]')) {
|
|
462
|
+
var $el = self.S(self.scope);
|
|
463
|
+
var instance = $el.data(self.name + '-instance');
|
|
464
|
+
instance.compute_dimensions();
|
|
465
|
+
} else {
|
|
466
|
+
self.S('[data-orbit]', self.scope).each(function (idx, el) {
|
|
467
|
+
var $el = self.S(el);
|
|
468
|
+
var opts = self.data_options($el);
|
|
469
|
+
var instance = $el.data(self.name + '-instance');
|
|
470
|
+
instance.compute_dimensions();
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
}(jQuery, window, window.document));
|