Codebase list capistrano / c3262e9
Import upstream version 3.17.1+git20221128.1.7317689 Debian Janitor 1 year, 3 months ago
116 changed file(s) with 14662 addition(s) and 97 deletion(s). Raw diff Collapse all Expand all
3131 paths:
3232 - ./vendor/bundle
3333 key: bundle-v1-{{ arch }}-<< parameters.version >>-{{ checksum "Gemfile.lock" }}
34 update_ssh_client:
35 description: Install recent SSH client for compatibility with GitHub
36 steps:
37 - run:
38 name: Install OpenSSH 8.1p1 if necessary
39 command: |
40 if $(ssh -V 2>&1 | grep -q -v OpenSSH_8); then
41 apt-get update
42 apt-get install -y --force-yes libssl-dev
43 mkdir ~/tempdownload
44 cd ~/tempdownload
45 wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz
46 tar zxvf openssh-8.1p1.tar.gz
47 cd openssh-8.1p1 && ./configure --prefix=/usr && make ssh && make install
48 fi
3449
3550 jobs:
3651 danger:
5772 name: ruby
5873 version: << parameters.version >>
5974 steps:
75 - update_ssh_client
6076 - checkout
6177 - bundle_install:
6278 version: << parameters.version >>
+0
-19
.github/issue_template.md less more
0 **Important:** GitHub issues are for feature requests or bug reports. The Capistrano team recommends you use [Stack Overflow](http://stackoverflow.com/questions/tagged/capistrano) for general questions. For more details, please see our [contribution policy](https://github.com/capistrano/capistrano/blob/master/CONTRIBUTING.md).
1
2 ---
3
4 ### Steps to reproduce
5 If reasonable, you can help by creating a Capistrano skeleton example project which reproduces the issue you are seeing. You can then upload the individual files to a GitHub Gist or a GitHub project. Others can simply modify the configuration to point at a test server/repository of their own. Often times, an issue is resolved simply by making this test case.
6
7 An example test case is here: https://gist.github.com/will-in-wi/527327e31af30b3eae2068e2965be05b
8
9 ### Expected behavior
10 Tell us what should happen
11
12 ### Actual behavior
13 Tell us what happens instead
14
15 ### System configuration
16 Please link to the output of `cap <stage> doctor` in a GitHub Gist.
17
18 Thanks for helping improve Capistrano!
+0
-22
.github/pull_request_template.md less more
0 ### Summary
1
2 (Guidelines for creating a bug report are available
3 here: https://github.com/capistrano/capistrano/blob/master/DEVELOPMENT.md)
4
5 Provide a general description of the code changes in your pull
6 request... were there any bugs you had fixed? If so, mention them. If
7 these bugs have open GitHub issues, be sure to tag them here as well,
8 to keep the conversation linked together.
9
10 ### Short checklist
11
12 - [ ] Did you run `bundle exec rubocop -a` to fix linter issues?
13 - [ ] If relevant, did you create a test?
14 - [ ] Did you confirm that the RSpec tests pass?
15
16 ### Other Information
17
18 If there's anything else that's important and relevant to your pull
19 request, mention that information here.
20
21 Thanks for helping improve Capistrano!
+0
-17
.github/release-drafter.yml less more
0 name-template: "$NEXT_PATCH_VERSION"
1 tag-template: "v$NEXT_PATCH_VERSION"
2 categories:
3 - title: "⚠️ Breaking Changes"
4 label: "⚠️ Breaking"
5 - title: "✨ New Features"
6 label: "✨ Feature"
7 - title: "🐛 Bug Fixes"
8 label: "🐛 Bug Fix"
9 - title: "📚 Documentation"
10 label: "📚 Docs"
11 - title: "🏠 Housekeeping"
12 label: "🏠 Housekeeping"
13 change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
14 no-changes-template: "- No changes"
15 template: |
16 $CHANGES
+0
-12
.github/workflows/push.yml less more
0 on: push
1 name: Push
2 jobs:
3 draftRelease:
4 name: Draft Release
5 runs-on: ubuntu-latest
6 steps:
7 - uses: actions/checkout@master
8 - name: Draft Release
9 uses: toolmantim/release-drafter@v5.2.0
10 env:
11 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+0
-25
.gitignore less more
0 *.gem
1 *.rbc
2 *.swp
3 .bundle
4 .config
5 .rspec
6 .rspec-local
7 .ruby-version
8 .yardoc
9 Gemfile.lock
10 InstalledFiles
11 _site
12 _yardoc
13 coverage
14 doc/
15 lib/bundler/man
16 pkg
17 rdoc
18 spec/reports
19 tags
20 test/tmp
21 test/version_tmp
22 tmp
23 /docs/_site/
24 vendor/
0 capistranorb.com
0 source "https://rubygems.org"
1
2 # keep versions up-to-date with the actual GitHub Pages setup
3 # https://pages.github.com/versions/
4
5 # just do `bundle update` to get the latest version.
6
7 gem "github-pages"
0 GEM
1 remote: https://rubygems.org/
2 specs:
3 activesupport (4.2.10)
4 i18n (~> 0.7)
5 minitest (~> 5.1)
6 thread_safe (~> 0.3, >= 0.3.4)
7 tzinfo (~> 1.1)
8 addressable (2.5.2)
9 public_suffix (>= 2.0.2, < 4.0)
10 coffee-script (2.4.1)
11 coffee-script-source
12 execjs
13 coffee-script-source (1.11.1)
14 colorator (1.1.0)
15 commonmarker (0.17.13)
16 ruby-enum (~> 0.5)
17 concurrent-ruby (1.0.5)
18 dnsruby (1.61.2)
19 addressable (~> 2.5)
20 em-websocket (0.5.1)
21 eventmachine (>= 0.12.9)
22 http_parser.rb (~> 0.6.0)
23 ethon (0.11.0)
24 ffi (>= 1.3.0)
25 eventmachine (1.2.7)
26 execjs (2.7.0)
27 faraday (0.15.3)
28 multipart-post (>= 1.2, < 3)
29 ffi (1.9.25)
30 forwardable-extended (2.6.0)
31 gemoji (3.0.0)
32 github-pages (192)
33 activesupport (= 4.2.10)
34 github-pages-health-check (= 1.8.1)
35 jekyll (= 3.7.4)
36 jekyll-avatar (= 0.6.0)
37 jekyll-coffeescript (= 1.1.1)
38 jekyll-commonmark-ghpages (= 0.1.5)
39 jekyll-default-layout (= 0.1.4)
40 jekyll-feed (= 0.10.0)
41 jekyll-gist (= 1.5.0)
42 jekyll-github-metadata (= 2.9.4)
43 jekyll-mentions (= 1.4.1)
44 jekyll-optional-front-matter (= 0.3.0)
45 jekyll-paginate (= 1.1.0)
46 jekyll-readme-index (= 0.2.0)
47 jekyll-redirect-from (= 0.14.0)
48 jekyll-relative-links (= 0.5.3)
49 jekyll-remote-theme (= 0.3.1)
50 jekyll-sass-converter (= 1.5.2)
51 jekyll-seo-tag (= 2.5.0)
52 jekyll-sitemap (= 1.2.0)
53 jekyll-swiss (= 0.4.0)
54 jekyll-theme-architect (= 0.1.1)
55 jekyll-theme-cayman (= 0.1.1)
56 jekyll-theme-dinky (= 0.1.1)
57 jekyll-theme-hacker (= 0.1.1)
58 jekyll-theme-leap-day (= 0.1.1)
59 jekyll-theme-merlot (= 0.1.1)
60 jekyll-theme-midnight (= 0.1.1)
61 jekyll-theme-minimal (= 0.1.1)
62 jekyll-theme-modernist (= 0.1.1)
63 jekyll-theme-primer (= 0.5.3)
64 jekyll-theme-slate (= 0.1.1)
65 jekyll-theme-tactile (= 0.1.1)
66 jekyll-theme-time-machine (= 0.1.1)
67 jekyll-titles-from-headings (= 0.5.1)
68 jemoji (= 0.10.1)
69 kramdown (= 1.17.0)
70 liquid (= 4.0.0)
71 listen (= 3.1.5)
72 mercenary (~> 0.3)
73 minima (= 2.5.0)
74 nokogiri (>= 1.8.2, < 2.0)
75 rouge (= 2.2.1)
76 terminal-table (~> 1.4)
77 github-pages-health-check (1.8.1)
78 addressable (~> 2.3)
79 dnsruby (~> 1.60)
80 octokit (~> 4.0)
81 public_suffix (~> 2.0)
82 typhoeus (~> 1.3)
83 html-pipeline (2.8.4)
84 activesupport (>= 2)
85 nokogiri (>= 1.4)
86 http_parser.rb (0.6.0)
87 i18n (0.9.5)
88 concurrent-ruby (~> 1.0)
89 jekyll (3.7.4)
90 addressable (~> 2.4)
91 colorator (~> 1.0)
92 em-websocket (~> 0.5)
93 i18n (~> 0.7)
94 jekyll-sass-converter (~> 1.0)
95 jekyll-watch (~> 2.0)
96 kramdown (~> 1.14)
97 liquid (~> 4.0)
98 mercenary (~> 0.3.3)
99 pathutil (~> 0.9)
100 rouge (>= 1.7, < 4)
101 safe_yaml (~> 1.0)
102 jekyll-avatar (0.6.0)
103 jekyll (~> 3.0)
104 jekyll-coffeescript (1.1.1)
105 coffee-script (~> 2.2)
106 coffee-script-source (~> 1.11.1)
107 jekyll-commonmark (1.2.0)
108 commonmarker (~> 0.14)
109 jekyll (>= 3.0, < 4.0)
110 jekyll-commonmark-ghpages (0.1.5)
111 commonmarker (~> 0.17.6)
112 jekyll-commonmark (~> 1)
113 rouge (~> 2)
114 jekyll-default-layout (0.1.4)
115 jekyll (~> 3.0)
116 jekyll-feed (0.10.0)
117 jekyll (~> 3.3)
118 jekyll-gist (1.5.0)
119 octokit (~> 4.2)
120 jekyll-github-metadata (2.9.4)
121 jekyll (~> 3.1)
122 octokit (~> 4.0, != 4.4.0)
123 jekyll-mentions (1.4.1)
124 html-pipeline (~> 2.3)
125 jekyll (~> 3.0)
126 jekyll-optional-front-matter (0.3.0)
127 jekyll (~> 3.0)
128 jekyll-paginate (1.1.0)
129 jekyll-readme-index (0.2.0)
130 jekyll (~> 3.0)
131 jekyll-redirect-from (0.14.0)
132 jekyll (~> 3.3)
133 jekyll-relative-links (0.5.3)
134 jekyll (~> 3.3)
135 jekyll-remote-theme (0.3.1)
136 jekyll (~> 3.5)
137 rubyzip (>= 1.2.1, < 3.0)
138 jekyll-sass-converter (1.5.2)
139 sass (~> 3.4)
140 jekyll-seo-tag (2.5.0)
141 jekyll (~> 3.3)
142 jekyll-sitemap (1.2.0)
143 jekyll (~> 3.3)
144 jekyll-swiss (0.4.0)
145 jekyll-theme-architect (0.1.1)
146 jekyll (~> 3.5)
147 jekyll-seo-tag (~> 2.0)
148 jekyll-theme-cayman (0.1.1)
149 jekyll (~> 3.5)
150 jekyll-seo-tag (~> 2.0)
151 jekyll-theme-dinky (0.1.1)
152 jekyll (~> 3.5)
153 jekyll-seo-tag (~> 2.0)
154 jekyll-theme-hacker (0.1.1)
155 jekyll (~> 3.5)
156 jekyll-seo-tag (~> 2.0)
157 jekyll-theme-leap-day (0.1.1)
158 jekyll (~> 3.5)
159 jekyll-seo-tag (~> 2.0)
160 jekyll-theme-merlot (0.1.1)
161 jekyll (~> 3.5)
162 jekyll-seo-tag (~> 2.0)
163 jekyll-theme-midnight (0.1.1)
164 jekyll (~> 3.5)
165 jekyll-seo-tag (~> 2.0)
166 jekyll-theme-minimal (0.1.1)
167 jekyll (~> 3.5)
168 jekyll-seo-tag (~> 2.0)
169 jekyll-theme-modernist (0.1.1)
170 jekyll (~> 3.5)
171 jekyll-seo-tag (~> 2.0)
172 jekyll-theme-primer (0.5.3)
173 jekyll (~> 3.5)
174 jekyll-github-metadata (~> 2.9)
175 jekyll-seo-tag (~> 2.0)
176 jekyll-theme-slate (0.1.1)
177 jekyll (~> 3.5)
178 jekyll-seo-tag (~> 2.0)
179 jekyll-theme-tactile (0.1.1)
180 jekyll (~> 3.5)
181 jekyll-seo-tag (~> 2.0)
182 jekyll-theme-time-machine (0.1.1)
183 jekyll (~> 3.5)
184 jekyll-seo-tag (~> 2.0)
185 jekyll-titles-from-headings (0.5.1)
186 jekyll (~> 3.3)
187 jekyll-watch (2.0.0)
188 listen (~> 3.0)
189 jemoji (0.10.1)
190 gemoji (~> 3.0)
191 html-pipeline (~> 2.2)
192 jekyll (~> 3.0)
193 kramdown (1.17.0)
194 liquid (4.0.0)
195 listen (3.1.5)
196 rb-fsevent (~> 0.9, >= 0.9.4)
197 rb-inotify (~> 0.9, >= 0.9.7)
198 ruby_dep (~> 1.2)
199 mercenary (0.3.6)
200 mini_portile2 (2.4.0)
201 minima (2.5.0)
202 jekyll (~> 3.5)
203 jekyll-feed (~> 0.9)
204 jekyll-seo-tag (~> 2.1)
205 minitest (5.11.3)
206 multipart-post (2.0.0)
207 nokogiri (1.10.8)
208 mini_portile2 (~> 2.4.0)
209 octokit (4.12.0)
210 sawyer (~> 0.8.0, >= 0.5.3)
211 pathutil (0.16.1)
212 forwardable-extended (~> 2.6)
213 public_suffix (2.0.5)
214 rb-fsevent (0.10.3)
215 rb-inotify (0.9.10)
216 ffi (>= 0.5.0, < 2)
217 rouge (2.2.1)
218 ruby-enum (0.7.2)
219 i18n
220 ruby_dep (1.5.0)
221 rubyzip (2.2.0)
222 safe_yaml (1.0.4)
223 sass (3.6.0)
224 sass-listen (~> 4.0.0)
225 sass-listen (4.0.0)
226 rb-fsevent (~> 0.9, >= 0.9.4)
227 rb-inotify (~> 0.9, >= 0.9.7)
228 sawyer (0.8.1)
229 addressable (>= 2.3.5, < 2.6)
230 faraday (~> 0.8, < 1.0)
231 terminal-table (1.8.0)
232 unicode-display_width (~> 1.1, >= 1.1.1)
233 thread_safe (0.3.6)
234 typhoeus (1.3.0)
235 ethon (>= 0.9.0)
236 tzinfo (1.2.5)
237 thread_safe (~> 0.1)
238 unicode-display_width (1.4.0)
239
240 PLATFORMS
241 ruby
242
243 DEPENDENCIES
244 github-pages
245
246 BUNDLED WITH
247 1.17.3
0 # capistranorb.com
1
2 This `docs/` directory generates the [capistranorb.com](https://capistranorb.com/) site. Feel free to send pull requests to make improvements to Capistrano's documentation!
3
4 ### Quick start
5
6 This is a GitHub Pages project, which means it is built using Jekyll. To run the site locally, you'll need a functioning Ruby environment.
7
8 After checking out the capistrano repository, run:
9
10 ```
11 cd docs
12 bundle install
13 ```
14
15 Then start the Jekyll server with:
16
17 ```
18 bundle exec jekyll serve
19 ```
20
21 You should now be able to preview the site on `http://localhost:4000`. After making any changes to markdown or HTML files, just refresh your browser to see the results. You do not have to restart the Jekyll process.
22
23 More information: [Using Jekyll with Pages](https://help.github.com/articles/using-jekyll-with-pages/).
0 name: Capistrano
1 kramdown:
2 input: GFM
3 hard_wrap: false
4 highlighter: rouge
5 safe: true
6 lsi: false
7 exclude: ["Gemfile", "Gemfile.lock", "README.md", "vendor"]
0 <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=capistranorbcom" id="_carbonads_js"></script>
0 <footer>
1 <div class="row">
2 <div class="large-4 columns">
3 <ul>
4 <li><a href="/documentation/overview/what-is-capistrano/">About Capistrano</a></li>
5 <li><a href="https://github.com/capistrano/capistrano/blob/master/CONTRIBUTING.md">Contributing</a></li>
6 <li><a href="https://rubygems.org/gems/capistrano/versions">Releases</a></li>
7 </ul>
8 </div>
9
10 <div class="large-4 columns">
11 <ul>
12 <li><a href="https://stackoverflow.com/questions/tagged/capistrano">StackOverflow</a></li>
13 <li><a href="https://groups.google.com/forum/#!forum/capistrano">Mailing List</a></li>
14 </ul>
15 </div>
16
17 <div class="large-4 columns">
18 <ul class="social icons">
19 <li class="foundicon"><a href="//twitter.com/capistranorb"><i class="foundicon-twitter"></i></a></li>
20 <li class="foundicon"><a href="//github.com/capistrano"><i class="foundicon-github"></i></a></li>
21 <li class="thanks-dnsimple">
22 <a href="https://dnsimple.link/resolving-capistrano" target="_blank">
23 <span>DNS Services Kindly Hosted By<br></span>
24 <img src="https://cdn.dnsimple.com/assets/resolving-with-us/logo-dark.png" alt="DNSimple" style="display:block;margin:0;padding:0;width:100px;">
25 </a>
26 </li>
27 </ul>
28 </div>
29 </div>
30 </footer>
0 <!-- Google Tag Manager -->
1 <noscript>
2 <iframe src="//www.googletagmanager.com/ns.html?id=GTM-KLDBJG" height="0" width="0" style="display:none;visibility:hidden"></iframe>
3 </noscript>
4 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KLDBJG');</script>
5 <!-- End Google Tag Manager -->
0 <div class="header">
1 <div class="row">
2 <div class="large-12 column">
3 <a href="/" class="brand">
4 <img src="/assets/images/CapistranoLogo.png" alt="capistrano logo" />
5 </a>
6 </div>
7 <!-- <div class="large&#45;4 column"> -->
8 <!-- {% include carbon.html %} -->
9 <!-- </div> -->
10 </div>
11 </div>
0 <script type="text/javascript">
1 var _gauges = _gauges || [];
2 (function() {
3 var t = document.createElement('script');
4 t.type = 'text/javascript';
5 t.async = true;
6 t.id = 'gauges-tracker';
7 t.setAttribute('data-site-id', '51c83c32613f5d7df70000bc');
8 t.src = '//secure.gaug.es/track.js';
9 var s = document.getElementsByTagName('script')[0];
10 s.parentNode.insertBefore(t, s);
11 })();
12 </script>
13
14 <script type="text/javascript">
15 setTimeout(function(){var a=document.createElement("script");
16 var b=document.getElementsByTagName("script")[0];
17 a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0017/6418.js?"+Math.floor(new Date().getTime()/3600000);
18 a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
19 </script>
20
21 <script>
22 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
23 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
24 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
25 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
26
27 ga('create', 'UA-41970098-1', 'capistranorb.com');
28 ga('send', 'pageview');
29 </script>
0 <ul class="side-nav">
1
2 <h5>Search</h5>
3 <form action="https://www.google.com/search" method="get">
4 <input type="hidden" name="as_sitesearch" value="capistranorb.com">
5 <input type="search" name="q" placeholder="Search terms" autocomplete="off">
6 </form>
7 <li class="divider"></li>
8
9 <h5>Overview</h5>
10 <li><a href="/documentation/overview/what-is-capistrano/">What is Capistrano?</a></li>
11 <li class="divider"></li>
12
13 <h5>Getting Started</h5>
14 <li><a href="https://github.com/capistrano/capistrano/blob/master/README.md">The Readme, start here!</a></li>
15
16 <li><a href="/documentation/getting-started/installation/">Installation</a></li>
17 <li><a href="/documentation/getting-started/structure/">Structure</a></li>
18 <li><a href="/documentation/getting-started/configuration/">Configuration</a></li>
19 <li><a href="/documentation/getting-started/user-input/">User Input</a></li>
20 <li><a href="/documentation/getting-started/preparing-your-application/">Preparing Your Application</a></li>
21 <li><a href="/documentation/getting-started/flow/">Flow</a></li>
22 <li><a href="/documentation/getting-started/rollbacks/">Rollbacks</a></li>
23 <li><a href="/documentation/getting-started/cold-start/">Cold Start</a></li>
24 <li><a href="/documentation/getting-started/version-locking/">Version Locking</a></li>
25 <li><a href="/documentation/getting-started/tasks/">Tasks</a></li>
26 <li><a href="/documentation/getting-started/local-tasks/">Local Tasks</a></li>
27 <li><a href="/documentation/getting-started/before-after/">Before / After Hooks</a></li>
28 <li><a href="/documentation/getting-started/authentication-and-authorisation/">Authentication &amp; Authorisation</a></li>
29 <li class="divider"></li>
30
31 <h5>Task cookbook</h5>
32 <!-- Also add to intro/index.markdown -->
33 <li><a href="/documentation/tasks/intro/">Introduction</a></li>
34 <li><a href="/documentation/tasks/rails/">Rails related tasks</a></li>
35 <li class="divider"></li>
36
37 <h5>Advanced Features</h5>
38 <li><a href="/documentation/advanced-features/console/">Console</a></li>
39 <li><a href="/documentation/advanced-features/ptys/">PTYs</a></li>
40 <li><a href="/documentation/advanced-features/filtering/">Filtering</a></li>
41 <li><a href="/documentation/advanced-features/properties/">Properties</a></li>
42 <li><a href="/documentation/advanced-features/property-filtering/">Property Filtering</a></li>
43 <li><a href="/documentation/advanced-features/host-filtering/">Host filtering</a></li>
44 <li><a href="/documentation/advanced-features/role-filtering/">Role Filtering</a></li>
45 <li><a href="/documentation/advanced-features/custom-filters/">Custom Filters</a></li>
46 <li><a href="/documentation/advanced-features/overriding-capistrano-tasks/">Overriding Capistrano Tasks</a></li>
47 <li><a href="/documentation/advanced-features/remote-file/">Remote File Task</a></li>
48 <li><a href="/documentation/advanced-features/ssh-kit">Remote Commands with SSHKit</a></li>
49 <li><a href="/documentation/advanced-features/ignoring">Preventing file deployment with gitattributes</a></li>
50 <li><a href="/documentation/advanced-features/validation-of-variables">Validation of variables</a></li>
51 <li><a href="/documentation/advanced-features/custom-scm">Custom SCM</a></li>
52 <li class="divider"></li>
53
54 <h5>Plugins</h5>
55 <li><a href="/documentation/plugins/">Official Plugins</a></li>
56 <li><a href="/documentation/third-party-plugins/">3<sup>rd</sup> Party Plugins</a></li>
57 <li class="divider"></li>
58
59 <h5>FAQ</h5>
60 <li><a href="/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/">Why does something work in an SSH session, but not in Capistrano?</a></li>
61 <li><a href="/documentation/faq/how-can-i-access-stage-configuration-variables/">How can I access stage configuration variables?</a></li>
62 <li><a href="/documentation/faq/how-can-i-check-for-existing-remote-file/">How can I check for existing remote file?</a></li>
63 <li><a href="/documentation/faq/how-can-i-get-capistrano-to-prompt-for-a-password/">How can I get Capistrano to prompt for a password?</a></li>
64 <li><a href="/documentation/faq/how-can-i-set-capistrano-configuration-paths/">How can I set Capistrano configuration paths?</a></li>
65 <li class="divider"></li>
66
67 <h5>Legacy</h5>
68 <li><a href="https://github.com/capistrano/capistrano-2.x-docs/">Capistrano 2 Documentation Repository</a></li>
69 <li><a href="/documentation/upgrading/">Upgrading from Capistrano 2.x to 3</a></li>
70 <li class="divider"></li>
71
72 <h5>Recent Announcements</h5>
73 {% for post in site.posts %}
74 <li><a href="{{ post.url }}"><span class="post-date">{{ post.date | date_to_string }}</span> {{ post.title }}</a></li>
75 {% endfor %}
76 </ul>
0 <!DOCTYPE html>
1 <html>
2 <head>
3 <meta charset="utf-8">
4 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>{{ page.title }}</title>
7 <link href='https://fonts.googleapis.com/css?family=Enriqueta' rel='stylesheet' type='text/css'>
8 <script type="text/javascript" src="//use.typekit.net/itm5ubu.js"></script>
9 <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
10 <link rel="stylesheet" href="/assets/css/foundation.css" />
11 <link rel="stylesheet" href="/assets/css/capistrano.css">
12 <link rel="stylesheet" href="/assets/css/social_foundicons.css" />
13 <link rel="stylesheet" href="/assets/css/monokai.css" />
14
15 <link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png">
16 <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png">
17 <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png">
18 <link rel="icon" href="/assets/favicon.ico">
19 <link rel="manifest" href="/assets/site.webmanifest">
20 <link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#5bbad5">
21 <meta name="msapplication-TileColor" content="#1c1b39">
22 <meta name="theme-color" content="#1c1b39">
23 </head>
24
25 <body>
26 {% include metrics.html %}
27
28 {% include header.html %}
29
30 <div class="row">
31 <div class="large-4 columns">
32 {% include navigation.html %}
33 </div>
34 <div class="large-8 column">
35 <div class="content">
36 <h2>{{ page.title }}</h2>
37 {{ content }}
38 </div>
39 </div>
40 </div>
41
42 {% include footer.html %}
43
44 <script src="/assets/js/jquery-1.7.min.js"></script>
45 <script src="/assets/js/jquery.githubRepoWidget.min.js"></script>
46
47 <a href="https://github.com/capistrano/capistrano"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a>
48
49 {% include google_tag_manager.html %}
50 </body>
51 </html>
0 ---
1 layout: default
2 ---
3 <p class="meta">{{ page.date | date_to_string }}</p>
4
5 <div id="post">
6 {{ content }}
7 </div>
0 ---
1 layout: post
2 title: "Capistrano Version 3 Release Announcement"
3 date: 2013-06-01
4 ---
5
6 After what seems like years of work, the Capistrano team (that's Tom and I)
7 are pleased to announce the first *major* release of Capistrano in almost 5
8 years.
9
10 The reasons behind the length of time between the last architectural overhaul
11 and this one are numerous, but it can be summarised to say that Capistrano is a
12 widely used tool, and when working around software deployment it's really a
13 question of downtime. If we had changed something significant in Capistrano we
14 could have taken a lot of sites offline, and made a lot of people very
15 unhappy. Until this point we haven't felt that the time has been ripe where
16 the benefits of a slightly rocky upgrade path are worth the risks of downtime.
17
18 It also hasn't helped historically that we've only just gotten to grips with
19 Ruby 1.9, and that Bundler's near ubiquity means that now it's trivial to lock
20 a Gem at a specific version. With other tools in the Ruby ecosystem it's
21 become easier for us to make significant changes to a tool upon which many
22 hundreds of thousands of people rely.
23
24 ### Design Goals
25
26 We had a few goals for this release, in no particular order they were:
27
28 * **Get away from our own DSL solution.** Great DSL alternatives (Rake, Sake, Thor,
29 etc) are already widely used.
30 * **Better modularisation.** to enable people outside the Rails community to
31 benefit from Capistrano's *best-practice* workflow, and to enable people in
32 the Rails community to pick and choose support for components they use
33 (Database Migrations, Asset Pipeline, etc)
34 * **Easier Debugging.** A lot of problems with Capistrano come from weirdness
35 surrounding environmental issues around PTY vs non-TTY environments, login
36 and non-login shells not to mention *environment managers* such as rvm,
37 rbenv and nvm.
38 * **Speed.** We know that in a lot of environments speed of deployment is a
39 huge factor, since Rails introduced the *Asset Pipeline* it's not uncommon
40 for a deploy that formerly took 5 seconds now takes 5 minutes. This really
41 is mostly out of our control, but with improved support for parallelism,
42 rolling restarts we feel confident that things will be quicker and easier to
43 keep running quickly now.
44 * **Applicability.** We've always maintained that Capistrano is a terrible
45 tool for system provisioning, and that more often than not servers are
46 better being setup with Chef, Puppet or similar, whilst we still agree with
47 that, the new features in Capistrano really lend themselves to integrating
48 with these kinds of tools.
49
50 ### What's missing?
51
52 Before we get too carried away it's worth shortlisting the things that don't
53 exist in version three, ***yet***.
54
55 * **SSH Gateway Support** SSH Gateway support hasn't been implemented in
56 version three yet, I hope that this will be done soon. As I have no direct
57 need for it, I haven't the means to test it with a view to implementing it,
58 yet.
59 * **Mecurial, Subversion, and CVS Support** These have been removed as we've
60 been able to implement the Git SCM in an incredibly neat way that isn't
61 compatible with the others. We wanted to break the cycle of always sticking
62 with the lowest common denominator, so we are **actively** looking for
63 people who are interested in contributing, or sharing expertise on the
64 *best-practice* way of speedily deploying from your respective choice of
65 source control.
66 * **`HOSTFILTER` ,`ROLEFILTER` and friends** These have gone away because we
67 always felt they were endemic of a bad design decision about using
68 Environmental Variables. These will be coming back as flags passed to `cap`
69 on the CLI, and options that can be set on the `Capistrano::Application` Ruby
70 class.
71 * **Shell** The shell has been removed temporarily pending a neater
72 implementation, we've got something that we are playing with internally, but
73 it needs better `readline` support, and some more controls around what to do
74 when things go badly on some servers, but not others.
75 * **Cold Deploy** The `cap deploy:cold` is a really old legacy component,
76 orignally from the days of the `script/spinner` where deploying cold
77 (starting workers that weren't running), and deploying a *warm* system were
78 different (restarting existing worker pools, which wasn't fun!) By and large
79 these things have gone away, and it's time `deploy:cold` went away. It's
80 safe in every case we could find to call setup, and seed and other Rake
81 tasks without things blowing up, and that should be the approach we take.
82 Tasks on the server should be idempotent, and if something is called twice,
83 let it be.
84
85 ### What's new?
86
87 Each section here really deserves it's own sub-heading as some of the new
88 features are awesome.
89
90 #### Rake Integration
91
92 We have moved away from our own DSL implemenation to implement Capistrano as a
93 *Rake* application.
94
95 Rake has always supported being sub-classed, so to speak as a
96 *sub-application*; it is however poorly documented. By subclassing
97 `Rake::Application` one can specify what the *Rakefile* should look like, where
98 to search for it, and how to load other *Rakefiles*.
99
100 The *Rake* DSL is widely used, well known and very powerful. As Rake is
101 essentially a dependency resolution system, it offers a lot of nice ways to,
102 for example build a tarball as a dependency of uploading it and deploying it.
103
104 This has allowed us to do away with the *copy* strategy all together, as it
105 can now be implemented from scratch in fewer than ten lines of code.
106
107 The guiding principle is dependency resolution, and interoperability with
108 other tools, for example:
109
110 {% highlight ruby %}
111 # Capistrano 3.0.x
112 task :notify do
113 this_release_tag = sh("git describe --abbrev=0 --tags")
114 last_ten_commits = sh("git log #{this_release_tag}~10..#{this_release_tag}")
115 Mail.deliver do
116 to "team@example.com"
117 subject "Releasing #{this_release_tag} Now!"
118 body last_ten_commits
119 end
120 end
121
122 namespace :deploy
123 task default: :notify
124 end
125 {% endhighlight %}
126
127 The last three lines rely on Rake's additive task declaration, by redefining the
128 `deploy:default` task by adding another dependency. Rake will automatically
129 resolve this dependency at Runtime, mailing the recent changelog to your team,
130 assuming everything is setup correctly.
131
132 #### Built-In Stage Support
133
134 In former versions of Capistrano *stage* support was an after thought,
135 provided through the `capistrano-ext` Gem, and laterally merged into the main
136 codebase, people insisted in still using the `capistrano-ext` version
137 regardless.
138
139 In Capistrano 3.0.x there's stage support built-in, at installation time, two
140 stages will be created by default, *staging* and *production*; it's easy to
141 add more, just add a file to `config/deploy/______.rb` which follows the
142 conventions established in the examples we created for you.
143
144 To create different stages at installation time, simply set the `STAGES`
145 environmental variable to a comma separated list of stages:
146
147 {% highlight bash %}
148 $ cap install STAGES=staging,production,ci,qa
149 {% endhighlight %}
150
151 #### Parallelism
152
153 In former versions of Capistrano there was a *parallel* option to run
154 different tasks differently on groups of servers, it looked something like
155 this:
156
157 {% highlight ruby %}
158 # Capistrano 2.0.x
159 task :restart do
160 parallel do |session|
161 session.when "in?(:app)", "/u/apps/social/script/restart-mongrel"
162 session.when "in?(:web)", "/u/apps/social/script/restart-apache"
163 session.else "echo nothing to do"
164 end
165 end
166 {% endhighlight %}
167
168 This always felt a little unclean, and indeed it's a hack that was originally
169 implemeted to facilitate rolling deployments at a large German firm by a
170 couple of freelancers who were consulting with them. (Hint, one of those guys
171 went on to found Travis-CI!)
172
173 The equivalent code in under Capistrano v3 would look like this:
174
175 {% highlight ruby %}
176 # Capistrano 3.0.x
177 task :restart do
178 on :all, in: :parallel do |host|
179 if host.roles.include?(:app)
180 execute "/u/apps/social/script/restart-mongrel"
181 elsif host.roles.include?(:web)
182 execute "/u/apps/social/script/restart-web"
183 else
184 info sprintf("Nothing to do for %s with roles %s", host,
185 host.properties.roles)
186 end
187 end
188 end
189 {% endhighlight %}
190
191 The second block of code, that representing the new Rake derived DSL and
192 demonstrating how to use the parallel execution mode is a little longer, but I
193 think it's clearer, more idiomatic Ruby code which relies less on an intimate
194 knowledge of how the Capistrano DSL happens to work. It also hints at the
195 built-in logging subsystem, keep reading to learn more.
196
197 Other modes for parallelism include:
198
199 {% highlight ruby %}
200 # Capistrano 3.0.x
201 on :all, in: :groups, limit: 3, wait: 5 do
202 # Take all servers, in groups of three which execute in parallel
203 # wait five seconds between groups of servers.
204 # This is perfect for rolling restarts
205 end
206
207 on :all, in: :sequence, wait: 15 do
208 # This takes all servers, in sequence and waits 15 seconds between
209 # each server, this might be perfect if you are afraid about
210 # overloading a shared resource, or want to defer the asset compilation
211 # over your cluster owing to worries about load
212 end
213
214 on :all, in: :parallel do
215 # This will simply try and execute the commands contained within
216 # the block in parallel on all servers. This might be perfect for kicking
217 # off something like a Git checkout or similar.
218 end
219 {% endhighlight %}
220
221 The internal tasks, for standard deploy recipes make use of all of these as is
222 appropriate for the normal case, no need to be afraid of scary slow deploys
223 again!
224
225 #### Streaming IO
226
227 This IO streaming model means that results from commands, the commands
228 themselves and any other arbitrary output are sent as objects to a class with
229 an `IO`ish interface, the class knows what to do with these things. There's a
230 *progress* formatter which prints dots for each command that is called, as
231 well as a *pretty* formatter which prints the full command, it's output on
232 standard out and standard error, as well as the final return status. It would
233 be trivial to implement HTML formatters, or formatters that reported to your
234 IRC room, or to email. I look forward to seeing more of these cropping up in
235 the community.
236
237 #### Host Definition Access
238
239 If you didn't skim over the *Parallism* section above, you might have noticed we
240 did something clever that wasn't possible in Capistrano v2; we accessed the
241 `host` inside the execution block.
242
243 For a lot of reasons in Capistrano v2 is wasn't possible to do this, the block
244 was essentially evaluated once and called verbatim on each host. This lead to
245 disappointing missing features such as not being able to pull the host list
246 out of Capistrano and examine the roles to do something like controlling Chef
247 solo, or similar.
248
249 In Capistrano v3 the `host` object is the same object that is created when a
250 server is defined, and is internally used, for example to pass to an ERB
251 template for rendering a last-deploy message that is dumped onto each server
252 after a successful deployment. The last deploy log includes everything
253 Capistrano knew about that server during the deployment.
254
255 > Users of Capistrano v2 may be familiar with the perenial `cap deploy:cleanup`
256 problem which came to light when servers differed in their old releases list,
257 imagine a scenario with two servers, one has been your bread-and-butter since
258 you launched, it has hundreds of old releases from all your wonderful deploys
259 over the months or years. The second server has been in the cluster for about
260 a month, it didn't quite slot-in cleanly, so the list of old releases looks a
261 bit weird, you deleted a few by hand, and anyway there might only be ten-or-so
262 releases there.
263
264 > Now imagine that you call `cap deploy:cleanup`, old `capture()`
265 implementations silently only ran on the first server that matched the
266 properties defined, so server one returned a list of ~95 old timestamped
267 release directories. Next Capistrano v2 would call `rm -rf
268 release1..release95` on **both** servers, causing server two to error out, and
269 leaving an undefined state on server one, as Capistrano would simply hang up
270 both connections.
271
272 This cleanup routine can now be better implemented as follows (which is
273 actually more or less the actual implementation in the the new Gem):
274
275 {% highlight ruby %}
276 # Capistrano 3.0.x
277 desc "Cleanup all old releases (keeps #{fetch(:releases_to_keep_on_cleanup)}
278 old releases"
279 task :cleanup do
280 keep_releases = fetch(:releases_to_keep_on_cleanup)
281 releases = capture(:ls, fetch(:releases_directory))
282 releases_to_delete = releases.sort_by { |r| r.to_i }.slice(1..-(keep_releases + 1))
283 releases_to_delete.each do |r|
284 execute :rm, fetch(:releases_directory).join(r)
285 end
286 end
287 {% endhighlight %}
288
289 Some handy things to note here are that both server one and server two in our
290 contrived example will both evaluate that independently, and when both servers
291 are finished removing old releases the `task :cleanup` block will have
292 finished.
293
294 Also in Capistrano v3 most path variables are [`Pathname`] objects, so they natively
295 respond to things like `#basename`, `#expand_path`, `#join` and similar.
296
297 **Warning:** `#expand_path` probably won't do what you expect, it will execute
298 on your *workstation* machine, and not on the remote host, so it's possible
299 that it will return an error in the case of paths which exist remotely but not
300 locally.
301
302 #### Host Properties
303
304 As the `host` object is now available to the task blocks, it made sense to make
305 it possible to store arbitrarty values against them.
306
307 Enter `host.properties`. This is a simple
308 [*OpenStruct*](http://www.ruby-doc.org/stdlib-2.0/libdoc/ostruct/rdoc/OpenStruct.html)
309 which can be used to store any additional properties which are important for
310 your application.
311
312 An example of it's usage might be:
313
314 {% highlight ruby %}
315 h = SSHKit::Host.new 'example.com'
316 h.properties.roles ||= %i{wep app}
317 {% endhighlight %}
318
319 #### More Expressive Command Language
320
321 In Capistrano v2, it wasn't uncommon to find commands such as:
322
323 {% highlight ruby %}
324 # Capistrano 2.0.x
325 task :precompile, :roles => lambda { assets_role }, :except => { :no_release => true } do
326 run <<-CMD.compact
327 cd -- #{latest_release} &&
328 RAILS_ENV=#{rails_env.to_s.shellescape} #{asset_env} #{rake} assets:precompile
329 CMD
330 end
331 {% endhighlight %}
332
333 In Capistrano v3 this looks more like this:
334
335 {% highlight ruby %}
336 # Capistrano 3.0.x
337 task :precompile do
338 on :sprockets_asset_host, reject: lambda { |h| h.properties.no_release } do
339 within fetch(:latest_release_directory) do
340 with rails_env: fetch(:rails_env) do
341 execute :rake, 'assets:precompile'
342 end
343 end
344 end
345 end
346 {% endhighlight %}
347
348 Again, with other examples this format is a little longer, but much more
349 expressive, and all the nightmare of shell escaping is handled interally for
350 you, environmental variables are capitalised and applied at the correct point
351 (i.e between the `cd` and `rake` calls in this case).
352
353 Other options here include `as :a_user` and
354
355 #### Better *magic* Variable Support
356
357 In Capistrano v2 there were certain bits of magic where if calling a variable
358 and `NoMethodError` would have been raised (for example the
359 `latest_release_directory` variable). This variable never existed on the
360 global namespace, as a fall-back the list of `set()` variables would be
361 consulted.
362
363 This magic led to times when people were not recognising that magic variables
364 were even being used. The magic variable system of Capistrano v2 did also
365 include a way to `fetch(:some_variable, 'with a default value')` incase the
366 variable might not be set already, but it wasn't widely used, and more often
367 than not people just used things like `latest_release_directory` never knowing
368 that behind the scenes an exception was raised, then rescued, and that
369 `:latest_release_directory` in the variable map was actually a continuation
370 that was evaluated the first time it was used, and the value then cached until
371 the end of the script.
372
373 The system has now 100% less magic. If you set a variable using `set()`, it
374 can be fetched with `fetch()`, if the value you set into the variable responds
375 to `#call` then it will be executed in the current context whenever it is
376 used, the values will not be cached, unless your continuation does some
377 explicit caching. *Again, we are favoring clarity over micro optimisation*.
378
379 #### SSHKit
380
381 Many of the new features in Capistrano which relate to logging, formatting,
382 SSH, connection management and pooling, parallelism, batch execution and more
383 are from a library that fell out of the Capistrano v3 development process.
384
385 [*SSHKit*](https://github.com/leehambley/sshkit) is a lower level toolkit, a level higher than *Net::SSH* still,
386 but lacking the roles, environments, rollbacks and other higher level features
387 from Capistrano.
388
389 SSHkit is ideal for use if you need to just connect to a machine and run some
390 arbitrary command, for example:
391
392 {% highlight ruby %}
393 # Rakefile (even without Capistrano loaded)
394 require 'sshkit'
395 desc "Check the uptime of example.com"
396 task :uptime do |h|
397 execute :uptime
398 end
399 {% endhighlight %}
400
401 There is much more than can be done with SSHKit, and we have quite an
402 extensive [list of
403 examples](https://github.com/leehambley/sshkit/blob/master/EXAMPLES.md). For
404 the most part with Capistrano v3, anything that happens inside of an `on()`
405 block is happening in SSHkit, and the documentation from that library is the
406 place to go to find more information.
407
408 #### Command Mapping
409
410 This is another feature from SSHKit, designed to remove a little ambiguity
411 from preceedings, there is a so-called command map for commands.
412
413 When executing something like:
414
415 {% highlight ruby %}
416 # Capistrano 2.0.x
417 execute "git clone ........ ......."
418 {% endhighlight %}
419
420 The command is passed through to the remote server *completely unchanged*.
421 This includes the options which might be set, such as user, directory, and
422 environmental variables. **This is by design.** This feature is designed to
423 allow people to write non-trivial commands in
424 [heredocs](https://en.wikipedia.org/wiki/Here_document) when the need arises,
425 for example:
426
427 {% highlight ruby %}
428 # Capistrano 3.0.x
429 execute <<-EOBLOCK
430 # All of this block is interpreted as Bash script
431 if ! [ -e /tmp/somefile ]
432 then touch /tmp/somefile
433 chmod 0644 /tmp/somefile
434 fi
435 EOBLOCK
436 {% endhighlight %}
437
438 **Caveat:** The SSHKit multiline command sanitizing logic will remove line feeds and add an `;` after each line to separate the commands. So make sure you are not putting a newline between `then` and the following command.
439
440 The idiomatic way to write that command in Capistrano v3 is to use the
441 separated variadaric method to specify the command:
442
443 {% highlight ruby %}
444 # Capistrano 3.0.x
445 execute :git, :clone, "........", "......."
446 {% endhighlight %}
447
448 ... or for the larger example
449
450 {% highlight ruby %}
451 # Capistrano 3.0.x
452 file = '/tmp/somefile'
453 unless test("-e #{file}")
454 execute :touch, file
455 end
456 {% endhighlight %}
457
458 In this way the *command map* is consulted, the command map maps all unknown
459 commands (which in this case is `git`, the rest of the line are *arguments* to
460 `git` ) are mapped to `/usr/bin/env ...`. Meaning that this command would be
461 expanded to `/usr/bin/env git clone ...... ......` which is what happens when
462 `git` is called without a full path, the `env` program is consulted (perhaps
463 indirectly) to determine which `git` to run.
464
465 Commands such as `rake` and `rails` are often better prefixed by `bundle
466 exec`, and in this case could be mapped to:
467
468 {% highlight ruby %}
469 SSHKit.config.command_map[:rake] = "bundle exec rake"
470 SSHKit.config.command_map[:rails] = "bundle exec rails"
471 {% endhighlight %}
472
473 There can also be a `lambda` or `Proc` applied in place of the mapping like so:
474
475 {% highlight ruby %}
476 SSHKit.config.command_map = Hash.new do |hash, key|
477 if %i{rails rake bundle clockwork heroku}.include?(key.to_sym)
478 hash[key] = "/usr/bin/env bundle exec #{key}"
479 else
480 hash[key] = "/usr/bin/env #{key}"
481 end
482 end
483 {% endhighlight %}
484
485 Between these two options there should be quite powerful options to map
486 commands in your environment without having to override internal tasks from
487 Capistrano just because a path is different, or a binary has a different name.
488
489 This can also be *slightly* abused in environments where *shim* executables
490 are used, for example `rbenv` *wrappers*:
491
492 {% highlight ruby %}
493 SSHKit.config.command_map = Hash.new do |hash, key|
494 if %i{rails rake bundle clockwork heroku}.include?(key.to_sym)
495 hash[key] = "/usr/bin/env myproject_bundle exec myproject_#{key}"
496 else
497 hash[key] = "/usr/bin/env #{key}"
498 end
499 end
500 {% endhighlight %}
501
502 The above assumes that you have done something like `rbenv wrapper default
503 myproject` which creates wrapper binaries which correctly set up the Ruby
504 environment without requiring an interactive login shell.
505
506 #### Testing
507
508 The old test suite for Capistrano was purely unit tests, and didn't cover a
509 wide variety of problem cases, specifically nothing in the `deploy.rb` (that is
510 the actual *deployment* code) was tested at all; because of having our own DSL
511 implementation, and other slightly odd design points, it was painful to test
512 the actual *recipes*.
513
514 Testing has been a focus of Capistrano v3. The *integration* test suite uses
515 Vagrant to boot a machine, configures certain scenarios using portable shell
516 script, and then executes commands against them, deploying common
517 configurations to typical Linux systems. This is slow to execute, but offers
518 stronger guarantees that nothing is broken that we've ever been able to give
519 before.
520
521 Capistrano v3 also offers a possibility to swap out backend implementations.
522 This is interesting because for the purpose of testing your *own* recipes you
523 can use a *printer* backend, and verify that the output matched what you
524 expected, or use a stubbed backend upon which you can verify that calls were
525 made, or not made as expected.
526
527 #### Arbitrary Logging
528
529 Capistrano exposes the methods `debug()`, `info()`, `warn()`, `error()` and
530 `fatal()` inside of `on()` blocks which can be used to log using the existing
531 logging infrastructure and streaming IO formatters:
532
533 {% highlight ruby %}
534 # Capistrano 3.0.x
535 on hosts do |host|
536 f = '/some/file'
537 if test("[ -d #{f} ]")
538 execute :touch, f
539 else
540 info "#{f} already exists on #{host}!"
541 end
542 end
543 {% endhighlight %}
544
545 ### Upgrading
546
547 The best place to go here is the [upgrading documentation](/documentation/upgrading/) to get deeper
548 into the specifics.
549
550 The simple version is to say that there is *no **direct** upgrade path*,
551 versions two and three are incompatible.
552
553 This is partly by design, the old DSL was imprecise in places that would have
554 made doing the right thing in most cases tricky, we opted to invest in more
555 features and better reliability than investing in keeping a backwards
556 compatible API.
557
558 There are a number of *gotchas* listed below, but the main points are the new
559 names of the built-in roles, as well as that by default Capistrano v3 is
560 platform agnostic, if you need Rails support, for migrations, asset pipeline
561 and such like, then it's required to `require` the support files.
562
563 ### Gotchas
564
565 #### Rake DSL Is Additive
566
567 In Capistrano v2 if you re-define a task then it replaces the original
568 implemetation, this has been used by people to replace internal tasks
569 piecemeal with their own implementations
570
571 #### `sudo` Behaviour
0 <?xml version="1.0" encoding="utf-8"?>
1 <browserconfig>
2 <msapplication>
3 <tile>
4 <square150x150logo src="mstile-150x150.png"/>
5 <TileColor>#1c1b39</TileColor>
6 </tile>
7 </msapplication>
8 </browserconfig>
0 body {
1 font-family: "proxima-nova",sans-serif;
2 }
3
4 #carbonads img {
5 float: left;
6 margin-right: 1em;
7 }
8
9 #carbonads .carbon-text {
10 display: block;
11 font-size: 0.9em;
12 color: silver;
13 }
14
15 #carbonads .carbon-poweredby {
16 font-size: 0.75em;
17 display: block;
18 color: silver
19 }
20
21 .header {
22 margin-bottom: 30px;
23 padding-top: 20px;
24 background-color: #1C1B39;
25 min-height: 170px;
26 }
27
28 h1, h2, h3, h4, h5, h6 {
29 font-weight: 400;
30 font-family: 'Enriqueta', serif;
31 }
32
33 .highlighter-rouge {
34 margin-bottom: 1.25em;
35 }
36
37 .alert-box {
38 font-weight: normal;
39 color: black;
40
41 background-color: #d7ecfa;
42 border: none;
43 padding-left: 20px;
44 }
45
46 .alert-box.alert {
47 background-color: #f7e4e1;
48 color: black;
49 }
50
51 .alert-box.success {
52 background-color: #e1faea;
53 color: black;
54 }
55
56 .alert-box.secondary {
57 background-color: #eaeaea;
58 color: black;
59 }
60
61 /*p code, li code {
62 padding: 3px;
63 background-color: #E6E6E6;
64 font-family: "droid-sans-mono", Consolas, Monaco, 'Andale Mono', monospace;
65 font-size: 0.9em;
66 color: #222;
67 border-radius: 3px;
68 }*/
69
70 footer {
71 padding: 1em;
72 background-color: #222;
73 color: #fff;
74 }
75
76 footer a, footer a:hover {
77 color: #fff;
78 }
79
80
81 footer ul.social.icons {
82 list-style-type: none;
83 }
84
85 li {
86 margin-left: 2em;
87 }
88
89 footer ul.social.icons li.foundicon {
90 float: left;
91 margin-left: 10px;
92 font-size: 5em;
93 }
94
95 footer ul.social.icons li.thanks-dnsimple {
96 clear: left;
97 }
98
99 .github-widget {
100 margin-bottom: 1em;
101 }
102
103 .github-box .github-box-download {
104 height: 44px !important;
105 }
106
107 /*pre code {
108 color: #fff;
109 }*/
0 /**
1 * Dreamweaver theme
2 *
3 * @author Sean Coker
4 * @url http://seancoker.com
5 * @version 1.0
6 */
7
8 pre {
9 /* original is white background with no border */
10 background-color: #fff;
11 word-wrap: break-word;
12 margin: 0;
13 padding: 10px;
14 color: #000;
15 font-size: 13px;
16 line-height: 16px;
17 margin-bottom: 20px
18 }
19
20 pre, code {
21 font-family: monospace;
22 }
23
24 pre .comment {
25 color: #888;
26 }
27
28 pre .support {
29 color: #cd57d5;
30 }
31
32 pre .constant.numeric, pre .php.embedded {
33 color: #fa0002;
34 font-weight: bold;
35 }
36
37 pre .keyword, pre .constant.language {
38 color: #000789;
39 font-weight: bold;
40 }
41
42 pre .selector, pre .support.property, pre .entity.name.function {
43 color: #000;
44 }
45
46 pre .storage.function, pre .variable.self, pre .support.function, pre .constant.language {
47 color: #000;
48 font-weight: bold;
49 }
50
51 pre .string {
52 color: #0d43fa;
53 font-weight: normal;
54 }
55
56 pre .css-property + span, pre .keyword.unit, pre .support.css-value {
57 color: #0d43fa !important;
58 font-weight: normal !important;
59 }
60
61 pre .entity.tag.style + .string, pre .php.embedded .constant.language, pre .php.embedded .keyword {
62 color: #37a348 !important;
63 }
64
65 pre .support.method {
66 color: #2bd5bb;
67 }
68
69 pre .entity.name {
70 color: #fd74e0;
71 }
72
73 pre .support.css-property, pre .support.tag-name, pre .support.tag, pre .support.attribute, pre .support.attribute + .operator {
74 color: #000789;
75 }
76
77 pre .storage.module, pre .storage.class {
78 color: #122573;
79 font-weight: bold;
80 }
81
82 pre .css.embedded .support.tag, pre .css.embedded .style.tag {
83 color: #cd57d5;
84 }
85
86 pre .keyword.operator {
87 color: #2852eb;
88 font-weight: normal;
89 }
90
91 pre .php.embedded .variable, pre .php.embedded .storage.function {
92 color: #0d43fa;
93 font-weight: normal;
94 }
95
96 pre .php.embedded .string, pre .js.embedded .tag.script {
97 color: #c4001e;
98 }
99
100 pre .php.embedded .comment {
101 color: #f4b441;
102 font-weight: normal;
103 }
104
105 pre .php.embedded .function.name {
106 color: #000;
107 font-weight: normal;
108 }
0 *,
1 *:before,
2 *:after {
3 -moz-box-sizing: border-box;
4 -webkit-box-sizing: border-box;
5 box-sizing: border-box; }
6
7 html,
8 body {
9 font-size: 100%; }
10
11 body {
12 background: white;
13 color: #1c1b39;
14 padding: 0;
15 margin: 0;
16 font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
17 font-weight: normal;
18 font-style: normal;
19 line-height: 1;
20 position: relative;
21 cursor: default; }
22
23 a:hover {
24 cursor: pointer; }
25
26 a:focus {
27 outline: none; }
28
29 img,
30 object,
31 embed {
32 max-width: 100%;
33 height: auto; }
34
35 object,
36 embed {
37 height: 100%; }
38
39 img {
40 -ms-interpolation-mode: bicubic; }
41
42 #map_canvas img,
43 #map_canvas embed,
44 #map_canvas object,
45 .map_canvas img,
46 .map_canvas embed,
47 .map_canvas object {
48 max-width: none !important; }
49
50 .left {
51 float: left !important; }
52
53 .right {
54 float: right !important; }
55
56 .text-left {
57 text-align: left !important; }
58
59 .text-right {
60 text-align: right !important; }
61
62 .text-center {
63 text-align: center !important; }
64
65 .text-justify {
66 text-align: justify !important; }
67
68 .hide {
69 display: none; }
70
71 .antialiased {
72 -webkit-font-smoothing: antialiased; }
73
74 img {
75 display: inline-block;
76 vertical-align: middle; }
77
78 textarea {
79 height: auto;
80 min-height: 50px; }
81
82 select {
83 width: 100%; }
84
85 /* Grid HTML Classes */
86 .row {
87 width: 100%;
88 margin-left: auto;
89 margin-right: auto;
90 margin-top: 0;
91 margin-bottom: 0;
92 max-width: 62.5em;
93 *zoom: 1; }
94 .row:before, .row:after {
95 content: " ";
96 display: table; }
97 .row:after {
98 clear: both; }
99 .row.collapse .column,
100 .row.collapse .columns {
101 position: relative;
102 padding-left: 0;
103 padding-right: 0;
104 float: left; }
105 .row .row {
106 width: auto;
107 margin-left: -0.9375em;
108 margin-right: -0.9375em;
109 margin-top: 0;
110 margin-bottom: 0;
111 max-width: none;
112 *zoom: 1; }
113 .row .row:before, .row .row:after {
114 content: " ";
115 display: table; }
116 .row .row:after {
117 clear: both; }
118 .row .row.collapse {
119 width: auto;
120 margin: 0;
121 max-width: none;
122 *zoom: 1; }
123 .row .row.collapse:before, .row .row.collapse:after {
124 content: " ";
125 display: table; }
126 .row .row.collapse:after {
127 clear: both; }
128
129 .column,
130 .columns {
131 position: relative;
132 padding-left: 0.9375em;
133 padding-right: 0.9375em;
134 width: 100%;
135 float: left; }
136
137 @media only screen {
138 .column,
139 .columns {
140 position: relative;
141 padding-left: 0.9375em;
142 padding-right: 0.9375em;
143 float: left; }
144
145 .small-1 {
146 position: relative;
147 width: 8.33333%; }
148
149 .small-2 {
150 position: relative;
151 width: 16.66667%; }
152
153 .small-3 {
154 position: relative;
155 width: 25%; }
156
157 .small-4 {
158 position: relative;
159 width: 33.33333%; }
160
161 .small-5 {
162 position: relative;
163 width: 41.66667%; }
164
165 .small-6 {
166 position: relative;
167 width: 50%; }
168
169 .small-7 {
170 position: relative;
171 width: 58.33333%; }
172
173 .small-8 {
174 position: relative;
175 width: 66.66667%; }
176
177 .small-9 {
178 position: relative;
179 width: 75%; }
180
181 .small-10 {
182 position: relative;
183 width: 83.33333%; }
184
185 .small-11 {
186 position: relative;
187 width: 91.66667%; }
188
189 .small-12 {
190 position: relative;
191 width: 100%; }
192
193 .small-offset-0 {
194 position: relative;
195 margin-left: 0%; }
196
197 .small-offset-1 {
198 position: relative;
199 margin-left: 8.33333%; }
200
201 .small-offset-2 {
202 position: relative;
203 margin-left: 16.66667%; }
204
205 .small-offset-3 {
206 position: relative;
207 margin-left: 25%; }
208
209 .small-offset-4 {
210 position: relative;
211 margin-left: 33.33333%; }
212
213 .small-offset-5 {
214 position: relative;
215 margin-left: 41.66667%; }
216
217 .small-offset-6 {
218 position: relative;
219 margin-left: 50%; }
220
221 .small-offset-7 {
222 position: relative;
223 margin-left: 58.33333%; }
224
225 .small-offset-8 {
226 position: relative;
227 margin-left: 66.66667%; }
228
229 .small-offset-9 {
230 position: relative;
231 margin-left: 75%; }
232
233 .small-offset-10 {
234 position: relative;
235 margin-left: 83.33333%; }
236
237 [class*="column"] + [class*="column"]:last-child {
238 float: right; }
239
240 [class*="column"] + [class*="column"].end {
241 float: left; }
242
243 .column.small-centered,
244 .columns.small-centered {
245 position: relative;
246 margin-left: auto;
247 margin-right: auto;
248 float: none !important; } }
249 /* Styles for screens that are atleast 768px; */
250 @media only screen and (min-width: 768px) {
251 .large-1 {
252 position: relative;
253 width: 8.33333%; }
254
255 .large-2 {
256 position: relative;
257 width: 16.66667%; }
258
259 .large-3 {
260 position: relative;
261 width: 25%; }
262
263 .large-4 {
264 position: relative;
265 width: 33.33333%; }
266
267 .large-5 {
268 position: relative;
269 width: 41.66667%; }
270
271 .large-6 {
272 position: relative;
273 width: 50%; }
274
275 .large-7 {
276 position: relative;
277 width: 58.33333%; }
278
279 .large-8 {
280 position: relative;
281 width: 66.66667%; }
282
283 .large-9 {
284 position: relative;
285 width: 75%; }
286
287 .large-10 {
288 position: relative;
289 width: 83.33333%; }
290
291 .large-11 {
292 position: relative;
293 width: 91.66667%; }
294
295 .large-12 {
296 position: relative;
297 width: 100%; }
298
299 .row .large-offset-0 {
300 position: relative;
301 margin-left: 0%; }
302
303 .row .large-offset-1 {
304 position: relative;
305 margin-left: 8.33333%; }
306
307 .row .large-offset-2 {
308 position: relative;
309 margin-left: 16.66667%; }
310
311 .row .large-offset-3 {
312 position: relative;
313 margin-left: 25%; }
314
315 .row .large-offset-4 {
316 position: relative;
317 margin-left: 33.33333%; }
318
319 .row .large-offset-5 {
320 position: relative;
321 margin-left: 41.66667%; }
322
323 .row .large-offset-6 {
324 position: relative;
325 margin-left: 50%; }
326
327 .row .large-offset-7 {
328 position: relative;
329 margin-left: 58.33333%; }
330
331 .row .large-offset-8 {
332 position: relative;
333 margin-left: 66.66667%; }
334
335 .row .large-offset-9 {
336 position: relative;
337 margin-left: 75%; }
338
339 .row .large-offset-10 {
340 position: relative;
341 margin-left: 83.33333%; }
342
343 .row .large-offset-11 {
344 position: relative;
345 margin-left: 91.66667%; }
346
347 .push-1 {
348 position: relative;
349 left: 8.33333%;
350 right: auto; }
351
352 .pull-1 {
353 position: relative;
354 right: 8.33333%;
355 left: auto; }
356
357 .push-2 {
358 position: relative;
359 left: 16.66667%;
360 right: auto; }
361
362 .pull-2 {
363 position: relative;
364 right: 16.66667%;
365 left: auto; }
366
367 .push-3 {
368 position: relative;
369 left: 25%;
370 right: auto; }
371
372 .pull-3 {
373 position: relative;
374 right: 25%;
375 left: auto; }
376
377 .push-4 {
378 position: relative;
379 left: 33.33333%;
380 right: auto; }
381
382 .pull-4 {
383 position: relative;
384 right: 33.33333%;
385 left: auto; }
386
387 .push-5 {
388 position: relative;
389 left: 41.66667%;
390 right: auto; }
391
392 .pull-5 {
393 position: relative;
394 right: 41.66667%;
395 left: auto; }
396
397 .push-6 {
398 position: relative;
399 left: 50%;
400 right: auto; }
401
402 .pull-6 {
403 position: relative;
404 right: 50%;
405 left: auto; }
406
407 .push-7 {
408 position: relative;
409 left: 58.33333%;
410 right: auto; }
411
412 .pull-7 {
413 position: relative;
414 right: 58.33333%;
415 left: auto; }
416
417 .push-8 {
418 position: relative;
419 left: 66.66667%;
420 right: auto; }
421
422 .pull-8 {
423 position: relative;
424 right: 66.66667%;
425 left: auto; }
426
427 .push-9 {
428 position: relative;
429 left: 75%;
430 right: auto; }
431
432 .pull-9 {
433 position: relative;
434 right: 75%;
435 left: auto; }
436
437 .push-10 {
438 position: relative;
439 left: 83.33333%;
440 right: auto; }
441
442 .pull-10 {
443 position: relative;
444 right: 83.33333%;
445 left: auto; }
446
447 .push-11 {
448 position: relative;
449 left: 91.66667%;
450 right: auto; }
451
452 .pull-11 {
453 position: relative;
454 right: 91.66667%;
455 left: auto; }
456
457 .column.large-centered,
458 .columns.large-centered {
459 position: relative;
460 margin-left: auto;
461 margin-right: auto;
462 float: none !important; }
463
464 .column.large-uncentered,
465 .columns.large-uncentered {
466 margin-left: 0;
467 margin-right: 0;
468 float: left !important; }
469
470 .column.large-uncentered.opposite,
471 .columns.large-uncentered.opposite {
472 float: right !important; } }
473 /* Foundation Visibility HTML Classes */
474 .show-for-small,
475 .show-for-medium-down,
476 .show-for-large-down {
477 display: inherit !important; }
478
479 .show-for-medium,
480 .show-for-medium-up,
481 .show-for-large,
482 .show-for-large-up,
483 .show-for-xlarge {
484 display: none !important; }
485
486 .hide-for-medium,
487 .hide-for-medium-up,
488 .hide-for-large,
489 .hide-for-large-up,
490 .hide-for-xlarge {
491 display: inherit !important; }
492
493 .hide-for-small,
494 .hide-for-medium-down,
495 .hide-for-large-down {
496 display: none !important; }
497
498 /* Specific visilbity for tables */
499 table.show-for-small, table.show-for-medium-down, table.show-for-large-down, table.hide-for-medium, table.hide-for-medium-up, table.hide-for-large, table.hide-for-large-up, table.hide-for-xlarge {
500 display: table; }
501
502 thead.show-for-small, thead.show-for-medium-down, thead.show-for-large-down, thead.hide-for-medium, thead.hide-for-medium-up, thead.hide-for-large, thead.hide-for-large-up, thead.hide-for-xlarge {
503 display: table-header-group !important; }
504
505 tbody.show-for-small, tbody.show-for-medium-down, tbody.show-for-large-down, tbody.hide-for-medium, tbody.hide-for-medium-up, tbody.hide-for-large, tbody.hide-for-large-up, tbody.hide-for-xlarge {
506 display: table-row-group !important; }
507
508 tr.show-for-small, tr.show-for-medium-down, tr.show-for-large-down, tr.hide-for-medium, tr.hide-for-medium-up, tr.hide-for-large, tr.hide-for-large-up, tr.hide-for-xlarge {
509 display: table-row !important; }
510
511 td.show-for-small, td.show-for-medium-down, td.show-for-large-down, td.hide-for-medium, td.hide-for-medium-up, td.hide-for-large, td.hide-for-large-up, td.hide-for-xlarge,
512 th.show-for-small,
513 th.show-for-medium-down,
514 th.show-for-large-down,
515 th.hide-for-medium,
516 th.hide-for-medium-up,
517 th.hide-for-large,
518 th.hide-for-large-up,
519 th.hide-for-xlarge {
520 display: table-cell !important; }
521
522 /* Medium Displays: 768px - 1279px */
523 @media only screen and (min-width: 768px) {
524 .show-for-medium,
525 .show-for-medium-up {
526 display: inherit !important; }
527
528 .show-for-small {
529 display: none !important; }
530
531 .hide-for-small {
532 display: inherit !important; }
533
534 .hide-for-medium,
535 .hide-for-medium-up {
536 display: none !important; }
537
538 /* Specific visilbity for tables */
539 table.show-for-medium, table.show-for-medium-up, table.hide-for-small {
540 display: table; }
541
542 thead.show-for-medium, thead.show-for-medium-up, thead.hide-for-small {
543 display: table-header-group !important; }
544
545 tbody.show-for-medium, tbody.show-for-medium-up, tbody.hide-for-small {
546 display: table-row-group !important; }
547
548 tr.show-for-medium, tr.show-for-medium-up, tr.hide-for-small {
549 display: table-row !important; }
550
551 td.show-for-medium, td.show-for-medium-up, td.hide-for-small,
552 th.show-for-medium,
553 th.show-for-medium-up,
554 th.hide-for-small {
555 display: table-cell !important; } }
556 /* Large Displays: 1280px - 1440px */
557 @media only screen and (min-width: 1280px) {
558 .show-for-large,
559 .show-for-large-up {
560 display: inherit !important; }
561
562 .show-for-medium,
563 .show-for-medium-down {
564 display: none !important; }
565
566 .hide-for-medium,
567 .hide-for-medium-down {
568 display: inherit !important; }
569
570 .hide-for-large,
571 .hide-for-large-up {
572 display: none !important; }
573
574 /* Specific visilbity for tables */
575 table.show-for-large, table.show-for-large-up, table.hide-for-medium, table.hide-for-medium-down {
576 display: table; }
577
578 thead.show-for-large, thead.show-for-large-up, thead.hide-for-medium, thead.hide-for-medium-down {
579 display: table-header-group !important; }
580
581 tbody.show-for-large, tbody.show-for-large-up, tbody.hide-for-medium, tbody.hide-for-medium-down {
582 display: table-row-group !important; }
583
584 tr.show-for-large, tr.show-for-large-up, tr.hide-for-medium, tr.hide-for-medium-down {
585 display: table-row !important; }
586
587 td.show-for-large, td.show-for-large-up, td.hide-for-medium, td.hide-for-medium-down,
588 th.show-for-large,
589 th.show-for-large-up,
590 th.hide-for-medium,
591 th.hide-for-medium-down {
592 display: table-cell !important; } }
593 /* X-Large Displays: 1400px and up */
594 @media only screen and (min-width: 1440px) {
595 .show-for-xlarge {
596 display: inherit !important; }
597
598 .show-for-large,
599 .show-for-large-down {
600 display: none !important; }
601
602 .hide-for-large,
603 .hide-for-large-down {
604 display: inherit !important; }
605
606 .hide-for-xlarge {
607 display: none !important; }
608
609 /* Specific visilbity for tables */
610 table.show-for-xlarge, table.hide-for-large, table.hide-for-large-down {
611 display: table; }
612
613 thead.show-for-xlarge, thead.hide-for-large, thead.hide-for-large-down {
614 display: table-header-group !important; }
615
616 tbody.show-for-xlarge, tbody.hide-for-large, tbody.hide-for-large-down {
617 display: table-row-group !important; }
618
619 tr.show-for-xlarge, tr.hide-for-large, tr.hide-for-large-down {
620 display: table-row !important; }
621
622 td.show-for-xlarge, td.hide-for-large, td.hide-for-large-down,
623 th.show-for-xlarge,
624 th.hide-for-large,
625 th.hide-for-large-down {
626 display: table-cell !important; } }
627 /* Orientation targeting */
628 .show-for-landscape,
629 .hide-for-portrait {
630 display: inherit !important; }
631
632 .hide-for-landscape,
633 .show-for-portrait {
634 display: none !important; }
635
636 /* Specific visilbity for tables */
637 table.hide-for-landscape, table.show-for-portrait {
638 display: table; }
639
640 thead.hide-for-landscape, thead.show-for-portrait {
641 display: table-header-group !important; }
642
643 tbody.hide-for-landscape, tbody.show-for-portrait {
644 display: table-row-group !important; }
645
646 tr.hide-for-landscape, tr.show-for-portrait {
647 display: table-row !important; }
648
649 td.hide-for-landscape, td.show-for-portrait,
650 th.hide-for-landscape,
651 th.show-for-portrait {
652 display: table-cell !important; }
653
654 @media only screen and (orientation: landscape) {
655 .show-for-landscape,
656 .hide-for-portrait {
657 display: inherit !important; }
658
659 .hide-for-landscape,
660 .show-for-portrait {
661 display: none !important; }
662
663 /* Specific visilbity for tables */
664 table.show-for-landscape, table.hide-for-portrait {
665 display: table; }
666
667 thead.show-for-landscape, thead.hide-for-portrait {
668 display: table-header-group !important; }
669
670 tbody.show-for-landscape, tbody.hide-for-portrait {
671 display: table-row-group !important; }
672
673 tr.show-for-landscape, tr.hide-for-portrait {
674 display: table-row !important; }
675
676 td.show-for-landscape, td.hide-for-portrait,
677 th.show-for-landscape,
678 th.hide-for-portrait {
679 display: table-cell !important; } }
680 @media only screen and (orientation: portrait) {
681 .show-for-portrait,
682 .hide-for-landscape {
683 display: inherit !important; }
684
685 .hide-for-portrait,
686 .show-for-landscape {
687 display: none !important; }
688
689 /* Specific visilbity for tables */
690 table.show-for-portrait, table.hide-for-landscape {
691 display: table; }
692
693 thead.show-for-portrait, thead.hide-for-landscape {
694 display: table-header-group !important; }
695
696 tbody.show-for-portrait, tbody.hide-for-landscape {
697 display: table-row-group !important; }
698
699 tr.show-for-portrait, tr.hide-for-landscape {
700 display: table-row !important; }
701
702 td.show-for-portrait, td.hide-for-landscape,
703 th.show-for-portrait,
704 th.hide-for-landscape {
705 display: table-cell !important; } }
706 /* Touch-enabled device targeting */
707 .show-for-touch {
708 display: none !important; }
709
710 .hide-for-touch {
711 display: inherit !important; }
712
713 .touch .show-for-touch {
714 display: inherit !important; }
715
716 .touch .hide-for-touch {
717 display: none !important; }
718
719 /* Specific visilbity for tables */
720 table.hide-for-touch {
721 display: table; }
722
723 .touch table.show-for-touch {
724 display: table; }
725
726 thead.hide-for-touch {
727 display: table-header-group !important; }
728
729 .touch thead.show-for-touch {
730 display: table-header-group !important; }
731
732 tbody.hide-for-touch {
733 display: table-row-group !important; }
734
735 .touch tbody.show-for-touch {
736 display: table-row-group !important; }
737
738 tr.hide-for-touch {
739 display: table-row !important; }
740
741 .touch tr.show-for-touch {
742 display: table-row !important; }
743
744 td.hide-for-touch {
745 display: table-cell !important; }
746
747 .touch td.show-for-touch {
748 display: table-cell !important; }
749
750 th.hide-for-touch {
751 display: table-cell !important; }
752
753 .touch th.show-for-touch {
754 display: table-cell !important; }
755
756 /* Foundation Block Grids for below small breakpoint */
757 @media only screen {
758 [class*="block-grid-"] {
759 display: block;
760 padding: 0;
761 margin: 0 -0.625em;
762 *zoom: 1; }
763 [class*="block-grid-"]:before, [class*="block-grid-"]:after {
764 content: " ";
765 display: table; }
766 [class*="block-grid-"]:after {
767 clear: both; }
768 [class*="block-grid-"] > li {
769 display: inline;
770 height: auto;
771 float: left;
772 padding: 0 0.625em 1.25em; }
773
774 .small-block-grid-1 > li {
775 width: 100%;
776 padding: 0 0.625em 1.25em; }
777 .small-block-grid-1 > li:nth-of-type(n) {
778 clear: none; }
779 .small-block-grid-1 > li:nth-of-type(1n+1) {
780 clear: both; }
781
782 .small-block-grid-2 > li {
783 width: 50%;
784 padding: 0 0.625em 1.25em; }
785 .small-block-grid-2 > li:nth-of-type(n) {
786 clear: none; }
787 .small-block-grid-2 > li:nth-of-type(2n+1) {
788 clear: both; }
789
790 .small-block-grid-3 > li {
791 width: 33.33333%;
792 padding: 0 0.625em 1.25em; }
793 .small-block-grid-3 > li:nth-of-type(n) {
794 clear: none; }
795 .small-block-grid-3 > li:nth-of-type(3n+1) {
796 clear: both; }
797
798 .small-block-grid-4 > li {
799 width: 25%;
800 padding: 0 0.625em 1.25em; }
801 .small-block-grid-4 > li:nth-of-type(n) {
802 clear: none; }
803 .small-block-grid-4 > li:nth-of-type(4n+1) {
804 clear: both; }
805
806 .small-block-grid-5 > li {
807 width: 20%;
808 padding: 0 0.625em 1.25em; }
809 .small-block-grid-5 > li:nth-of-type(n) {
810 clear: none; }
811 .small-block-grid-5 > li:nth-of-type(5n+1) {
812 clear: both; }
813
814 .small-block-grid-6 > li {
815 width: 16.66667%;
816 padding: 0 0.625em 1.25em; }
817 .small-block-grid-6 > li:nth-of-type(n) {
818 clear: none; }
819 .small-block-grid-6 > li:nth-of-type(6n+1) {
820 clear: both; }
821
822 .small-block-grid-7 > li {
823 width: 14.28571%;
824 padding: 0 0.625em 1.25em; }
825 .small-block-grid-7 > li:nth-of-type(n) {
826 clear: none; }
827 .small-block-grid-7 > li:nth-of-type(7n+1) {
828 clear: both; }
829
830 .small-block-grid-8 > li {
831 width: 12.5%;
832 padding: 0 0.625em 1.25em; }
833 .small-block-grid-8 > li:nth-of-type(n) {
834 clear: none; }
835 .small-block-grid-8 > li:nth-of-type(8n+1) {
836 clear: both; }
837
838 .small-block-grid-9 > li {
839 width: 11.11111%;
840 padding: 0 0.625em 1.25em; }
841 .small-block-grid-9 > li:nth-of-type(n) {
842 clear: none; }
843 .small-block-grid-9 > li:nth-of-type(9n+1) {
844 clear: both; }
845
846 .small-block-grid-10 > li {
847 width: 10%;
848 padding: 0 0.625em 1.25em; }
849 .small-block-grid-10 > li:nth-of-type(n) {
850 clear: none; }
851 .small-block-grid-10 > li:nth-of-type(10n+1) {
852 clear: both; }
853
854 .small-block-grid-11 > li {
855 width: 9.09091%;
856 padding: 0 0.625em 1.25em; }
857 .small-block-grid-11 > li:nth-of-type(n) {
858 clear: none; }
859 .small-block-grid-11 > li:nth-of-type(11n+1) {
860 clear: both; }
861
862 .small-block-grid-12 > li {
863 width: 8.33333%;
864 padding: 0 0.625em 1.25em; }
865 .small-block-grid-12 > li:nth-of-type(n) {
866 clear: none; }
867 .small-block-grid-12 > li:nth-of-type(12n+1) {
868 clear: both; } }
869 /* Foundation Block Grids for above small breakpoint */
870 @media only screen and (min-width: 768px) {
871 /* Remove small grid clearing */
872 .small-block-grid-1 > li:nth-of-type(1n+1) {
873 clear: none; }
874
875 .small-block-grid-2 > li:nth-of-type(2n+1) {
876 clear: none; }
877
878 .small-block-grid-3 > li:nth-of-type(3n+1) {
879 clear: none; }
880
881 .small-block-grid-4 > li:nth-of-type(4n+1) {
882 clear: none; }
883
884 .small-block-grid-5 > li:nth-of-type(5n+1) {
885 clear: none; }
886
887 .small-block-grid-6 > li:nth-of-type(6n+1) {
888 clear: none; }
889
890 .small-block-grid-7 > li:nth-of-type(7n+1) {
891 clear: none; }
892
893 .small-block-grid-8 > li:nth-of-type(8n+1) {
894 clear: none; }
895
896 .small-block-grid-9 > li:nth-of-type(9n+1) {
897 clear: none; }
898
899 .small-block-grid-10 > li:nth-of-type(10n+1) {
900 clear: none; }
901
902 .small-block-grid-11 > li:nth-of-type(11n+1) {
903 clear: none; }
904
905 .small-block-grid-12 > li:nth-of-type(12n+1) {
906 clear: none; }
907
908 .large-block-grid-1 > li {
909 width: 100%;
910 padding: 0 0.625em 1.25em; }
911 .large-block-grid-1 > li:nth-of-type(n) {
912 clear: none; }
913 .large-block-grid-1 > li:nth-of-type(1n+1) {
914 clear: both; }
915
916 .large-block-grid-2 > li {
917 width: 50%;
918 padding: 0 0.625em 1.25em; }
919 .large-block-grid-2 > li:nth-of-type(n) {
920 clear: none; }
921 .large-block-grid-2 > li:nth-of-type(2n+1) {
922 clear: both; }
923
924 .large-block-grid-3 > li {
925 width: 33.33333%;
926 padding: 0 0.625em 1.25em; }
927 .large-block-grid-3 > li:nth-of-type(n) {
928 clear: none; }
929 .large-block-grid-3 > li:nth-of-type(3n+1) {
930 clear: both; }
931
932 .large-block-grid-4 > li {
933 width: 25%;
934 padding: 0 0.625em 1.25em; }
935 .large-block-grid-4 > li:nth-of-type(n) {
936 clear: none; }
937 .large-block-grid-4 > li:nth-of-type(4n+1) {
938 clear: both; }
939
940 .large-block-grid-5 > li {
941 width: 20%;
942 padding: 0 0.625em 1.25em; }
943 .large-block-grid-5 > li:nth-of-type(n) {
944 clear: none; }
945 .large-block-grid-5 > li:nth-of-type(5n+1) {
946 clear: both; }
947
948 .large-block-grid-6 > li {
949 width: 16.66667%;
950 padding: 0 0.625em 1.25em; }
951 .large-block-grid-6 > li:nth-of-type(n) {
952 clear: none; }
953 .large-block-grid-6 > li:nth-of-type(6n+1) {
954 clear: both; }
955
956 .large-block-grid-7 > li {
957 width: 14.28571%;
958 padding: 0 0.625em 1.25em; }
959 .large-block-grid-7 > li:nth-of-type(n) {
960 clear: none; }
961 .large-block-grid-7 > li:nth-of-type(7n+1) {
962 clear: both; }
963
964 .large-block-grid-8 > li {
965 width: 12.5%;
966 padding: 0 0.625em 1.25em; }
967 .large-block-grid-8 > li:nth-of-type(n) {
968 clear: none; }
969 .large-block-grid-8 > li:nth-of-type(8n+1) {
970 clear: both; }
971
972 .large-block-grid-9 > li {
973 width: 11.11111%;
974 padding: 0 0.625em 1.25em; }
975 .large-block-grid-9 > li:nth-of-type(n) {
976 clear: none; }
977 .large-block-grid-9 > li:nth-of-type(9n+1) {
978 clear: both; }
979
980 .large-block-grid-10 > li {
981 width: 10%;
982 padding: 0 0.625em 1.25em; }
983 .large-block-grid-10 > li:nth-of-type(n) {
984 clear: none; }
985 .large-block-grid-10 > li:nth-of-type(10n+1) {
986 clear: both; }
987
988 .large-block-grid-11 > li {
989 width: 9.09091%;
990 padding: 0 0.625em 1.25em; }
991 .large-block-grid-11 > li:nth-of-type(n) {
992 clear: none; }
993 .large-block-grid-11 > li:nth-of-type(11n+1) {
994 clear: both; }
995
996 .large-block-grid-12 > li {
997 width: 8.33333%;
998 padding: 0 0.625em 1.25em; }
999 .large-block-grid-12 > li:nth-of-type(n) {
1000 clear: none; }
1001 .large-block-grid-12 > li:nth-of-type(12n+1) {
1002 clear: both; } }
1003 p.lead {
1004 font-size: 1.21875em;
1005 line-height: 1.6; }
1006
1007 .subheader {
1008 line-height: 1.4;
1009 color: #8fa2cf;
1010 font-weight: 300;
1011 margin-top: 0.2em;
1012 margin-bottom: 0.5em; }
1013
1014 /* Typography resets */
1015 div,
1016 dl,
1017 dt,
1018 dd,
1019 ul,
1020 ol,
1021 li,
1022 h1,
1023 h2,
1024 h3,
1025 h4,
1026 h5,
1027 h6,
1028 pre,
1029 form,
1030 p,
1031 blockquote,
1032 th,
1033 td {
1034 margin: 0;
1035 padding: 0;
1036 direction: ltr; }
1037
1038 /* Default Link Styles */
1039 a {
1040 color: #2ba6cb;
1041 text-decoration: none;
1042 line-height: inherit; }
1043 a:hover, a:focus {
1044 color: #2795b6; }
1045 a img {
1046 border: none; }
1047
1048 /* Default paragraph styles */
1049 p {
1050 font-family: inherit;
1051 font-weight: normal;
1052 font-size: 1em;
1053 line-height: 1.6;
1054 margin-bottom: 1.25em;
1055 text-rendering: optimizeLegibility; }
1056 p aside {
1057 font-size: 0.875em;
1058 line-height: 1.35;
1059 font-style: italic; }
1060
1061 /* Default header styles */
1062 h1, h2, h3, h4, h5, h6 {
1063 font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
1064 font-weight: bold;
1065 font-style: normal;
1066 color: #3b528a;
1067 text-rendering: optimizeLegibility;
1068 margin-top: 0.2em;
1069 margin-bottom: 0.5em;
1070 line-height: 1.2125em; }
1071 h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
1072 font-size: 60%;
1073 color: #8fa2cf;
1074 line-height: 0; }
1075
1076 h1 {
1077 font-size: 2.125em; }
1078
1079 h2 {
1080 font-size: 1.6875em; }
1081
1082 h3 {
1083 font-size: 1.375em; }
1084
1085 h4 {
1086 font-size: 1.125em; }
1087
1088 h5 {
1089 font-size: 1.125em; }
1090
1091 h6 {
1092 font-size: 1em; }
1093
1094 hr {
1095 border: solid #dddddd;
1096 border-width: 1px 0 0;
1097 clear: both;
1098 margin: 1.25em 0 1.1875em;
1099 height: 0; }
1100
1101 /* Helpful Typography Defaults */
1102 em,
1103 i {
1104 font-style: italic;
1105 line-height: inherit; }
1106
1107 strong,
1108 b {
1109 font-weight: bold;
1110 line-height: inherit; }
1111
1112 small {
1113 font-size: 60%;
1114 line-height: inherit; }
1115
1116 code {
1117 font-family: Consolas, "Liberation Mono", Courier, monospace;
1118 font-weight: bold;
1119 color: #7f0a0c; }
1120
1121 /* Lists */
1122 ul,
1123 ol,
1124 dl {
1125 font-size: 1em;
1126 line-height: 1.6;
1127 margin-bottom: 1.25em;
1128 list-style-position: outside;
1129 font-family: inherit; }
1130
1131 ul, ol {
1132 margin-left: 0; }
1133
1134 /* Unordered Lists */
1135 ul li ul,
1136 ul li ol {
1137 margin-left: 1.25em;
1138 margin-bottom: 0;
1139 font-size: 1em;
1140 /* Override nested font-size change */ }
1141 ul.square li ul, ul.circle li ul, ul.disc li ul {
1142 list-style: inherit; }
1143 ul.square {
1144 list-style-type: square; }
1145 ul.circle {
1146 list-style-type: circle; }
1147 ul.disc {
1148 list-style-type: disc; }
1149 ul.no-bullet {
1150 list-style: none; }
1151
1152 /* Ordered Lists */
1153 ol li ul,
1154 ol li ol {
1155 margin-left: 1.25em;
1156 margin-bottom: 0; }
1157
1158 /* Definition Lists */
1159 dl dt {
1160 margin-bottom: 0.3em;
1161 font-weight: bold; }
1162 dl dd {
1163 margin-bottom: 0.75em; }
1164
1165 /* Abbreviations */
1166 abbr,
1167 acronym {
1168 text-transform: uppercase;
1169 font-size: 90%;
1170 color: #1c1b39;
1171 border-bottom: 1px dotted #dddddd;
1172 cursor: help; }
1173
1174 abbr {
1175 text-transform: none; }
1176
1177 /* Blockquotes */
1178 blockquote {
1179 margin: 0 0 1.25em;
1180 padding: 0.5625em 1.25em 0 1.1875em;
1181 border-left: 1px solid #dddddd; }
1182 blockquote cite {
1183 display: block;
1184 font-size: 0.8125em;
1185 color: #6b84c0; }
1186 blockquote cite:before {
1187 content: "\2014 \0020"; }
1188 blockquote cite a,
1189 blockquote cite a:visited {
1190 color: #6b84c0; }
1191
1192 blockquote,
1193 blockquote p {
1194 line-height: 1.6;
1195 color: #8fa2cf; }
1196
1197 /* Microformats */
1198 .vcard {
1199 display: inline-block;
1200 margin: 0 0 1.25em 0;
1201 border: 1px solid #dddddd;
1202 padding: 0.625em 0.75em; }
1203 .vcard li {
1204 margin: 0;
1205 display: block; }
1206 .vcard .fn {
1207 font-weight: bold;
1208 font-size: 0.9375em; }
1209
1210 .vevent .summary {
1211 font-weight: bold; }
1212 .vevent abbr {
1213 cursor: default;
1214 text-decoration: none;
1215 font-weight: bold;
1216 border: none;
1217 padding: 0 0.0625em; }
1218
1219 @media only screen and (min-width: 768px) {
1220 h1, h2, h3, h4, h5, h6 {
1221 line-height: 1.4; }
1222
1223 h1 {
1224 font-size: 2.75em; }
1225
1226 h2 {
1227 font-size: 2.3125em; }
1228
1229 h3 {
1230 font-size: 1.6875em; }
1231
1232 h4 {
1233 font-size: 1.4375em; } }
1234 /*
1235 * Print styles.
1236 *
1237 * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
1238 * Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
1239 */
1240 .print-only {
1241 display: none !important; }
1242
1243 @media print {
1244 * {
1245 background: transparent !important;
1246 color: black !important;
1247 /* Black prints faster: h5bp.com/s */
1248 box-shadow: none !important;
1249 text-shadow: none !important; }
1250
1251 a,
1252 a:visited {
1253 text-decoration: underline; }
1254
1255 a[href]:after {
1256 content: " (" attr(href) ")"; }
1257
1258 abbr[title]:after {
1259 content: " (" attr(title) ")"; }
1260
1261 .ir a:after,
1262 a[href^="javascript:"]:after,
1263 a[href^="#"]:after {
1264 content: ""; }
1265
1266 pre,
1267 blockquote {
1268 border: 1px solid #999999;
1269 page-break-inside: avoid; }
1270
1271 thead {
1272 display: table-header-group;
1273 /* h5bp.com/t */ }
1274
1275 tr,
1276 img {
1277 page-break-inside: avoid; }
1278
1279 img {
1280 max-width: 100% !important; }
1281
1282 @page {
1283 margin: 0.5cm; }
1284
1285 p,
1286 h2,
1287 h3 {
1288 orphans: 3;
1289 widows: 3; }
1290
1291 h2,
1292 h3 {
1293 page-break-after: avoid; }
1294
1295 .hide-on-print {
1296 display: none !important; }
1297
1298 .print-only {
1299 display: block !important; }
1300
1301 .hide-for-print {
1302 display: none !important; }
1303
1304 .show-for-print {
1305 display: inherit !important; } }
1306 button, .button {
1307 border-style: solid;
1308 border-width: 1px;
1309 cursor: pointer;
1310 font-family: inherit;
1311 font-weight: bold;
1312 line-height: 1;
1313 margin: 0 0 1.25em;
1314 position: relative;
1315 text-decoration: none;
1316 text-align: center;
1317 display: inline-block;
1318 padding-top: 0.75em;
1319 padding-right: 1.5em;
1320 padding-bottom: 0.8125em;
1321 padding-left: 1.5em;
1322 font-size: 1em;
1323 background-color: #2ba6cb;
1324 border-color: #2284a1;
1325 color: white; }
1326 button:hover, button:focus, .button:hover, .button:focus {
1327 background-color: #2284a1; }
1328 button:hover, button:focus, .button:hover, .button:focus {
1329 color: white; }
1330 button.secondary, .button.secondary {
1331 background-color: #e9e9e9;
1332 border-color: #d0d0d0;
1333 color: #333333; }
1334 button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
1335 background-color: #d0d0d0; }
1336 button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
1337 color: #333333; }
1338 button.success, .button.success {
1339 background-color: #5da423;
1340 border-color: #457a1a;
1341 color: white; }
1342 button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
1343 background-color: #457a1a; }
1344 button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
1345 color: white; }
1346 button.alert, .button.alert {
1347 background-color: #c60f13;
1348 border-color: #970b0e;
1349 color: white; }
1350 button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
1351 background-color: #970b0e; }
1352 button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
1353 color: white; }
1354 button.large, .button.large {
1355 padding-top: 1em;
1356 padding-right: 2em;
1357 padding-bottom: 1.0625em;
1358 padding-left: 2em;
1359 font-size: 1.25em; }
1360 button.small, .button.small {
1361 padding-top: 0.5625em;
1362 padding-right: 1.125em;
1363 padding-bottom: 0.625em;
1364 padding-left: 1.125em;
1365 font-size: 0.8125em; }
1366 button.tiny, .button.tiny {
1367 padding-top: 0.4375em;
1368 padding-right: 0.875em;
1369 padding-bottom: 0.5em;
1370 padding-left: 0.875em;
1371 font-size: 0.6875em; }
1372 button.expand, .button.expand {
1373 padding-right: 0px;
1374 padding-left: 0px;
1375 width: 100%; }
1376 button.left-align, .button.left-align {
1377 text-align: left;
1378 text-indent: 0.75em; }
1379 button.right-align, .button.right-align {
1380 text-align: right;
1381 padding-right: 0.75em; }
1382 button.disabled, button[disabled], .button.disabled, .button[disabled] {
1383 background-color: #2ba6cb;
1384 border-color: #2284a1;
1385 color: white;
1386 cursor: default;
1387 opacity: 0.6;
1388 -webkit-box-shadow: none;
1389 box-shadow: none; }
1390 button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
1391 background-color: #2284a1; }
1392 button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
1393 color: white; }
1394 button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
1395 background-color: #2ba6cb; }
1396 button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary {
1397 background-color: #e9e9e9;
1398 border-color: #d0d0d0;
1399 color: #333333;
1400 cursor: default;
1401 opacity: 0.6;
1402 -webkit-box-shadow: none;
1403 box-shadow: none; }
1404 button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
1405 background-color: #d0d0d0; }
1406 button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
1407 color: #333333; }
1408 button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
1409 background-color: #e9e9e9; }
1410 button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success {
1411 background-color: #5da423;
1412 border-color: #457a1a;
1413 color: white;
1414 cursor: default;
1415 opacity: 0.6;
1416 -webkit-box-shadow: none;
1417 box-shadow: none; }
1418 button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
1419 background-color: #457a1a; }
1420 button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
1421 color: white; }
1422 button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
1423 background-color: #5da423; }
1424 button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert {
1425 background-color: #c60f13;
1426 border-color: #970b0e;
1427 color: white;
1428 cursor: default;
1429 opacity: 0.6;
1430 -webkit-box-shadow: none;
1431 box-shadow: none; }
1432 button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
1433 background-color: #970b0e; }
1434 button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
1435 color: white; }
1436 button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
1437 background-color: #c60f13; }
1438
1439 button, .button {
1440 padding-top: 0.8125em;
1441 padding-bottom: 0.75em;
1442 -webkit-appearance: none; }
1443 button.tiny, .button.tiny {
1444 padding-top: 0.5em;
1445 padding-bottom: 0.4375em;
1446 -webkit-appearance: none; }
1447 button.small, .button.small {
1448 padding-top: 0.625em;
1449 padding-bottom: 0.5625em;
1450 -webkit-appearance: none; }
1451 button.large, .button.large {
1452 padding-top: 1.03125em;
1453 padding-bottom: 1.03125em;
1454 -webkit-appearance: none; }
1455
1456 @media only screen {
1457 button, .button {
1458 -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
1459 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
1460 -webkit-transition: background-color 300ms ease-out;
1461 -moz-transition: background-color 300ms ease-out;
1462 transition: background-color 300ms ease-out; }
1463 button:active, .button:active {
1464 -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset;
1465 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; }
1466 button.radius, .button.radius {
1467 -webkit-border-radius: 3px;
1468 border-radius: 3px; }
1469 button.round, .button.round {
1470 -webkit-border-radius: 1000px;
1471 border-radius: 1000px; } }
1472 @media only screen and (min-width: 768px) {
1473 button, .button {
1474 display: inline-block; } }
1475 /* Standard Forms */
1476 form {
1477 margin: 0 0 1em; }
1478
1479 /* Using forms within rows, we need to set some defaults */
1480 form .row .row {
1481 margin: 0 -0.5em; }
1482 form .row .row .column,
1483 form .row .row .columns {
1484 padding: 0 0.5em; }
1485 form .row .row.collapse {
1486 margin: 0; }
1487 form .row .row.collapse .column,
1488 form .row .row.collapse .columns {
1489 padding: 0; }
1490 form .row input.column,
1491 form .row input.columns,
1492 form .row textarea.column,
1493 form .row textarea.columns {
1494 padding-left: 0.5em; }
1495
1496 /* Label Styles */
1497 label {
1498 font-size: 0.875em;
1499 color: #4d4d4d;
1500 cursor: pointer;
1501 display: block;
1502 font-weight: 500;
1503 margin-bottom: 0.1875em; }
1504 label.right {
1505 float: none;
1506 text-align: right; }
1507 label.inline {
1508 margin: 0 0 1em 0;
1509 padding: 0.625em 0; }
1510
1511 /* Attach elements to the beginning or end of an input */
1512 .prefix,
1513 .postfix {
1514 display: block;
1515 position: relative;
1516 z-index: 2;
1517 text-align: center;
1518 width: 100%;
1519 padding-top: 0;
1520 padding-bottom: 0;
1521 border-style: solid;
1522 border-width: 1px;
1523 overflow: hidden;
1524 font-size: 0.875em;
1525 height: 2.3125em;
1526 line-height: 2.3125em; }
1527
1528 /* Adjust padding, alignment and radius if pre/post element is a button */
1529 .postfix.button {
1530 padding-left: 0;
1531 padding-right: 0;
1532 padding-top: 0;
1533 padding-bottom: 0;
1534 text-align: center;
1535 line-height: 2.125em; }
1536
1537 .prefix.button {
1538 padding-left: 0;
1539 padding-right: 0;
1540 padding-top: 0;
1541 padding-bottom: 0;
1542 text-align: center;
1543 line-height: 2.125em; }
1544
1545 .prefix.button.radius {
1546 -webkit-border-radius: 0;
1547 border-radius: 0;
1548 -moz-border-radius-bottomleft: 3px;
1549 -moz-border-radius-topleft: 3px;
1550 -webkit-border-bottom-left-radius: 3px;
1551 -webkit-border-top-left-radius: 3px;
1552 border-bottom-left-radius: 3px;
1553 border-top-left-radius: 3px; }
1554
1555 .postfix.button.radius {
1556 -webkit-border-radius: 0;
1557 border-radius: 0;
1558 -moz-border-radius-topright: 3px;
1559 -moz-border-radius-bottomright: 3px;
1560 -webkit-border-top-right-radius: 3px;
1561 -webkit-border-bottom-right-radius: 3px;
1562 border-top-right-radius: 3px;
1563 border-bottom-right-radius: 3px; }
1564
1565 .prefix.button.round {
1566 -webkit-border-radius: 0;
1567 border-radius: 0;
1568 -moz-border-radius-bottomleft: 1000px;
1569 -moz-border-radius-topleft: 1000px;
1570 -webkit-border-bottom-left-radius: 1000px;
1571 -webkit-border-top-left-radius: 1000px;
1572 border-bottom-left-radius: 1000px;
1573 border-top-left-radius: 1000px; }
1574
1575 .postfix.button.round {
1576 -webkit-border-radius: 0;
1577 border-radius: 0;
1578 -moz-border-radius-topright: 1000px;
1579 -moz-border-radius-bottomright: 1000px;
1580 -webkit-border-top-right-radius: 1000px;
1581 -webkit-border-bottom-right-radius: 1000px;
1582 border-top-right-radius: 1000px;
1583 border-bottom-right-radius: 1000px; }
1584
1585 /* Separate prefix and postfix styles when on span so buttons keep their own */
1586 span.prefix {
1587 background: #f2f2f2;
1588 border-color: #d9d9d9;
1589 border-right: none;
1590 color: #333333; }
1591 span.prefix.radius {
1592 -webkit-border-radius: 0;
1593 border-radius: 0;
1594 -moz-border-radius-bottomleft: 3px;
1595 -moz-border-radius-topleft: 3px;
1596 -webkit-border-bottom-left-radius: 3px;
1597 -webkit-border-top-left-radius: 3px;
1598 border-bottom-left-radius: 3px;
1599 border-top-left-radius: 3px; }
1600
1601 span.postfix {
1602 background: #f2f2f2;
1603 border-color: #cccccc;
1604 border-left: none;
1605 color: #333333; }
1606 span.postfix.radius {
1607 -webkit-border-radius: 0;
1608 border-radius: 0;
1609 -moz-border-radius-topright: 3px;
1610 -moz-border-radius-bottomright: 3px;
1611 -webkit-border-top-right-radius: 3px;
1612 -webkit-border-bottom-right-radius: 3px;
1613 border-top-right-radius: 3px;
1614 border-bottom-right-radius: 3px; }
1615
1616 /* Input groups will automatically style first and last elements of the group */
1617 .input-group.radius > *:first-child, .input-group.radius > *:first-child * {
1618 -moz-border-radius-bottomleft: 3px;
1619 -moz-border-radius-topleft: 3px;
1620 -webkit-border-bottom-left-radius: 3px;
1621 -webkit-border-top-left-radius: 3px;
1622 border-bottom-left-radius: 3px;
1623 border-top-left-radius: 3px; }
1624 .input-group.radius > *:last-child, .input-group.radius > *:last-child * {
1625 -moz-border-radius-topright: 3px;
1626 -moz-border-radius-bottomright: 3px;
1627 -webkit-border-top-right-radius: 3px;
1628 -webkit-border-bottom-right-radius: 3px;
1629 border-top-right-radius: 3px;
1630 border-bottom-right-radius: 3px; }
1631 .input-group.round > *:first-child, .input-group.round > *:first-child * {
1632 -moz-border-radius-bottomleft: 1000px;
1633 -moz-border-radius-topleft: 1000px;
1634 -webkit-border-bottom-left-radius: 1000px;
1635 -webkit-border-top-left-radius: 1000px;
1636 border-bottom-left-radius: 1000px;
1637 border-top-left-radius: 1000px; }
1638 .input-group.round > *:last-child, .input-group.round > *:last-child * {
1639 -moz-border-radius-topright: 1000px;
1640 -moz-border-radius-bottomright: 1000px;
1641 -webkit-border-top-right-radius: 1000px;
1642 -webkit-border-bottom-right-radius: 1000px;
1643 border-top-right-radius: 1000px;
1644 border-bottom-right-radius: 1000px; }
1645
1646 /* We use this to get basic styling on all basic form elements */
1647 input[type="text"],
1648 input[type="password"],
1649 input[type="date"],
1650 input[type="datetime"],
1651 input[type="datetime-local"],
1652 input[type="month"],
1653 input[type="week"],
1654 input[type="email"],
1655 input[type="number"],
1656 input[type="search"],
1657 input[type="tel"],
1658 input[type="time"],
1659 input[type="url"],
1660 textarea {
1661 background-color: white;
1662 font-family: inherit;
1663 border: 1px solid #cccccc;
1664 -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
1665 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
1666 color: rgba(0, 0, 0, 0.75);
1667 display: block;
1668 font-size: 0.875em;
1669 margin: 0 0 1em 0;
1670 padding: 0.5em;
1671 height: 2.3125em;
1672 width: 100%;
1673 -moz-box-sizing: border-box;
1674 -webkit-box-sizing: border-box;
1675 box-sizing: border-box;
1676 -webkit-transition: -webkit-box-shadow 0.45s, border-color 0.45s ease-in-out;
1677 -moz-transition: -moz-box-shadow 0.45s, border-color 0.45s ease-in-out;
1678 transition: box-shadow 0.45s, border-color 0.45s ease-in-out; }
1679 input[type="text"]:focus,
1680 input[type="password"]:focus,
1681 input[type="date"]:focus,
1682 input[type="datetime"]:focus,
1683 input[type="datetime-local"]:focus,
1684 input[type="month"]:focus,
1685 input[type="week"]:focus,
1686 input[type="email"]:focus,
1687 input[type="number"]:focus,
1688 input[type="search"]:focus,
1689 input[type="tel"]:focus,
1690 input[type="time"]:focus,
1691 input[type="url"]:focus,
1692 textarea:focus {
1693 -webkit-box-shadow: 0 0 5px #999999;
1694 -moz-box-shadow: 0 0 5px #999999;
1695 box-shadow: 0 0 5px #999999;
1696 border-color: #999999; }
1697 input[type="text"]:focus,
1698 input[type="password"]:focus,
1699 input[type="date"]:focus,
1700 input[type="datetime"]:focus,
1701 input[type="datetime-local"]:focus,
1702 input[type="month"]:focus,
1703 input[type="week"]:focus,
1704 input[type="email"]:focus,
1705 input[type="number"]:focus,
1706 input[type="search"]:focus,
1707 input[type="tel"]:focus,
1708 input[type="time"]:focus,
1709 input[type="url"]:focus,
1710 textarea:focus {
1711 background: #fafafa;
1712 border-color: #999999;
1713 outline: none; }
1714 input[type="text"][disabled],
1715 input[type="password"][disabled],
1716 input[type="date"][disabled],
1717 input[type="datetime"][disabled],
1718 input[type="datetime-local"][disabled],
1719 input[type="month"][disabled],
1720 input[type="week"][disabled],
1721 input[type="email"][disabled],
1722 input[type="number"][disabled],
1723 input[type="search"][disabled],
1724 input[type="tel"][disabled],
1725 input[type="time"][disabled],
1726 input[type="url"][disabled],
1727 textarea[disabled] {
1728 background-color: #dddddd; }
1729
1730 /* Adjust margin for form elements below */
1731 input[type="file"],
1732 input[type="checkbox"],
1733 input[type="radio"],
1734 select {
1735 margin: 0 0 1em 0; }
1736
1737 /* Normalize file input width */
1738 input[type="file"] {
1739 width: 100%; }
1740
1741 /* We add basic fieldset styling */
1742 fieldset {
1743 border: solid 1px #dddddd;
1744 padding: 1.25em;
1745 margin: 1.125em 0; }
1746 fieldset legend {
1747 font-weight: bold;
1748 background: white;
1749 padding: 0 0.1875em;
1750 margin: 0;
1751 margin-left: -0.1875em; }
1752
1753 /* Error Handling */
1754 .error input,
1755 input.error,
1756 .error textarea,
1757 textarea.error {
1758 border-color: #c60f13;
1759 background-color: rgba(198, 15, 19, 0.1); }
1760 .error input:focus,
1761 input.error:focus,
1762 .error textarea:focus,
1763 textarea.error:focus {
1764 background: #fafafa;
1765 border-color: #999999; }
1766
1767 .error label,
1768 label.error {
1769 color: #c60f13; }
1770
1771 .error small,
1772 small.error {
1773 display: block;
1774 padding: 0.375em 0.25em;
1775 margin-top: -1.3125em;
1776 margin-bottom: 1em;
1777 font-size: 0.75em;
1778 font-weight: bold;
1779 background: #c60f13;
1780 color: white; }
1781
1782 /* Custom Checkbox and Radio Inputs */
1783 form.custom .hidden-field {
1784 margin-left: -99999px;
1785 position: absolute;
1786 visibility: hidden; }
1787 form.custom .custom {
1788 display: inline-block;
1789 width: 16px;
1790 height: 16px;
1791 position: relative;
1792 vertical-align: middle;
1793 border: solid 1px #cccccc;
1794 background: white; }
1795 form.custom .custom.checkbox {
1796 -webkit-border-radius: 0px;
1797 border-radius: 0px;
1798 padding: -1px; }
1799 form.custom .custom.radio {
1800 -webkit-border-radius: 1000px;
1801 border-radius: 1000px;
1802 padding: 3px; }
1803 form.custom .custom.checkbox:before {
1804 content: "";
1805 display: block;
1806 font-size: 16px;
1807 color: white; }
1808 form.custom .custom.radio.checked:before {
1809 content: "";
1810 display: block;
1811 width: 8px;
1812 height: 8px;
1813 -webkit-border-radius: 1000px;
1814 border-radius: 1000px;
1815 background: #222222;
1816 position: relative; }
1817 form.custom .custom.checkbox.checked:before {
1818 content: "\00d7";
1819 color: #222222;
1820 position: absolute;
1821 top: -50%;
1822 left: 50%;
1823 margin-top: 4px;
1824 margin-left: -5px; }
1825
1826 /* Custom Select Options and Dropdowns */
1827 form.custom {
1828 /* Custom input, disabled */ }
1829 form.custom .custom.dropdown {
1830 display: block;
1831 position: relative;
1832 top: 0;
1833 height: 2.3125em;
1834 margin-bottom: 1.25em;
1835 margin-top: 0px;
1836 padding: 0px;
1837 width: 100%;
1838 background: white;
1839 background: -moz-linear-gradient(top, white 0%, #f3f3f3 100%);
1840 background: -webkit-linear-gradient(top, white 0%, #f3f3f3 100%);
1841 -webkit-box-shadow: none;
1842 background: linear-gradient(to bottom, white 0%, #f3f3f3 100%);
1843 box-shadow: none;
1844 font-size: 0.875em;
1845 vertical-align: top; }
1846 form.custom .custom.dropdown ul {
1847 overflow-y: auto;
1848 max-height: 200px; }
1849 form.custom .custom.dropdown .current {
1850 cursor: default;
1851 white-space: nowrap;
1852 line-height: 2.25em;
1853 color: rgba(0, 0, 0, 0.75);
1854 text-decoration: none;
1855 overflow: hidden;
1856 display: block;
1857 margin-left: 0.5em;
1858 margin-right: 2.3125em; }
1859 form.custom .custom.dropdown .selector {
1860 cursor: default;
1861 position: absolute;
1862 width: 2.5em;
1863 height: 2.3125em;
1864 display: block;
1865 right: 0;
1866 top: 0; }
1867 form.custom .custom.dropdown .selector:after {
1868 content: "";
1869 display: block;
1870 content: "";
1871 display: block;
1872 width: 0;
1873 height: 0;
1874 border: inset 5px;
1875 border-color: #aaaaaa transparent transparent transparent;
1876 border-top-style: solid;
1877 position: absolute;
1878 left: 0.9375em;
1879 top: 50%;
1880 margin-top: -3px; }
1881 form.custom .custom.dropdown:hover a.selector:after, form.custom .custom.dropdown.open a.selector:after {
1882 content: "";
1883 display: block;
1884 width: 0;
1885 height: 0;
1886 border: inset 5px;
1887 border-color: #222222 transparent transparent transparent;
1888 border-top-style: solid; }
1889 form.custom .custom.dropdown .disabled {
1890 color: #888888; }
1891 form.custom .custom.dropdown .disabled:hover {
1892 background: transparent;
1893 color: #888888; }
1894 form.custom .custom.dropdown .disabled:hover:after {
1895 display: none; }
1896 form.custom .custom.dropdown.open ul {
1897 display: block;
1898 z-index: 10;
1899 min-width: 100%;
1900 -moz-box-sizing: content-box;
1901 -webkit-box-sizing: content-box;
1902 box-sizing: content-box; }
1903 form.custom .custom.dropdown.small {
1904 max-width: 134px; }
1905 form.custom .custom.dropdown.medium {
1906 max-width: 254px; }
1907 form.custom .custom.dropdown.large {
1908 max-width: 434px; }
1909 form.custom .custom.dropdown.expand {
1910 width: 100% !important; }
1911 form.custom .custom.dropdown.open.small ul {
1912 min-width: 134px;
1913 -moz-box-sizing: border-box;
1914 -webkit-box-sizing: border-box;
1915 box-sizing: border-box; }
1916 form.custom .custom.dropdown.open.medium ul {
1917 min-width: 254px;
1918 -moz-box-sizing: border-box;
1919 -webkit-box-sizing: border-box;
1920 box-sizing: border-box; }
1921 form.custom .custom.dropdown.open.large ul {
1922 min-width: 434px;
1923 -moz-box-sizing: border-box;
1924 -webkit-box-sizing: border-box;
1925 box-sizing: border-box; }
1926 form.custom .custom.dropdown ul {
1927 position: absolute;
1928 width: auto;
1929 display: none;
1930 margin: 0;
1931 left: -1px;
1932 top: auto;
1933 -webkit-box-shadow: 0 2px 2px 0px rgba(0, 0, 0, 0.1);
1934 box-shadow: 0 2px 2px 0px rgba(0, 0, 0, 0.1);
1935 margin: 0;
1936 padding: 0;
1937 background: white;
1938 border: solid 1px #cccccc;
1939 font-size: 16px; }
1940 form.custom .custom.dropdown ul li {
1941 color: #555555;
1942 font-size: 0.875em;
1943 cursor: default;
1944 padding-top: 0.25em;
1945 padding-bottom: 0.25em;
1946 padding-left: 0.375em;
1947 padding-right: 2.375em;
1948 min-height: 1.5em;
1949 line-height: 1.5em;
1950 margin: 0;
1951 white-space: nowrap;
1952 list-style: none; }
1953 form.custom .custom.dropdown ul li.selected {
1954 background: #eeeeee;
1955 color: black; }
1956 form.custom .custom.dropdown ul li:hover {
1957 background-color: #e4e4e4;
1958 color: black; }
1959 form.custom .custom.dropdown ul li.selected:hover {
1960 background: #eeeeee;
1961 cursor: default;
1962 color: black; }
1963 form.custom .custom.dropdown ul.show {
1964 display: block; }
1965 form.custom .custom.disabled {
1966 background: #dddddd; }
1967
1968 /* Button Groups */
1969 .button-group {
1970 list-style: none;
1971 margin: 0;
1972 *zoom: 1; }
1973 .button-group:before, .button-group:after {
1974 content: " ";
1975 display: table; }
1976 .button-group:after {
1977 clear: both; }
1978 .button-group > * {
1979 margin: 0 0 0 -1px;
1980 float: left; }
1981 .button-group > *:first-child {
1982 margin-left: 0; }
1983 .button-group.radius > *:first-child, .button-group.radius > *:first-child > a, .button-group.radius > *:first-child > button, .button-group.radius > *:first-child > .button {
1984 -moz-border-radius-bottomleft: 3px;
1985 -moz-border-radius-topleft: 3px;
1986 -webkit-border-bottom-left-radius: 3px;
1987 -webkit-border-top-left-radius: 3px;
1988 border-bottom-left-radius: 3px;
1989 border-top-left-radius: 3px; }
1990 .button-group.radius > *:last-child, .button-group.radius > *:last-child > a, .button-group.radius > *:last-child > button, .button-group.radius > *:last-child > .button {
1991 -moz-border-radius-topright: 3px;
1992 -moz-border-radius-bottomright: 3px;
1993 -webkit-border-top-right-radius: 3px;
1994 -webkit-border-bottom-right-radius: 3px;
1995 border-top-right-radius: 3px;
1996 border-bottom-right-radius: 3px; }
1997 .button-group.round > *:first-child, .button-group.round > *:first-child > a, .button-group.round > *:first-child > button, .button-group.round > *:first-child > .button {
1998 -moz-border-radius-bottomleft: 1000px;
1999 -moz-border-radius-topleft: 1000px;
2000 -webkit-border-bottom-left-radius: 1000px;
2001 -webkit-border-top-left-radius: 1000px;
2002 border-bottom-left-radius: 1000px;
2003 border-top-left-radius: 1000px; }
2004 .button-group.round > *:last-child, .button-group.round > *:last-child > a, .button-group.round > *:last-child > button, .button-group.round > *:last-child > .button {
2005 -moz-border-radius-topright: 1000px;
2006 -moz-border-radius-bottomright: 1000px;
2007 -webkit-border-top-right-radius: 1000px;
2008 -webkit-border-bottom-right-radius: 1000px;
2009 border-top-right-radius: 1000px;
2010 border-bottom-right-radius: 1000px; }
2011 .button-group.even-2 li {
2012 width: 50%; }
2013 .button-group.even-2 li button, .button-group.even-2 li .button {
2014 width: 100%; }
2015 .button-group.even-3 li {
2016 width: 33.33333%; }
2017 .button-group.even-3 li button, .button-group.even-3 li .button {
2018 width: 100%; }
2019 .button-group.even-4 li {
2020 width: 25%; }
2021 .button-group.even-4 li button, .button-group.even-4 li .button {
2022 width: 100%; }
2023 .button-group.even-5 li {
2024 width: 20%; }
2025 .button-group.even-5 li button, .button-group.even-5 li .button {
2026 width: 100%; }
2027 .button-group.even-6 li {
2028 width: 16.66667%; }
2029 .button-group.even-6 li button, .button-group.even-6 li .button {
2030 width: 100%; }
2031 .button-group.even-7 li {
2032 width: 14.28571%; }
2033 .button-group.even-7 li button, .button-group.even-7 li .button {
2034 width: 100%; }
2035 .button-group.even-8 li {
2036 width: 12.5%; }
2037 .button-group.even-8 li button, .button-group.even-8 li .button {
2038 width: 100%; }
2039
2040 .button-bar {
2041 *zoom: 1; }
2042 .button-bar:before, .button-bar:after {
2043 content: " ";
2044 display: table; }
2045 .button-bar:after {
2046 clear: both; }
2047 .button-bar .button-group {
2048 float: left;
2049 margin-right: 0.625em; }
2050 .button-bar .button-group div {
2051 overflow: hidden; }
2052
2053 /* Dropdown Button */
2054 .dropdown.button {
2055 position: relative;
2056 padding-right: 3.1875em; }
2057 .dropdown.button:before {
2058 position: absolute;
2059 content: "";
2060 width: 0;
2061 height: 0;
2062 display: block;
2063 border-style: solid;
2064 border-color: white transparent transparent transparent;
2065 top: 50%; }
2066 .dropdown.button:before {
2067 border-width: 0.5625em;
2068 right: 1.5em;
2069 margin-top: -0.25em; }
2070 .dropdown.button:before {
2071 border-color: white transparent transparent transparent; }
2072 .dropdown.button.tiny {
2073 padding-right: 2.1875em; }
2074 .dropdown.button.tiny:before {
2075 border-width: 0.4375em;
2076 right: 0.875em;
2077 margin-top: -0.15625em; }
2078 .dropdown.button.tiny:before {
2079 border-color: white transparent transparent transparent; }
2080 .dropdown.button.small {
2081 padding-right: 2.8125em; }
2082 .dropdown.button.small:before {
2083 border-width: 0.5625em;
2084 right: 1.125em;
2085 margin-top: -0.21875em; }
2086 .dropdown.button.small:before {
2087 border-color: white transparent transparent transparent; }
2088 .dropdown.button.large {
2089 padding-right: 4em; }
2090 .dropdown.button.large:before {
2091 border-width: 0.625em;
2092 right: 1.75em;
2093 margin-top: -0.3125em; }
2094 .dropdown.button.large:before {
2095 border-color: white transparent transparent transparent; }
2096 .dropdown.button.secondary:before {
2097 border-color: #333333 transparent transparent transparent; }
2098
2099 /* Split Buttons */
2100 .split.button {
2101 position: relative;
2102 padding-right: 4.8em; }
2103 .split.button span {
2104 display: block;
2105 height: 100%;
2106 position: absolute;
2107 right: 0;
2108 top: 0;
2109 border-left: solid 1px; }
2110 .split.button span:before {
2111 position: absolute;
2112 content: "";
2113 width: 0;
2114 height: 0;
2115 display: block;
2116 border-style: inset;
2117 left: 50%; }
2118 .split.button span:active {
2119 background-color: rgba(0, 0, 0, 0.1); }
2120 .split.button span {
2121 border-left-color: #1e728c; }
2122 .split.button span {
2123 width: 3em; }
2124 .split.button span:before {
2125 border-top-style: solid;
2126 border-width: 0.5625em;
2127 top: 1.125em;
2128 margin-left: -0.5625em; }
2129 .split.button span:before {
2130 border-color: white transparent transparent transparent; }
2131 .split.button.secondary span {
2132 border-left-color: #c3c3c3; }
2133 .split.button.secondary span:before {
2134 border-color: white transparent transparent transparent; }
2135 .split.button.alert span {
2136 border-left-color: #7f0a0c; }
2137 .split.button.success span {
2138 border-left-color: #396516; }
2139 .split.button.tiny {
2140 padding-right: 3.9375em; }
2141 .split.button.tiny span {
2142 width: 2.84375em; }
2143 .split.button.tiny span:before {
2144 border-top-style: solid;
2145 border-width: 0.4375em;
2146 top: 0.875em;
2147 margin-left: -0.3125em; }
2148 .split.button.small {
2149 padding-right: 3.9375em; }
2150 .split.button.small span {
2151 width: 2.8125em; }
2152 .split.button.small span:before {
2153 border-top-style: solid;
2154 border-width: 0.5625em;
2155 top: 0.84375em;
2156 margin-left: -0.5625em; }
2157 .split.button.large {
2158 padding-right: 6em; }
2159 .split.button.large span {
2160 width: 3.75em; }
2161 .split.button.large span:before {
2162 border-top-style: solid;
2163 border-width: 0.625em;
2164 top: 1.3125em;
2165 margin-left: -0.5625em; }
2166 .split.button.expand {
2167 padding-left: 2em; }
2168 .split.button.secondary span:before {
2169 border-color: #333333 transparent transparent transparent; }
2170 .split.button.radius span {
2171 -moz-border-radius-topright: 3px;
2172 -moz-border-radius-bottomright: 3px;
2173 -webkit-border-top-right-radius: 3px;
2174 -webkit-border-bottom-right-radius: 3px;
2175 border-top-right-radius: 3px;
2176 border-bottom-right-radius: 3px; }
2177 .split.button.round span {
2178 -moz-border-radius-topright: 1000px;
2179 -moz-border-radius-bottomright: 1000px;
2180 -webkit-border-top-right-radius: 1000px;
2181 -webkit-border-bottom-right-radius: 1000px;
2182 border-top-right-radius: 1000px;
2183 border-bottom-right-radius: 1000px; }
2184
2185 /* Flex Video */
2186 .flex-video {
2187 position: relative;
2188 padding-top: 1.5625em;
2189 padding-bottom: 67.5%;
2190 height: 0;
2191 margin-bottom: 1em;
2192 overflow: hidden; }
2193 .flex-video.widescreen {
2194 padding-bottom: 57.25%; }
2195 .flex-video.vimeo {
2196 padding-top: 0; }
2197 .flex-video iframe,
2198 .flex-video object,
2199 .flex-video embed,
2200 .flex-video video {
2201 position: absolute;
2202 top: 0;
2203 left: 0;
2204 width: 100%;
2205 height: 100%; }
2206
2207 /* Sections */
2208 .section-container, .section-container.auto {
2209 width: 100%;
2210 display: block;
2211 margin-bottom: 1.25em;
2212 border: 1px solid #cccccc;
2213 border-top: none; }
2214 .section-container > section, .section-container > .section, .section-container.auto > section, .section-container.auto > .section {
2215 position: relative; }
2216 .section-container > section > .title, .section-container > .section > .title, .section-container.auto > section > .title, .section-container.auto > .section > .title {
2217 background-color: #efefef;
2218 cursor: pointer;
2219 margin-bottom: 0; }
2220 .section-container > section > .title a, .section-container > .section > .title a, .section-container.auto > section > .title a, .section-container.auto > .section > .title a {
2221 padding: 0.9375em;
2222 display: inline-block;
2223 color: #333333;
2224 font-size: 0.875em;
2225 white-space: nowrap; }
2226 .section-container > section > .title:hover, .section-container > .section > .title:hover, .section-container.auto > section > .title:hover, .section-container.auto > .section > .title:hover {
2227 background-color: #e2e2e2; }
2228 .section-container > section .content, .section-container > .section .content, .section-container.auto > section .content, .section-container.auto > .section .content {
2229 display: none;
2230 padding: 0.9375em;
2231 background-color: white; }
2232 .section-container > section .content > *:last-child, .section-container > .section .content > *:last-child, .section-container.auto > section .content > *:last-child, .section-container.auto > .section .content > *:last-child {
2233 margin-bottom: 0; }
2234 .section-container > section .content > *:first-child, .section-container > .section .content > *:first-child, .section-container.auto > section .content > *:first-child, .section-container.auto > .section .content > *:first-child {
2235 padding-top: 0; }
2236 .section-container > section .content > *:last-child:not(.flex-video), .section-container > .section .content > *:last-child:not(.flex-video), .section-container.auto > section .content > *:last-child:not(.flex-video), .section-container.auto > .section .content > *:last-child:not(.flex-video) {
2237 padding-bottom: 0; }
2238 .section-container > section.active > .content, .section-container > .section.active > .content, .section-container.auto > section.active > .content, .section-container.auto > .section.active > .content {
2239 display: block; }
2240 .section-container > section.active > .title, .section-container > .section.active > .title, .section-container.auto > section.active > .title, .section-container.auto > .section.active > .title {
2241 background: #d5d5d5; }
2242 .section-container > section.active > .title a, .section-container > .section.active > .title a, .section-container.auto > section.active > .title a, .section-container.auto > .section.active > .title a {
2243 color: #333333; }
2244 .section-container > section > .title, .section-container > .section > .title, .section-container.auto > section > .title, .section-container.auto > .section > .title {
2245 top: 0;
2246 width: 100%;
2247 margin: 0;
2248 border-top: solid 1px #cccccc; }
2249 .section-container > section > .title a, .section-container > .section > .title a, .section-container.auto > section > .title a, .section-container.auto > .section > .title a {
2250 width: 100%; }
2251
2252 .section-container.tabs {
2253 border: 0;
2254 position: relative; }
2255 .section-container.tabs > section, .section-container.tabs > .section {
2256 border: 0;
2257 position: static; }
2258 .section-container.tabs > section > .title, .section-container.tabs > .section > .title {
2259 background-color: #efefef;
2260 cursor: pointer;
2261 margin-bottom: 0; }
2262 .section-container.tabs > section > .title a, .section-container.tabs > .section > .title a {
2263 padding: 0.9375em;
2264 display: inline-block;
2265 color: #333333;
2266 font-size: 0.875em;
2267 white-space: nowrap; }
2268 .section-container.tabs > section > .title:hover, .section-container.tabs > .section > .title:hover {
2269 background-color: #e2e2e2; }
2270 .section-container.tabs > section .content, .section-container.tabs > .section .content {
2271 display: none;
2272 padding: 0.9375em;
2273 background-color: white; }
2274 .section-container.tabs > section .content > *:last-child, .section-container.tabs > .section .content > *:last-child {
2275 margin-bottom: 0; }
2276 .section-container.tabs > section .content > *:first-child, .section-container.tabs > .section .content > *:first-child {
2277 padding-top: 0; }
2278 .section-container.tabs > section .content > *:last-child:not(.flex-video), .section-container.tabs > .section .content > *:last-child:not(.flex-video) {
2279 padding-bottom: 0; }
2280 .section-container.tabs > section.active > .content, .section-container.tabs > .section.active > .content {
2281 display: block; }
2282 .section-container.tabs > section.active > .title, .section-container.tabs > .section.active > .title {
2283 background: white; }
2284 .section-container.tabs > section.active > .title a, .section-container.tabs > .section.active > .title a {
2285 color: #333333; }
2286 .section-container.tabs > section > .title, .section-container.tabs > .section > .title {
2287 width: auto;
2288 border: solid 1px #cccccc;
2289 border-right: 0;
2290 border-bottom: 0;
2291 position: absolute;
2292 top: 0;
2293 z-index: 1; }
2294 .section-container.tabs > section > .title a, .section-container.tabs > .section > .title a {
2295 width: 100%; }
2296 .section-container.tabs > section:last-child .title, .section-container.tabs > .section:last-child .title {
2297 border-right: solid 1px #cccccc; }
2298 .section-container.tabs > section .content, .section-container.tabs > .section .content {
2299 border: solid 1px #cccccc;
2300 position: absolute;
2301 z-index: 10;
2302 display: none;
2303 top: -1px; }
2304 .section-container.tabs > section.active > .title, .section-container.tabs > .section.active > .title {
2305 z-index: 11;
2306 border-bottom: 0;
2307 background-color: white; }
2308 .section-container.tabs > section.active > .content, .section-container.tabs > .section.active > .content {
2309 position: relative; }
2310
2311 @media only screen and (min-width: 768px) {
2312 .section-container.auto {
2313 border: 0;
2314 position: relative; }
2315 .section-container.auto > section, .section-container.auto > .section {
2316 border: 0;
2317 position: static; }
2318 .section-container.auto > section > .title, .section-container.auto > .section > .title {
2319 background-color: #efefef;
2320 cursor: pointer;
2321 margin-bottom: 0; }
2322 .section-container.auto > section > .title a, .section-container.auto > .section > .title a {
2323 padding: 0.9375em;
2324 display: inline-block;
2325 color: #333333;
2326 font-size: 0.875em;
2327 white-space: nowrap; }
2328 .section-container.auto > section > .title:hover, .section-container.auto > .section > .title:hover {
2329 background-color: #e2e2e2; }
2330 .section-container.auto > section .content, .section-container.auto > .section .content {
2331 display: none;
2332 padding: 0.9375em;
2333 background-color: white; }
2334 .section-container.auto > section .content > *:last-child, .section-container.auto > .section .content > *:last-child {
2335 margin-bottom: 0; }
2336 .section-container.auto > section .content > *:first-child, .section-container.auto > .section .content > *:first-child {
2337 padding-top: 0; }
2338 .section-container.auto > section .content > *:last-child:not(.flex-video), .section-container.auto > .section .content > *:last-child:not(.flex-video) {
2339 padding-bottom: 0; }
2340 .section-container.auto > section.active > .content, .section-container.auto > .section.active > .content {
2341 display: block; }
2342 .section-container.auto > section.active > .title, .section-container.auto > .section.active > .title {
2343 background: white; }
2344 .section-container.auto > section.active > .title a, .section-container.auto > .section.active > .title a {
2345 color: #333333; }
2346 .section-container.auto > section > .title, .section-container.auto > .section > .title {
2347 width: auto;
2348 border: solid 1px #cccccc;
2349 border-right: 0;
2350 border-bottom: 0;
2351 position: absolute;
2352 top: 0;
2353 z-index: 1; }
2354 .section-container.auto > section > .title a, .section-container.auto > .section > .title a {
2355 width: 100%; }
2356 .section-container.auto > section:last-child .title, .section-container.auto > .section:last-child .title {
2357 border-right: solid 1px #cccccc; }
2358 .section-container.auto > section .content, .section-container.auto > .section .content {
2359 border: solid 1px #cccccc;
2360 position: absolute;
2361 z-index: 10;
2362 display: none;
2363 top: -1px; }
2364 .section-container.auto > section.active > .title, .section-container.auto > .section.active > .title {
2365 z-index: 11;
2366 border-bottom: 0;
2367 background-color: white; }
2368 .section-container.auto > section.active > .content, .section-container.auto > .section.active > .content {
2369 position: relative; }
2370
2371 .section-container.accordion .section {
2372 padding-top: 0 !important; }
2373
2374 .section-container.vertical-tabs {
2375 border: 1px solid #cccccc;
2376 position: relative; }
2377 .section-container.vertical-tabs section,
2378 .section-container.vertical-tabs .section {
2379 padding-top: 0 !important;
2380 border: 0;
2381 position: static; }
2382 .section-container.vertical-tabs section > .title,
2383 .section-container.vertical-tabs .section > .title {
2384 background-color: #efefef;
2385 cursor: pointer;
2386 margin-bottom: 0; }
2387 .section-container.vertical-tabs section > .title a,
2388 .section-container.vertical-tabs .section > .title a {
2389 padding: 0.9375em;
2390 display: inline-block;
2391 color: #333333;
2392 font-size: 0.875em;
2393 white-space: nowrap; }
2394 .section-container.vertical-tabs section > .title:hover,
2395 .section-container.vertical-tabs .section > .title:hover {
2396 background-color: #e2e2e2; }
2397 .section-container.vertical-tabs section .content,
2398 .section-container.vertical-tabs .section .content {
2399 display: none;
2400 padding: 0.9375em;
2401 background-color: white; }
2402 .section-container.vertical-tabs section .content > *:last-child,
2403 .section-container.vertical-tabs .section .content > *:last-child {
2404 margin-bottom: 0; }
2405 .section-container.vertical-tabs section .content > *:first-child,
2406 .section-container.vertical-tabs .section .content > *:first-child {
2407 padding-top: 0; }
2408 .section-container.vertical-tabs section .content > *:last-child:not(.flex-video),
2409 .section-container.vertical-tabs .section .content > *:last-child:not(.flex-video) {
2410 padding-bottom: 0; }
2411 .section-container.vertical-tabs section.active > .content,
2412 .section-container.vertical-tabs .section.active > .content {
2413 display: block; }
2414 .section-container.vertical-tabs section.active > .title,
2415 .section-container.vertical-tabs .section.active > .title {
2416 background: #d5d5d5; }
2417 .section-container.vertical-tabs section.active > .title a,
2418 .section-container.vertical-tabs .section.active > .title a {
2419 color: #333333; }
2420 .section-container.vertical-tabs section > .title,
2421 .section-container.vertical-tabs .section > .title {
2422 position: absolute;
2423 border-top: solid 1px #cccccc;
2424 width: 12.5em; }
2425 .section-container.vertical-tabs section:first-child .title,
2426 .section-container.vertical-tabs .section:first-child .title {
2427 border-top: 0; }
2428 .section-container.vertical-tabs section .content,
2429 .section-container.vertical-tabs .section .content {
2430 display: block;
2431 position: relative;
2432 left: 12.5em;
2433 border-left: solid 1px #cccccc;
2434 z-index: 10; }
2435 .section-container.vertical-tabs section.active > .title,
2436 .section-container.vertical-tabs .section.active > .title {
2437 background-color: #d5d5d5;
2438 width: 12.5625em;
2439 border-right: solid 0 transparent;
2440 z-index: 11; }
2441 .section-container.vertical-tabs section.active:last-child .title,
2442 .section-container.vertical-tabs .section.active:last-child .title {
2443 border-bottom: 0; }
2444
2445 .section-container.vertical-nav {
2446 border: 0;
2447 position: relative; }
2448 .section-container.vertical-nav > section, .section-container.vertical-nav > .section {
2449 padding-top: 0 !important;
2450 position: relative; }
2451 .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > .title {
2452 background-color: #efefef;
2453 cursor: pointer;
2454 margin-bottom: 0; }
2455 .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > .title a {
2456 padding: 0.9375em;
2457 display: inline-block;
2458 color: #333333;
2459 font-size: 0.875em;
2460 white-space: nowrap; }
2461 .section-container.vertical-nav > section > .title:hover, .section-container.vertical-nav > .section > .title:hover {
2462 background-color: #e2e2e2; }
2463 .section-container.vertical-nav > section .content, .section-container.vertical-nav > .section .content {
2464 display: none;
2465 padding: 0.9375em;
2466 background-color: white; }
2467 .section-container.vertical-nav > section .content > *:last-child, .section-container.vertical-nav > .section .content > *:last-child {
2468 margin-bottom: 0; }
2469 .section-container.vertical-nav > section .content > *:first-child, .section-container.vertical-nav > .section .content > *:first-child {
2470 padding-top: 0; }
2471 .section-container.vertical-nav > section .content > *:last-child:not(.flex-video), .section-container.vertical-nav > .section .content > *:last-child:not(.flex-video) {
2472 padding-bottom: 0; }
2473 .section-container.vertical-nav > section.active > .content, .section-container.vertical-nav > .section.active > .content {
2474 display: block; }
2475 .section-container.vertical-nav > section.active > .title, .section-container.vertical-nav > .section.active > .title {
2476 background: #d5d5d5; }
2477 .section-container.vertical-nav > section.active > .title a, .section-container.vertical-nav > .section.active > .title a {
2478 color: #333333; }
2479 .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > .title {
2480 border-top: none;
2481 border: solid 1px #cccccc; }
2482 .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > .title a {
2483 display: block;
2484 width: 100%; }
2485 .section-container.vertical-nav > section .content, .section-container.vertical-nav > .section .content {
2486 display: none; }
2487 .section-container.vertical-nav > section:first-child .title, .section-container.vertical-nav > .section:first-child .title {
2488 border-bottom: none; }
2489 .section-container.vertical-nav > section.active > .content, .section-container.vertical-nav > .section.active > .content {
2490 display: block;
2491 position: absolute;
2492 left: 100%;
2493 top: 0px;
2494 z-index: 999;
2495 min-width: 12.5em;
2496 border: solid 1px #cccccc; }
2497
2498 .section-container.horizontal-nav {
2499 position: relative;
2500 background: #efefef;
2501 border: 1px solid #cccccc; }
2502 .section-container.horizontal-nav > section, .section-container.horizontal-nav > .section {
2503 padding-top: 0;
2504 border: 0;
2505 position: static; }
2506 .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > .title {
2507 background-color: #efefef;
2508 cursor: pointer;
2509 margin-bottom: 0; }
2510 .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > .title a {
2511 padding: 0.9375em;
2512 display: inline-block;
2513 color: #333333;
2514 font-size: 0.875em;
2515 white-space: nowrap; }
2516 .section-container.horizontal-nav > section > .title:hover, .section-container.horizontal-nav > .section > .title:hover {
2517 background-color: #e2e2e2; }
2518 .section-container.horizontal-nav > section .content, .section-container.horizontal-nav > .section .content {
2519 display: none;
2520 padding: 0.9375em;
2521 background-color: white; }
2522 .section-container.horizontal-nav > section .content > *:last-child, .section-container.horizontal-nav > .section .content > *:last-child {
2523 margin-bottom: 0; }
2524 .section-container.horizontal-nav > section .content > *:first-child, .section-container.horizontal-nav > .section .content > *:first-child {
2525 padding-top: 0; }
2526 .section-container.horizontal-nav > section .content > *:last-child:not(.flex-video), .section-container.horizontal-nav > .section .content > *:last-child:not(.flex-video) {
2527 padding-bottom: 0; }
2528 .section-container.horizontal-nav > section.active > .content, .section-container.horizontal-nav > .section.active > .content {
2529 display: block; }
2530 .section-container.horizontal-nav > section.active > .title, .section-container.horizontal-nav > .section.active > .title {
2531 background: #d5d5d5; }
2532 .section-container.horizontal-nav > section.active > .title a, .section-container.horizontal-nav > .section.active > .title a {
2533 color: #333333; }
2534 .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > .title {
2535 width: auto;
2536 border: solid 1px #cccccc;
2537 border-left: 0;
2538 top: -1px;
2539 position: absolute;
2540 z-index: 1; }
2541 .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > .title a {
2542 width: 100%; }
2543 .section-container.horizontal-nav > section .content, .section-container.horizontal-nav > .section .content {
2544 display: none; }
2545 .section-container.horizontal-nav > section.active > .content, .section-container.horizontal-nav > .section.active > .content {
2546 display: block;
2547 position: absolute;
2548 z-index: 999;
2549 left: 0;
2550 top: -2px;
2551 min-width: 12.5em;
2552 border: solid 1px #cccccc; } }
2553 .no-js .section-container.auto, .no-js .section-container.accordion, .no-js .section-container.tabs, .no-js .section-container.vertical-tabs, .no-js .section-container.vertical-nav, .no-js .section-container.horizontal-nav {
2554 width: 100%;
2555 display: block;
2556 margin-bottom: 1.25em;
2557 border: 1px solid #cccccc;
2558 border-top: none; }
2559 .no-js .section-container.auto > section, .no-js .section-container.auto > .section, .no-js .section-container.accordion > section, .no-js .section-container.accordion > .section, .no-js .section-container.tabs > section, .no-js .section-container.tabs > .section, .no-js .section-container.vertical-tabs > section, .no-js .section-container.vertical-tabs > .section, .no-js .section-container.vertical-nav > section, .no-js .section-container.vertical-nav > .section, .no-js .section-container.horizontal-nav > section, .no-js .section-container.horizontal-nav > .section {
2560 position: relative; }
2561 .no-js .section-container.auto > section > .title, .no-js .section-container.auto > .section > .title, .no-js .section-container.accordion > section > .title, .no-js .section-container.accordion > .section > .title, .no-js .section-container.tabs > section > .title, .no-js .section-container.tabs > .section > .title, .no-js .section-container.vertical-tabs > section > .title, .no-js .section-container.vertical-tabs > .section > .title, .no-js .section-container.vertical-nav > section > .title, .no-js .section-container.vertical-nav > .section > .title, .no-js .section-container.horizontal-nav > section > .title, .no-js .section-container.horizontal-nav > .section > .title {
2562 background-color: #efefef;
2563 cursor: pointer;
2564 margin-bottom: 0; }
2565 .no-js .section-container.auto > section > .title a, .no-js .section-container.auto > .section > .title a, .no-js .section-container.accordion > section > .title a, .no-js .section-container.accordion > .section > .title a, .no-js .section-container.tabs > section > .title a, .no-js .section-container.tabs > .section > .title a, .no-js .section-container.vertical-tabs > section > .title a, .no-js .section-container.vertical-tabs > .section > .title a, .no-js .section-container.vertical-nav > section > .title a, .no-js .section-container.vertical-nav > .section > .title a, .no-js .section-container.horizontal-nav > section > .title a, .no-js .section-container.horizontal-nav > .section > .title a {
2566 padding: 0.9375em;
2567 display: inline-block;
2568 color: #333333;
2569 font-size: 0.875em;
2570 white-space: nowrap; }
2571 .no-js .section-container.auto > section > .title:hover, .no-js .section-container.auto > .section > .title:hover, .no-js .section-container.accordion > section > .title:hover, .no-js .section-container.accordion > .section > .title:hover, .no-js .section-container.tabs > section > .title:hover, .no-js .section-container.tabs > .section > .title:hover, .no-js .section-container.vertical-tabs > section > .title:hover, .no-js .section-container.vertical-tabs > .section > .title:hover, .no-js .section-container.vertical-nav > section > .title:hover, .no-js .section-container.vertical-nav > .section > .title:hover, .no-js .section-container.horizontal-nav > section > .title:hover, .no-js .section-container.horizontal-nav > .section > .title:hover {
2572 background-color: #e2e2e2; }
2573 .no-js .section-container.auto > section .content, .no-js .section-container.auto > .section .content, .no-js .section-container.accordion > section .content, .no-js .section-container.accordion > .section .content, .no-js .section-container.tabs > section .content, .no-js .section-container.tabs > .section .content, .no-js .section-container.vertical-tabs > section .content, .no-js .section-container.vertical-tabs > .section .content, .no-js .section-container.vertical-nav > section .content, .no-js .section-container.vertical-nav > .section .content, .no-js .section-container.horizontal-nav > section .content, .no-js .section-container.horizontal-nav > .section .content {
2574 display: none;
2575 padding: 0.9375em;
2576 background-color: white; }
2577 .no-js .section-container.auto > section .content > *:last-child, .no-js .section-container.auto > .section .content > *:last-child, .no-js .section-container.accordion > section .content > *:last-child, .no-js .section-container.accordion > .section .content > *:last-child, .no-js .section-container.tabs > section .content > *:last-child, .no-js .section-container.tabs > .section .content > *:last-child, .no-js .section-container.vertical-tabs > section .content > *:last-child, .no-js .section-container.vertical-tabs > .section .content > *:last-child, .no-js .section-container.vertical-nav > section .content > *:last-child, .no-js .section-container.vertical-nav > .section .content > *:last-child, .no-js .section-container.horizontal-nav > section .content > *:last-child, .no-js .section-container.horizontal-nav > .section .content > *:last-child {
2578 margin-bottom: 0; }
2579 .no-js .section-container.auto > section .content > *:first-child, .no-js .section-container.auto > .section .content > *:first-child, .no-js .section-container.accordion > section .content > *:first-child, .no-js .section-container.accordion > .section .content > *:first-child, .no-js .section-container.tabs > section .content > *:first-child, .no-js .section-container.tabs > .section .content > *:first-child, .no-js .section-container.vertical-tabs > section .content > *:first-child, .no-js .section-container.vertical-tabs > .section .content > *:first-child, .no-js .section-container.vertical-nav > section .content > *:first-child, .no-js .section-container.vertical-nav > .section .content > *:first-child, .no-js .section-container.horizontal-nav > section .content > *:first-child, .no-js .section-container.horizontal-nav > .section .content > *:first-child {
2580 padding-top: 0; }
2581 .no-js .section-container.auto > section .content > *:last-child:not(.flex-video), .no-js .section-container.auto > .section .content > *:last-child:not(.flex-video), .no-js .section-container.accordion > section .content > *:last-child:not(.flex-video), .no-js .section-container.accordion > .section .content > *:last-child:not(.flex-video), .no-js .section-container.tabs > section .content > *:last-child:not(.flex-video), .no-js .section-container.tabs > .section .content > *:last-child:not(.flex-video), .no-js .section-container.vertical-tabs > section .content > *:last-child:not(.flex-video), .no-js .section-container.vertical-tabs > .section .content > *:last-child:not(.flex-video), .no-js .section-container.vertical-nav > section .content > *:last-child:not(.flex-video), .no-js .section-container.vertical-nav > .section .content > *:last-child:not(.flex-video), .no-js .section-container.horizontal-nav > section .content > *:last-child:not(.flex-video), .no-js .section-container.horizontal-nav > .section .content > *:last-child:not(.flex-video) {
2582 padding-bottom: 0; }
2583 .no-js .section-container.auto > section.active > .content, .no-js .section-container.auto > .section.active > .content, .no-js .section-container.accordion > section.active > .content, .no-js .section-container.accordion > .section.active > .content, .no-js .section-container.tabs > section.active > .content, .no-js .section-container.tabs > .section.active > .content, .no-js .section-container.vertical-tabs > section.active > .content, .no-js .section-container.vertical-tabs > .section.active > .content, .no-js .section-container.vertical-nav > section.active > .content, .no-js .section-container.vertical-nav > .section.active > .content, .no-js .section-container.horizontal-nav > section.active > .content, .no-js .section-container.horizontal-nav > .section.active > .content {
2584 display: block; }
2585 .no-js .section-container.auto > section.active > .title, .no-js .section-container.auto > .section.active > .title, .no-js .section-container.accordion > section.active > .title, .no-js .section-container.accordion > .section.active > .title, .no-js .section-container.tabs > section.active > .title, .no-js .section-container.tabs > .section.active > .title, .no-js .section-container.vertical-tabs > section.active > .title, .no-js .section-container.vertical-tabs > .section.active > .title, .no-js .section-container.vertical-nav > section.active > .title, .no-js .section-container.vertical-nav > .section.active > .title, .no-js .section-container.horizontal-nav > section.active > .title, .no-js .section-container.horizontal-nav > .section.active > .title {
2586 background: #d5d5d5; }
2587 .no-js .section-container.auto > section.active > .title a, .no-js .section-container.auto > .section.active > .title a, .no-js .section-container.accordion > section.active > .title a, .no-js .section-container.accordion > .section.active > .title a, .no-js .section-container.tabs > section.active > .title a, .no-js .section-container.tabs > .section.active > .title a, .no-js .section-container.vertical-tabs > section.active > .title a, .no-js .section-container.vertical-tabs > .section.active > .title a, .no-js .section-container.vertical-nav > section.active > .title a, .no-js .section-container.vertical-nav > .section.active > .title a, .no-js .section-container.horizontal-nav > section.active > .title a, .no-js .section-container.horizontal-nav > .section.active > .title a {
2588 color: #333333; }
2589 .no-js .section-container.auto > section > .title, .no-js .section-container.auto > .section > .title, .no-js .section-container.accordion > section > .title, .no-js .section-container.accordion > .section > .title, .no-js .section-container.tabs > section > .title, .no-js .section-container.tabs > .section > .title, .no-js .section-container.vertical-tabs > section > .title, .no-js .section-container.vertical-tabs > .section > .title, .no-js .section-container.vertical-nav > section > .title, .no-js .section-container.vertical-nav > .section > .title, .no-js .section-container.horizontal-nav > section > .title, .no-js .section-container.horizontal-nav > .section > .title {
2590 top: 0;
2591 width: 100%;
2592 margin: 0;
2593 border-top: solid 1px #cccccc; }
2594 .no-js .section-container.auto > section > .title a, .no-js .section-container.auto > .section > .title a, .no-js .section-container.accordion > section > .title a, .no-js .section-container.accordion > .section > .title a, .no-js .section-container.tabs > section > .title a, .no-js .section-container.tabs > .section > .title a, .no-js .section-container.vertical-tabs > section > .title a, .no-js .section-container.vertical-tabs > .section > .title a, .no-js .section-container.vertical-nav > section > .title a, .no-js .section-container.vertical-nav > .section > .title a, .no-js .section-container.horizontal-nav > section > .title a, .no-js .section-container.horizontal-nav > .section > .title a {
2595 width: 100%; }
2596 .no-js .section-container.auto > section .title, .no-js .section-container.auto > .section .title, .no-js .section-container.accordion > section .title, .no-js .section-container.accordion > .section .title, .no-js .section-container.tabs > section .title, .no-js .section-container.tabs > .section .title, .no-js .section-container.vertical-tabs > section .title, .no-js .section-container.vertical-tabs > .section .title, .no-js .section-container.vertical-nav > section .title, .no-js .section-container.vertical-nav > .section .title, .no-js .section-container.horizontal-nav > section .title, .no-js .section-container.horizontal-nav > .section .title {
2597 position: static;
2598 width: 100%;
2599 border-left: 0;
2600 border-right: 0; }
2601 .no-js .section-container.auto > section .content, .no-js .section-container.auto > .section .content, .no-js .section-container.accordion > section .content, .no-js .section-container.accordion > .section .content, .no-js .section-container.tabs > section .content, .no-js .section-container.tabs > .section .content, .no-js .section-container.vertical-tabs > section .content, .no-js .section-container.vertical-tabs > .section .content, .no-js .section-container.vertical-nav > section .content, .no-js .section-container.vertical-nav > .section .content, .no-js .section-container.horizontal-nav > section .content, .no-js .section-container.horizontal-nav > .section .content {
2602 position: static;
2603 display: block;
2604 width: 100%;
2605 border-left: 0;
2606 border-right: 0;
2607 border-bottom: 0; }
2608
2609 /* Wrapped around .top-bar to contain to grid width */
2610 .contain-to-grid {
2611 width: 100%;
2612 background: #111111; }
2613 .contain-to-grid .top-bar {
2614 margin-bottom: 0; }
2615
2616 .fixed {
2617 width: 100%;
2618 left: 0;
2619 position: fixed;
2620 top: 0;
2621 z-index: 99; }
2622
2623 .top-bar {
2624 overflow: hidden;
2625 height: 45px;
2626 line-height: 45px;
2627 position: relative;
2628 background: #111111;
2629 margin-bottom: 1.875em; }
2630 .top-bar ul {
2631 margin-bottom: 0;
2632 list-style: none; }
2633 .top-bar .row {
2634 max-width: none; }
2635 .top-bar form,
2636 .top-bar input {
2637 margin-bottom: 0; }
2638 .top-bar input {
2639 height: 2.45em; }
2640 .top-bar .button {
2641 padding-top: .5em;
2642 padding-bottom: .5em;
2643 margin-bottom: 0; }
2644 .top-bar .title-area {
2645 position: relative;
2646 margin: 0; }
2647 .top-bar .name {
2648 height: 45px;
2649 margin: 0;
2650 font-size: 16px; }
2651 .top-bar .name h1 {
2652 line-height: 45px;
2653 font-size: 1.0625em;
2654 margin: 0; }
2655 .top-bar .name h1 a {
2656 font-weight: bold;
2657 color: white;
2658 width: 50%;
2659 display: block;
2660 padding: 0 15px; }
2661 .top-bar .toggle-topbar {
2662 position: absolute;
2663 right: 0;
2664 top: 0; }
2665 .top-bar .toggle-topbar a {
2666 color: white;
2667 text-transform: uppercase;
2668 font-size: 0.8125em;
2669 font-weight: bold;
2670 position: relative;
2671 display: block;
2672 padding: 0 15px;
2673 height: 45px;
2674 line-height: 45px; }
2675 .top-bar .toggle-topbar.menu-icon {
2676 right: 15px;
2677 top: 50%;
2678 margin-top: -16px;
2679 padding-left: 40px; }
2680 .top-bar .toggle-topbar.menu-icon a {
2681 text-indent: -48px;
2682 width: 34px;
2683 height: 34px;
2684 line-height: 33px;
2685 padding: 0;
2686 color: white; }
2687 .top-bar .toggle-topbar.menu-icon a span {
2688 position: absolute;
2689 right: 0;
2690 display: block;
2691 width: 16px;
2692 height: 0;
2693 -webkit-box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white;
2694 box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white; }
2695 .top-bar.expanded {
2696 height: auto;
2697 background: transparent; }
2698 .top-bar.expanded .title-area {
2699 background: #111111; }
2700 .top-bar.expanded .toggle-topbar a {
2701 color: #888888; }
2702 .top-bar.expanded .toggle-topbar a span {
2703 -webkit-box-shadow: 0 10px 0 1px #888888, 0 16px 0 1px #888888, 0 22px 0 1px #888888;
2704 box-shadow: 0 10px 0 1px #888888, 0 16px 0 1px #888888, 0 22px 0 1px #888888; }
2705
2706 .top-bar-section {
2707 left: 0;
2708 position: relative;
2709 width: auto;
2710 -webkit-transition: left 300ms ease-out;
2711 -moz-transition: left 300ms ease-out;
2712 transition: left 300ms ease-out; }
2713 .top-bar-section ul {
2714 width: 100%;
2715 height: auto;
2716 display: block;
2717 background: #222222;
2718 font-size: 16px;
2719 margin: 0; }
2720 .top-bar-section .divider,
2721 .top-bar-section [role="separator"] {
2722 border-bottom: solid 1px #2b2b2b;
2723 border-top: solid 1px black;
2724 clear: both;
2725 height: 1px;
2726 width: 100%; }
2727 .top-bar-section ul li > a {
2728 display: block;
2729 width: 100%;
2730 color: white;
2731 padding: 12px 0 12px 0;
2732 padding-left: 15px;
2733 font-size: 0.8125em;
2734 font-weight: bold;
2735 background: #222222; }
2736 .top-bar-section ul li > a.hover {
2737 background: #090909;
2738 color: white; }
2739 .top-bar-section ul li > a.button {
2740 background: #2ba6cb;
2741 font-size: 0.8125em; }
2742 .top-bar-section ul li > a.button.hover {
2743 background: #2284a1; }
2744 .top-bar-section ul li > a.button.secondary {
2745 background: #e9e9e9; }
2746 .top-bar-section ul li > a.button.secondary.hover {
2747 background: #d0d0d0; }
2748 .top-bar-section ul li > a.button.success {
2749 background: #5da423; }
2750 .top-bar-section ul li > a.button.success.hover {
2751 background: #457a1a; }
2752 .top-bar-section ul li > a.button.alert {
2753 background: #c60f13; }
2754 .top-bar-section ul li > a.button.alert.hover {
2755 background: #970b0e; }
2756 .top-bar-section ul li.active > a {
2757 background: #090909;
2758 color: white; }
2759 .top-bar-section .has-form {
2760 padding: 15px; }
2761 .top-bar-section .has-dropdown {
2762 position: relative; }
2763 .top-bar-section .has-dropdown > a:after {
2764 content: "";
2765 display: block;
2766 width: 0;
2767 height: 0;
2768 border: inset 5px;
2769 border-color: transparent transparent transparent rgba(255, 255, 255, 0.5);
2770 border-left-style: solid;
2771 margin-right: 15px;
2772 margin-top: -4.5px;
2773 position: absolute;
2774 top: 50%;
2775 right: 0; }
2776 .top-bar-section .has-dropdown.moved {
2777 position: static; }
2778 .top-bar-section .has-dropdown.moved > .dropdown {
2779 visibility: visible; }
2780 .top-bar-section .dropdown {
2781 position: absolute;
2782 left: 100%;
2783 top: 0;
2784 visibility: hidden;
2785 z-index: 99; }
2786 .top-bar-section .dropdown li {
2787 width: 100%;
2788 height: auto; }
2789 .top-bar-section .dropdown li a {
2790 font-weight: normal;
2791 padding: 8px 15px; }
2792 .top-bar-section .dropdown li.title h5 {
2793 margin-bottom: 0; }
2794 .top-bar-section .dropdown li.title h5 a {
2795 color: white;
2796 line-height: 22.5px;
2797 display: block; }
2798 .top-bar-section .dropdown label {
2799 padding: 8px 15px 2px;
2800 margin-bottom: 0;
2801 text-transform: uppercase;
2802 color: #555555;
2803 font-weight: bold;
2804 font-size: 0.625em; }
2805
2806 .top-bar-js-breakpoint {
2807 width: 58.75em !important;
2808 visibility: hidden; }
2809
2810 .js-generated {
2811 display: block; }
2812
2813 @media only screen and (min-width: 58.75em) {
2814 .top-bar {
2815 background: #111111;
2816 *zoom: 1;
2817 overflow: visible; }
2818 .top-bar:before, .top-bar:after {
2819 content: " ";
2820 display: table; }
2821 .top-bar:after {
2822 clear: both; }
2823 .top-bar .toggle-topbar {
2824 display: none; }
2825 .top-bar .title-area {
2826 float: left; }
2827 .top-bar .name h1 a {
2828 width: auto; }
2829 .top-bar input,
2830 .top-bar .button {
2831 line-height: 2em;
2832 font-size: 0.875em;
2833 height: 2em;
2834 padding: 0 10px;
2835 position: relative;
2836 top: 8px; }
2837 .top-bar.expanded {
2838 background: #111111; }
2839
2840 .contain-to-grid .top-bar {
2841 max-width: 62.5em;
2842 margin: 0 auto; }
2843
2844 .top-bar-section {
2845 -webkit-transition: none 0 0;
2846 -moz-transition: none 0 0;
2847 transition: none 0 0;
2848 left: 0 !important; }
2849 .top-bar-section ul {
2850 width: auto;
2851 height: auto !important;
2852 display: inline; }
2853 .top-bar-section ul li {
2854 float: left; }
2855 .top-bar-section ul li .js-generated {
2856 display: none; }
2857 .top-bar-section li a:not(.button) {
2858 padding: 0 15px;
2859 line-height: 45px;
2860 background: #111111; }
2861 .top-bar-section li a:not(.button).hover {
2862 background: black; }
2863 .top-bar-section .has-dropdown > a {
2864 padding-right: 35px !important; }
2865 .top-bar-section .has-dropdown > a:after {
2866 content: "";
2867 display: block;
2868 width: 0;
2869 height: 0;
2870 border: inset 5px;
2871 border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent;
2872 border-top-style: solid;
2873 margin-top: -2.5px;
2874 top: 22.5px; }
2875 .top-bar-section .has-dropdown.moved {
2876 position: relative; }
2877 .top-bar-section .has-dropdown.moved > .dropdown {
2878 visibility: hidden; }
2879 .top-bar-section .has-dropdown.hover > .dropdown {
2880 visibility: visible; }
2881 .top-bar-section .has-dropdown .dropdown li.has-dropdown > a:after {
2882 border: none;
2883 content: "\00bb";
2884 margin-top: -16px;
2885 right: 5px; }
2886 .top-bar-section .dropdown {
2887 left: 0;
2888 top: auto;
2889 background: transparent;
2890 min-width: 100%; }
2891 .top-bar-section .dropdown li a {
2892 color: white;
2893 line-height: 1;
2894 white-space: nowrap;
2895 padding: 7px 15px;
2896 background: #1e1e1e; }
2897 .top-bar-section .dropdown li label {
2898 white-space: nowrap;
2899 background: #1e1e1e; }
2900 .top-bar-section .dropdown li .dropdown {
2901 left: 100%;
2902 top: 0; }
2903 .top-bar-section > ul > .divider, .top-bar-section > ul > [role="separator"] {
2904 border-bottom: none;
2905 border-top: none;
2906 border-right: solid 1px #2b2b2b;
2907 border-left: solid 1px black;
2908 clear: none;
2909 height: 45px;
2910 width: 0px; }
2911 .top-bar-section .has-form {
2912 background: #111111;
2913 padding: 0 15px;
2914 height: 45px; }
2915 .top-bar-section ul.right li .dropdown {
2916 left: auto;
2917 right: 0; }
2918 .top-bar-section ul.right li .dropdown li .dropdown {
2919 right: 100%; } }
2920 @-webkit-keyframes rotate {
2921 from {
2922 -webkit-transform: rotate(0deg); }
2923
2924 to {
2925 -webkit-transform: rotate(360deg); } }
2926
2927 @-moz-keyframes rotate {
2928 from {
2929 -webkit-transform: rotate(0deg); }
2930
2931 to {
2932 -webkit-transform: rotate(360deg); } }
2933
2934 @-o-keyframes rotate {
2935 from {
2936 -webkit-transform: rotate(0deg); }
2937
2938 to {
2939 -webkit-transform: rotate(360deg); } }
2940
2941 @keyframes rotate {
2942 from {
2943 -webkit-transform: rotate(0deg); }
2944
2945 to {
2946 -webkit-transform: rotate(360deg); } }
2947
2948 /* Orbit Graceful Loading */
2949 .slideshow-wrapper {
2950 position: relative; }
2951 .slideshow-wrapper ul {
2952 list-style-type: none;
2953 margin: 0; }
2954 .slideshow-wrapper ul li,
2955 .slideshow-wrapper ul li .orbit-caption {
2956 display: none; }
2957 .slideshow-wrapper ul li:first-child {
2958 display: block; }
2959 .slideshow-wrapper .orbit-container {
2960 background-color: transparent; }
2961 .slideshow-wrapper .orbit-container li {
2962 display: block; }
2963 .slideshow-wrapper .orbit-container li .orbit-caption {
2964 display: block; }
2965
2966 .preloader {
2967 display: block;
2968 width: 40px;
2969 height: 40px;
2970 position: absolute;
2971 top: 50%;
2972 left: 50%;
2973 margin-top: -20px;
2974 margin-left: -20px;
2975 border: solid 3px;
2976 border-color: #555555 white;
2977 -webkit-border-radius: 1000px;
2978 border-radius: 1000px;
2979 -webkit-animation-name: rotate;
2980 -webkit-animation-duration: 1.5s;
2981 -webkit-animation-iteration-count: infinite;
2982 -webkit-animation-timing-function: linear;
2983 -moz-animation-name: rotate;
2984 -moz-animation-duration: 1.5s;
2985 -moz-animation-iteration-count: infinite;
2986 -moz-animation-timing-function: linear;
2987 -o-animation-name: rotate;
2988 -o-animation-duration: 1.5s;
2989 -o-animation-iteration-count: infinite;
2990 -o-animation-timing-function: linear;
2991 animation-name: rotate;
2992 animation-duration: 1.5s;
2993 animation-iteration-count: infinite;
2994 animation-timing-function: linear; }
2995
2996 .orbit-container {
2997 overflow: hidden;
2998 width: 100%;
2999 position: relative;
3000 background: whitesmoke; }
3001 .orbit-container .orbit-slides-container {
3002 list-style: none;
3003 margin: 0;
3004 padding: 0;
3005 position: relative; }
3006 .orbit-container .orbit-slides-container img {
3007 display: block; }
3008 .orbit-container .orbit-slides-container > * {
3009 position: relative;
3010 float: left;
3011 height: auto; }
3012 .orbit-container .orbit-slides-container > * .orbit-caption {
3013 position: absolute;
3014 bottom: 0;
3015 background-color: black;
3016 background-color: rgba(0, 0, 0, 0.6);
3017 color: white;
3018 width: 100%;
3019 padding: 10px 14px;
3020 font-size: 0.875em; }
3021 .orbit-container .orbit-slide-number {
3022 position: absolute;
3023 top: 10px;
3024 left: 10px;
3025 font-size: 12px;
3026 color: white;
3027 background: rgba(0, 0, 0, 0); }
3028 .orbit-container .orbit-slide-number span {
3029 font-weight: 700;
3030 padding: 0.3125em; }
3031 .orbit-container .orbit-timer {
3032 position: absolute;
3033 top: 10px;
3034 right: 10px;
3035 height: 6px;
3036 width: 100px; }
3037 .orbit-container .orbit-timer .orbit-progress {
3038 height: 100%;
3039 background-color: black;
3040 background-color: rgba(0, 0, 0, 0.6);
3041 display: block;
3042 width: 0%; }
3043 .orbit-container .orbit-timer > span {
3044 display: none;
3045 position: absolute;
3046 top: 10px;
3047 right: 0px;
3048 width: 11px;
3049 height: 14px;
3050 border: solid 4px black;
3051 border-top: none;
3052 border-bottom: none; }
3053 .orbit-container .orbit-timer.paused > span {
3054 right: -6px;
3055 top: 9px;
3056 width: 11px;
3057 height: 14px;
3058 border: inset 8px;
3059 border-right-style: solid;
3060 border-color: transparent transparent transparent black; }
3061 .orbit-container:hover .orbit-timer > span {
3062 display: block; }
3063 .orbit-container .orbit-prev,
3064 .orbit-container .orbit-next {
3065 position: absolute;
3066 top: 50%;
3067 margin-top: -25px;
3068 background-color: black;
3069 background-color: rgba(0, 0, 0, 0.6);
3070 width: 50px;
3071 height: 60px;
3072 line-height: 50px;
3073 color: white;
3074 text-indent: -9999px !important; }
3075 .orbit-container .orbit-prev > span,
3076 .orbit-container .orbit-next > span {
3077 position: absolute;
3078 top: 50%;
3079 margin-top: -16px;
3080 display: block;
3081 width: 0;
3082 height: 0;
3083 border: inset 16px; }
3084 .orbit-container .orbit-prev {
3085 left: 0; }
3086 .orbit-container .orbit-prev > span {
3087 border-right-style: solid;
3088 border-color: transparent;
3089 border-right-color: #fff; }
3090 .orbit-container .orbit-prev:hover > span {
3091 border-right-color: #ccc; }
3092 .orbit-container .orbit-next {
3093 right: 0; }
3094 .orbit-container .orbit-next > span {
3095 border-color: transparent;
3096 border-left-style: solid;
3097 border-left-color: #fff;
3098 left: 50%;
3099 margin-left: -8px; }
3100 .orbit-container .orbit-next:hover > span {
3101 border-left-color: #ccc; }
3102
3103 .orbit-bullets {
3104 margin: 0 auto 30px auto;
3105 overflow: hidden;
3106 position: relative;
3107 top: 10px; }
3108 .orbit-bullets li {
3109 display: block;
3110 width: 18px;
3111 height: 18px;
3112 background: #999999;
3113 float: left;
3114 margin-right: 6px;
3115 border: solid 2px #222222;
3116 -webkit-border-radius: 1000px;
3117 border-radius: 1000px; }
3118 .orbit-bullets li.active {
3119 background: #222222; }
3120 .orbit-bullets li:last-child {
3121 margin-right: 0; }
3122
3123 .touch .orbit-container .orbit-prev,
3124 .touch .orbit-container .orbit-next {
3125 display: none; }
3126 .touch .orbit-bullets {
3127 display: none; }
3128
3129 @media only screen and (min-width: 768px) {
3130 .touch .orbit-container .orbit-prev,
3131 .touch .orbit-container .orbit-next {
3132 display: inherit; }
3133 .touch .orbit-bullets {
3134 display: block; } }
3135 .reveal-modal-bg {
3136 position: fixed;
3137 height: 100%;
3138 width: 100%;
3139 background: black;
3140 background: rgba(0, 0, 0, 0.45);
3141 z-index: 98;
3142 display: none;
3143 top: 0;
3144 left: 0; }
3145
3146 .reveal-modal {
3147 visibility: hidden;
3148 display: none;
3149 position: absolute;
3150 left: 50%;
3151 z-index: 99;
3152 height: auto;
3153 margin-left: -40%;
3154 width: 80%;
3155 background-color: white;
3156 padding: 1.25em;
3157 border: solid 1px #666666;
3158 -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
3159 box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
3160 top: 50px; }
3161 .reveal-modal .column,
3162 .reveal-modal .columns {
3163 min-width: 0; }
3164 .reveal-modal > :first-child {
3165 margin-top: 0; }
3166 .reveal-modal > :last-child {
3167 margin-bottom: 0; }
3168 .reveal-modal .close-reveal-modal {
3169 font-size: 1.375em;
3170 line-height: 1;
3171 position: absolute;
3172 top: 0.5em;
3173 right: 0.6875em;
3174 color: #aaaaaa;
3175 font-weight: bold;
3176 cursor: pointer; }
3177
3178 @media only screen and (min-width: 768px) {
3179 .reveal-modal {
3180 padding: 1.875em;
3181 top: 6.25em; }
3182 .reveal-modal.tiny {
3183 margin-left: -15%;
3184 width: 30%; }
3185 .reveal-modal.small {
3186 margin-left: -20%;
3187 width: 40%; }
3188 .reveal-modal.medium {
3189 margin-left: -30%;
3190 width: 60%; }
3191 .reveal-modal.large {
3192 margin-left: -35%;
3193 width: 70%; }
3194 .reveal-modal.xlarge {
3195 margin-left: -47.5%;
3196 width: 95%; } }
3197 @media print {
3198 .reveal-modal {
3199 background: white !important; } }
3200 /* Foundation Joyride */
3201 .joyride-list {
3202 display: none; }
3203
3204 /* Default styles for the container */
3205 .joyride-tip-guide {
3206 display: none;
3207 position: absolute;
3208 background: black;
3209 color: white;
3210 z-index: 101;
3211 top: 0;
3212 left: 2.5%;
3213 font-family: inherit;
3214 font-weight: normal;
3215 width: 95%; }
3216
3217 .lt-ie9 .joyride-tip-guide {
3218 max-width: 800px;
3219 left: 50%;
3220 margin-left: -400px; }
3221
3222 .joyride-content-wrapper {
3223 width: 100%;
3224 padding: 1.125em 1.25em 1.5em; }
3225 .joyride-content-wrapper .button {
3226 margin-bottom: 0 !important; }
3227
3228 /* Add a little css triangle pip, older browser just miss out on the fanciness of it */
3229 .joyride-tip-guide .joyride-nub {
3230 display: block;
3231 position: absolute;
3232 left: 22px;
3233 width: 0;
3234 height: 0;
3235 border: inset 14px; }
3236 .joyride-tip-guide .joyride-nub.top {
3237 border-top-style: solid;
3238 border-color: black;
3239 border-top-color: transparent !important;
3240 border-left-color: transparent !important;
3241 border-right-color: transparent !important;
3242 top: -28px; }
3243 .joyride-tip-guide .joyride-nub.bottom {
3244 border-bottom-style: solid;
3245 border-color: black !important;
3246 border-bottom-color: transparent !important;
3247 border-left-color: transparent !important;
3248 border-right-color: transparent !important;
3249 bottom: -28px; }
3250 .joyride-tip-guide .joyride-nub.right {
3251 right: -28px; }
3252 .joyride-tip-guide .joyride-nub.left {
3253 left: -28px; }
3254
3255 /* Typography */
3256 .joyride-tip-guide h1,
3257 .joyride-tip-guide h2,
3258 .joyride-tip-guide h3,
3259 .joyride-tip-guide h4,
3260 .joyride-tip-guide h5,
3261 .joyride-tip-guide h6 {
3262 line-height: 1.25;
3263 margin: 0;
3264 font-weight: bold;
3265 color: white; }
3266
3267 .joyride-tip-guide p {
3268 margin: 0 0 1.125em 0;
3269 font-size: 0.875em;
3270 line-height: 1.3; }
3271
3272 .joyride-timer-indicator-wrap {
3273 width: 50px;
3274 height: 3px;
3275 border: solid 1px #555555;
3276 position: absolute;
3277 right: 1.0625em;
3278 bottom: 1em; }
3279
3280 .joyride-timer-indicator {
3281 display: block;
3282 width: 0;
3283 height: inherit;
3284 background: #666666; }
3285
3286 .joyride-close-tip {
3287 position: absolute;
3288 right: 12px;
3289 top: 10px;
3290 color: #777777 !important;
3291 text-decoration: none;
3292 font-size: 30px;
3293 font-weight: normal;
3294 line-height: 0.5 !important; }
3295 .joyride-close-tip:hover, .joyride-close-tip:focus {
3296 color: #eeeeee !important; }
3297
3298 .joyride-modal-bg {
3299 position: fixed;
3300 height: 100%;
3301 width: 100%;
3302 background: transparent;
3303 background: rgba(0, 0, 0, 0.5);
3304 z-index: 100;
3305 display: none;
3306 top: 0;
3307 left: 0;
3308 cursor: pointer; }
3309
3310 .joyride-expose-wrapper {
3311 background-color: #ffffff;
3312 position: absolute;
3313 border-radius: 3px;
3314 z-index: 102;
3315 -moz-box-shadow: 0px 0px 30px white;
3316 -webkit-box-shadow: 0px 0px 15px white;
3317 box-shadow: 0px 0px 15px white; }
3318
3319 .joyride-expose-cover {
3320 background: transparent;
3321 border-radius: 3px;
3322 position: absolute;
3323 z-index: 9999;
3324 top: 0px;
3325 left: 0px; }
3326
3327 /* Styles for screens that are atleast 768px; */
3328 @media only screen and (min-width: 768px) {
3329 .joyride-tip-guide {
3330 width: 300px;
3331 left: inherit; }
3332 .joyride-tip-guide .joyride-nub.bottom {
3333 border-color: black !important;
3334 border-bottom-color: transparent !important;
3335 border-left-color: transparent !important;
3336 border-right-color: transparent !important;
3337 bottom: -28px; }
3338 .joyride-tip-guide .joyride-nub.right {
3339 border-color: black !important;
3340 border-top-color: transparent !important;
3341 border-right-color: transparent !important;
3342 border-bottom-color: transparent !important;
3343 top: 22px;
3344 left: auto;
3345 right: -28px; }
3346 .joyride-tip-guide .joyride-nub.left {
3347 border-color: black !important;
3348 border-top-color: transparent !important;
3349 border-left-color: transparent !important;
3350 border-bottom-color: transparent !important;
3351 top: 22px;
3352 left: -28px;
3353 right: auto; } }
3354 /* Clearing Styles */
3355 [data-clearing] {
3356 *zoom: 1;
3357 margin-bottom: 0;
3358 margin-left: 0;
3359 list-style: none; }
3360 [data-clearing]:before, [data-clearing]:after {
3361 content: " ";
3362 display: table; }
3363 [data-clearing]:after {
3364 clear: both; }
3365 [data-clearing] li {
3366 float: left;
3367 margin-right: 10px; }
3368
3369 .clearing-blackout {
3370 background: #111111;
3371 position: fixed;
3372 width: 100%;
3373 height: 100%;
3374 top: 0;
3375 left: 0;
3376 z-index: 998; }
3377 .clearing-blackout .clearing-close {
3378 display: block; }
3379
3380 .clearing-container {
3381 position: relative;
3382 z-index: 998;
3383 height: 100%;
3384 overflow: hidden;
3385 margin: 0; }
3386
3387 .visible-img {
3388 height: 95%;
3389 position: relative; }
3390 .visible-img img {
3391 position: absolute;
3392 left: 50%;
3393 top: 50%;
3394 margin-left: -50%;
3395 max-height: 100%;
3396 max-width: 100%; }
3397
3398 .clearing-caption {
3399 color: white;
3400 line-height: 1.3;
3401 margin-bottom: 0;
3402 text-align: center;
3403 bottom: 0;
3404 background: #111111;
3405 width: 100%;
3406 padding: 10px 30px;
3407 position: absolute;
3408 left: 0; }
3409
3410 .clearing-close {
3411 z-index: 999;
3412 padding-left: 20px;
3413 padding-top: 10px;
3414 font-size: 40px;
3415 line-height: 1;
3416 color: white;
3417 display: none; }
3418 .clearing-close:hover, .clearing-close:focus {
3419 color: #ccc; }
3420
3421 .clearing-assembled .clearing-container {
3422 height: 100%; }
3423 .clearing-assembled .clearing-container .carousel > ul {
3424 display: none; }
3425
3426 .clearing-feature li {
3427 display: none; }
3428 .clearing-feature li.clearing-featured-img {
3429 display: block; }
3430
3431 @media only screen and (min-width: 768px) {
3432 .clearing-main-prev,
3433 .clearing-main-next {
3434 position: absolute;
3435 height: 100%;
3436 width: 40px;
3437 top: 0; }
3438 .clearing-main-prev > span,
3439 .clearing-main-next > span {
3440 position: absolute;
3441 top: 50%;
3442 display: block;
3443 width: 0;
3444 height: 0;
3445 border: solid 16px; }
3446
3447 .clearing-main-prev {
3448 left: 0; }
3449 .clearing-main-prev > span {
3450 left: 5px;
3451 border-color: transparent;
3452 border-right-color: white; }
3453
3454 .clearing-main-next {
3455 right: 0; }
3456 .clearing-main-next > span {
3457 border-color: transparent;
3458 border-left-color: white; }
3459
3460 .clearing-main-prev.disabled,
3461 .clearing-main-next.disabled {
3462 opacity: 0.5; }
3463
3464 .clearing-assembled .clearing-container .carousel {
3465 background: #111111;
3466 height: 150px;
3467 margin-top: 5px; }
3468 .clearing-assembled .clearing-container .carousel > ul {
3469 display: block;
3470 z-index: 999;
3471 width: 200%;
3472 height: 100%;
3473 margin-left: 0;
3474 position: relative;
3475 left: 0; }
3476 .clearing-assembled .clearing-container .carousel > ul li {
3477 display: block;
3478 width: 175px;
3479 height: inherit;
3480 padding: 0;
3481 float: left;
3482 overflow: hidden;
3483 margin-right: 1px;
3484 position: relative;
3485 cursor: pointer;
3486 opacity: 0.4; }
3487 .clearing-assembled .clearing-container .carousel > ul li.fix-height img {
3488 min-height: 100%;
3489 height: 100%;
3490 max-width: none; }
3491 .clearing-assembled .clearing-container .carousel > ul li a.th {
3492 border: none;
3493 -webkit-box-shadow: none;
3494 box-shadow: none;
3495 display: block; }
3496 .clearing-assembled .clearing-container .carousel > ul li img {
3497 cursor: pointer !important;
3498 min-width: 100% !important; }
3499 .clearing-assembled .clearing-container .carousel > ul li.visible {
3500 opacity: 1; }
3501 .clearing-assembled .clearing-container .visible-img {
3502 background: #111111;
3503 overflow: hidden;
3504 height: 75%; }
3505
3506 .clearing-close {
3507 position: absolute;
3508 top: 10px;
3509 right: 20px;
3510 padding-left: 0;
3511 padding-top: 0; } }
3512 /* Foundation Alerts */
3513 .alert-box {
3514 border-style: solid;
3515 border-width: 1px;
3516 display: block;
3517 font-weight: bold;
3518 margin-bottom: 1.25em;
3519 position: relative;
3520 padding: 0.6875em 1.3125em 0.75em 0.6875em;
3521 font-size: 0.875em;
3522 background-color: #2ba6cb;
3523 border-color: #2284a1;
3524 color: white; }
3525 .alert-box .close {
3526 font-size: 1.375em;
3527 padding: 5px 4px 4px;
3528 line-height: 0;
3529 position: absolute;
3530 top: 0.4375em;
3531 right: 0.3125em;
3532 color: #333333;
3533 opacity: 0.3; }
3534 .alert-box .close:hover, .alert-box .close:focus {
3535 opacity: 0.5; }
3536 .alert-box.radius {
3537 -webkit-border-radius: 3px;
3538 border-radius: 3px; }
3539 .alert-box.round {
3540 -webkit-border-radius: 1000px;
3541 border-radius: 1000px; }
3542 .alert-box.success {
3543 background-color: #5da423;
3544 border-color: #457a1a;
3545 color: white; }
3546 .alert-box.alert {
3547 background-color: #c60f13;
3548 border-color: #970b0e;
3549 color: white; }
3550 .alert-box.secondary {
3551 background-color: #e9e9e9;
3552 border-color: #d0d0d0;
3553 color: #505050; }
3554
3555 /* Breadcrumbs */
3556 .breadcrumbs {
3557 display: block;
3558 padding: 0.5625em 0.875em 0.5625em;
3559 overflow: hidden;
3560 margin-left: 0;
3561 list-style: none;
3562 border-style: solid;
3563 border-width: 1px;
3564 background-color: #f6f6f6;
3565 border-color: gainsboro;
3566 -webkit-border-radius: 3px;
3567 border-radius: 3px; }
3568 .breadcrumbs > * {
3569 margin: 0;
3570 float: left;
3571 font-size: 0.6875em;
3572 text-transform: uppercase;
3573 color: #2ba6cb; }
3574 .breadcrumbs > *:hover a, .breadcrumbs > *:focus a {
3575 text-decoration: underline; }
3576 .breadcrumbs > * a,
3577 .breadcrumbs > * span {
3578 text-transform: uppercase;
3579 color: #2ba6cb; }
3580 .breadcrumbs > *.current {
3581 cursor: default;
3582 color: #333333; }
3583 .breadcrumbs > *.current a {
3584 cursor: default;
3585 color: #333333; }
3586 .breadcrumbs > *.current:hover, .breadcrumbs > *.current:hover a, .breadcrumbs > *.current:focus, .breadcrumbs > *.current:focus a {
3587 text-decoration: none; }
3588 .breadcrumbs > *.unavailable {
3589 color: #999999; }
3590 .breadcrumbs > *.unavailable a {
3591 color: #999999; }
3592 .breadcrumbs > *.unavailable:hover, .breadcrumbs > *.unavailable:hover a, .breadcrumbs > *.unavailable:focus,
3593 .breadcrumbs > *.unavailable a:focus {
3594 text-decoration: none;
3595 color: #999999;
3596 cursor: default; }
3597 .breadcrumbs > *:before {
3598 content: "/";
3599 color: #aaaaaa;
3600 margin: 0 0.75em;
3601 position: relative;
3602 top: 1px; }
3603 .breadcrumbs > *:first-child:before {
3604 content: " ";
3605 margin: 0; }
3606
3607 /* Keystroke Characters */
3608 .keystroke,
3609 kbd {
3610 background-color: #ededed;
3611 border-color: #dbdbdb;
3612 color: #222222;
3613 border-style: solid;
3614 border-width: 1px;
3615 margin: 0;
3616 font-family: "Consolas", "Menlo", "Courier", monospace;
3617 font-size: 0.875em;
3618 padding: 0.125em 0.25em 0em;
3619 -webkit-border-radius: 3px;
3620 border-radius: 3px; }
3621
3622 /* Labels */
3623 .label {
3624 font-weight: bold;
3625 text-align: center;
3626 text-decoration: none;
3627 line-height: 1;
3628 white-space: nowrap;
3629 display: inline-block;
3630 position: relative;
3631 padding: 0.1875em 0.625em 0.25em;
3632 font-size: 0.875em;
3633 background-color: #2ba6cb;
3634 color: white; }
3635 .label.radius {
3636 -webkit-border-radius: 3px;
3637 border-radius: 3px; }
3638 .label.round {
3639 -webkit-border-radius: 1000px;
3640 border-radius: 1000px; }
3641 .label.alert {
3642 background-color: #c60f13;
3643 color: white; }
3644 .label.success {
3645 background-color: #5da423;
3646 color: white; }
3647 .label.secondary {
3648 background-color: #e9e9e9;
3649 color: #333333; }
3650
3651 /* Inline Lists */
3652 .inline-list {
3653 margin: 0 auto 1.0625em auto;
3654 margin-left: -1.375em;
3655 margin-right: 0;
3656 padding: 0;
3657 list-style: none;
3658 overflow: hidden; }
3659 .inline-list > li {
3660 list-style: none;
3661 float: left;
3662 margin-left: 1.375em;
3663 display: block; }
3664 .inline-list > li > * {
3665 display: block; }
3666
3667 /* Pagination */
3668 .pagination {
3669 display: block;
3670 height: 1.5em;
3671 margin-left: -0.3125em; }
3672 .pagination li {
3673 display: block;
3674 float: left;
3675 height: 1.5em;
3676 color: #222222;
3677 font-size: 0.875em;
3678 margin-left: 0.3125em; }
3679 .pagination li a {
3680 display: block;
3681 padding: 0.0625em 0.4375em 0.0625em;
3682 color: #999999; }
3683 .pagination li:hover a,
3684 .pagination li a:focus {
3685 background: #e6e6e6; }
3686 .pagination li.unavailable a {
3687 cursor: default;
3688 color: #999999; }
3689 .pagination li.unavailable:hover a, .pagination li.unavailable a:focus {
3690 background: transparent; }
3691 .pagination li.current a {
3692 background: #2ba6cb;
3693 color: white;
3694 font-weight: bold;
3695 cursor: default; }
3696 .pagination li.current a:hover, .pagination li.current a:focus {
3697 background: #2ba6cb; }
3698
3699 .pagination-centered {
3700 text-align: center; }
3701 .pagination-centered ul > li {
3702 float: none;
3703 display: inline-block; }
3704
3705 /* Panels */
3706 .panel {
3707 border-style: solid;
3708 border-width: 1px;
3709 border-color: #d9d9d9;
3710 margin-bottom: 1.25em;
3711 padding: 1.25em;
3712 background: #f2f2f2; }
3713 .panel > :first-child {
3714 margin-top: 0; }
3715 .panel > :last-child {
3716 margin-bottom: 0; }
3717 .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p {
3718 color: #333333; }
3719 .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6 {
3720 line-height: 1;
3721 margin-bottom: 0.625em; }
3722 .panel h1.subheader, .panel h2.subheader, .panel h3.subheader, .panel h4.subheader, .panel h5.subheader, .panel h6.subheader {
3723 line-height: 1.4; }
3724 .panel.callout {
3725 border-style: solid;
3726 border-width: 1px;
3727 border-color: #2284a1;
3728 margin-bottom: 1.25em;
3729 padding: 1.25em;
3730 background: #2ba6cb;
3731 -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
3732 box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; }
3733 .panel.callout > :first-child {
3734 margin-top: 0; }
3735 .panel.callout > :last-child {
3736 margin-bottom: 0; }
3737 .panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6, .panel.callout p {
3738 color: white; }
3739 .panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6 {
3740 line-height: 1;
3741 margin-bottom: 0.625em; }
3742 .panel.callout h1.subheader, .panel.callout h2.subheader, .panel.callout h3.subheader, .panel.callout h4.subheader, .panel.callout h5.subheader, .panel.callout h6.subheader {
3743 line-height: 1.4; }
3744 .panel.radius {
3745 -webkit-border-radius: 3px;
3746 border-radius: 3px; }
3747
3748 /* Pricing Tables */
3749 .pricing-table {
3750 border: solid 1px #dddddd;
3751 margin-left: 0;
3752 margin-bottom: 1.25em; }
3753 .pricing-table * {
3754 list-style: none;
3755 line-height: 1; }
3756 .pricing-table .title {
3757 background-color: #dddddd;
3758 padding: 0.9375em 1.25em;
3759 text-align: center;
3760 color: #333333;
3761 font-weight: bold;
3762 font-size: 1em; }
3763 .pricing-table .price {
3764 background-color: #eeeeee;
3765 padding: 0.9375em 1.25em;
3766 text-align: center;
3767 color: #333333;
3768 font-weight: normal;
3769 font-size: 1.25em; }
3770 .pricing-table .description {
3771 background-color: white;
3772 padding: 0.9375em;
3773 text-align: center;
3774 color: #777777;
3775 font-size: 0.75em;
3776 font-weight: normal;
3777 line-height: 1.4;
3778 border-bottom: dotted 1px #dddddd; }
3779 .pricing-table .bullet-item {
3780 background-color: white;
3781 padding: 0.9375em;
3782 text-align: center;
3783 color: #333333;
3784 font-size: 0.875em;
3785 font-weight: normal;
3786 border-bottom: dotted 1px #dddddd; }
3787 .pricing-table .cta-button {
3788 background-color: whitesmoke;
3789 text-align: center;
3790 padding: 1.25em 1.25em 0; }
3791
3792 /* Progress Bar */
3793 .progress {
3794 background-color: transparent;
3795 height: 1.5625em;
3796 border: 1px solid #cccccc;
3797 padding: 0.125em;
3798 margin-bottom: 0.625em; }
3799 .progress .meter {
3800 background: #2ba6cb;
3801 height: 100%;
3802 display: block; }
3803 .progress.secondary .meter {
3804 background: #e9e9e9;
3805 height: 100%;
3806 display: block; }
3807 .progress.success .meter {
3808 background: #5da423;
3809 height: 100%;
3810 display: block; }
3811 .progress.alert .meter {
3812 background: #c60f13;
3813 height: 100%;
3814 display: block; }
3815 .progress.radius {
3816 -webkit-border-radius: 3px;
3817 border-radius: 3px; }
3818 .progress.radius .meter {
3819 -webkit-border-radius: 2px;
3820 border-radius: 2px; }
3821 .progress.round {
3822 -webkit-border-radius: 1000px;
3823 border-radius: 1000px; }
3824 .progress.round .meter {
3825 -webkit-border-radius: 999px;
3826 border-radius: 999px; }
3827
3828 /* Side Nav */
3829 .side-nav {
3830 display: block;
3831 margin: 0;
3832 padding: 0.875em 0;
3833 list-style-type: none;
3834 list-style-position: inside; }
3835 .side-nav li {
3836 margin: 0 0 0.4375em 0;
3837 font-size: 0.875em; }
3838 .side-nav li a {
3839 display: block;
3840 color: #2ba6cb; }
3841 .side-nav li.active > a:first-child {
3842 color: #4d4d4d;
3843 font-weight: bold; }
3844 .side-nav li.divider {
3845 border-top: 1px solid;
3846 height: 0;
3847 padding: 0;
3848 list-style: none;
3849 border-top-color: #e6e6e6; }
3850
3851 /* Side Nav */
3852 .sub-nav {
3853 display: block;
3854 width: auto;
3855 overflow: hidden;
3856 margin: -0.25em 0 1.125em;
3857 padding-top: 0.25em;
3858 margin-right: 0;
3859 margin-left: -0.5625em; }
3860 .sub-nav dt,
3861 .sub-nav dd {
3862 float: left;
3863 display: inline;
3864 margin-left: 0.5625em;
3865 margin-bottom: 0.625em;
3866 font-weight: normal;
3867 font-size: 0.875em; }
3868 .sub-nav dt a,
3869 .sub-nav dd a {
3870 color: #999999;
3871 text-decoration: none; }
3872 .sub-nav dt.active a,
3873 .sub-nav dd.active a {
3874 -webkit-border-radius: 1000px;
3875 border-radius: 1000px;
3876 font-weight: bold;
3877 background: #2ba6cb;
3878 padding: 0.1875em 0.5625em;
3879 cursor: default;
3880 color: white; }
3881
3882 /* Foundation Switches */
3883 @media only screen {
3884 div.switch {
3885 position: relative;
3886 width: 100%;
3887 padding: 0;
3888 display: block;
3889 overflow: hidden;
3890 border-style: solid;
3891 border-width: 1px;
3892 margin-bottom: 1.25em;
3893 -webkit-animation: webkitSiblingBugfix infinite 1s;
3894 height: 36px;
3895 background: white;
3896 border-color: #cccccc; }
3897 div.switch label {
3898 position: relative;
3899 left: 0;
3900 z-index: 2;
3901 float: left;
3902 width: 50%;
3903 height: 100%;
3904 margin: 0;
3905 font-weight: bold;
3906 text-align: left;
3907 -webkit-transition: all 0.1s ease-out;
3908 -moz-transition: all 0.1s ease-out;
3909 transition: all 0.1s ease-out; }
3910 div.switch input {
3911 position: absolute;
3912 z-index: 3;
3913 opacity: 0;
3914 width: 100%;
3915 height: 100%;
3916 -moz-appearance: none; }
3917 div.switch input:hover, div.switch input:focus {
3918 cursor: pointer; }
3919 div.switch > span {
3920 position: absolute;
3921 top: -1px;
3922 left: -1px;
3923 z-index: 1;
3924 display: block;
3925 padding: 0;
3926 border-width: 1px;
3927 border-style: solid;
3928 -webkit-transition: all 0.1s ease-out;
3929 -moz-transition: all 0.1s ease-out;
3930 transition: all 0.1s ease-out; }
3931 div.switch input:not(:checked) + label {
3932 opacity: 0; }
3933 div.switch input:checked {
3934 display: none !important; }
3935 div.switch input {
3936 left: 0;
3937 display: block !important; }
3938 div.switch input:first-of-type + label,
3939 div.switch input:first-of-type + span + label {
3940 left: -50%; }
3941 div.switch input:first-of-type:checked + label,
3942 div.switch input:first-of-type:checked + span + label {
3943 left: 0%; }
3944 div.switch input:last-of-type + label,
3945 div.switch input:last-of-type + span + label {
3946 right: -50%;
3947 left: auto;
3948 text-align: right; }
3949 div.switch input:last-of-type:checked + label,
3950 div.switch input:last-of-type:checked + span + label {
3951 right: 0%;
3952 left: auto; }
3953 div.switch span.custom {
3954 display: none !important; }
3955 div.switch label {
3956 padding: 0 0.375em;
3957 line-height: 2.3em;
3958 font-size: 0.875em; }
3959 div.switch input:first-of-type:checked ~ span {
3960 left: 100%;
3961 margin-left: -2.1875em; }
3962 div.switch > span {
3963 width: 2.25em;
3964 height: 2.25em; }
3965 div.switch > span {
3966 border-color: #b3b3b3;
3967 background: white;
3968 background: -moz-linear-gradient(top, white 0%, #f2f2f2 100%);
3969 background: -webkit-linear-gradient(top, white 0%, #f2f2f2 100%);
3970 background: linear-gradient(to bottom, white 0%, #f2f2f2 100%);
3971 -webkit-box-shadow: 2px 0 10px 0 rgba(0, 0, 0, 0.07), 1000px 0 0 1000px #e1f5d1, -2px 0 10px 0 rgba(0, 0, 0, 0.07), -1000px 0 0 1000px whitesmoke;
3972 box-shadow: 2px 0 10px 0 rgba(0, 0, 0, 0.07), 1000px 0 0 980px #e1f5d1, -2px 0 10px 0 rgba(0, 0, 0, 0.07), -1000px 0 0 1000px whitesmoke; }
3973 div.switch:hover > span, div.switch:focus > span {
3974 background: white;
3975 background: -moz-linear-gradient(top, white 0%, #e6e6e6 100%);
3976 background: -webkit-linear-gradient(top, white 0%, #e6e6e6 100%);
3977 background: linear-gradient(to bottom, white 0%, #e6e6e6 100%); }
3978 div.switch:active {
3979 background: transparent; }
3980 div.switch.large {
3981 height: 44px; }
3982 div.switch.large label {
3983 padding: 0 0.375em;
3984 line-height: 2.3em;
3985 font-size: 1.0625em; }
3986 div.switch.large input:first-of-type:checked ~ span {
3987 left: 100%;
3988 margin-left: -2.6875em; }
3989 div.switch.large > span {
3990 width: 2.75em;
3991 height: 2.75em; }
3992 div.switch.small {
3993 height: 28px; }
3994 div.switch.small label {
3995 padding: 0 0.375em;
3996 line-height: 2.1em;
3997 font-size: 0.75em; }
3998 div.switch.small input:first-of-type:checked ~ span {
3999 left: 100%;
4000 margin-left: -1.6875em; }
4001 div.switch.small > span {
4002 width: 1.75em;
4003 height: 1.75em; }
4004 div.switch.tiny {
4005 height: 22px; }
4006 div.switch.tiny label {
4007 padding: 0 0.375em;
4008 line-height: 1.9em;
4009 font-size: 0.6875em; }
4010 div.switch.tiny input:first-of-type:checked ~ span {
4011 left: 100%;
4012 margin-left: -1.3125em; }
4013 div.switch.tiny > span {
4014 width: 1.375em;
4015 height: 1.375em; }
4016 div.switch.radius {
4017 -webkit-border-radius: 4px;
4018 border-radius: 4px; }
4019 div.switch.radius > span {
4020 -webkit-border-radius: 3px;
4021 border-radius: 3px; }
4022 div.switch.round {
4023 -webkit-border-radius: 1000px;
4024 border-radius: 1000px; }
4025 div.switch.round > span {
4026 -webkit-border-radius: 999px;
4027 border-radius: 999px; }
4028 div.switch.round label {
4029 padding: 0 0.5625em; }
4030
4031 @-webkit-keyframes webkitSiblingBugfix {
4032 from {
4033 position: relative; }
4034
4035 to {
4036 position: relative; } } }
4037 [data-magellan-expedition] {
4038 background: white;
4039 z-index: 50;
4040 min-width: 100%;
4041 padding: 10px; }
4042 [data-magellan-expedition] .sub-nav {
4043 margin-bottom: 0; }
4044 [data-magellan-expedition] .sub-nav dd {
4045 margin-bottom: 0; }
4046
4047 /* Tables */
4048 table {
4049 background: white;
4050 margin-bottom: 1.25em;
4051 border: solid 1px #dddddd; }
4052 table thead,
4053 table tfoot {
4054 background: whitesmoke;
4055 font-weight: bold; }
4056 table thead tr th,
4057 table thead tr td,
4058 table tfoot tr th,
4059 table tfoot tr td {
4060 padding: 0.5em 0.625em 0.625em;
4061 font-size: 0.875em;
4062 color: #222222;
4063 text-align: left; }
4064 table tr th,
4065 table tr td {
4066 padding: 0.5625em 0.625em;
4067 font-size: 0.875em;
4068 color: #222222; }
4069 table tr.even, table tr.alt, table tr:nth-of-type(even) {
4070 background: #f9f9f9; }
4071 table thead tr th,
4072 table tfoot tr th,
4073 table tbody tr td,
4074 table tr td,
4075 table tfoot tr td {
4076 display: table-cell;
4077 line-height: 1.125em; }
4078
4079 /* Image Thumbnails */
4080 .th {
4081 line-height: 0;
4082 display: inline-block;
4083 border: solid 4px white;
4084 -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
4085 box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
4086 -webkit-transition: all 200ms ease-out;
4087 -moz-transition: all 200ms ease-out;
4088 transition: all 200ms ease-out; }
4089 .th:hover, .th:focus {
4090 -webkit-box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5);
4091 box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); }
4092 .th.radius {
4093 -webkit-border-radius: 3px;
4094 border-radius: 3px; }
4095
4096 a.th {
4097 display: inline-block; }
4098
4099 /* Tooltips */
4100 .has-tip {
4101 border-bottom: dotted 1px #cccccc;
4102 cursor: help;
4103 font-weight: bold;
4104 color: #333333; }
4105 .has-tip:hover, .has-tip:focus {
4106 border-bottom: dotted 1px #196177;
4107 color: #2ba6cb; }
4108 .has-tip.tip-left, .has-tip.tip-right {
4109 float: none !important; }
4110
4111 .tooltip {
4112 display: none;
4113 position: absolute;
4114 z-index: 999;
4115 font-weight: bold;
4116 font-size: 0.9375em;
4117 line-height: 1.3;
4118 padding: 0.5em;
4119 max-width: 85%;
4120 left: 50%;
4121 width: 100%;
4122 color: white;
4123 background: black;
4124 -webkit-border-radius: 3px;
4125 border-radius: 3px; }
4126 .tooltip > .nub {
4127 display: block;
4128 left: 5px;
4129 position: absolute;
4130 width: 0;
4131 height: 0;
4132 border: solid 5px;
4133 border-color: transparent transparent black transparent;
4134 top: -10px; }
4135 .tooltip.opened {
4136 color: #2ba6cb !important;
4137 border-bottom: dotted 1px #196177 !important; }
4138
4139 .tap-to-close {
4140 display: block;
4141 font-size: 0.625em;
4142 color: #888888;
4143 font-weight: normal; }
4144
4145 @media only screen and (min-width: 768px) {
4146 .tooltip > .nub {
4147 border-color: transparent transparent black transparent;
4148 top: -10px; }
4149 .tooltip.tip-top > .nub {
4150 border-color: black transparent transparent transparent;
4151 top: auto;
4152 bottom: -10px; }
4153 .tooltip.tip-left, .tooltip.tip-right {
4154 float: none !important; }
4155 .tooltip.tip-left > .nub {
4156 border-color: transparent transparent transparent black;
4157 right: -10px;
4158 left: auto;
4159 top: 50%;
4160 margin-top: -5px; }
4161 .tooltip.tip-right > .nub {
4162 border-color: transparent black transparent transparent;
4163 right: auto;
4164 left: -10px;
4165 top: 50%;
4166 margin-top: -5px; } }
4167 @media only screen and (max-width: 767px) {
4168 .f-dropdown {
4169 max-width: 100%;
4170 left: 0; } }
4171 /* Foundation Dropdowns */
4172 .f-dropdown {
4173 position: absolute;
4174 top: -9999px;
4175 list-style: none;
4176 margin-left: 0;
4177 width: 100%;
4178 max-height: none;
4179 height: auto;
4180 background: white;
4181 border: solid 1px #cccccc;
4182 font-size: 16px;
4183 z-index: 99;
4184 margin-top: 2px;
4185 max-width: 200px; }
4186 .f-dropdown > *:first-child {
4187 margin-top: 0; }
4188 .f-dropdown > *:last-child {
4189 margin-bottom: 0; }
4190 .f-dropdown:before {
4191 content: "";
4192 display: block;
4193 width: 0;
4194 height: 0;
4195 border: inset 6px;
4196 border-color: transparent transparent white transparent;
4197 border-bottom-style: solid;
4198 position: absolute;
4199 top: -12px;
4200 left: 10px;
4201 z-index: 99; }
4202 .f-dropdown:after {
4203 content: "";
4204 display: block;
4205 width: 0;
4206 height: 0;
4207 border: inset 7px;
4208 border-color: transparent transparent #cccccc transparent;
4209 border-bottom-style: solid;
4210 position: absolute;
4211 top: -14px;
4212 left: 9px;
4213 z-index: 98; }
4214 .f-dropdown.right:before {
4215 left: auto;
4216 right: 10px; }
4217 .f-dropdown.right:after {
4218 left: auto;
4219 right: 9px; }
4220 .f-dropdown li {
4221 font-size: 0.875em;
4222 cursor: pointer;
4223 line-height: 1.125em;
4224 margin: 0; }
4225 .f-dropdown li:hover, .f-dropdown li:focus {
4226 background: #eeeeee; }
4227 .f-dropdown li a {
4228 display: block;
4229 padding: 0.3125em 0.625em;
4230 color: #555555; }
4231 .f-dropdown.content {
4232 position: absolute;
4233 top: -9999px;
4234 list-style: none;
4235 margin-left: 0;
4236 padding: 1.25em;
4237 width: 100%;
4238 height: auto;
4239 max-height: none;
4240 background: white;
4241 border: solid 1px #cccccc;
4242 font-size: 16px;
4243 z-index: 99;
4244 max-width: 200px; }
4245 .f-dropdown.content > *:first-child {
4246 margin-top: 0; }
4247 .f-dropdown.content > *:last-child {
4248 margin-bottom: 0; }
4249 .f-dropdown.tiny {
4250 max-width: 200px; }
4251 .f-dropdown.small {
4252 max-width: 300px; }
4253 .f-dropdown.medium {
4254 max-width: 500px; }
4255 .f-dropdown.large {
4256 max-width: 800px; }
0 *,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}html,body{font-size:100%}body{background:#fff;color:#1c1b39;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default}a:hover{cursor:pointer}a:focus{outline:none}img,object,embed{max-width:100%;height:auto}object,embed{height:100%}img{-ms-interpolation-mode:bicubic}#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none !important}.left{float:left !important}.right{float:right !important}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.text-justify{text-align:justify !important}.hide{display:none}.antialiased{-webkit-font-smoothing:antialiased}img{display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select{width:100%}.row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1}.row:before,.row:after{content:" ";display:table}.row:after{clear:both}.row.collapse .column,.row.collapse .columns{position:relative;padding-left:0;padding-right:0;float:left}.row .row{width:auto;margin-left:-0.9375em;margin-right:-0.9375em;margin-top:0;margin-bottom:0;max-width:none;*zoom:1}.row .row:before,.row .row:after{content:" ";display:table}.row .row:after{clear:both}.row .row.collapse{width:auto;margin:0;max-width:none;*zoom:1}.row .row.collapse:before,.row .row.collapse:after{content:" ";display:table}.row .row.collapse:after{clear:both}.column,.columns{position:relative;padding-left:0.9375em;padding-right:0.9375em;width:100%;float:left}@media only screen{.column,.columns{position:relative;padding-left:0.9375em;padding-right:0.9375em;float:left}.small-1{position:relative;width:8.33333%}.small-2{position:relative;width:16.66667%}.small-3{position:relative;width:25%}.small-4{position:relative;width:33.33333%}.small-5{position:relative;width:41.66667%}.small-6{position:relative;width:50%}.small-7{position:relative;width:58.33333%}.small-8{position:relative;width:66.66667%}.small-9{position:relative;width:75%}.small-10{position:relative;width:83.33333%}.small-11{position:relative;width:91.66667%}.small-12{position:relative;width:100%}.small-offset-0{position:relative;margin-left:0%}.small-offset-1{position:relative;margin-left:8.33333%}.small-offset-2{position:relative;margin-left:16.66667%}.small-offset-3{position:relative;margin-left:25%}.small-offset-4{position:relative;margin-left:33.33333%}.small-offset-5{position:relative;margin-left:41.66667%}.small-offset-6{position:relative;margin-left:50%}.small-offset-7{position:relative;margin-left:58.33333%}.small-offset-8{position:relative;margin-left:66.66667%}.small-offset-9{position:relative;margin-left:75%}.small-offset-10{position:relative;margin-left:83.33333%}[class*="column"]+[class*="column"]:last-child{float:right}[class*="column"]+[class*="column"].end{float:left}.column.small-centered,.columns.small-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}}@media only screen and (min-width: 768px){.large-1{position:relative;width:8.33333%}.large-2{position:relative;width:16.66667%}.large-3{position:relative;width:25%}.large-4{position:relative;width:33.33333%}.large-5{position:relative;width:41.66667%}.large-6{position:relative;width:50%}.large-7{position:relative;width:58.33333%}.large-8{position:relative;width:66.66667%}.large-9{position:relative;width:75%}.large-10{position:relative;width:83.33333%}.large-11{position:relative;width:91.66667%}.large-12{position:relative;width:100%}.row .large-offset-0{position:relative;margin-left:0%}.row .large-offset-1{position:relative;margin-left:8.33333%}.row .large-offset-2{position:relative;margin-left:16.66667%}.row .large-offset-3{position:relative;margin-left:25%}.row .large-offset-4{position:relative;margin-left:33.33333%}.row .large-offset-5{position:relative;margin-left:41.66667%}.row .large-offset-6{position:relative;margin-left:50%}.row .large-offset-7{position:relative;margin-left:58.33333%}.row .large-offset-8{position:relative;margin-left:66.66667%}.row .large-offset-9{position:relative;margin-left:75%}.row .large-offset-10{position:relative;margin-left:83.33333%}.row .large-offset-11{position:relative;margin-left:91.66667%}.push-1{position:relative;left:8.33333%;right:auto}.pull-1{position:relative;right:8.33333%;left:auto}.push-2{position:relative;left:16.66667%;right:auto}.pull-2{position:relative;right:16.66667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.33333%;right:auto}.pull-4{position:relative;right:33.33333%;left:auto}.push-5{position:relative;left:41.66667%;right:auto}.pull-5{position:relative;right:41.66667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.33333%;right:auto}.pull-7{position:relative;right:58.33333%;left:auto}.push-8{position:relative;left:66.66667%;right:auto}.pull-8{position:relative;right:66.66667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.33333%;right:auto}.pull-10{position:relative;right:83.33333%;left:auto}.push-11{position:relative;left:91.66667%;right:auto}.pull-11{position:relative;right:91.66667%;left:auto}.column.large-centered,.columns.large-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.column.large-uncentered,.columns.large-uncentered{margin-left:0;margin-right:0;float:left !important}.column.large-uncentered.opposite,.columns.large-uncentered.opposite{float:right !important}}.show-for-small,.show-for-medium-down,.show-for-large-down{display:inherit !important}.show-for-medium,.show-for-medium-up,.show-for-large,.show-for-large-up,.show-for-xlarge{display:none !important}.hide-for-medium,.hide-for-medium-up,.hide-for-large,.hide-for-large-up,.hide-for-xlarge{display:inherit !important}.hide-for-small,.hide-for-medium-down,.hide-for-large-down{display:none !important}table.show-for-small,table.show-for-medium-down,table.show-for-large-down,table.hide-for-medium,table.hide-for-medium-up,table.hide-for-large,table.hide-for-large-up,table.hide-for-xlarge{display:table}thead.show-for-small,thead.show-for-medium-down,thead.show-for-large-down,thead.hide-for-medium,thead.hide-for-medium-up,thead.hide-for-large,thead.hide-for-large-up,thead.hide-for-xlarge{display:table-header-group !important}tbody.show-for-small,tbody.show-for-medium-down,tbody.show-for-large-down,tbody.hide-for-medium,tbody.hide-for-medium-up,tbody.hide-for-large,tbody.hide-for-large-up,tbody.hide-for-xlarge{display:table-row-group !important}tr.show-for-small,tr.show-for-medium-down,tr.show-for-large-down,tr.hide-for-medium,tr.hide-for-medium-up,tr.hide-for-large,tr.hide-for-large-up,tr.hide-for-xlarge{display:table-row !important}td.show-for-small,td.show-for-medium-down,td.show-for-large-down,td.hide-for-medium,td.hide-for-medium-up,td.hide-for-large,td.hide-for-large-up,td.hide-for-xlarge,th.show-for-small,th.show-for-medium-down,th.show-for-large-down,th.hide-for-medium,th.hide-for-medium-up,th.hide-for-large,th.hide-for-large-up,th.hide-for-xlarge{display:table-cell !important}@media only screen and (min-width: 768px){.show-for-medium,.show-for-medium-up{display:inherit !important}.show-for-small{display:none !important}.hide-for-small{display:inherit !important}.hide-for-medium,.hide-for-medium-up{display:none !important}table.show-for-medium,table.show-for-medium-up,table.hide-for-small{display:table}thead.show-for-medium,thead.show-for-medium-up,thead.hide-for-small{display:table-header-group !important}tbody.show-for-medium,tbody.show-for-medium-up,tbody.hide-for-small{display:table-row-group !important}tr.show-for-medium,tr.show-for-medium-up,tr.hide-for-small{display:table-row !important}td.show-for-medium,td.show-for-medium-up,td.hide-for-small,th.show-for-medium,th.show-for-medium-up,th.hide-for-small{display:table-cell !important}}@media only screen and (min-width: 1280px){.show-for-large,.show-for-large-up{display:inherit !important}.show-for-medium,.show-for-medium-down{display:none !important}.hide-for-medium,.hide-for-medium-down{display:inherit !important}.hide-for-large,.hide-for-large-up{display:none !important}table.show-for-large,table.show-for-large-up,table.hide-for-medium,table.hide-for-medium-down{display:table}thead.show-for-large,thead.show-for-large-up,thead.hide-for-medium,thead.hide-for-medium-down{display:table-header-group !important}tbody.show-for-large,tbody.show-for-large-up,tbody.hide-for-medium,tbody.hide-for-medium-down{display:table-row-group !important}tr.show-for-large,tr.show-for-large-up,tr.hide-for-medium,tr.hide-for-medium-down{display:table-row !important}td.show-for-large,td.show-for-large-up,td.hide-for-medium,td.hide-for-medium-down,th.show-for-large,th.show-for-large-up,th.hide-for-medium,th.hide-for-medium-down{display:table-cell !important}}@media only screen and (min-width: 1440px){.show-for-xlarge{display:inherit !important}.show-for-large,.show-for-large-down{display:none !important}.hide-for-large,.hide-for-large-down{display:inherit !important}.hide-for-xlarge{display:none !important}table.show-for-xlarge,table.hide-for-large,table.hide-for-large-down{display:table}thead.show-for-xlarge,thead.hide-for-large,thead.hide-for-large-down{display:table-header-group !important}tbody.show-for-xlarge,tbody.hide-for-large,tbody.hide-for-large-down{display:table-row-group !important}tr.show-for-xlarge,tr.hide-for-large,tr.hide-for-large-down{display:table-row !important}td.show-for-xlarge,td.hide-for-large,td.hide-for-large-down,th.show-for-xlarge,th.hide-for-large,th.hide-for-large-down{display:table-cell !important}}.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.hide-for-landscape,table.show-for-portrait{display:table}thead.hide-for-landscape,thead.show-for-portrait{display:table-header-group !important}tbody.hide-for-landscape,tbody.show-for-portrait{display:table-row-group !important}tr.hide-for-landscape,tr.show-for-portrait{display:table-row !important}td.hide-for-landscape,td.show-for-portrait,th.hide-for-landscape,th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.show-for-landscape,table.hide-for-portrait{display:table}thead.show-for-landscape,thead.hide-for-portrait{display:table-header-group !important}tbody.show-for-landscape,tbody.hide-for-portrait{display:table-row-group !important}tr.show-for-landscape,tr.hide-for-portrait{display:table-row !important}td.show-for-landscape,td.hide-for-portrait,th.show-for-landscape,th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.show-for-portrait,.hide-for-landscape{display:inherit !important}.hide-for-portrait,.show-for-landscape{display:none !important}table.show-for-portrait,table.hide-for-landscape{display:table}thead.show-for-portrait,thead.hide-for-landscape{display:table-header-group !important}tbody.show-for-portrait,tbody.hide-for-landscape{display:table-row-group !important}tr.show-for-portrait,tr.hide-for-landscape{display:table-row !important}td.show-for-portrait,td.hide-for-landscape,th.show-for-portrait,th.hide-for-landscape{display:table-cell !important}}.show-for-touch{display:none !important}.hide-for-touch{display:inherit !important}.touch .show-for-touch{display:inherit !important}.touch .hide-for-touch{display:none !important}table.hide-for-touch{display:table}.touch table.show-for-touch{display:table}thead.hide-for-touch{display:table-header-group !important}.touch thead.show-for-touch{display:table-header-group !important}tbody.hide-for-touch{display:table-row-group !important}.touch tbody.show-for-touch{display:table-row-group !important}tr.hide-for-touch{display:table-row !important}.touch tr.show-for-touch{display:table-row !important}td.hide-for-touch{display:table-cell !important}.touch td.show-for-touch{display:table-cell !important}th.hide-for-touch{display:table-cell !important}.touch th.show-for-touch{display:table-cell !important}@media only screen{[class*="block-grid-"]{display:block;padding:0;margin:0 -0.625em;*zoom:1}[class*="block-grid-"]:before,[class*="block-grid-"]:after{content:" ";display:table}[class*="block-grid-"]:after{clear:both}[class*="block-grid-"]>li{display:inline;height:auto;float:left;padding:0 0.625em 1.25em}.small-block-grid-1>li{width:100%;padding:0 0.625em 1.25em}.small-block-grid-1>li:nth-of-type(n){clear:none}.small-block-grid-1>li:nth-of-type(1n+1){clear:both}.small-block-grid-2>li{width:50%;padding:0 0.625em 1.25em}.small-block-grid-2>li:nth-of-type(n){clear:none}.small-block-grid-2>li:nth-of-type(2n+1){clear:both}.small-block-grid-3>li{width:33.33333%;padding:0 0.625em 1.25em}.small-block-grid-3>li:nth-of-type(n){clear:none}.small-block-grid-3>li:nth-of-type(3n+1){clear:both}.small-block-grid-4>li{width:25%;padding:0 0.625em 1.25em}.small-block-grid-4>li:nth-of-type(n){clear:none}.small-block-grid-4>li:nth-of-type(4n+1){clear:both}.small-block-grid-5>li{width:20%;padding:0 0.625em 1.25em}.small-block-grid-5>li:nth-of-type(n){clear:none}.small-block-grid-5>li:nth-of-type(5n+1){clear:both}.small-block-grid-6>li{width:16.66667%;padding:0 0.625em 1.25em}.small-block-grid-6>li:nth-of-type(n){clear:none}.small-block-grid-6>li:nth-of-type(6n+1){clear:both}.small-block-grid-7>li{width:14.28571%;padding:0 0.625em 1.25em}.small-block-grid-7>li:nth-of-type(n){clear:none}.small-block-grid-7>li:nth-of-type(7n+1){clear:both}.small-block-grid-8>li{width:12.5%;padding:0 0.625em 1.25em}.small-block-grid-8>li:nth-of-type(n){clear:none}.small-block-grid-8>li:nth-of-type(8n+1){clear:both}.small-block-grid-9>li{width:11.11111%;padding:0 0.625em 1.25em}.small-block-grid-9>li:nth-of-type(n){clear:none}.small-block-grid-9>li:nth-of-type(9n+1){clear:both}.small-block-grid-10>li{width:10%;padding:0 0.625em 1.25em}.small-block-grid-10>li:nth-of-type(n){clear:none}.small-block-grid-10>li:nth-of-type(10n+1){clear:both}.small-block-grid-11>li{width:9.09091%;padding:0 0.625em 1.25em}.small-block-grid-11>li:nth-of-type(n){clear:none}.small-block-grid-11>li:nth-of-type(11n+1){clear:both}.small-block-grid-12>li{width:8.33333%;padding:0 0.625em 1.25em}.small-block-grid-12>li:nth-of-type(n){clear:none}.small-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 768px){.small-block-grid-1>li:nth-of-type(1n+1){clear:none}.small-block-grid-2>li:nth-of-type(2n+1){clear:none}.small-block-grid-3>li:nth-of-type(3n+1){clear:none}.small-block-grid-4>li:nth-of-type(4n+1){clear:none}.small-block-grid-5>li:nth-of-type(5n+1){clear:none}.small-block-grid-6>li:nth-of-type(6n+1){clear:none}.small-block-grid-7>li:nth-of-type(7n+1){clear:none}.small-block-grid-8>li:nth-of-type(8n+1){clear:none}.small-block-grid-9>li:nth-of-type(9n+1){clear:none}.small-block-grid-10>li:nth-of-type(10n+1){clear:none}.small-block-grid-11>li:nth-of-type(11n+1){clear:none}.small-block-grid-12>li:nth-of-type(12n+1){clear:none}.large-block-grid-1>li{width:100%;padding:0 0.625em 1.25em}.large-block-grid-1>li:nth-of-type(n){clear:none}.large-block-grid-1>li:nth-of-type(1n+1){clear:both}.large-block-grid-2>li{width:50%;padding:0 0.625em 1.25em}.large-block-grid-2>li:nth-of-type(n){clear:none}.large-block-grid-2>li:nth-of-type(2n+1){clear:both}.large-block-grid-3>li{width:33.33333%;padding:0 0.625em 1.25em}.large-block-grid-3>li:nth-of-type(n){clear:none}.large-block-grid-3>li:nth-of-type(3n+1){clear:both}.large-block-grid-4>li{width:25%;padding:0 0.625em 1.25em}.large-block-grid-4>li:nth-of-type(n){clear:none}.large-block-grid-4>li:nth-of-type(4n+1){clear:both}.large-block-grid-5>li{width:20%;padding:0 0.625em 1.25em}.large-block-grid-5>li:nth-of-type(n){clear:none}.large-block-grid-5>li:nth-of-type(5n+1){clear:both}.large-block-grid-6>li{width:16.66667%;padding:0 0.625em 1.25em}.large-block-grid-6>li:nth-of-type(n){clear:none}.large-block-grid-6>li:nth-of-type(6n+1){clear:both}.large-block-grid-7>li{width:14.28571%;padding:0 0.625em 1.25em}.large-block-grid-7>li:nth-of-type(n){clear:none}.large-block-grid-7>li:nth-of-type(7n+1){clear:both}.large-block-grid-8>li{width:12.5%;padding:0 0.625em 1.25em}.large-block-grid-8>li:nth-of-type(n){clear:none}.large-block-grid-8>li:nth-of-type(8n+1){clear:both}.large-block-grid-9>li{width:11.11111%;padding:0 0.625em 1.25em}.large-block-grid-9>li:nth-of-type(n){clear:none}.large-block-grid-9>li:nth-of-type(9n+1){clear:both}.large-block-grid-10>li{width:10%;padding:0 0.625em 1.25em}.large-block-grid-10>li:nth-of-type(n){clear:none}.large-block-grid-10>li:nth-of-type(10n+1){clear:both}.large-block-grid-11>li{width:9.09091%;padding:0 0.625em 1.25em}.large-block-grid-11>li:nth-of-type(n){clear:none}.large-block-grid-11>li:nth-of-type(11n+1){clear:both}.large-block-grid-12>li{width:8.33333%;padding:0 0.625em 1.25em}.large-block-grid-12>li:nth-of-type(n){clear:none}.large-block-grid-12>li:nth-of-type(12n+1){clear:both}}p.lead{font-size:1.21875em;line-height:1.6}.subheader{line-height:1.4;color:#8fa2cf;font-weight:300;margin-top:0.2em;margin-bottom:0.5em}div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}a{color:#2ba6cb;text-decoration:none;line-height:inherit}a:hover,a:focus{color:#2795b6}a img{border:none}p{font-family:inherit;font-weight:normal;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}p aside{font-size:0.875em;line-height:1.35;font-style:italic}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:bold;font-style:normal;color:#3b528a;text-rendering:optimizeLegibility;margin-top:0.2em;margin-bottom:0.5em;line-height:1.2125em}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-size:60%;color:#8fa2cf;line-height:0}h1{font-size:2.125em}h2{font-size:1.6875em}h3{font-size:1.375em}h4{font-size:1.125em}h5{font-size:1.125em}h6{font-size:1em}hr{border:solid #ddd;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}em,i{font-style:italic;line-height:inherit}strong,b{font-weight:bold;line-height:inherit}small{font-size:60%;line-height:inherit}code{font-family:Consolas,"Liberation Mono",Courier,monospace;font-weight:bold;color:#7f0a0c}ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}ul,ol{margin-left:0}ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}ul.square{list-style-type:square}ul.circle{list-style-type:circle}ul.disc{list-style-type:disc}ul.no-bullet{list-style:none}ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}dl dt{margin-bottom:0.3em;font-weight:bold}dl dd{margin-bottom:0.75em}abbr,acronym{text-transform:uppercase;font-size:90%;color:#1c1b39;border-bottom:1px dotted #ddd;cursor:help}abbr{text-transform:none}blockquote{margin:0 0 1.25em;padding:0.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}blockquote cite{display:block;font-size:0.8125em;color:#6b84c0}blockquote cite:before{content:"\2014 \0020"}blockquote cite a,blockquote cite a:visited{color:#6b84c0}blockquote,blockquote p{line-height:1.6;color:#8fa2cf}.vcard{display:inline-block;margin:0 0 1.25em 0;border:1px solid #ddd;padding:0.625em 0.75em}.vcard li{margin:0;display:block}.vcard .fn{font-weight:bold;font-size:0.9375em}.vevent .summary{font-weight:bold}.vevent abbr{cursor:default;text-decoration:none;font-weight:bold;border:none;padding:0 0.0625em}@media only screen and (min-width: 768px){h1,h2,h3,h4,h5,h6{line-height:1.4}h1{font-size:2.75em}h2{font-size:2.3125em}h3{font-size:1.6875em}h4{font-size:1.4375em}}.print-only{display:none !important}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.hide-on-print{display:none !important}.print-only{display:block !important}.hide-for-print{display:none !important}.show-for-print{display:inherit !important}}button,.button{border-style:solid;border-width:1px;cursor:pointer;font-family:inherit;font-weight:bold;line-height:1;margin:0 0 1.25em;position:relative;text-decoration:none;text-align:center;display:inline-block;padding-top:0.75em;padding-right:1.5em;padding-bottom:0.8125em;padding-left:1.5em;font-size:1em;background-color:#2ba6cb;border-color:#2284a1;color:#fff}button:hover,button:focus,.button:hover,.button:focus{background-color:#2284a1}button:hover,button:focus,.button:hover,.button:focus{color:#fff}button.secondary,.button.secondary{background-color:#e9e9e9;border-color:#d0d0d0;color:#333}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{background-color:#d0d0d0}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{color:#333}button.success,.button.success{background-color:#5da423;border-color:#457a1a;color:#fff}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{background-color:#457a1a}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{color:#fff}button.alert,.button.alert{background-color:#c60f13;border-color:#970b0e;color:#fff}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{background-color:#970b0e}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{color:#fff}button.large,.button.large{padding-top:1em;padding-right:2em;padding-bottom:1.0625em;padding-left:2em;font-size:1.25em}button.small,.button.small{padding-top:0.5625em;padding-right:1.125em;padding-bottom:0.625em;padding-left:1.125em;font-size:0.8125em}button.tiny,.button.tiny{padding-top:0.4375em;padding-right:0.875em;padding-bottom:0.5em;padding-left:0.875em;font-size:0.6875em}button.expand,.button.expand{padding-right:0px;padding-left:0px;width:100%}button.left-align,.button.left-align{text-align:left;text-indent:0.75em}button.right-align,.button.right-align{text-align:right;padding-right:0.75em}button.disabled,button[disabled],.button.disabled,.button[disabled]{background-color:#2ba6cb;border-color:#2284a1;color:#fff;cursor:default;opacity:0.6;-webkit-box-shadow:none;box-shadow:none}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#2284a1}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{color:#fff}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#2ba6cb}button.disabled.secondary,button[disabled].secondary,.button.disabled.secondary,.button[disabled].secondary{background-color:#e9e9e9;border-color:#d0d0d0;color:#333;cursor:default;opacity:0.6;-webkit-box-shadow:none;box-shadow:none}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#d0d0d0}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{color:#333}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#e9e9e9}button.disabled.success,button[disabled].success,.button.disabled.success,.button[disabled].success{background-color:#5da423;border-color:#457a1a;color:#fff;cursor:default;opacity:0.6;-webkit-box-shadow:none;box-shadow:none}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#457a1a}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{color:#fff}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#5da423}button.disabled.alert,button[disabled].alert,.button.disabled.alert,.button[disabled].alert{background-color:#c60f13;border-color:#970b0e;color:#fff;cursor:default;opacity:0.6;-webkit-box-shadow:none;box-shadow:none}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#970b0e}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{color:#fff}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#c60f13}button,.button{padding-top:0.8125em;padding-bottom:0.75em;-webkit-appearance:none}button.tiny,.button.tiny{padding-top:0.5em;padding-bottom:0.4375em;-webkit-appearance:none}button.small,.button.small{padding-top:0.625em;padding-bottom:0.5625em;-webkit-appearance:none}button.large,.button.large{padding-top:1.03125em;padding-bottom:1.03125em;-webkit-appearance:none}@media only screen{button,.button{-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.5) inset;box-shadow:0 1px 0 rgba(255,255,255,0.5) inset;-webkit-transition:background-color 300ms ease-out;-moz-transition:background-color 300ms ease-out;transition:background-color 300ms ease-out}button:active,.button:active{-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.2) inset;box-shadow:0 1px 0 rgba(0,0,0,0.2) inset}button.radius,.button.radius{-webkit-border-radius:3px;border-radius:3px}button.round,.button.round{-webkit-border-radius:1000px;border-radius:1000px}}@media only screen and (min-width: 768px){button,.button{display:inline-block}}form{margin:0 0 1em}form .row .row{margin:0 -0.5em}form .row .row .column,form .row .row .columns{padding:0 0.5em}form .row .row.collapse{margin:0}form .row .row.collapse .column,form .row .row.collapse .columns{padding:0}form .row input.column,form .row input.columns,form .row textarea.column,form .row textarea.columns{padding-left:0.5em}label{font-size:0.875em;color:#4d4d4d;cursor:pointer;display:block;font-weight:500;margin-bottom:0.1875em}label.right{float:none;text-align:right}label.inline{margin:0 0 1em 0;padding:0.625em 0}.prefix,.postfix{display:block;position:relative;z-index:2;text-align:center;width:100%;padding-top:0;padding-bottom:0;border-style:solid;border-width:1px;overflow:hidden;font-size:0.875em;height:2.3125em;line-height:2.3125em}.postfix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;line-height:2.125em}.prefix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;line-height:2.125em}.prefix.button.radius{-webkit-border-radius:0;border-radius:0;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.postfix.button.radius{-webkit-border-radius:0;border-radius:0;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.prefix.button.round{-webkit-border-radius:0;border-radius:0;-moz-border-radius-bottomleft:1000px;-moz-border-radius-topleft:1000px;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}.postfix.button.round{-webkit-border-radius:0;border-radius:0;-moz-border-radius-topright:1000px;-moz-border-radius-bottomright:1000px;-webkit-border-top-right-radius:1000px;-webkit-border-bottom-right-radius:1000px;border-top-right-radius:1000px;border-bottom-right-radius:1000px}span.prefix{background:#f2f2f2;border-color:#d9d9d9;border-right:none;color:#333}span.prefix.radius{-webkit-border-radius:0;border-radius:0;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}span.postfix{background:#f2f2f2;border-color:#ccc;border-left:none;color:#333}span.postfix.radius{-webkit-border-radius:0;border-radius:0;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.input-group.radius>*:first-child,.input-group.radius>*:first-child *{-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.input-group.radius>*:last-child,.input-group.radius>*:last-child *{-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.input-group.round>*:first-child,.input-group.round>*:first-child *{-moz-border-radius-bottomleft:1000px;-moz-border-radius-topleft:1000px;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}.input-group.round>*:last-child,.input-group.round>*:last-child *{-moz-border-radius-topright:1000px;-moz-border-radius-bottomright:1000px;-webkit-border-top-right-radius:1000px;-webkit-border-bottom-right-radius:1000px;border-top-right-radius:1000px;border-bottom-right-radius:1000px}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="month"],input[type="week"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea{background-color:#fff;font-family:inherit;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);color:rgba(0,0,0,0.75);display:block;font-size:0.875em;margin:0 0 1em 0;padding:0.5em;height:2.3125em;width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:-webkit-box-shadow 0.45s,border-color 0.45s ease-in-out;-moz-transition:-moz-box-shadow 0.45s,border-color 0.45s ease-in-out;transition:box-shadow 0.45s,border-color 0.45s ease-in-out}input[type="text"]:focus,input[type="password"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="time"]:focus,input[type="url"]:focus,textarea:focus{-webkit-box-shadow:0 0 5px #999;-moz-box-shadow:0 0 5px #999;box-shadow:0 0 5px #999;border-color:#999}input[type="text"]:focus,input[type="password"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="time"]:focus,input[type="url"]:focus,textarea:focus{background:#fafafa;border-color:#999;outline:none}input[type="text"][disabled],input[type="password"][disabled],input[type="date"][disabled],input[type="datetime"][disabled],input[type="datetime-local"][disabled],input[type="month"][disabled],input[type="week"][disabled],input[type="email"][disabled],input[type="number"][disabled],input[type="search"][disabled],input[type="tel"][disabled],input[type="time"][disabled],input[type="url"][disabled],textarea[disabled]{background-color:#ddd}input[type="file"],input[type="checkbox"],input[type="radio"],select{margin:0 0 1em 0}input[type="file"]{width:100%}fieldset{border:solid 1px #ddd;padding:1.25em;margin:1.125em 0}fieldset legend{font-weight:bold;background:#fff;padding:0 0.1875em;margin:0;margin-left:-0.1875em}.error input,input.error,.error textarea,textarea.error{border-color:#c60f13;background-color:rgba(198,15,19,0.1)}.error input:focus,input.error:focus,.error textarea:focus,textarea.error:focus{background:#fafafa;border-color:#999}.error label,label.error{color:#c60f13}.error small,small.error{display:block;padding:0.375em 0.25em;margin-top:-1.3125em;margin-bottom:1em;font-size:0.75em;font-weight:bold;background:#c60f13;color:#fff}form.custom .hidden-field{margin-left:-99999px;position:absolute;visibility:hidden}form.custom .custom{display:inline-block;width:16px;height:16px;position:relative;vertical-align:middle;border:solid 1px #ccc;background:#fff}form.custom .custom.checkbox{-webkit-border-radius:0px;border-radius:0px;padding:-1px}form.custom .custom.radio{-webkit-border-radius:1000px;border-radius:1000px;padding:3px}form.custom .custom.checkbox:before{content:"";display:block;font-size:16px;color:#fff}form.custom .custom.radio.checked:before{content:"";display:block;width:8px;height:8px;-webkit-border-radius:1000px;border-radius:1000px;background:#222;position:relative}form.custom .custom.checkbox.checked:before{content:"\00d7";color:#222;position:absolute;top:-50%;left:50%;margin-top:4px;margin-left:-5px}form.custom .custom.dropdown{display:block;position:relative;top:0;height:2.3125em;margin-bottom:1.25em;margin-top:0px;padding:0px;width:100%;background:#fff;background:-moz-linear-gradient(top, #fff 0%, #f3f3f3 100%);background:-webkit-linear-gradient(top, #fff 0%, #f3f3f3 100%);-webkit-box-shadow:none;background:linear-gradient(to bottom, #fff 0%, #f3f3f3 100%);box-shadow:none;font-size:0.875em;vertical-align:top}form.custom .custom.dropdown ul{overflow-y:auto;max-height:200px}form.custom .custom.dropdown .current{cursor:default;white-space:nowrap;line-height:2.25em;color:rgba(0,0,0,0.75);text-decoration:none;overflow:hidden;display:block;margin-left:0.5em;margin-right:2.3125em}form.custom .custom.dropdown .selector{cursor:default;position:absolute;width:2.5em;height:2.3125em;display:block;right:0;top:0}form.custom .custom.dropdown .selector:after{content:"";display:block;content:"";display:block;width:0;height:0;border:inset 5px;border-color:#aaa transparent transparent transparent;border-top-style:solid;position:absolute;left:0.9375em;top:50%;margin-top:-3px}form.custom .custom.dropdown:hover a.selector:after,form.custom .custom.dropdown.open a.selector:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:#222 transparent transparent transparent;border-top-style:solid}form.custom .custom.dropdown .disabled{color:#888}form.custom .custom.dropdown .disabled:hover{background:transparent;color:#888}form.custom .custom.dropdown .disabled:hover:after{display:none}form.custom .custom.dropdown.open ul{display:block;z-index:10;min-width:100%;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}form.custom .custom.dropdown.small{max-width:134px}form.custom .custom.dropdown.medium{max-width:254px}form.custom .custom.dropdown.large{max-width:434px}form.custom .custom.dropdown.expand{width:100% !important}form.custom .custom.dropdown.open.small ul{min-width:134px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}form.custom .custom.dropdown.open.medium ul{min-width:254px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}form.custom .custom.dropdown.open.large ul{min-width:434px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}form.custom .custom.dropdown ul{position:absolute;width:auto;display:none;margin:0;left:-1px;top:auto;-webkit-box-shadow:0 2px 2px 0px rgba(0,0,0,0.1);box-shadow:0 2px 2px 0px rgba(0,0,0,0.1);margin:0;padding:0;background:#fff;border:solid 1px #ccc;font-size:16px}form.custom .custom.dropdown ul li{color:#555;font-size:0.875em;cursor:default;padding-top:0.25em;padding-bottom:0.25em;padding-left:0.375em;padding-right:2.375em;min-height:1.5em;line-height:1.5em;margin:0;white-space:nowrap;list-style:none}form.custom .custom.dropdown ul li.selected{background:#eee;color:#000}form.custom .custom.dropdown ul li:hover{background-color:#e4e4e4;color:#000}form.custom .custom.dropdown ul li.selected:hover{background:#eee;cursor:default;color:#000}form.custom .custom.dropdown ul.show{display:block}form.custom .custom.disabled{background:#ddd}.button-group{list-style:none;margin:0;*zoom:1}.button-group:before,.button-group:after{content:" ";display:table}.button-group:after{clear:both}.button-group>*{margin:0 0 0 -1px;float:left}.button-group>*:first-child{margin-left:0}.button-group.radius>*:first-child,.button-group.radius>*:first-child>a,.button-group.radius>*:first-child>button,.button-group.radius>*:first-child>.button{-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.button-group.radius>*:last-child,.button-group.radius>*:last-child>a,.button-group.radius>*:last-child>button,.button-group.radius>*:last-child>.button{-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.button-group.round>*:first-child,.button-group.round>*:first-child>a,.button-group.round>*:first-child>button,.button-group.round>*:first-child>.button{-moz-border-radius-bottomleft:1000px;-moz-border-radius-topleft:1000px;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}.button-group.round>*:last-child,.button-group.round>*:last-child>a,.button-group.round>*:last-child>button,.button-group.round>*:last-child>.button{-moz-border-radius-topright:1000px;-moz-border-radius-bottomright:1000px;-webkit-border-top-right-radius:1000px;-webkit-border-bottom-right-radius:1000px;border-top-right-radius:1000px;border-bottom-right-radius:1000px}.button-group.even-2 li{width:50%}.button-group.even-2 li button,.button-group.even-2 li .button{width:100%}.button-group.even-3 li{width:33.33333%}.button-group.even-3 li button,.button-group.even-3 li .button{width:100%}.button-group.even-4 li{width:25%}.button-group.even-4 li button,.button-group.even-4 li .button{width:100%}.button-group.even-5 li{width:20%}.button-group.even-5 li button,.button-group.even-5 li .button{width:100%}.button-group.even-6 li{width:16.66667%}.button-group.even-6 li button,.button-group.even-6 li .button{width:100%}.button-group.even-7 li{width:14.28571%}.button-group.even-7 li button,.button-group.even-7 li .button{width:100%}.button-group.even-8 li{width:12.5%}.button-group.even-8 li button,.button-group.even-8 li .button{width:100%}.button-bar{*zoom:1}.button-bar:before,.button-bar:after{content:" ";display:table}.button-bar:after{clear:both}.button-bar .button-group{float:left;margin-right:0.625em}.button-bar .button-group div{overflow:hidden}.dropdown.button{position:relative;padding-right:3.1875em}.dropdown.button:before{position:absolute;content:"";width:0;height:0;display:block;border-style:solid;border-color:#fff transparent transparent transparent;top:50%}.dropdown.button:before{border-width:0.5625em;right:1.5em;margin-top:-0.25em}.dropdown.button:before{border-color:#fff transparent transparent transparent}.dropdown.button.tiny{padding-right:2.1875em}.dropdown.button.tiny:before{border-width:0.4375em;right:0.875em;margin-top:-0.15625em}.dropdown.button.tiny:before{border-color:#fff transparent transparent transparent}.dropdown.button.small{padding-right:2.8125em}.dropdown.button.small:before{border-width:0.5625em;right:1.125em;margin-top:-0.21875em}.dropdown.button.small:before{border-color:#fff transparent transparent transparent}.dropdown.button.large{padding-right:4em}.dropdown.button.large:before{border-width:0.625em;right:1.75em;margin-top:-0.3125em}.dropdown.button.large:before{border-color:#fff transparent transparent transparent}.dropdown.button.secondary:before{border-color:#333 transparent transparent transparent}.split.button{position:relative;padding-right:4.8em}.split.button span{display:block;height:100%;position:absolute;right:0;top:0;border-left:solid 1px}.split.button span:before{position:absolute;content:"";width:0;height:0;display:block;border-style:inset;left:50%}.split.button span:active{background-color:rgba(0,0,0,0.1)}.split.button span{border-left-color:#1e728c}.split.button span{width:3em}.split.button span:before{border-top-style:solid;border-width:0.5625em;top:1.125em;margin-left:-0.5625em}.split.button span:before{border-color:#fff transparent transparent transparent}.split.button.secondary span{border-left-color:#c3c3c3}.split.button.secondary span:before{border-color:#fff transparent transparent transparent}.split.button.alert span{border-left-color:#7f0a0c}.split.button.success span{border-left-color:#396516}.split.button.tiny{padding-right:3.9375em}.split.button.tiny span{width:2.84375em}.split.button.tiny span:before{border-top-style:solid;border-width:0.4375em;top:0.875em;margin-left:-0.3125em}.split.button.small{padding-right:3.9375em}.split.button.small span{width:2.8125em}.split.button.small span:before{border-top-style:solid;border-width:0.5625em;top:0.84375em;margin-left:-0.5625em}.split.button.large{padding-right:6em}.split.button.large span{width:3.75em}.split.button.large span:before{border-top-style:solid;border-width:0.625em;top:1.3125em;margin-left:-0.5625em}.split.button.expand{padding-left:2em}.split.button.secondary span:before{border-color:#333 transparent transparent transparent}.split.button.radius span{-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.split.button.round span{-moz-border-radius-topright:1000px;-moz-border-radius-bottomright:1000px;-webkit-border-top-right-radius:1000px;-webkit-border-bottom-right-radius:1000px;border-top-right-radius:1000px;border-bottom-right-radius:1000px}.flex-video{position:relative;padding-top:1.5625em;padding-bottom:67.5%;height:0;margin-bottom:1em;overflow:hidden}.flex-video.widescreen{padding-bottom:57.25%}.flex-video.vimeo{padding-top:0}.flex-video iframe,.flex-video object,.flex-video embed,.flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.section-container,.section-container.auto{width:100%;display:block;margin-bottom:1.25em;border:1px solid #ccc;border-top:none}.section-container>section,.section-container>.section,.section-container.auto>section,.section-container.auto>.section{position:relative}.section-container>section>.title,.section-container>.section>.title,.section-container.auto>section>.title,.section-container.auto>.section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.section-container>section>.title a,.section-container>.section>.title a,.section-container.auto>section>.title a,.section-container.auto>.section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.section-container>section>.title:hover,.section-container>.section>.title:hover,.section-container.auto>section>.title:hover,.section-container.auto>.section>.title:hover{background-color:#e2e2e2}.section-container>section .content,.section-container>.section .content,.section-container.auto>section .content,.section-container.auto>.section .content{display:none;padding:0.9375em;background-color:#fff}.section-container>section .content>*:last-child,.section-container>.section .content>*:last-child,.section-container.auto>section .content>*:last-child,.section-container.auto>.section .content>*:last-child{margin-bottom:0}.section-container>section .content>*:first-child,.section-container>.section .content>*:first-child,.section-container.auto>section .content>*:first-child,.section-container.auto>.section .content>*:first-child{padding-top:0}.section-container>section .content>*:last-child:not(.flex-video),.section-container>.section .content>*:last-child:not(.flex-video),.section-container.auto>section .content>*:last-child:not(.flex-video),.section-container.auto>.section .content>*:last-child:not(.flex-video){padding-bottom:0}.section-container>section.active>.content,.section-container>.section.active>.content,.section-container.auto>section.active>.content,.section-container.auto>.section.active>.content{display:block}.section-container>section.active>.title,.section-container>.section.active>.title,.section-container.auto>section.active>.title,.section-container.auto>.section.active>.title{background:#d5d5d5}.section-container>section.active>.title a,.section-container>.section.active>.title a,.section-container.auto>section.active>.title a,.section-container.auto>.section.active>.title a{color:#333}.section-container>section>.title,.section-container>.section>.title,.section-container.auto>section>.title,.section-container.auto>.section>.title{top:0;width:100%;margin:0;border-top:solid 1px #ccc}.section-container>section>.title a,.section-container>.section>.title a,.section-container.auto>section>.title a,.section-container.auto>.section>.title a{width:100%}.section-container.tabs{border:0;position:relative}.section-container.tabs>section,.section-container.tabs>.section{border:0;position:static}.section-container.tabs>section>.title,.section-container.tabs>.section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.section-container.tabs>section>.title a,.section-container.tabs>.section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.section-container.tabs>section>.title:hover,.section-container.tabs>.section>.title:hover{background-color:#e2e2e2}.section-container.tabs>section .content,.section-container.tabs>.section .content{display:none;padding:0.9375em;background-color:#fff}.section-container.tabs>section .content>*:last-child,.section-container.tabs>.section .content>*:last-child{margin-bottom:0}.section-container.tabs>section .content>*:first-child,.section-container.tabs>.section .content>*:first-child{padding-top:0}.section-container.tabs>section .content>*:last-child:not(.flex-video),.section-container.tabs>.section .content>*:last-child:not(.flex-video){padding-bottom:0}.section-container.tabs>section.active>.content,.section-container.tabs>.section.active>.content{display:block}.section-container.tabs>section.active>.title,.section-container.tabs>.section.active>.title{background:#fff}.section-container.tabs>section.active>.title a,.section-container.tabs>.section.active>.title a{color:#333}.section-container.tabs>section>.title,.section-container.tabs>.section>.title{width:auto;border:solid 1px #ccc;border-right:0;border-bottom:0;position:absolute;top:0;z-index:1}.section-container.tabs>section>.title a,.section-container.tabs>.section>.title a{width:100%}.section-container.tabs>section:last-child .title,.section-container.tabs>.section:last-child .title{border-right:solid 1px #ccc}.section-container.tabs>section .content,.section-container.tabs>.section .content{border:solid 1px #ccc;position:absolute;z-index:10;display:none;top:-1px}.section-container.tabs>section.active>.title,.section-container.tabs>.section.active>.title{z-index:11;border-bottom:0;background-color:#fff}.section-container.tabs>section.active>.content,.section-container.tabs>.section.active>.content{position:relative}@media only screen and (min-width: 768px){.section-container.auto{border:0;position:relative}.section-container.auto>section,.section-container.auto>.section{border:0;position:static}.section-container.auto>section>.title,.section-container.auto>.section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.section-container.auto>section>.title a,.section-container.auto>.section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.section-container.auto>section>.title:hover,.section-container.auto>.section>.title:hover{background-color:#e2e2e2}.section-container.auto>section .content,.section-container.auto>.section .content{display:none;padding:0.9375em;background-color:#fff}.section-container.auto>section .content>*:last-child,.section-container.auto>.section .content>*:last-child{margin-bottom:0}.section-container.auto>section .content>*:first-child,.section-container.auto>.section .content>*:first-child{padding-top:0}.section-container.auto>section .content>*:last-child:not(.flex-video),.section-container.auto>.section .content>*:last-child:not(.flex-video){padding-bottom:0}.section-container.auto>section.active>.content,.section-container.auto>.section.active>.content{display:block}.section-container.auto>section.active>.title,.section-container.auto>.section.active>.title{background:#fff}.section-container.auto>section.active>.title a,.section-container.auto>.section.active>.title a{color:#333}.section-container.auto>section>.title,.section-container.auto>.section>.title{width:auto;border:solid 1px #ccc;border-right:0;border-bottom:0;position:absolute;top:0;z-index:1}.section-container.auto>section>.title a,.section-container.auto>.section>.title a{width:100%}.section-container.auto>section:last-child .title,.section-container.auto>.section:last-child .title{border-right:solid 1px #ccc}.section-container.auto>section .content,.section-container.auto>.section .content{border:solid 1px #ccc;position:absolute;z-index:10;display:none;top:-1px}.section-container.auto>section.active>.title,.section-container.auto>.section.active>.title{z-index:11;border-bottom:0;background-color:#fff}.section-container.auto>section.active>.content,.section-container.auto>.section.active>.content{position:relative}.section-container.accordion .section{padding-top:0 !important}.section-container.vertical-tabs{border:1px solid #ccc;position:relative}.section-container.vertical-tabs section,.section-container.vertical-tabs .section{padding-top:0 !important;border:0;position:static}.section-container.vertical-tabs section>.title,.section-container.vertical-tabs .section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.section-container.vertical-tabs section>.title a,.section-container.vertical-tabs .section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.section-container.vertical-tabs section>.title:hover,.section-container.vertical-tabs .section>.title:hover{background-color:#e2e2e2}.section-container.vertical-tabs section .content,.section-container.vertical-tabs .section .content{display:none;padding:0.9375em;background-color:#fff}.section-container.vertical-tabs section .content>*:last-child,.section-container.vertical-tabs .section .content>*:last-child{margin-bottom:0}.section-container.vertical-tabs section .content>*:first-child,.section-container.vertical-tabs .section .content>*:first-child{padding-top:0}.section-container.vertical-tabs section .content>*:last-child:not(.flex-video),.section-container.vertical-tabs .section .content>*:last-child:not(.flex-video){padding-bottom:0}.section-container.vertical-tabs section.active>.content,.section-container.vertical-tabs .section.active>.content{display:block}.section-container.vertical-tabs section.active>.title,.section-container.vertical-tabs .section.active>.title{background:#d5d5d5}.section-container.vertical-tabs section.active>.title a,.section-container.vertical-tabs .section.active>.title a{color:#333}.section-container.vertical-tabs section>.title,.section-container.vertical-tabs .section>.title{position:absolute;border-top:solid 1px #ccc;width:12.5em}.section-container.vertical-tabs section:first-child .title,.section-container.vertical-tabs .section:first-child .title{border-top:0}.section-container.vertical-tabs section .content,.section-container.vertical-tabs .section .content{display:block;position:relative;left:12.5em;border-left:solid 1px #ccc;z-index:10}.section-container.vertical-tabs section.active>.title,.section-container.vertical-tabs .section.active>.title{background-color:#d5d5d5;width:12.5625em;border-right:solid 0 transparent;z-index:11}.section-container.vertical-tabs section.active:last-child .title,.section-container.vertical-tabs .section.active:last-child .title{border-bottom:0}.section-container.vertical-nav{border:0;position:relative}.section-container.vertical-nav>section,.section-container.vertical-nav>.section{padding-top:0 !important;position:relative}.section-container.vertical-nav>section>.title,.section-container.vertical-nav>.section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.section-container.vertical-nav>section>.title a,.section-container.vertical-nav>.section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.section-container.vertical-nav>section>.title:hover,.section-container.vertical-nav>.section>.title:hover{background-color:#e2e2e2}.section-container.vertical-nav>section .content,.section-container.vertical-nav>.section .content{display:none;padding:0.9375em;background-color:#fff}.section-container.vertical-nav>section .content>*:last-child,.section-container.vertical-nav>.section .content>*:last-child{margin-bottom:0}.section-container.vertical-nav>section .content>*:first-child,.section-container.vertical-nav>.section .content>*:first-child{padding-top:0}.section-container.vertical-nav>section .content>*:last-child:not(.flex-video),.section-container.vertical-nav>.section .content>*:last-child:not(.flex-video){padding-bottom:0}.section-container.vertical-nav>section.active>.content,.section-container.vertical-nav>.section.active>.content{display:block}.section-container.vertical-nav>section.active>.title,.section-container.vertical-nav>.section.active>.title{background:#d5d5d5}.section-container.vertical-nav>section.active>.title a,.section-container.vertical-nav>.section.active>.title a{color:#333}.section-container.vertical-nav>section>.title,.section-container.vertical-nav>.section>.title{border-top:none;border:solid 1px #ccc}.section-container.vertical-nav>section>.title a,.section-container.vertical-nav>.section>.title a{display:block;width:100%}.section-container.vertical-nav>section .content,.section-container.vertical-nav>.section .content{display:none}.section-container.vertical-nav>section:first-child .title,.section-container.vertical-nav>.section:first-child .title{border-bottom:none}.section-container.vertical-nav>section.active>.content,.section-container.vertical-nav>.section.active>.content{display:block;position:absolute;left:100%;top:0px;z-index:999;min-width:12.5em;border:solid 1px #ccc}.section-container.horizontal-nav{position:relative;background:#efefef;border:1px solid #ccc}.section-container.horizontal-nav>section,.section-container.horizontal-nav>.section{padding-top:0;border:0;position:static}.section-container.horizontal-nav>section>.title,.section-container.horizontal-nav>.section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.section-container.horizontal-nav>section>.title a,.section-container.horizontal-nav>.section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.section-container.horizontal-nav>section>.title:hover,.section-container.horizontal-nav>.section>.title:hover{background-color:#e2e2e2}.section-container.horizontal-nav>section .content,.section-container.horizontal-nav>.section .content{display:none;padding:0.9375em;background-color:#fff}.section-container.horizontal-nav>section .content>*:last-child,.section-container.horizontal-nav>.section .content>*:last-child{margin-bottom:0}.section-container.horizontal-nav>section .content>*:first-child,.section-container.horizontal-nav>.section .content>*:first-child{padding-top:0}.section-container.horizontal-nav>section .content>*:last-child:not(.flex-video),.section-container.horizontal-nav>.section .content>*:last-child:not(.flex-video){padding-bottom:0}.section-container.horizontal-nav>section.active>.content,.section-container.horizontal-nav>.section.active>.content{display:block}.section-container.horizontal-nav>section.active>.title,.section-container.horizontal-nav>.section.active>.title{background:#d5d5d5}.section-container.horizontal-nav>section.active>.title a,.section-container.horizontal-nav>.section.active>.title a{color:#333}.section-container.horizontal-nav>section>.title,.section-container.horizontal-nav>.section>.title{width:auto;border:solid 1px #ccc;border-left:0;top:-1px;position:absolute;z-index:1}.section-container.horizontal-nav>section>.title a,.section-container.horizontal-nav>.section>.title a{width:100%}.section-container.horizontal-nav>section .content,.section-container.horizontal-nav>.section .content{display:none}.section-container.horizontal-nav>section.active>.content,.section-container.horizontal-nav>.section.active>.content{display:block;position:absolute;z-index:999;left:0;top:-2px;min-width:12.5em;border:solid 1px #ccc}}.no-js .section-container.auto,.no-js .section-container.accordion,.no-js .section-container.tabs,.no-js .section-container.vertical-tabs,.no-js .section-container.vertical-nav,.no-js .section-container.horizontal-nav{width:100%;display:block;margin-bottom:1.25em;border:1px solid #ccc;border-top:none}.no-js .section-container.auto>section,.no-js .section-container.auto>.section,.no-js .section-container.accordion>section,.no-js .section-container.accordion>.section,.no-js .section-container.tabs>section,.no-js .section-container.tabs>.section,.no-js .section-container.vertical-tabs>section,.no-js .section-container.vertical-tabs>.section,.no-js .section-container.vertical-nav>section,.no-js .section-container.vertical-nav>.section,.no-js .section-container.horizontal-nav>section,.no-js .section-container.horizontal-nav>.section{position:relative}.no-js .section-container.auto>section>.title,.no-js .section-container.auto>.section>.title,.no-js .section-container.accordion>section>.title,.no-js .section-container.accordion>.section>.title,.no-js .section-container.tabs>section>.title,.no-js .section-container.tabs>.section>.title,.no-js .section-container.vertical-tabs>section>.title,.no-js .section-container.vertical-tabs>.section>.title,.no-js .section-container.vertical-nav>section>.title,.no-js .section-container.vertical-nav>.section>.title,.no-js .section-container.horizontal-nav>section>.title,.no-js .section-container.horizontal-nav>.section>.title{background-color:#efefef;cursor:pointer;margin-bottom:0}.no-js .section-container.auto>section>.title a,.no-js .section-container.auto>.section>.title a,.no-js .section-container.accordion>section>.title a,.no-js .section-container.accordion>.section>.title a,.no-js .section-container.tabs>section>.title a,.no-js .section-container.tabs>.section>.title a,.no-js .section-container.vertical-tabs>section>.title a,.no-js .section-container.vertical-tabs>.section>.title a,.no-js .section-container.vertical-nav>section>.title a,.no-js .section-container.vertical-nav>.section>.title a,.no-js .section-container.horizontal-nav>section>.title a,.no-js .section-container.horizontal-nav>.section>.title a{padding:0.9375em;display:inline-block;color:#333;font-size:0.875em;white-space:nowrap}.no-js .section-container.auto>section>.title:hover,.no-js .section-container.auto>.section>.title:hover,.no-js .section-container.accordion>section>.title:hover,.no-js .section-container.accordion>.section>.title:hover,.no-js .section-container.tabs>section>.title:hover,.no-js .section-container.tabs>.section>.title:hover,.no-js .section-container.vertical-tabs>section>.title:hover,.no-js .section-container.vertical-tabs>.section>.title:hover,.no-js .section-container.vertical-nav>section>.title:hover,.no-js .section-container.vertical-nav>.section>.title:hover,.no-js .section-container.horizontal-nav>section>.title:hover,.no-js .section-container.horizontal-nav>.section>.title:hover{background-color:#e2e2e2}.no-js .section-container.auto>section .content,.no-js .section-container.auto>.section .content,.no-js .section-container.accordion>section .content,.no-js .section-container.accordion>.section .content,.no-js .section-container.tabs>section .content,.no-js .section-container.tabs>.section .content,.no-js .section-container.vertical-tabs>section .content,.no-js .section-container.vertical-tabs>.section .content,.no-js .section-container.vertical-nav>section .content,.no-js .section-container.vertical-nav>.section .content,.no-js .section-container.horizontal-nav>section .content,.no-js .section-container.horizontal-nav>.section .content{display:none;padding:0.9375em;background-color:#fff}.no-js .section-container.auto>section .content>*:last-child,.no-js .section-container.auto>.section .content>*:last-child,.no-js .section-container.accordion>section .content>*:last-child,.no-js .section-container.accordion>.section .content>*:last-child,.no-js .section-container.tabs>section .content>*:last-child,.no-js .section-container.tabs>.section .content>*:last-child,.no-js .section-container.vertical-tabs>section .content>*:last-child,.no-js .section-container.vertical-tabs>.section .content>*:last-child,.no-js .section-container.vertical-nav>section .content>*:last-child,.no-js .section-container.vertical-nav>.section .content>*:last-child,.no-js .section-container.horizontal-nav>section .content>*:last-child,.no-js .section-container.horizontal-nav>.section .content>*:last-child{margin-bottom:0}.no-js .section-container.auto>section .content>*:first-child,.no-js .section-container.auto>.section .content>*:first-child,.no-js .section-container.accordion>section .content>*:first-child,.no-js .section-container.accordion>.section .content>*:first-child,.no-js .section-container.tabs>section .content>*:first-child,.no-js .section-container.tabs>.section .content>*:first-child,.no-js .section-container.vertical-tabs>section .content>*:first-child,.no-js .section-container.vertical-tabs>.section .content>*:first-child,.no-js .section-container.vertical-nav>section .content>*:first-child,.no-js .section-container.vertical-nav>.section .content>*:first-child,.no-js .section-container.horizontal-nav>section .content>*:first-child,.no-js .section-container.horizontal-nav>.section .content>*:first-child{padding-top:0}.no-js .section-container.auto>section .content>*:last-child:not(.flex-video),.no-js .section-container.auto>.section .content>*:last-child:not(.flex-video),.no-js .section-container.accordion>section .content>*:last-child:not(.flex-video),.no-js .section-container.accordion>.section .content>*:last-child:not(.flex-video),.no-js .section-container.tabs>section .content>*:last-child:not(.flex-video),.no-js .section-container.tabs>.section .content>*:last-child:not(.flex-video),.no-js .section-container.vertical-tabs>section .content>*:last-child:not(.flex-video),.no-js .section-container.vertical-tabs>.section .content>*:last-child:not(.flex-video),.no-js .section-container.vertical-nav>section .content>*:last-child:not(.flex-video),.no-js .section-container.vertical-nav>.section .content>*:last-child:not(.flex-video),.no-js .section-container.horizontal-nav>section .content>*:last-child:not(.flex-video),.no-js .section-container.horizontal-nav>.section .content>*:last-child:not(.flex-video){padding-bottom:0}.no-js .section-container.auto>section.active>.content,.no-js .section-container.auto>.section.active>.content,.no-js .section-container.accordion>section.active>.content,.no-js .section-container.accordion>.section.active>.content,.no-js .section-container.tabs>section.active>.content,.no-js .section-container.tabs>.section.active>.content,.no-js .section-container.vertical-tabs>section.active>.content,.no-js .section-container.vertical-tabs>.section.active>.content,.no-js .section-container.vertical-nav>section.active>.content,.no-js .section-container.vertical-nav>.section.active>.content,.no-js .section-container.horizontal-nav>section.active>.content,.no-js .section-container.horizontal-nav>.section.active>.content{display:block}.no-js .section-container.auto>section.active>.title,.no-js .section-container.auto>.section.active>.title,.no-js .section-container.accordion>section.active>.title,.no-js .section-container.accordion>.section.active>.title,.no-js .section-container.tabs>section.active>.title,.no-js .section-container.tabs>.section.active>.title,.no-js .section-container.vertical-tabs>section.active>.title,.no-js .section-container.vertical-tabs>.section.active>.title,.no-js .section-container.vertical-nav>section.active>.title,.no-js .section-container.vertical-nav>.section.active>.title,.no-js .section-container.horizontal-nav>section.active>.title,.no-js .section-container.horizontal-nav>.section.active>.title{background:#d5d5d5}.no-js .section-container.auto>section.active>.title a,.no-js .section-container.auto>.section.active>.title a,.no-js .section-container.accordion>section.active>.title a,.no-js .section-container.accordion>.section.active>.title a,.no-js .section-container.tabs>section.active>.title a,.no-js .section-container.tabs>.section.active>.title a,.no-js .section-container.vertical-tabs>section.active>.title a,.no-js .section-container.vertical-tabs>.section.active>.title a,.no-js .section-container.vertical-nav>section.active>.title a,.no-js .section-container.vertical-nav>.section.active>.title a,.no-js .section-container.horizontal-nav>section.active>.title a,.no-js .section-container.horizontal-nav>.section.active>.title a{color:#333}.no-js .section-container.auto>section>.title,.no-js .section-container.auto>.section>.title,.no-js .section-container.accordion>section>.title,.no-js .section-container.accordion>.section>.title,.no-js .section-container.tabs>section>.title,.no-js .section-container.tabs>.section>.title,.no-js .section-container.vertical-tabs>section>.title,.no-js .section-container.vertical-tabs>.section>.title,.no-js .section-container.vertical-nav>section>.title,.no-js .section-container.vertical-nav>.section>.title,.no-js .section-container.horizontal-nav>section>.title,.no-js .section-container.horizontal-nav>.section>.title{top:0;width:100%;margin:0;border-top:solid 1px #ccc}.no-js .section-container.auto>section>.title a,.no-js .section-container.auto>.section>.title a,.no-js .section-container.accordion>section>.title a,.no-js .section-container.accordion>.section>.title a,.no-js .section-container.tabs>section>.title a,.no-js .section-container.tabs>.section>.title a,.no-js .section-container.vertical-tabs>section>.title a,.no-js .section-container.vertical-tabs>.section>.title a,.no-js .section-container.vertical-nav>section>.title a,.no-js .section-container.vertical-nav>.section>.title a,.no-js .section-container.horizontal-nav>section>.title a,.no-js .section-container.horizontal-nav>.section>.title a{width:100%}.no-js .section-container.auto>section .title,.no-js .section-container.auto>.section .title,.no-js .section-container.accordion>section .title,.no-js .section-container.accordion>.section .title,.no-js .section-container.tabs>section .title,.no-js .section-container.tabs>.section .title,.no-js .section-container.vertical-tabs>section .title,.no-js .section-container.vertical-tabs>.section .title,.no-js .section-container.vertical-nav>section .title,.no-js .section-container.vertical-nav>.section .title,.no-js .section-container.horizontal-nav>section .title,.no-js .section-container.horizontal-nav>.section .title{position:static;width:100%;border-left:0;border-right:0}.no-js .section-container.auto>section .content,.no-js .section-container.auto>.section .content,.no-js .section-container.accordion>section .content,.no-js .section-container.accordion>.section .content,.no-js .section-container.tabs>section .content,.no-js .section-container.tabs>.section .content,.no-js .section-container.vertical-tabs>section .content,.no-js .section-container.vertical-tabs>.section .content,.no-js .section-container.vertical-nav>section .content,.no-js .section-container.vertical-nav>.section .content,.no-js .section-container.horizontal-nav>section .content,.no-js .section-container.horizontal-nav>.section .content{position:static;display:block;width:100%;border-left:0;border-right:0;border-bottom:0}.contain-to-grid{width:100%;background:#111}.contain-to-grid .top-bar{margin-bottom:0}.fixed{width:100%;left:0;position:fixed;top:0;z-index:99}.top-bar{overflow:hidden;height:45px;line-height:45px;position:relative;background:#111;margin-bottom:1.875em}.top-bar ul{margin-bottom:0;list-style:none}.top-bar .row{max-width:none}.top-bar form,.top-bar input{margin-bottom:0}.top-bar input{height:2.45em}.top-bar .button{padding-top:.5em;padding-bottom:.5em;margin-bottom:0}.top-bar .title-area{position:relative;margin:0}.top-bar .name{height:45px;margin:0;font-size:16px}.top-bar .name h1{line-height:45px;font-size:1.0625em;margin:0}.top-bar .name h1 a{font-weight:bold;color:#fff;width:50%;display:block;padding:0 15px}.top-bar .toggle-topbar{position:absolute;right:0;top:0}.top-bar .toggle-topbar a{color:#fff;text-transform:uppercase;font-size:0.8125em;font-weight:bold;position:relative;display:block;padding:0 15px;height:45px;line-height:45px}.top-bar .toggle-topbar.menu-icon{right:15px;top:50%;margin-top:-16px;padding-left:40px}.top-bar .toggle-topbar.menu-icon a{text-indent:-48px;width:34px;height:34px;line-height:33px;padding:0;color:#fff}.top-bar .toggle-topbar.menu-icon a span{position:absolute;right:0;display:block;width:16px;height:0;-webkit-box-shadow:0 10px 0 1px #fff,0 16px 0 1px #fff,0 22px 0 1px #fff;box-shadow:0 10px 0 1px #fff,0 16px 0 1px #fff,0 22px 0 1px #fff}.top-bar.expanded{height:auto;background:transparent}.top-bar.expanded .title-area{background:#111}.top-bar.expanded .toggle-topbar a{color:#888}.top-bar.expanded .toggle-topbar a span{-webkit-box-shadow:0 10px 0 1px #888,0 16px 0 1px #888,0 22px 0 1px #888;box-shadow:0 10px 0 1px #888,0 16px 0 1px #888,0 22px 0 1px #888}.top-bar-section{left:0;position:relative;width:auto;-webkit-transition:left 300ms ease-out;-moz-transition:left 300ms ease-out;transition:left 300ms ease-out}.top-bar-section ul{width:100%;height:auto;display:block;background:#222;font-size:16px;margin:0}.top-bar-section .divider,.top-bar-section [role="separator"]{border-bottom:solid 1px #2b2b2b;border-top:solid 1px #000;clear:both;height:1px;width:100%}.top-bar-section ul li>a{display:block;width:100%;color:#fff;padding:12px 0 12px 0;padding-left:15px;font-size:0.8125em;font-weight:bold;background:#222}.top-bar-section ul li>a.hover{background:#090909;color:#fff}.top-bar-section ul li>a.button{background:#2ba6cb;font-size:0.8125em}.top-bar-section ul li>a.button.hover{background:#2284a1}.top-bar-section ul li>a.button.secondary{background:#e9e9e9}.top-bar-section ul li>a.button.secondary.hover{background:#d0d0d0}.top-bar-section ul li>a.button.success{background:#5da423}.top-bar-section ul li>a.button.success.hover{background:#457a1a}.top-bar-section ul li>a.button.alert{background:#c60f13}.top-bar-section ul li>a.button.alert.hover{background:#970b0e}.top-bar-section ul li.active>a{background:#090909;color:#fff}.top-bar-section .has-form{padding:15px}.top-bar-section .has-dropdown{position:relative}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:transparent transparent transparent rgba(255,255,255,0.5);border-left-style:solid;margin-right:15px;margin-top:-4.5px;position:absolute;top:50%;right:0}.top-bar-section .has-dropdown.moved{position:static}.top-bar-section .has-dropdown.moved>.dropdown{visibility:visible}.top-bar-section .dropdown{position:absolute;left:100%;top:0;visibility:hidden;z-index:99}.top-bar-section .dropdown li{width:100%;height:auto}.top-bar-section .dropdown li a{font-weight:normal;padding:8px 15px}.top-bar-section .dropdown li.title h5{margin-bottom:0}.top-bar-section .dropdown li.title h5 a{color:#fff;line-height:22.5px;display:block}.top-bar-section .dropdown label{padding:8px 15px 2px;margin-bottom:0;text-transform:uppercase;color:#555;font-weight:bold;font-size:0.625em}.top-bar-js-breakpoint{width:58.75em !important;visibility:hidden}.js-generated{display:block}@media only screen and (min-width: 58.75em){.top-bar{background:#111;*zoom:1;overflow:visible}.top-bar:before,.top-bar:after{content:" ";display:table}.top-bar:after{clear:both}.top-bar .toggle-topbar{display:none}.top-bar .title-area{float:left}.top-bar .name h1 a{width:auto}.top-bar input,.top-bar .button{line-height:2em;font-size:0.875em;height:2em;padding:0 10px;position:relative;top:8px}.top-bar.expanded{background:#111}.contain-to-grid .top-bar{max-width:62.5em;margin:0 auto}.top-bar-section{-webkit-transition:none 0 0;-moz-transition:none 0 0;transition:none 0 0;left:0 !important}.top-bar-section ul{width:auto;height:auto !important;display:inline}.top-bar-section ul li{float:left}.top-bar-section ul li .js-generated{display:none}.top-bar-section li a:not(.button){padding:0 15px;line-height:45px;background:#111}.top-bar-section li a:not(.button).hover{background:#000}.top-bar-section .has-dropdown>a{padding-right:35px !important}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:rgba(255,255,255,0.5) transparent transparent transparent;border-top-style:solid;margin-top:-2.5px;top:22.5px}.top-bar-section .has-dropdown.moved{position:relative}.top-bar-section .has-dropdown.moved>.dropdown{visibility:hidden}.top-bar-section .has-dropdown.hover>.dropdown{visibility:visible}.top-bar-section .has-dropdown .dropdown li.has-dropdown>a:after{border:none;content:"\00bb";margin-top:-16px;right:5px}.top-bar-section .dropdown{left:0;top:auto;background:transparent;min-width:100%}.top-bar-section .dropdown li a{color:#fff;line-height:1;white-space:nowrap;padding:7px 15px;background:#1e1e1e}.top-bar-section .dropdown li label{white-space:nowrap;background:#1e1e1e}.top-bar-section .dropdown li .dropdown{left:100%;top:0}.top-bar-section>ul>.divider,.top-bar-section>ul>[role="separator"]{border-bottom:none;border-top:none;border-right:solid 1px #2b2b2b;border-left:solid 1px #000;clear:none;height:45px;width:0px}.top-bar-section .has-form{background:#111;padding:0 15px;height:45px}.top-bar-section ul.right li .dropdown{left:auto;right:0}.top-bar-section ul.right li .dropdown li .dropdown{right:100%}}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@-moz-keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@-o-keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.slideshow-wrapper{position:relative}.slideshow-wrapper ul{list-style-type:none;margin:0}.slideshow-wrapper ul li,.slideshow-wrapper ul li .orbit-caption{display:none}.slideshow-wrapper ul li:first-child{display:block}.slideshow-wrapper .orbit-container{background-color:transparent}.slideshow-wrapper .orbit-container li{display:block}.slideshow-wrapper .orbit-container li .orbit-caption{display:block}.preloader{display:block;width:40px;height:40px;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px;border:solid 3px;border-color:#555 #fff;-webkit-border-radius:1000px;border-radius:1000px;-webkit-animation-name:rotate;-webkit-animation-duration:1.5s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-moz-animation-name:rotate;-moz-animation-duration:1.5s;-moz-animation-iteration-count:infinite;-moz-animation-timing-function:linear;-o-animation-name:rotate;-o-animation-duration:1.5s;-o-animation-iteration-count:infinite;-o-animation-timing-function:linear;animation-name:rotate;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}.orbit-container{overflow:hidden;width:100%;position:relative;background:#f5f5f5}.orbit-container .orbit-slides-container{list-style:none;margin:0;padding:0;position:relative}.orbit-container .orbit-slides-container img{display:block}.orbit-container .orbit-slides-container>*{position:relative;float:left;height:auto}.orbit-container .orbit-slides-container>* .orbit-caption{position:absolute;bottom:0;background-color:#000;background-color:rgba(0,0,0,0.6);color:#fff;width:100%;padding:10px 14px;font-size:0.875em}.orbit-container .orbit-slide-number{position:absolute;top:10px;left:10px;font-size:12px;color:#fff;background:rgba(0,0,0,0)}.orbit-container .orbit-slide-number span{font-weight:700;padding:0.3125em}.orbit-container .orbit-timer{position:absolute;top:10px;right:10px;height:6px;width:100px}.orbit-container .orbit-timer .orbit-progress{height:100%;background-color:#000;background-color:rgba(0,0,0,0.6);display:block;width:0%}.orbit-container .orbit-timer>span{display:none;position:absolute;top:10px;right:0px;width:11px;height:14px;border:solid 4px #000;border-top:none;border-bottom:none}.orbit-container .orbit-timer.paused>span{right:-6px;top:9px;width:11px;height:14px;border:inset 8px;border-right-style:solid;border-color:transparent transparent transparent #000}.orbit-container:hover .orbit-timer>span{display:block}.orbit-container .orbit-prev,.orbit-container .orbit-next{position:absolute;top:50%;margin-top:-25px;background-color:#000;background-color:rgba(0,0,0,0.6);width:50px;height:60px;line-height:50px;color:white;text-indent:-9999px !important}.orbit-container .orbit-prev>span,.orbit-container .orbit-next>span{position:absolute;top:50%;margin-top:-16px;display:block;width:0;height:0;border:inset 16px}.orbit-container .orbit-prev{left:0}.orbit-container .orbit-prev>span{border-right-style:solid;border-color:transparent;border-right-color:#fff}.orbit-container .orbit-prev:hover>span{border-right-color:#ccc}.orbit-container .orbit-next{right:0}.orbit-container .orbit-next>span{border-color:transparent;border-left-style:solid;border-left-color:#fff;left:50%;margin-left:-8px}.orbit-container .orbit-next:hover>span{border-left-color:#ccc}.orbit-bullets{margin:0 auto 30px auto;overflow:hidden;position:relative;top:10px}.orbit-bullets li{display:block;width:18px;height:18px;background:#999;float:left;margin-right:6px;border:solid 2px #222;-webkit-border-radius:1000px;border-radius:1000px}.orbit-bullets li.active{background:#222}.orbit-bullets li:last-child{margin-right:0}.touch .orbit-container .orbit-prev,.touch .orbit-container .orbit-next{display:none}.touch .orbit-bullets{display:none}@media only screen and (min-width: 768px){.touch .orbit-container .orbit-prev,.touch .orbit-container .orbit-next{display:inherit}.touch .orbit-bullets{display:block}}.reveal-modal-bg{position:fixed;height:100%;width:100%;background:#000;background:rgba(0,0,0,0.45);z-index:98;display:none;top:0;left:0}.reveal-modal{visibility:hidden;display:none;position:absolute;left:50%;z-index:99;height:auto;margin-left:-40%;width:80%;background-color:#fff;padding:1.25em;border:solid 1px #666;-webkit-box-shadow:0 0 10px rgba(0,0,0,0.4);box-shadow:0 0 10px rgba(0,0,0,0.4);top:50px}.reveal-modal .column,.reveal-modal .columns{min-width:0}.reveal-modal>:first-child{margin-top:0}.reveal-modal>:last-child{margin-bottom:0}.reveal-modal .close-reveal-modal{font-size:1.375em;line-height:1;position:absolute;top:0.5em;right:0.6875em;color:#aaa;font-weight:bold;cursor:pointer}@media only screen and (min-width: 768px){.reveal-modal{padding:1.875em;top:6.25em}.reveal-modal.tiny{margin-left:-15%;width:30%}.reveal-modal.small{margin-left:-20%;width:40%}.reveal-modal.medium{margin-left:-30%;width:60%}.reveal-modal.large{margin-left:-35%;width:70%}.reveal-modal.xlarge{margin-left:-47.5%;width:95%}}@media print{.reveal-modal{background:#fff !important}}.joyride-list{display:none}.joyride-tip-guide{display:none;position:absolute;background:#000;color:#fff;z-index:101;top:0;left:2.5%;font-family:inherit;font-weight:normal;width:95%}.lt-ie9 .joyride-tip-guide{max-width:800px;left:50%;margin-left:-400px}.joyride-content-wrapper{width:100%;padding:1.125em 1.25em 1.5em}.joyride-content-wrapper .button{margin-bottom:0 !important}.joyride-tip-guide .joyride-nub{display:block;position:absolute;left:22px;width:0;height:0;border:inset 14px}.joyride-tip-guide .joyride-nub.top{border-top-style:solid;border-color:#000;border-top-color:transparent !important;border-left-color:transparent !important;border-right-color:transparent !important;top:-28px}.joyride-tip-guide .joyride-nub.bottom{border-bottom-style:solid;border-color:#000 !important;border-bottom-color:transparent !important;border-left-color:transparent !important;border-right-color:transparent !important;bottom:-28px}.joyride-tip-guide .joyride-nub.right{right:-28px}.joyride-tip-guide .joyride-nub.left{left:-28px}.joyride-tip-guide h1,.joyride-tip-guide h2,.joyride-tip-guide h3,.joyride-tip-guide h4,.joyride-tip-guide h5,.joyride-tip-guide h6{line-height:1.25;margin:0;font-weight:bold;color:#fff}.joyride-tip-guide p{margin:0 0 1.125em 0;font-size:0.875em;line-height:1.3}.joyride-timer-indicator-wrap{width:50px;height:3px;border:solid 1px #555;position:absolute;right:1.0625em;bottom:1em}.joyride-timer-indicator{display:block;width:0;height:inherit;background:#666}.joyride-close-tip{position:absolute;right:12px;top:10px;color:#777 !important;text-decoration:none;font-size:30px;font-weight:normal;line-height:0.5 !important}.joyride-close-tip:hover,.joyride-close-tip:focus{color:#eee !important}.joyride-modal-bg{position:fixed;height:100%;width:100%;background:transparent;background:rgba(0,0,0,0.5);z-index:100;display:none;top:0;left:0;cursor:pointer}.joyride-expose-wrapper{background-color:#ffffff;position:absolute;border-radius:3px;z-index:102;-moz-box-shadow:0px 0px 30px #fff;-webkit-box-shadow:0px 0px 15px #fff;box-shadow:0px 0px 15px #fff}.joyride-expose-cover{background:transparent;border-radius:3px;position:absolute;z-index:9999;top:0px;left:0px}@media only screen and (min-width: 768px){.joyride-tip-guide{width:300px;left:inherit}.joyride-tip-guide .joyride-nub.bottom{border-color:#000 !important;border-bottom-color:transparent !important;border-left-color:transparent !important;border-right-color:transparent !important;bottom:-28px}.joyride-tip-guide .joyride-nub.right{border-color:#000 !important;border-top-color:transparent !important;border-right-color:transparent !important;border-bottom-color:transparent !important;top:22px;left:auto;right:-28px}.joyride-tip-guide .joyride-nub.left{border-color:#000 !important;border-top-color:transparent !important;border-left-color:transparent !important;border-bottom-color:transparent !important;top:22px;left:-28px;right:auto}}[data-clearing]{*zoom:1;margin-bottom:0;margin-left:0;list-style:none}[data-clearing]:before,[data-clearing]:after{content:" ";display:table}[data-clearing]:after{clear:both}[data-clearing] li{float:left;margin-right:10px}.clearing-blackout{background:#111;position:fixed;width:100%;height:100%;top:0;left:0;z-index:998}.clearing-blackout .clearing-close{display:block}.clearing-container{position:relative;z-index:998;height:100%;overflow:hidden;margin:0}.visible-img{height:95%;position:relative}.visible-img img{position:absolute;left:50%;top:50%;margin-left:-50%;max-height:100%;max-width:100%}.clearing-caption{color:#fff;line-height:1.3;margin-bottom:0;text-align:center;bottom:0;background:#111;width:100%;padding:10px 30px;position:absolute;left:0}.clearing-close{z-index:999;padding-left:20px;padding-top:10px;font-size:40px;line-height:1;color:#fff;display:none}.clearing-close:hover,.clearing-close:focus{color:#ccc}.clearing-assembled .clearing-container{height:100%}.clearing-assembled .clearing-container .carousel>ul{display:none}.clearing-feature li{display:none}.clearing-feature li.clearing-featured-img{display:block}@media only screen and (min-width: 768px){.clearing-main-prev,.clearing-main-next{position:absolute;height:100%;width:40px;top:0}.clearing-main-prev>span,.clearing-main-next>span{position:absolute;top:50%;display:block;width:0;height:0;border:solid 16px}.clearing-main-prev{left:0}.clearing-main-prev>span{left:5px;border-color:transparent;border-right-color:#fff}.clearing-main-next{right:0}.clearing-main-next>span{border-color:transparent;border-left-color:#fff}.clearing-main-prev.disabled,.clearing-main-next.disabled{opacity:0.5}.clearing-assembled .clearing-container .carousel{background:#111;height:150px;margin-top:5px}.clearing-assembled .clearing-container .carousel>ul{display:block;z-index:999;width:200%;height:100%;margin-left:0;position:relative;left:0}.clearing-assembled .clearing-container .carousel>ul li{display:block;width:175px;height:inherit;padding:0;float:left;overflow:hidden;margin-right:1px;position:relative;cursor:pointer;opacity:0.4}.clearing-assembled .clearing-container .carousel>ul li.fix-height img{min-height:100%;height:100%;max-width:none}.clearing-assembled .clearing-container .carousel>ul li a.th{border:none;-webkit-box-shadow:none;box-shadow:none;display:block}.clearing-assembled .clearing-container .carousel>ul li img{cursor:pointer !important;min-width:100% !important}.clearing-assembled .clearing-container .carousel>ul li.visible{opacity:1}.clearing-assembled .clearing-container .visible-img{background:#111;overflow:hidden;height:75%}.clearing-close{position:absolute;top:10px;right:20px;padding-left:0;padding-top:0}}.alert-box{border-style:solid;border-width:1px;display:block;font-weight:bold;margin-bottom:1.25em;position:relative;padding:0.6875em 1.3125em 0.75em 0.6875em;font-size:0.875em;background-color:#2ba6cb;border-color:#2284a1;color:#fff}.alert-box .close{font-size:1.375em;padding:5px 4px 4px;line-height:0;position:absolute;top:0.4375em;right:0.3125em;color:#333;opacity:0.3}.alert-box .close:hover,.alert-box .close:focus{opacity:0.5}.alert-box.radius{-webkit-border-radius:3px;border-radius:3px}.alert-box.round{-webkit-border-radius:1000px;border-radius:1000px}.alert-box.success{background-color:#5da423;border-color:#457a1a;color:#fff}.alert-box.alert{background-color:#c60f13;border-color:#970b0e;color:#fff}.alert-box.secondary{background-color:#e9e9e9;border-color:#d0d0d0;color:#505050}.breadcrumbs{display:block;padding:0.5625em 0.875em 0.5625em;overflow:hidden;margin-left:0;list-style:none;border-style:solid;border-width:1px;background-color:#f6f6f6;border-color:#dcdcdc;-webkit-border-radius:3px;border-radius:3px}.breadcrumbs>*{margin:0;float:left;font-size:0.6875em;text-transform:uppercase;color:#2ba6cb}.breadcrumbs>*:hover a,.breadcrumbs>*:focus a{text-decoration:underline}.breadcrumbs>* a,.breadcrumbs>* span{text-transform:uppercase;color:#2ba6cb}.breadcrumbs>*.current{cursor:default;color:#333}.breadcrumbs>*.current a{cursor:default;color:#333}.breadcrumbs>*.current:hover,.breadcrumbs>*.current:hover a,.breadcrumbs>*.current:focus,.breadcrumbs>*.current:focus a{text-decoration:none}.breadcrumbs>*.unavailable{color:#999}.breadcrumbs>*.unavailable a{color:#999}.breadcrumbs>*.unavailable:hover,.breadcrumbs>*.unavailable:hover a,.breadcrumbs>*.unavailable:focus,.breadcrumbs>*.unavailable a:focus{text-decoration:none;color:#999;cursor:default}.breadcrumbs>*:before{content:"/";color:#aaa;margin:0 0.75em;position:relative;top:1px}.breadcrumbs>*:first-child:before{content:" ";margin:0}.keystroke,kbd{background-color:#ededed;border-color:#dbdbdb;color:#222;border-style:solid;border-width:1px;margin:0;font-family:"Consolas","Menlo","Courier",monospace;font-size:0.875em;padding:0.125em 0.25em 0em;-webkit-border-radius:3px;border-radius:3px}.label{font-weight:bold;text-align:center;text-decoration:none;line-height:1;white-space:nowrap;display:inline-block;position:relative;padding:0.1875em 0.625em 0.25em;font-size:0.875em;background-color:#2ba6cb;color:#fff}.label.radius{-webkit-border-radius:3px;border-radius:3px}.label.round{-webkit-border-radius:1000px;border-radius:1000px}.label.alert{background-color:#c60f13;color:#fff}.label.success{background-color:#5da423;color:#fff}.label.secondary{background-color:#e9e9e9;color:#333}.inline-list{margin:0 auto 1.0625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden}.inline-list>li{list-style:none;float:left;margin-left:1.375em;display:block}.inline-list>li>*{display:block}.pagination{display:block;height:1.5em;margin-left:-0.3125em}.pagination li{display:block;float:left;height:1.5em;color:#222;font-size:0.875em;margin-left:0.3125em}.pagination li a{display:block;padding:0.0625em 0.4375em 0.0625em;color:#999}.pagination li:hover a,.pagination li a:focus{background:#e6e6e6}.pagination li.unavailable a{cursor:default;color:#999}.pagination li.unavailable:hover a,.pagination li.unavailable a:focus{background:transparent}.pagination li.current a{background:#2ba6cb;color:#fff;font-weight:bold;cursor:default}.pagination li.current a:hover,.pagination li.current a:focus{background:#2ba6cb}.pagination-centered{text-align:center}.pagination-centered ul>li{float:none;display:inline-block}.panel{border-style:solid;border-width:1px;border-color:#d9d9d9;margin-bottom:1.25em;padding:1.25em;background:#f2f2f2}.panel>:first-child{margin-top:0}.panel>:last-child{margin-bottom:0}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6,.panel p{color:#333}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6{line-height:1;margin-bottom:0.625em}.panel h1.subheader,.panel h2.subheader,.panel h3.subheader,.panel h4.subheader,.panel h5.subheader,.panel h6.subheader{line-height:1.4}.panel.callout{border-style:solid;border-width:1px;border-color:#2284a1;margin-bottom:1.25em;padding:1.25em;background:#2ba6cb;-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.5) inset;box-shadow:0 1px 0 rgba(255,255,255,0.5) inset}.panel.callout>:first-child{margin-top:0}.panel.callout>:last-child{margin-bottom:0}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6,.panel.callout p{color:#fff}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6{line-height:1;margin-bottom:0.625em}.panel.callout h1.subheader,.panel.callout h2.subheader,.panel.callout h3.subheader,.panel.callout h4.subheader,.panel.callout h5.subheader,.panel.callout h6.subheader{line-height:1.4}.panel.radius{-webkit-border-radius:3px;border-radius:3px}.pricing-table{border:solid 1px #ddd;margin-left:0;margin-bottom:1.25em}.pricing-table *{list-style:none;line-height:1}.pricing-table .title{background-color:#ddd;padding:0.9375em 1.25em;text-align:center;color:#333;font-weight:bold;font-size:1em}.pricing-table .price{background-color:#eee;padding:0.9375em 1.25em;text-align:center;color:#333;font-weight:normal;font-size:1.25em}.pricing-table .description{background-color:#fff;padding:0.9375em;text-align:center;color:#777;font-size:0.75em;font-weight:normal;line-height:1.4;border-bottom:dotted 1px #ddd}.pricing-table .bullet-item{background-color:#fff;padding:0.9375em;text-align:center;color:#333;font-size:0.875em;font-weight:normal;border-bottom:dotted 1px #ddd}.pricing-table .cta-button{background-color:#f5f5f5;text-align:center;padding:1.25em 1.25em 0}.progress{background-color:transparent;height:1.5625em;border:1px solid #ccc;padding:0.125em;margin-bottom:0.625em}.progress .meter{background:#2ba6cb;height:100%;display:block}.progress.secondary .meter{background:#e9e9e9;height:100%;display:block}.progress.success .meter{background:#5da423;height:100%;display:block}.progress.alert .meter{background:#c60f13;height:100%;display:block}.progress.radius{-webkit-border-radius:3px;border-radius:3px}.progress.radius .meter{-webkit-border-radius:2px;border-radius:2px}.progress.round{-webkit-border-radius:1000px;border-radius:1000px}.progress.round .meter{-webkit-border-radius:999px;border-radius:999px}.side-nav{display:block;margin:0;padding:0.875em 0;list-style-type:none;list-style-position:inside}.side-nav li{margin:0 0 0.4375em 0;font-size:0.875em}.side-nav li a{display:block;color:#2ba6cb}.side-nav li.active>a:first-child{color:#4d4d4d;font-weight:bold}.side-nav li.divider{border-top:1px solid;height:0;padding:0;list-style:none;border-top-color:#e6e6e6}.sub-nav{display:block;width:auto;overflow:hidden;margin:-0.25em 0 1.125em;padding-top:0.25em;margin-right:0;margin-left:-0.5625em}.sub-nav dt,.sub-nav dd{float:left;display:inline;margin-left:0.5625em;margin-bottom:0.625em;font-weight:normal;font-size:0.875em}.sub-nav dt a,.sub-nav dd a{color:#999;text-decoration:none}.sub-nav dt.active a,.sub-nav dd.active a{-webkit-border-radius:1000px;border-radius:1000px;font-weight:bold;background:#2ba6cb;padding:0.1875em 0.5625em;cursor:default;color:#fff}@media only screen{div.switch{position:relative;width:100%;padding:0;display:block;overflow:hidden;border-style:solid;border-width:1px;margin-bottom:1.25em;-webkit-animation:webkitSiblingBugfix infinite 1s;height:36px;background:#fff;border-color:#ccc}div.switch label{position:relative;left:0;z-index:2;float:left;width:50%;height:100%;margin:0;font-weight:bold;text-align:left;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;transition:all 0.1s ease-out}div.switch input{position:absolute;z-index:3;opacity:0;width:100%;height:100%;-moz-appearance:none}div.switch input:hover,div.switch input:focus{cursor:pointer}div.switch>span{position:absolute;top:-1px;left:-1px;z-index:1;display:block;padding:0;border-width:1px;border-style:solid;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;transition:all 0.1s ease-out}div.switch input:not(:checked)+label{opacity:0}div.switch input:checked{display:none !important}div.switch input{left:0;display:block !important}div.switch input:first-of-type+label,div.switch input:first-of-type+span+label{left:-50%}div.switch input:first-of-type:checked+label,div.switch input:first-of-type:checked+span+label{left:0%}div.switch input:last-of-type+label,div.switch input:last-of-type+span+label{right:-50%;left:auto;text-align:right}div.switch input:last-of-type:checked+label,div.switch input:last-of-type:checked+span+label{right:0%;left:auto}div.switch span.custom{display:none !important}div.switch label{padding:0 0.375em;line-height:2.3em;font-size:0.875em}div.switch input:first-of-type:checked ~ span{left:100%;margin-left:-2.1875em}div.switch>span{width:2.25em;height:2.25em}div.switch>span{border-color:#b3b3b3;background:#fff;background:-moz-linear-gradient(top, #fff 0%, #f2f2f2 100%);background:-webkit-linear-gradient(top, #fff 0%, #f2f2f2 100%);background:linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);-webkit-box-shadow:2px 0 10px 0 rgba(0,0,0,0.07),1000px 0 0 1000px #e1f5d1,-2px 0 10px 0 rgba(0,0,0,0.07),-1000px 0 0 1000px #f5f5f5;box-shadow:2px 0 10px 0 rgba(0,0,0,0.07),1000px 0 0 980px #e1f5d1,-2px 0 10px 0 rgba(0,0,0,0.07),-1000px 0 0 1000px #f5f5f5}div.switch:hover>span,div.switch:focus>span{background:#fff;background:-moz-linear-gradient(top, #fff 0%, #e6e6e6 100%);background:-webkit-linear-gradient(top, #fff 0%, #e6e6e6 100%);background:linear-gradient(to bottom, #fff 0%, #e6e6e6 100%)}div.switch:active{background:transparent}div.switch.large{height:44px}div.switch.large label{padding:0 0.375em;line-height:2.3em;font-size:1.0625em}div.switch.large input:first-of-type:checked ~ span{left:100%;margin-left:-2.6875em}div.switch.large>span{width:2.75em;height:2.75em}div.switch.small{height:28px}div.switch.small label{padding:0 0.375em;line-height:2.1em;font-size:0.75em}div.switch.small input:first-of-type:checked ~ span{left:100%;margin-left:-1.6875em}div.switch.small>span{width:1.75em;height:1.75em}div.switch.tiny{height:22px}div.switch.tiny label{padding:0 0.375em;line-height:1.9em;font-size:0.6875em}div.switch.tiny input:first-of-type:checked ~ span{left:100%;margin-left:-1.3125em}div.switch.tiny>span{width:1.375em;height:1.375em}div.switch.radius{-webkit-border-radius:4px;border-radius:4px}div.switch.radius>span{-webkit-border-radius:3px;border-radius:3px}div.switch.round{-webkit-border-radius:1000px;border-radius:1000px}div.switch.round>span{-webkit-border-radius:999px;border-radius:999px}div.switch.round label{padding:0 0.5625em}@-webkit-keyframes webkitSiblingBugfix{from{position:relative}to{position:relative}}}[data-magellan-expedition]{background:#fff;z-index:50;min-width:100%;padding:10px}[data-magellan-expedition] .sub-nav{margin-bottom:0}[data-magellan-expedition] .sub-nav dd{margin-bottom:0}table{background:#fff;margin-bottom:1.25em;border:solid 1px #ddd}table thead,table tfoot{background:#f5f5f5;font-weight:bold}table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:0.5em 0.625em 0.625em;font-size:0.875em;color:#222;text-align:left}table tr th,table tr td{padding:0.5625em 0.625em;font-size:0.875em;color:#222}table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f9f9f9}table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.125em}.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,0.2);box-shadow:0 0 0 1px rgba(0,0,0,0.2);-webkit-transition:all 200ms ease-out;-moz-transition:all 200ms ease-out;transition:all 200ms ease-out}.th:hover,.th:focus{-webkit-box-shadow:0 0 6px 1px rgba(43,166,203,0.5);box-shadow:0 0 6px 1px rgba(43,166,203,0.5)}.th.radius{-webkit-border-radius:3px;border-radius:3px}a.th{display:inline-block}.has-tip{border-bottom:dotted 1px #ccc;cursor:help;font-weight:bold;color:#333}.has-tip:hover,.has-tip:focus{border-bottom:dotted 1px #196177;color:#2ba6cb}.has-tip.tip-left,.has-tip.tip-right{float:none !important}.tooltip{display:none;position:absolute;z-index:999;font-weight:bold;font-size:0.9375em;line-height:1.3;padding:0.5em;max-width:85%;left:50%;width:100%;color:#fff;background:#000;-webkit-border-radius:3px;border-radius:3px}.tooltip>.nub{display:block;left:5px;position:absolute;width:0;height:0;border:solid 5px;border-color:transparent transparent #000 transparent;top:-10px}.tooltip.opened{color:#2ba6cb !important;border-bottom:dotted 1px #196177 !important}.tap-to-close{display:block;font-size:0.625em;color:#888;font-weight:normal}@media only screen and (min-width: 768px){.tooltip>.nub{border-color:transparent transparent #000 transparent;top:-10px}.tooltip.tip-top>.nub{border-color:#000 transparent transparent transparent;top:auto;bottom:-10px}.tooltip.tip-left,.tooltip.tip-right{float:none !important}.tooltip.tip-left>.nub{border-color:transparent transparent transparent #000;right:-10px;left:auto;top:50%;margin-top:-5px}.tooltip.tip-right>.nub{border-color:transparent #000 transparent transparent;right:auto;left:-10px;top:50%;margin-top:-5px}}@media only screen and (max-width: 767px){.f-dropdown{max-width:100%;left:0}}.f-dropdown{position:absolute;top:-9999px;list-style:none;margin-left:0;width:100%;max-height:none;height:auto;background:#fff;border:solid 1px #ccc;font-size:16px;z-index:99;margin-top:2px;max-width:200px}.f-dropdown>*:first-child{margin-top:0}.f-dropdown>*:last-child{margin-bottom:0}.f-dropdown:before{content:"";display:block;width:0;height:0;border:inset 6px;border-color:transparent transparent #fff transparent;border-bottom-style:solid;position:absolute;top:-12px;left:10px;z-index:99}.f-dropdown:after{content:"";display:block;width:0;height:0;border:inset 7px;border-color:transparent transparent #ccc transparent;border-bottom-style:solid;position:absolute;top:-14px;left:9px;z-index:98}.f-dropdown.right:before{left:auto;right:10px}.f-dropdown.right:after{left:auto;right:9px}.f-dropdown li{font-size:0.875em;cursor:pointer;line-height:1.125em;margin:0}.f-dropdown li:hover,.f-dropdown li:focus{background:#eee}.f-dropdown li a{display:block;padding:0.3125em 0.625em;color:#555}.f-dropdown.content{position:absolute;top:-9999px;list-style:none;margin-left:0;padding:1.25em;width:100%;height:auto;max-height:none;background:#fff;border:solid 1px #ccc;font-size:16px;z-index:99;max-width:200px}.f-dropdown.content>*:first-child{margin-top:0}.f-dropdown.content>*:last-child{margin-bottom:0}.f-dropdown.tiny{max-width:200px}.f-dropdown.small{max-width:300px}.f-dropdown.medium{max-width:500px}.f-dropdown.large{max-width:800px}
0 /**
1 * GitHub theme
2 *
3 * @author Craig Campbell
4 * @version 1.0.4
5 */
6 pre {
7 border: 1px solid #ccc;
8 word-wrap: break-word;
9 padding: 6px 10px;
10 line-height: 19px;
11 margin-bottom: 20px;
12 }
13
14 code {
15 border: 1px solid #eaeaea;
16 margin: 0px 2px;
17 padding: 0px 5px;
18 font-size: 12px;
19 }
20
21 pre code {
22 border: 0px;
23 padding: 0px;
24 margin: 0px;
25 -moz-border-radius: 0px;
26 -webkit-border-radius: 0px;
27 border-radius: 0px;
28 }
29
30 pre, code {
31 font-family: Consolas, 'Liberation Mono', Courier, monospace;
32 color: #333;
33 background: #f8f8f8;
34 -moz-border-radius: 3px;
35 -webkit-border-radius: 3px;
36 border-radius: 3px;
37 }
38
39 pre, pre code {
40 font-size: 13px;
41 }
42
43 pre .comment {
44 color: #998;
45 }
46
47 pre .support {
48 color: #0086B3;
49 }
50
51 pre .tag, pre .tag-name {
52 color: navy;
53 }
54
55 pre .keyword, pre .css-property, pre .vendor-prefix, pre .sass, pre .class, pre .id, pre .css-value, pre .entity.function, pre .storage.function {
56 font-weight: bold;
57 }
58
59 pre .css-property, pre .css-value, pre .vendor-prefix, pre .support.namespace {
60 color: #333;
61 }
62
63 pre .constant.numeric, pre .keyword.unit, pre .hex-color {
64 font-weight: normal;
65 color: #099;
66 }
67
68 pre .entity.class {
69 color: #458;
70 }
71
72 pre .entity.id, pre .entity.function {
73 color: #900;
74 }
75
76 pre .attribute, pre .variable {
77 color: teal;
78 }
79
80 pre .string, pre .support.value {
81 font-weight: normal;
82 color: #d14;
83 }
84
85 pre .regexp {
86 color: #009926;
87 }
0 // A modified version of https://raw.githubusercontent.com/richleland/pygments-css/master/monokai.css
1
2 .highlighter-rouge {
3 background-color: #272822;
4 }
5
6 .highlight {
7 background: #272822;
8 padding: 1em;
9 font-size: 0.9em;
10 overflow: auto;
11 line-height: 150%;
12 overflow-y: auto;
13 overflow-x: scroll;
14 }
15
16 .highlight code {
17 font-family: Consolas, "Liberation Mono", Courier, monospace;
18 font-weight: bold;
19 color: #FFFFFF;
20 }
21
22 .highlight .hll { background-color: #49483e }
23 .highlight .c { color: #75715e } /* Comment */
24 .highlight .err { color: #960050; background-color: #1e0010 } /* Error */
25 .highlight .k { color: #66d9ef } /* Keyword */
26 .highlight .l { color: #ae81ff } /* Literal */
27 .highlight .n { color: #f8f8f2 } /* Name */
28 .highlight .o { color: #f92672 } /* Operator */
29 .highlight .p { color: #f8f8f2 } /* Punctuation */
30 .highlight .cm { color: #75715e } /* Comment.Multiline */
31 .highlight .cp { color: #75715e } /* Comment.Preproc */
32 .highlight .c1 { color: #75715e } /* Comment.Single */
33 .highlight .cs { color: #75715e } /* Comment.Special */
34 .highlight .ge { font-style: italic } /* Generic.Emph */
35 .highlight .gs { font-weight: bold } /* Generic.Strong */
36 .highlight .kc { color: #66d9ef } /* Keyword.Constant */
37 .highlight .kd { color: #66d9ef } /* Keyword.Declaration */
38 .highlight .kn { color: #f92672 } /* Keyword.Namespace */
39 .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
40 .highlight .kr { color: #66d9ef } /* Keyword.Reserved */
41 .highlight .kt { color: #66d9ef } /* Keyword.Type */
42 .highlight .ld { color: #e6db74 } /* Literal.Date */
43 .highlight .m { color: #ae81ff } /* Literal.Number */
44 .highlight .s { color: #e6db74 } /* Literal.String */
45 .highlight .na { color: #a6e22e } /* Name.Attribute */
46 .highlight .nb { color: #f8f8f2 } /* Name.Builtin */
47 .highlight .nc { color: #a6e22e } /* Name.Class */
48 .highlight .no { color: #66d9ef } /* Name.Constant */
49 .highlight .nd { color: #a6e22e } /* Name.Decorator */
50 .highlight .ni { color: #f8f8f2 } /* Name.Entity */
51 .highlight .ne { color: #a6e22e } /* Name.Exception */
52 .highlight .nf { color: #a6e22e } /* Name.Function */
53 .highlight .nl { color: #f8f8f2 } /* Name.Label */
54 .highlight .nn { color: #f8f8f2 } /* Name.Namespace */
55 .highlight .nx { color: #a6e22e } /* Name.Other */
56 .highlight .py { color: #f8f8f2 } /* Name.Property */
57 .highlight .nt { color: #f92672 } /* Name.Tag */
58 .highlight .nv { color: #f8f8f2 } /* Name.Variable */
59 .highlight .ow { color: #f92672 } /* Operator.Word */
60 .highlight .w { color: #f8f8f2 } /* Text.Whitespace */
61 .highlight .mf { color: #ae81ff } /* Literal.Number.Float */
62 .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
63 .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
64 .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
65 .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
66 .highlight .sc { color: #e6db74 } /* Literal.String.Char */
67 .highlight .sd { color: #e6db74 } /* Literal.String.Doc */
68 .highlight .s2 { color: #e6db74 } /* Literal.String.Double */
69 .highlight .se { color: #ae81ff } /* Literal.String.Escape */
70 .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
71 .highlight .si { color: #e6db74 } /* Literal.String.Interpol */
72 .highlight .sx { color: #e6db74 } /* Literal.String.Other */
73 .highlight .sr { color: #e6db74 } /* Literal.String.Regex */
74 .highlight .s1 { color: #e6db74 } /* Literal.String.Single */
75 .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
76 .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
77 .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
78 .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
79 .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
80 .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
81
82 .highlight .gh { } /* Generic Heading & Diff Header */
83 .highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
84 .highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */
85 .highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */
0 /*! normalize.css v2.1.1 | MIT License | git.io/normalize */
1
2 /* ==========================================================================
3 HTML5 display definitions
4 ========================================================================== */
5
6 /**
7 * Correct `block` display not defined in IE 8/9.
8 */
9
10 article,
11 aside,
12 details,
13 figcaption,
14 figure,
15 footer,
16 header,
17 hgroup,
18 main,
19 nav,
20 section,
21 summary {
22 display: block;
23 }
24
25 /**
26 * Correct `inline-block` display not defined in IE 8/9.
27 */
28
29 audio,
30 canvas,
31 video {
32 display: inline-block;
33 }
34
35 /**
36 * Prevent modern browsers from displaying `audio` without controls.
37 * Remove excess height in iOS 5 devices.
38 */
39
40 audio:not([controls]) {
41 display: none;
42 height: 0;
43 }
44
45 /**
46 * Address styling not present in IE 8/9.
47 */
48
49 [hidden] {
50 display: none;
51 }
52
53 /* ==========================================================================
54 Base
55 ========================================================================== */
56
57 /**
58 * 1. Prevent system color scheme's background color being used in Firefox, IE,
59 * and Opera.
60 * 2. Prevent system color scheme's text color being used in Firefox, IE, and
61 * Opera.
62 * 3. Set default font family to sans-serif.
63 * 4. Prevent iOS text size adjust after orientation change, without disabling
64 * user zoom.
65 */
66
67 html {
68 background: #fff; /* 1 */
69 color: #000; /* 2 */
70 font-family: sans-serif; /* 3 */
71 -ms-text-size-adjust: 100%; /* 4 */
72 -webkit-text-size-adjust: 100%; /* 4 */
73 }
74
75 /**
76 * Remove default margin.
77 */
78
79 body {
80 margin: 0;
81 }
82
83 /* ==========================================================================
84 Links
85 ========================================================================== */
86
87 /**
88 * Address `outline` inconsistency between Chrome and other browsers.
89 */
90
91 a:focus {
92 outline: thin dotted;
93 }
94
95 /**
96 * Improve readability when focused and also mouse hovered in all browsers.
97 */
98
99 a:active,
100 a:hover {
101 outline: 0;
102 }
103
104 /* ==========================================================================
105 Typography
106 ========================================================================== */
107
108 /**
109 * Address variable `h1` font-size and margin within `section` and `article`
110 * contexts in Firefox 4+, Safari 5, and Chrome.
111 */
112
113 h1 {
114 font-size: 2em;
115 margin: 0.67em 0;
116 }
117
118 /**
119 * Address styling not present in IE 8/9, Safari 5, and Chrome.
120 */
121
122 abbr[title] {
123 border-bottom: 1px dotted;
124 }
125
126 /**
127 * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
128 */
129
130 b,
131 strong {
132 font-weight: bold;
133 }
134
135 /**
136 * Address styling not present in Safari 5 and Chrome.
137 */
138
139 dfn {
140 font-style: italic;
141 }
142
143 /**
144 * Address differences between Firefox and other browsers.
145 */
146
147 hr {
148 -moz-box-sizing: content-box;
149 box-sizing: content-box;
150 height: 0;
151 }
152
153 /**
154 * Address styling not present in IE 8/9.
155 */
156
157 mark {
158 background: #ff0;
159 color: #000;
160 }
161
162 /**
163 * Correct font family set oddly in Safari 5 and Chrome.
164 */
165
166 code,
167 kbd,
168 pre,
169 samp {
170 font-family: monospace, serif;
171 font-size: 1em;
172 }
173
174 /**
175 * Improve readability of pre-formatted text in all browsers.
176 */
177
178 pre {
179 white-space: pre-wrap;
180 }
181
182 /**
183 * Set consistent quote types.
184 */
185
186 q {
187 quotes: "\201C" "\201D" "\2018" "\2019";
188 }
189
190 /**
191 * Address inconsistent and variable font size in all browsers.
192 */
193
194 small {
195 font-size: 80%;
196 }
197
198 /**
199 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
200 */
201
202 sub,
203 sup {
204 font-size: 75%;
205 line-height: 0;
206 position: relative;
207 vertical-align: baseline;
208 }
209
210 sup {
211 top: -0.5em;
212 }
213
214 sub {
215 bottom: -0.25em;
216 }
217
218 /* ==========================================================================
219 Embedded content
220 ========================================================================== */
221
222 /**
223 * Remove border when inside `a` element in IE 8/9.
224 */
225
226 img {
227 border: 0;
228 }
229
230 /**
231 * Correct overflow displayed oddly in IE 9.
232 */
233
234 svg:not(:root) {
235 overflow: hidden;
236 }
237
238 /* ==========================================================================
239 Figures
240 ========================================================================== */
241
242 /**
243 * Address margin not present in IE 8/9 and Safari 5.
244 */
245
246 figure {
247 margin: 0;
248 }
249
250 /* ==========================================================================
251 Forms
252 ========================================================================== */
253
254 /**
255 * Define consistent border, margin, and padding.
256 */
257
258 fieldset {
259 border: 1px solid #c0c0c0;
260 margin: 0 2px;
261 padding: 0.35em 0.625em 0.75em;
262 }
263
264 /**
265 * 1. Correct `color` not being inherited in IE 8/9.
266 * 2. Remove padding so people aren't caught out if they zero out fieldsets.
267 */
268
269 legend {
270 border: 0; /* 1 */
271 padding: 0; /* 2 */
272 }
273
274 /**
275 * 1. Correct font family not being inherited in all browsers.
276 * 2. Correct font size not being inherited in all browsers.
277 * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
278 */
279
280 button,
281 input,
282 select,
283 textarea {
284 font-family: inherit; /* 1 */
285 font-size: 100%; /* 2 */
286 margin: 0; /* 3 */
287 }
288
289 /**
290 * Address Firefox 4+ setting `line-height` on `input` using `!important` in
291 * the UA stylesheet.
292 */
293
294 button,
295 input {
296 line-height: normal;
297 }
298
299 /**
300 * Address inconsistent `text-transform` inheritance for `button` and `select`.
301 * All other form control elements do not inherit `text-transform` values.
302 * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
303 * Correct `select` style inheritance in Firefox 4+ and Opera.
304 */
305
306 button,
307 select {
308 text-transform: none;
309 }
310
311 /**
312 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
313 * and `video` controls.
314 * 2. Correct inability to style clickable `input` types in iOS.
315 * 3. Improve usability and consistency of cursor style between image-type
316 * `input` and others.
317 */
318
319 button,
320 html input[type="button"], /* 1 */
321 input[type="reset"],
322 input[type="submit"] {
323 -webkit-appearance: button; /* 2 */
324 cursor: pointer; /* 3 */
325 }
326
327 /**
328 * Re-set default cursor for disabled elements.
329 */
330
331 button[disabled],
332 html input[disabled] {
333 cursor: default;
334 }
335
336 /**
337 * 1. Address box sizing set to `content-box` in IE 8/9.
338 * 2. Remove excess padding in IE 8/9.
339 */
340
341 input[type="checkbox"],
342 input[type="radio"] {
343 box-sizing: border-box; /* 1 */
344 padding: 0; /* 2 */
345 }
346
347 /**
348 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
349 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
350 * (include `-moz` to future-proof).
351 */
352
353 input[type="search"] {
354 -webkit-appearance: textfield; /* 1 */
355 -moz-box-sizing: content-box;
356 -webkit-box-sizing: content-box; /* 2 */
357 box-sizing: content-box;
358 }
359
360 /**
361 * Remove inner padding and search cancel button in Safari 5 and Chrome
362 * on OS X.
363 */
364
365 input[type="search"]::-webkit-search-cancel-button,
366 input[type="search"]::-webkit-search-decoration {
367 -webkit-appearance: none;
368 }
369
370 /**
371 * Remove inner padding and border in Firefox 4+.
372 */
373
374 button::-moz-focus-inner,
375 input::-moz-focus-inner {
376 border: 0;
377 padding: 0;
378 }
379
380 /**
381 * 1. Remove default vertical scrollbar in IE 8/9.
382 * 2. Improve readability and alignment in all browsers.
383 */
384
385 textarea {
386 overflow: auto; /* 1 */
387 vertical-align: top; /* 2 */
388 }
389
390 /* ==========================================================================
391 Tables
392 ========================================================================== */
393
394 /**
395 * Remove most spacing between table cells.
396 */
397
398 table {
399 border-collapse: collapse;
400 border-spacing: 0;
401 }
0 /* font-face */
1 @font-face {
2 font-family: "SocialFoundicons";
3 src: url("../fonts/social_foundicons.eot");
4 src: url("../fonts/social_foundicons.eot?#iefix") format("embedded-opentype"), url("../fonts/social_foundicons.woff") format("woff"), url("../fonts/social_foundicons.ttf") format("truetype"), url("../fonts/social_foundicons.svg#SocialFoundicons") format("svg");
5 font-weight: normal;
6 font-style: normal;
7 }
8
9 /* global foundicon styles */
10 [class*="foundicon-"] {
11 display: inline;
12 width: auto;
13 height: auto;
14 line-height: inherit;
15 vertical-align: baseline;
16 background-image: none;
17 background-position: 0 0;
18 background-repeat: repeat;
19 }
20
21 [class*="foundicon-"]:before {
22 font-family: "SocialFoundicons";
23 font-weight: normal;
24 font-style: normal;
25 text-decoration: inherit;
26 }
27
28 /* icons */
29 .foundicon-thumb-up:before {
30 content: "\f000";
31 }
32
33 .foundicon-thumb-down:before {
34 content: "\f001";
35 }
36
37 .foundicon-rss:before {
38 content: "\f002";
39 }
40
41 .foundicon-facebook:before {
42 content: "\f003";
43 }
44
45 .foundicon-twitter:before {
46 content: "\f004";
47 }
48
49 .foundicon-pinterest:before {
50 content: "\f005";
51 }
52
53 .foundicon-github:before {
54 content: "\f006";
55 }
56
57 .foundicon-path:before {
58 content: "\f007";
59 }
60
61 .foundicon-linkedin:before {
62 content: "\f008";
63 }
64
65 .foundicon-dribbble:before {
66 content: "\f009";
67 }
68
69 .foundicon-stumble-upon:before {
70 content: "\f00a";
71 }
72
73 .foundicon-behance:before {
74 content: "\f00b";
75 }
76
77 .foundicon-reddit:before {
78 content: "\f00c";
79 }
80
81 .foundicon-google-plus:before {
82 content: "\f00d";
83 }
84
85 .foundicon-youtube:before {
86 content: "\f00e";
87 }
88
89 .foundicon-vimeo:before {
90 content: "\f00f";
91 }
92
93 .foundicon-flickr:before {
94 content: "\f010";
95 }
96
97 .foundicon-slideshare:before {
98 content: "\f011";
99 }
100
101 .foundicon-picassa:before {
102 content: "\f012";
103 }
104
105 .foundicon-skype:before {
106 content: "\f013";
107 }
108
109 .foundicon-steam:before {
110 content: "\f014";
111 }
112
113 .foundicon-instagram:before {
114 content: "\f015";
115 }
116
117 .foundicon-foursquare:before {
118 content: "\f016";
119 }
120
121 .foundicon-delicious:before {
122 content: "\f017";
123 }
124
125 .foundicon-chat:before {
126 content: "\f018";
127 }
128
129 .foundicon-torso:before {
130 content: "\f019";
131 }
132
133 .foundicon-tumblr:before {
134 content: "\f01a";
135 }
136
137 .foundicon-video-chat:before {
138 content: "\f01b";
139 }
140
141 .foundicon-digg:before {
142 content: "\f01c";
143 }
144
145 .foundicon-wordpress:before {
146 content: "\f01d";
147 }
0 /* general icons for IE7 */
1 [class*="foundicon-"] {
2 font-family: "SocialFoundicons";
3 font-weight: normal;
4 font-style: normal;
5 }
6
7 .foundicon-thumb-up {
8 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf000;");
9 }
10
11 .foundicon-thumb-down {
12 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf001;");
13 }
14
15 .foundicon-rss {
16 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf002;");
17 }
18
19 .foundicon-facebook {
20 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf003;");
21 }
22
23 .foundicon-twitter {
24 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf004;");
25 }
26
27 .foundicon-pinterest {
28 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf005;");
29 }
30
31 .foundicon-github {
32 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf006;");
33 }
34
35 .foundicon-path {
36 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf007;");
37 }
38
39 .foundicon-linkedin {
40 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf008;");
41 }
42
43 .foundicon-dribbble {
44 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf009;");
45 }
46
47 .foundicon-stumble-upon {
48 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf00a;");
49 }
50
51 .foundicon-behance {
52 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf00b;");
53 }
54
55 .foundicon-reddit {
56 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf00c;");
57 }
58
59 .foundicon-google-plus {
60 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf00d;");
61 }
62
63 .foundicon-youtube {
64 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf00e;");
65 }
66
67 .foundicon-vimeo {
68 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf00f;");
69 }
70
71 .foundicon-flickr {
72 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf010;");
73 }
74
75 .foundicon-slideshare {
76 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf011;");
77 }
78
79 .foundicon-picassa {
80 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf012;");
81 }
82
83 .foundicon-skype {
84 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf013;");
85 }
86
87 .foundicon-steam {
88 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf014;");
89 }
90
91 .foundicon-instagram {
92 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf015;");
93 }
94
95 .foundicon-foursquare {
96 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf016;");
97 }
98
99 .foundicon-delicious {
100 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf017;");
101 }
102
103 .foundicon-chat {
104 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf018;");
105 }
106
107 .foundicon-torso {
108 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf019;");
109 }
110
111 .foundicon-tumblr {
112 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf01a;");
113 }
114
115 .foundicon-video-chat {
116 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf01b;");
117 }
118
119 .foundicon-digg {
120 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf01c;");
121 }
122
123 .foundicon-wordpress {
124 *zoom: expression(this.runtimeStyle['zoom'] = "1", this.innerHTML = "&#xf01d;");
125 }
0 .highlight { background: #ffffff; padding: 10px; }
1 .highlight .c { color: #999988; font-style: italic } /* Comment */
2 .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
3 .highlight .k { font-weight: bold } /* Keyword */
4 .highlight .o { font-weight: bold } /* Operator */
5 .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
6 .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
7 .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
8 .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
9 .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
10 .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
11 .highlight .ge { font-style: italic } /* Generic.Emph */
12 .highlight .gr { color: #aa0000 } /* Generic.Error */
13 .highlight .gh { color: #999999 } /* Generic.Heading */
14 .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
15 .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
16 .highlight .go { color: #888888 } /* Generic.Output */
17 .highlight .gp { color: #555555 } /* Generic.Prompt */
18 .highlight .gs { font-weight: bold } /* Generic.Strong */
19 .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
20 .highlight .gt { color: #aa0000 } /* Generic.Traceback */
21 .highlight .kc { font-weight: bold } /* Keyword.Constant */
22 .highlight .kd { font-weight: bold } /* Keyword.Declaration */
23 .highlight .kp { font-weight: bold } /* Keyword.Pseudo */
24 .highlight .kr { font-weight: bold } /* Keyword.Reserved */
25 .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
26 .highlight .m { color: #009999 } /* Literal.Number */
27 .highlight .s { color: #d14 } /* Literal.String */
28 .highlight .na { color: #008080 } /* Name.Attribute */
29 .highlight .nb { color: #0086B3 } /* Name.Builtin */
30 .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
31 .highlight .no { color: #008080 } /* Name.Constant */
32 .highlight .ni { color: #800080 } /* Name.Entity */
33 .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
34 .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
35 .highlight .nn { color: #555555 } /* Name.Namespace */
36 .highlight .nt { color: #000080 } /* Name.Tag */
37 .highlight .nv { color: #008080 } /* Name.Variable */
38 .highlight .ow { font-weight: bold } /* Operator.Word */
39 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
40 .highlight .mf { color: #009999 } /* Literal.Number.Float */
41 .highlight .mh { color: #009999 } /* Literal.Number.Hex */
42 .highlight .mi { color: #009999 } /* Literal.Number.Integer */
43 .highlight .mo { color: #009999 } /* Literal.Number.Oct */
44 .highlight .sb { color: #d14 } /* Literal.String.Backtick */
45 .highlight .sc { color: #d14 } /* Literal.String.Char */
46 .highlight .sd { color: #d14 } /* Literal.String.Doc */
47 .highlight .s2 { color: #d14 } /* Literal.String.Double */
48 .highlight .se { color: #d14 } /* Literal.String.Escape */
49 .highlight .sh { color: #d14 } /* Literal.String.Heredoc */
50 .highlight .si { color: #d14 } /* Literal.String.Interpol */
51 .highlight .sx { color: #d14 } /* Literal.String.Other */
52 .highlight .sr { color: #009926 } /* Literal.String.Regex */
53 .highlight .s1 { color: #d14 } /* Literal.String.Single */
54 .highlight .ss { color: #990073 } /* Literal.String.Symbol */
55 .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
56 .highlight .vc { color: #008080 } /* Name.Variable.Class */
57 .highlight .vg { color: #008080 } /* Name.Variable.Global */
58 .highlight .vi { color: #008080 } /* Name.Variable.Instance */
59 .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
Binary diff not shown
0 <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" > <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
1 <defs >
2 <font id="socialfoundicons" horiz-adv-x="933" ><font-face
3 font-family="Social Foundicons"
4 units-per-em="1000"
5 panose-1="0 0 0 0 0 0 0 0 0 0"
6 ascent="1000"
7 descent="0"
8 alphabetic="0" />
9 <missing-glyph horiz-adv-x="250" />
10 <glyph unicode=" " glyph-name="space" horiz-adv-x="250" />
11 <glyph unicode="~" glyph-name="asciitilde" horiz-adv-x="1000" />
12 </font>
13 </defs>
14 </svg>
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.alerts = {
6 name : 'alerts',
7
8 version : '4.2.2',
9
10 settings : {
11 speed: 300, // fade out speed
12 callback: function (){}
13 },
14
15 init : function (scope, method, options) {
16 this.scope = scope || this.scope;
17
18 if (typeof method === 'object') {
19 $.extend(true, this.settings, method);
20 }
21
22 if (typeof method !== 'string') {
23 if (!this.settings.init) { this.events(); }
24
25 return this.settings.init;
26 } else {
27 return this[method].call(this, options);
28 }
29 },
30
31 events : function () {
32 var self = this;
33
34 $(this.scope).on('click.fndtn.alerts', '[data-alert] a.close', function (e) {
35 e.preventDefault();
36 $(this).closest("[data-alert]").fadeOut(self.speed, function () {
37 $(this).remove();
38 self.settings.callback();
39 });
40 });
41
42 this.settings.init = true;
43 },
44
45 off : function () {
46 $(this.scope).off('.fndtn.alerts');
47 },
48
49 reflow : function () {}
50 };
51 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.clearing = {
6 name : 'clearing',
7
8 version : '4.2.2',
9
10 settings : {
11 templates : {
12 viewing : '<a href="#" class="clearing-close">&times;</a>' +
13 '<div class="visible-img" style="display: none"><img src="//:0">' +
14 '<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
15 '<a href="#" class="clearing-main-next"><span></span></a></div>'
16 },
17
18 // comma delimited list of selectors that, on click, will close clearing,
19 // add 'div.clearing-blackout, div.visible-img' to close on background click
20 close_selectors : '.clearing-close',
21
22 // event initializers and locks
23 init : false,
24 locked : false
25 },
26
27 init : function (scope, method, options) {
28 var self = this;
29 Foundation.inherit(this, 'set_data get_data remove_data throttle data_options');
30
31 if (typeof method === 'object') {
32 options = $.extend(true, this.settings, method);
33 }
34
35 if (typeof method !== 'string') {
36 $(this.scope).find('ul[data-clearing]').each(function () {
37 var $el = $(this),
38 options = options || {},
39 lis = $el.find('li'),
40 settings = self.get_data($el);
41
42 if (!settings && lis.length > 0) {
43 options.$parent = $el.parent();
44
45 self.set_data($el, $.extend({}, self.settings, options, self.data_options($el)));
46
47 self.assemble($el.find('li'));
48
49 if (!self.settings.init) {
50 self.events().swipe_events();
51 }
52 }
53 });
54
55 return this.settings.init;
56 } else {
57 // fire method
58 return this[method].call(this, options);
59 }
60 },
61
62 // event binding and initial setup
63
64 events : function () {
65 var self = this;
66
67 $(this.scope)
68 .on('click.fndtn.clearing', 'ul[data-clearing] li',
69 function (e, current, target) {
70 var current = current || $(this),
71 target = target || current,
72 next = current.next('li'),
73 settings = self.get_data(current.parent()),
74 image = $(e.target);
75
76 e.preventDefault();
77 if (!settings) self.init();
78
79 // if clearing is open and the current image is
80 // clicked, go to the next image in sequence
81 if (target.hasClass('visible') &&
82 current[0] === target[0] &&
83 next.length > 0 && self.is_open(current)) {
84 target = next;
85 image = target.find('img');
86 }
87
88 // set current and target to the clicked li if not otherwise defined.
89 self.open(image, current, target);
90 self.update_paddles(target);
91 })
92
93 .on('click.fndtn.clearing', '.clearing-main-next',
94 function (e) { this.nav(e, 'next') }.bind(this))
95 .on('click.fndtn.clearing', '.clearing-main-prev',
96 function (e) { this.nav(e, 'prev') }.bind(this))
97 .on('click.fndtn.clearing', this.settings.close_selectors,
98 function (e) { Foundation.libs.clearing.close(e, this) })
99 .on('keydown.fndtn.clearing',
100 function (e) { this.keydown(e) }.bind(this));
101
102 $(window).on('resize.fndtn.clearing',
103 function () { this.resize() }.bind(this));
104
105 this.settings.init = true;
106 return this;
107 },
108
109 swipe_events : function () {
110 var self = this;
111
112 $(this.scope)
113 .on('touchstart.fndtn.clearing', '.visible-img', function(e) {
114 if (!e.touches) { e = e.originalEvent; }
115 var data = {
116 start_page_x: e.touches[0].pageX,
117 start_page_y: e.touches[0].pageY,
118 start_time: (new Date()).getTime(),
119 delta_x: 0,
120 is_scrolling: undefined
121 };
122
123 $(this).data('swipe-transition', data);
124 e.stopPropagation();
125 })
126 .on('touchmove.fndtn.clearing', '.visible-img', function(e) {
127 if (!e.touches) { e = e.originalEvent; }
128 // Ignore pinch/zoom events
129 if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
130
131 var data = $(this).data('swipe-transition');
132
133 if (typeof data === 'undefined') {
134 data = {};
135 }
136
137 data.delta_x = e.touches[0].pageX - data.start_page_x;
138
139 if ( typeof data.is_scrolling === 'undefined') {
140 data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
141 }
142
143 if (!data.is_scrolling && !data.active) {
144 e.preventDefault();
145 var direction = (data.delta_x < 0) ? 'next' : 'prev';
146 data.active = true;
147 self.nav(e, direction);
148 }
149 })
150 .on('touchend.fndtn.clearing', '.visible-img', function(e) {
151 $(this).data('swipe-transition', {});
152 e.stopPropagation();
153 });
154 },
155
156 assemble : function ($li) {
157 var $el = $li.parent();
158 $el.after('<div id="foundationClearingHolder"></div>');
159
160 var holder = $('#foundationClearingHolder'),
161 settings = this.get_data($el),
162 grid = $el.detach(),
163 data = {
164 grid: '<div class="carousel">' + this.outerHTML(grid[0]) + '</div>',
165 viewing: settings.templates.viewing
166 },
167 wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
168 data.grid + '</div></div>';
169
170 return holder.after(wrapper).remove();
171 },
172
173 // event callbacks
174
175 open : function ($image, current, target) {
176 var root = target.closest('.clearing-assembled'),
177 container = root.find('div').first(),
178 visible_image = container.find('.visible-img'),
179 image = visible_image.find('img').not($image);
180
181 if (!this.locked()) {
182 // set the image to the selected thumbnail
183 image
184 .attr('src', this.load($image))
185 .css('visibility', 'hidden');
186
187 this.loaded(image, function () {
188 image.css('visibility', 'visible');
189 // toggle the gallery
190 root.addClass('clearing-blackout');
191 container.addClass('clearing-container');
192 visible_image.show();
193 this.fix_height(target)
194 .caption(visible_image.find('.clearing-caption'), $image)
195 .center(image)
196 .shift(current, target, function () {
197 target.siblings().removeClass('visible');
198 target.addClass('visible');
199 });
200 }.bind(this));
201 }
202 },
203
204 close : function (e, el) {
205 e.preventDefault();
206
207 var root = (function (target) {
208 if (/blackout/.test(target.selector)) {
209 return target;
210 } else {
211 return target.closest('.clearing-blackout');
212 }
213 }($(el))), container, visible_image;
214
215 if (el === e.target && root) {
216 container = root.find('div').first();
217 visible_image = container.find('.visible-img');
218 this.settings.prev_index = 0;
219 root.find('ul[data-clearing]')
220 .attr('style', '').closest('.clearing-blackout')
221 .removeClass('clearing-blackout');
222 container.removeClass('clearing-container');
223 visible_image.hide();
224 }
225
226 return false;
227 },
228
229 is_open : function (current) {
230 return current.parent().attr('style').length > 0;
231 },
232
233 keydown : function (e) {
234 var clearing = $('.clearing-blackout').find('ul[data-clearing]');
235
236 if (e.which === 39) this.go(clearing, 'next');
237 if (e.which === 37) this.go(clearing, 'prev');
238 if (e.which === 27) $('a.clearing-close').trigger('click');
239 },
240
241 nav : function (e, direction) {
242 var clearing = $('.clearing-blackout').find('ul[data-clearing]');
243
244 e.preventDefault();
245 this.go(clearing, direction);
246 },
247
248 resize : function () {
249 var image = $('.clearing-blackout .visible-img').find('img');
250
251 if (image.length) {
252 this.center(image);
253 }
254 },
255
256 // visual adjustments
257 fix_height : function (target) {
258 var lis = target.parent().children(),
259 self = this;
260
261 lis.each(function () {
262 var li = $(this),
263 image = li.find('img');
264
265 if (li.height() > self.outerHeight(image)) {
266 li.addClass('fix-height');
267 }
268 })
269 .closest('ul')
270 .width(lis.length * 100 + '%');
271
272 return this;
273 },
274
275 update_paddles : function (target) {
276 var visible_image = target
277 .closest('.carousel')
278 .siblings('.visible-img');
279
280 if (target.next().length > 0) {
281 visible_image
282 .find('.clearing-main-next')
283 .removeClass('disabled');
284 } else {
285 visible_image
286 .find('.clearing-main-next')
287 .addClass('disabled');
288 }
289
290 if (target.prev().length > 0) {
291 visible_image
292 .find('.clearing-main-prev')
293 .removeClass('disabled');
294 } else {
295 visible_image
296 .find('.clearing-main-prev')
297 .addClass('disabled');
298 }
299 },
300
301 center : function (target) {
302 if (!this.rtl) {
303 target.css({
304 marginLeft : -(this.outerWidth(target) / 2),
305 marginTop : -(this.outerHeight(target) / 2)
306 });
307 } else {
308 target.css({
309 marginRight : -(this.outerWidth(target) / 2),
310 marginTop : -(this.outerHeight(target) / 2)
311 });
312 }
313 return this;
314 },
315
316 // image loading and preloading
317
318 load : function ($image) {
319 if ($image[0].nodeName === "A") {
320 var href = $image.attr('href');
321 } else {
322 var href = $image.parent().attr('href');
323 }
324
325 this.preload($image);
326
327 if (href) return href;
328 return $image.attr('src');
329 },
330
331 preload : function ($image) {
332 this
333 .img($image.closest('li').next())
334 .img($image.closest('li').prev());
335 },
336
337 loaded : function (image, callback) {
338 // based on jquery.imageready.js
339 // @weblinc, @jsantell, (c) 2012
340
341 function loaded () {
342 callback();
343 }
344
345 function bindLoad () {
346 this.one('load', loaded);
347
348 if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
349 var src = this.attr( 'src' ),
350 param = src.match( /\?/ ) ? '&' : '?';
351
352 param += 'random=' + (new Date()).getTime();
353 this.attr('src', src + param);
354 }
355 }
356
357 if (!image.attr('src')) {
358 loaded();
359 return;
360 }
361
362 if (image[0].complete || image[0].readyState === 4) {
363 loaded();
364 } else {
365 bindLoad.call(image);
366 }
367 },
368
369 img : function (img) {
370 if (img.length) {
371 var new_img = new Image(),
372 new_a = img.find('a');
373
374 if (new_a.length) {
375 new_img.src = new_a.attr('href');
376 } else {
377 new_img.src = img.find('img').attr('src');
378 }
379 }
380 return this;
381 },
382
383 // image caption
384
385 caption : function (container, $image) {
386 var caption = $image.data('caption');
387
388 if (caption) {
389 container
390 .html(caption)
391 .show();
392 } else {
393 container
394 .text('')
395 .hide();
396 }
397 return this;
398 },
399
400 // directional methods
401
402 go : function ($ul, direction) {
403 var current = $ul.find('.visible'),
404 target = current[direction]();
405
406 if (target.length) {
407 target
408 .find('img')
409 .trigger('click', [current, target]);
410 }
411 },
412
413 shift : function (current, target, callback) {
414 var clearing = target.parent(),
415 old_index = this.settings.prev_index || target.index(),
416 direction = this.direction(clearing, current, target),
417 left = parseInt(clearing.css('left'), 10),
418 width = this.outerWidth(target),
419 skip_shift;
420
421 // we use jQuery animate instead of CSS transitions because we
422 // need a callback to unlock the next animation
423 if (target.index() !== old_index && !/skip/.test(direction)){
424 if (/left/.test(direction)) {
425 this.lock();
426 clearing.animate({left : left + width}, 300, this.unlock());
427 } else if (/right/.test(direction)) {
428 this.lock();
429 clearing.animate({left : left - width}, 300, this.unlock());
430 }
431 } else if (/skip/.test(direction)) {
432 // the target image is not adjacent to the current image, so
433 // do we scroll right or not
434 skip_shift = target.index() - this.settings.up_count;
435 this.lock();
436
437 if (skip_shift > 0) {
438 clearing.animate({left : -(skip_shift * width)}, 300, this.unlock());
439 } else {
440 clearing.animate({left : 0}, 300, this.unlock());
441 }
442 }
443
444 callback();
445 },
446
447 direction : function ($el, current, target) {
448 var lis = $el.find('li'),
449 li_width = this.outerWidth(lis) + (this.outerWidth(lis) / 4),
450 up_count = Math.floor(this.outerWidth($('.clearing-container')) / li_width) - 1,
451 target_index = lis.index(target),
452 response;
453
454 this.settings.up_count = up_count;
455
456 if (this.adjacent(this.settings.prev_index, target_index)) {
457 if ((target_index > up_count)
458 && target_index > this.settings.prev_index) {
459 response = 'right';
460 } else if ((target_index > up_count - 1)
461 && target_index <= this.settings.prev_index) {
462 response = 'left';
463 } else {
464 response = false;
465 }
466 } else {
467 response = 'skip';
468 }
469
470 this.settings.prev_index = target_index;
471
472 return response;
473 },
474
475 adjacent : function (current_index, target_index) {
476 for (var i = target_index + 1; i >= target_index - 1; i--) {
477 if (i === current_index) return true;
478 }
479 return false;
480 },
481
482 // lock management
483
484 lock : function () {
485 this.settings.locked = true;
486 },
487
488 unlock : function () {
489 this.settings.locked = false;
490 },
491
492 locked : function () {
493 return this.settings.locked;
494 },
495
496 // plugin management/browser quirks
497
498 outerHTML : function (el) {
499 // support FireFox < 11
500 return el.outerHTML || new XMLSerializer().serializeToString(el);
501 },
502
503 off : function () {
504 $(this.scope).off('.fndtn.clearing');
505 $(window).off('.fndtn.clearing');
506 this.remove_data(); // empty settings cache
507 this.settings.init = false;
508 },
509
510 reflow : function () {
511 this.init();
512 }
513 };
514
515 }(Foundation.zj, this, this.document));
0 /*!
1 * jQuery Cookie Plugin v1.3
2 * https://github.com/carhartl/jquery-cookie
3 *
4 * Copyright 2011, Klaus Hartl
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://www.opensource.org/licenses/mit-license.php
7 * http://www.opensource.org/licenses/GPL-2.0
8 *
9 * Modified to work with Zepto.js by ZURB
10 */
11 (function ($, document, undefined) {
12
13 var pluses = /\+/g;
14
15 function raw(s) {
16 return s;
17 }
18
19 function decoded(s) {
20 return decodeURIComponent(s.replace(pluses, ' '));
21 }
22
23 var config = $.cookie = function (key, value, options) {
24
25 // write
26 if (value !== undefined) {
27 options = $.extend({}, config.defaults, options);
28
29 if (value === null) {
30 options.expires = -1;
31 }
32
33 if (typeof options.expires === 'number') {
34 var days = options.expires, t = options.expires = new Date();
35 t.setDate(t.getDate() + days);
36 }
37
38 value = config.json ? JSON.stringify(value) : String(value);
39
40 return (document.cookie = [
41 encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
42 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
43 options.path ? '; path=' + options.path : '',
44 options.domain ? '; domain=' + options.domain : '',
45 options.secure ? '; secure' : ''
46 ].join(''));
47 }
48
49 // read
50 var decode = config.raw ? raw : decoded;
51 var cookies = document.cookie.split('; ');
52 for (var i = 0, l = cookies.length; i < l; i++) {
53 var parts = cookies[i].split('=');
54 if (decode(parts.shift()) === key) {
55 var cookie = decode(parts.join('='));
56 return config.json ? JSON.parse(cookie) : cookie;
57 }
58 }
59
60 return null;
61 };
62
63 config.defaults = {};
64
65 $.removeCookie = function (key, options) {
66 if ($.cookie(key) !== null) {
67 $.cookie(key, null, options);
68 return true;
69 }
70 return false;
71 };
72
73 })(Foundation.zj, document);
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.dropdown = {
6 name : 'dropdown',
7
8 version : '4.2.0',
9
10 settings : {
11 activeClass: 'open',
12 is_hover: false,
13 opened: function(){},
14 closed: function(){}
15 },
16
17 init : function (scope, method, options) {
18 this.scope = scope || this.scope;
19 Foundation.inherit(this, 'throttle scrollLeft data_options');
20
21 if (typeof method === 'object') {
22 $.extend(true, this.settings, method);
23 }
24
25 if (typeof method !== 'string') {
26
27 if (!this.settings.init) {
28 this.events();
29 }
30
31 return this.settings.init;
32 } else {
33 return this[method].call(this, options);
34 }
35 },
36
37 events : function () {
38 var self = this;
39
40 $(this.scope)
41 .on('click.fndtn.dropdown', '[data-dropdown]', function (e) {
42 var settings = $.extend({}, self.settings, self.data_options($(this)));
43 e.preventDefault();
44
45 if (!settings.is_hover) self.toggle($(this));
46 })
47 .on('mouseenter', '[data-dropdown]', function (e) {
48 var settings = $.extend({}, self.settings, self.data_options($(this)));
49 if (settings.is_hover) self.toggle($(this));
50 })
51 .on('mouseleave', '[data-dropdown-content]', function (e) {
52 var target = $('[data-dropdown="' + $(this).attr('id') + '"]'),
53 settings = $.extend({}, self.settings, self.data_options(target));
54 if (settings.is_hover) self.close.call(self, $(this));
55 })
56 .on('opened.fndtn.dropdown', '[data-dropdown-content]', this.settings.opened)
57 .on('closed.fndtn.dropdown', '[data-dropdown-content]', this.settings.closed);
58
59 $('body').on('click.fndtn.dropdown', function (e) {
60 var parent = $(e.target).closest('[data-dropdown-content]');
61
62 if ($(e.target).data('dropdown')) {
63 return;
64 }
65 if (parent.length > 0 && ($(e.target).is('[data-dropdown-content]') || $.contains(parent.first()[0], e.target))) {
66 e.stopPropagation();
67 return;
68 }
69
70 self.close.call(self, $('[data-dropdown-content]'));
71 });
72
73 $(window).on('resize.fndtn.dropdown', self.throttle(function () {
74 self.resize.call(self);
75 }, 50)).trigger('resize');
76
77 this.settings.init = true;
78 },
79
80 close: function (dropdown) {
81 var self = this;
82 dropdown.each(function () {
83 if ($(this).hasClass(self.settings.activeClass)) {
84 $(this)
85 .css(Foundation.rtl ? 'right':'left', '-99999px')
86 .removeClass(self.settings.activeClass);
87 $(this).trigger('closed');
88 }
89 });
90 },
91
92 open: function (dropdown, target) {
93 this
94 .css(dropdown
95 .addClass(this.settings.activeClass), target);
96 dropdown.trigger('opened');
97 },
98
99 toggle : function (target) {
100 var dropdown = $('#' + target.data('dropdown'));
101
102 this.close.call(this, $('[data-dropdown-content]').not(dropdown));
103
104 if (dropdown.hasClass(this.settings.activeClass)) {
105 this.close.call(this, dropdown);
106 } else {
107 this.close.call(this, $('[data-dropdown-content]'))
108 this.open.call(this, dropdown, target);
109 }
110 },
111
112 resize : function () {
113 var dropdown = $('[data-dropdown-content].open'),
114 target = $("[data-dropdown='" + dropdown.attr('id') + "']");
115
116 if (dropdown.length && target.length) {
117 this.css(dropdown, target);
118 }
119 },
120
121 css : function (dropdown, target) {
122 var offset_parent = dropdown.offsetParent();
123 // temporary workaround until 4.2
124 if (offset_parent.length > 0 && /body/i.test(dropdown.offsetParent()[0].nodeName)) {
125 var position = target.offset();
126 position.top -= dropdown.offsetParent().offset().top;
127 position.left -= dropdown.offsetParent().offset().left;
128 } else {
129 var position = target.position();
130 }
131
132 if (this.small()) {
133 dropdown.css({
134 position : 'absolute',
135 width: '95%',
136 left: '2.5%',
137 'max-width': 'none',
138 top: position.top + this.outerHeight(target)
139 });
140 } else {
141 if (!Foundation.rtl && $(window).width() > this.outerWidth(dropdown) + target.offset().left) {
142 var left = position.left;
143 if (dropdown.hasClass('right')) {
144 dropdown.removeClass('right');
145 }
146 } else {
147 if (!dropdown.hasClass('right')) {
148 dropdown.addClass('right');
149 }
150 var left = position.left - (this.outerWidth(dropdown) - this.outerWidth(target));
151 }
152
153 dropdown.attr('style', '').css({
154 position : 'absolute',
155 top: position.top + this.outerHeight(target),
156 left: left
157 });
158 }
159
160 return dropdown;
161 },
162
163 small : function () {
164 return $(window).width() < 768 || $('html').hasClass('lt-ie9');
165 },
166
167 off: function () {
168 $(this.scope).off('.fndtn.dropdown');
169 $('html, body').off('.fndtn.dropdown');
170 $(window).off('.fndtn.dropdown');
171 $('[data-dropdown-content]').off('.fndtn.dropdown');
172 this.settings.init = false;
173 },
174
175 reflow : function () {}
176 };
177 }(Foundation.zj, this, this.document));
0 (function ($, window, document, undefined) {
1 'use strict';
2
3 Foundation.libs.forms = {
4 name: 'forms',
5
6 version: '4.2.2',
7
8 cache: {},
9
10 settings: {
11 disable_class: 'no-custom',
12 last_combo : null
13 },
14
15 init: function (scope, method, options) {
16
17 if (typeof method === 'object') {
18 $.extend(true, this.settings, method);
19 }
20
21 if (typeof method !== 'string') {
22 if (!this.settings.init) {
23 this.events();
24 }
25
26 this.assemble();
27
28 return this.settings.init;
29 } else {
30 return this[method].call(this, options);
31 }
32 },
33
34 assemble: function () {
35 $('form.custom input[type="radio"]', $(this.scope))
36 .not('[data-customforms="disabled"]')
37 .not('.' + this.settings.disable_class)
38 .each(this.append_custom_markup);
39 $('form.custom input[type="checkbox"]', $(this.scope))
40 .not('[data-customforms="disabled"]')
41 .not('.' + this.settings.disable_class)
42 .each(this.append_custom_markup);
43 $('form.custom select', $(this.scope))
44 .not('[data-customforms="disabled"]')
45 .not('.' + this.settings.disable_class)
46 .not('[multiple=multiple]')
47 .each(this.append_custom_select);
48 },
49
50 events: function () {
51 var self = this;
52
53 $(this.scope)
54 .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
55 e.preventDefault();
56 e.stopPropagation();
57 self.toggle_checkbox($(this));
58 })
59 .on('click.fndtn.forms', 'form.custom span.custom.radio', function (e) {
60 e.preventDefault();
61 e.stopPropagation();
62 self.toggle_radio($(this));
63 })
64 .on('change.fndtn.forms', 'form.custom select', function (e, force_refresh) {
65 if (!$(this).not('[data-customforms="disabled"])')) return;
66 self.refresh_custom_select($(this), force_refresh);
67 })
68 .on('click.fndtn.forms', 'form.custom label', function (e) {
69 if ($(e.target).is('label')) {
70 var $associatedElement = $('#' + self.escape($(this).attr('for'))).not('[data-customforms="disabled"]'),
71 $customCheckbox,
72 $customRadio;
73
74 if ($associatedElement.length !== 0) {
75 if ($associatedElement.attr('type') === 'checkbox') {
76 e.preventDefault();
77 $customCheckbox = $(this).find('span.custom.checkbox');
78 //the checkbox might be outside after the label or inside of another element
79 if ($customCheckbox.length === 0) {
80 $customCheckbox = $associatedElement.add(this).siblings('span.custom.checkbox').first();
81 }
82 self.toggle_checkbox($customCheckbox);
83 } else if ($associatedElement.attr('type') === 'radio') {
84 e.preventDefault();
85 $customRadio = $(this).find('span.custom.radio');
86 //the radio might be outside after the label or inside of another element
87 if ($customRadio.length === 0) {
88 $customRadio = $associatedElement.add(this).siblings('span.custom.radio').first();
89 }
90 self.toggle_radio($customRadio);
91 }
92 }
93 }
94 })
95 .on('mousedown.fndtn.forms', 'form.custom div.custom.dropdown', function () {
96 return false;
97 })
98 .on('click.fndtn.forms', 'form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector', function (e) {
99 var $this = $(this),
100 $dropdown = $this.closest('div.custom.dropdown'),
101 $select = getFirstPrevSibling($dropdown, 'select');
102
103 // make sure other dropdowns close
104 if (!$dropdown.hasClass('open')) $(self.scope).trigger('click');
105
106 e.preventDefault();
107 if (false === $select.is(':disabled')) {
108 $dropdown.toggleClass('open');
109
110 if ($dropdown.hasClass('open')) {
111 $(self.scope).on('click.fndtn.forms.customdropdown', function () {
112 $dropdown.removeClass('open');
113 $(self.scope).off('.fndtn.forms.customdropdown');
114 });
115 } else {
116 $(self.scope).on('.fndtn.forms.customdropdown');
117 }
118 return false;
119 }
120 })
121 .on('click.fndtn.forms touchend.fndtn.forms', 'form.custom div.custom.dropdown li', function (e) {
122 var $this = $(this),
123 $customDropdown = $this.closest('div.custom.dropdown'),
124 $select = getFirstPrevSibling($customDropdown, 'select'),
125 selectedIndex = 0;
126
127 e.preventDefault();
128 e.stopPropagation();
129
130 if (!$(this).hasClass('disabled')) {
131 $('div.dropdown').not($customDropdown).removeClass('open');
132
133 var $oldThis = $this.closest('ul')
134 .find('li.selected');
135 $oldThis.removeClass('selected');
136
137 $this.addClass('selected');
138
139 $customDropdown.removeClass('open')
140 .find('a.current')
141 .text($this.text());
142
143 $this.closest('ul').find('li').each(function (index) {
144 if ($this[0] === this) {
145 selectedIndex = index;
146 }
147 });
148 $select[0].selectedIndex = selectedIndex;
149
150 //store the old value in data
151 $select.data('prevalue', $oldThis.html());
152 $select.trigger('change');
153 }
154 });
155
156 $(window).on('keydown', function (e) {
157 var focus = document.activeElement,
158 self = Foundation.libs.forms,
159 dropdown = $('.custom.dropdown.open');
160
161 if (dropdown.length > 0) {
162 e.preventDefault();
163
164 if (e.which === 13) {
165 dropdown.find('li.selected').trigger('click');
166 }
167
168 if (e.which === 27) {
169 dropdown.removeClass('open');
170 }
171
172 if (e.which >= 65 && e.which <= 90) {
173 var next = self.go_to(dropdown, e.which),
174 current = dropdown.find('li.selected');
175
176 if (next) {
177 current.removeClass('selected');
178 self.scrollTo(next.addClass('selected'), 300);
179 }
180 }
181
182 if (e.which === 38) {
183 var current = dropdown.find('li.selected'),
184 prev = current.prev(':not(.disabled)');
185
186 if (prev.length > 0) {
187 prev.parent()[0].scrollTop = prev.parent().scrollTop() - self.outerHeight(prev);
188 current.removeClass('selected');
189 prev.addClass('selected');
190 }
191 } else if (e.which === 40) {
192 var current = dropdown.find('li.selected'),
193 next = current.next(':not(.disabled)');
194
195 if (next.length > 0) {
196 next.parent()[0].scrollTop = next.parent().scrollTop() + self.outerHeight(next);
197 current.removeClass('selected');
198 next.addClass('selected');
199 }
200 }
201 }
202 });
203
204 this.settings.init = true;
205 },
206
207 go_to: function (dropdown, character) {
208 var lis = dropdown.find('li'),
209 count = lis.length;
210
211 if (count > 0) {
212 for (var i = 0; i < count; i++) {
213 var first_letter = lis.eq(i).text().charAt(0).toLowerCase();
214 if (first_letter === String.fromCharCode(character).toLowerCase()) return lis.eq(i);
215 }
216 }
217 },
218
219 scrollTo: function (el, duration) {
220 if (duration < 0) return;
221 var parent = el.parent();
222 var li_height = this.outerHeight(el);
223 var difference = (li_height * (el.index())) - parent.scrollTop();
224 var perTick = difference / duration * 10;
225
226 this.scrollToTimerCache = setTimeout(function () {
227 if (!isNaN(parseInt(perTick, 10))) {
228 parent[0].scrollTop = parent.scrollTop() + perTick;
229 this.scrollTo(el, duration - 10);
230 }
231 }.bind(this), 10);
232 },
233
234 append_custom_markup: function (idx, sel) {
235 var $this = $(sel),
236 type = $this.attr('type'),
237 $span = $this.next('span.custom.' + type);
238
239 if (!$this.parent().hasClass('switch')) {
240 $this.addClass('hidden-field');
241 }
242
243 if ($span.length === 0) {
244 $span = $('<span class="custom ' + type + '"></span>').insertAfter($this);
245 }
246
247 $span.toggleClass('checked', $this.is(':checked'));
248 $span.toggleClass('disabled', $this.is(':disabled'));
249 },
250
251 append_custom_select: function (idx, sel) {
252 var self = Foundation.libs.forms,
253 $this = $(sel),
254 $customSelect = $this.next('div.custom.dropdown'),
255 $customList = $customSelect.find('ul'),
256 $selectCurrent = $customSelect.find(".current"),
257 $selector = $customSelect.find(".selector"),
258 $options = $this.find('option'),
259 $selectedOption = $options.filter(':selected'),
260 copyClasses = $this.attr('class') ? $this.attr('class').split(' ') : [],
261 maxWidth = 0,
262 liHtml = '',
263 $listItems,
264 $currentSelect = false;
265
266 if ($customSelect.length === 0) {
267 var customSelectSize = $this.hasClass('small') ? 'small' : $this.hasClass('medium') ? 'medium' : $this.hasClass('large') ? 'large' : $this.hasClass('expand') ? 'expand' : '';
268
269 $customSelect = $('<div class="' + ['custom', 'dropdown', customSelectSize].concat(copyClasses).filter(function (item, idx, arr) {
270 if (item === '') return false;
271 return arr.indexOf(item) === idx;
272 }).join(' ') + '"><a href="#" class="selector"></a><ul /></div>');
273
274 $selector = $customSelect.find(".selector");
275 $customList = $customSelect.find("ul");
276
277 liHtml = $options.map(function () {
278 var copyClasses = $(this).attr('class') ? $(this).attr('class') : '';
279 return "<li class='" + copyClasses + "'>" + $(this).html() + "</li>";
280 }).get().join('');
281
282 $customList.append(liHtml);
283
284 $currentSelect = $customSelect
285 .prepend('<a href="#" class="current">' + $selectedOption.html() + '</a>')
286 .find(".current");
287
288 $this.after($customSelect)
289 .addClass('hidden-field');
290 } else {
291 liHtml = $options.map(function () {
292 return "<li>" + $(this).html() + "</li>";
293 })
294 .get().join('');
295
296 $customList.html('')
297 .append(liHtml);
298
299 } // endif $customSelect.length === 0
300
301 self.assign_id($this, $customSelect);
302 $customSelect.toggleClass('disabled', $this.is(':disabled'));
303 $listItems = $customList.find('li');
304
305 // cache list length
306 self.cache[$customSelect.data('id')] = $listItems.length;
307
308 $options.each(function (index) {
309 if (this.selected) {
310 $listItems.eq(index).addClass('selected');
311
312 if ($currentSelect) {
313 $currentSelect.html($(this).html());
314 }
315 }
316 if ($(this).is(':disabled')) {
317 $listItems.eq(index).addClass('disabled');
318 }
319 });
320
321 //
322 // If we're not specifying a predetermined form size.
323 //
324 if (!$customSelect.is('.small, .medium, .large, .expand')) {
325
326 // ------------------------------------------------------------------------------------
327 // This is a work-around for when elements are contained within hidden parents.
328 // For example, when custom-form elements are inside of a hidden reveal modal.
329 //
330 // We need to display the current custom list element as well as hidden parent elements
331 // in order to properly calculate the list item element's width property.
332 // -------------------------------------------------------------------------------------
333
334 $customSelect.addClass('open');
335 //
336 // Quickly, display all parent elements.
337 // This should help us calcualate the width of the list item's within the drop down.
338 //
339 var self = Foundation.libs.forms;
340 self.hidden_fix.adjust($customList);
341
342 maxWidth = (self.outerWidth($listItems) > maxWidth) ? self.outerWidth($listItems) : maxWidth;
343
344 Foundation.libs.forms.hidden_fix.reset();
345
346 $customSelect.removeClass('open');
347
348 } // endif
349
350 },
351
352 assign_id: function ($select, $customSelect) {
353 var id = [+new Date(), Foundation.random_str(5)].join('-');
354 $select.attr('data-id', id);
355 $customSelect.attr('data-id', id);
356 },
357
358 refresh_custom_select: function ($select, force_refresh) {
359 var self = this;
360 var maxWidth = 0,
361 $customSelect = $select.next(),
362 $options = $select.find('option'),
363 $listItems = $customSelect.find('li');
364
365 if ($listItems.length !== this.cache[$customSelect.data('id')] || force_refresh) {
366 $customSelect.find('ul').html('');
367
368 $options.each(function () {
369 var $li = $('<li>' + $(this).html() + '</li>');
370 $customSelect.find('ul').append($li);
371 });
372
373 // re-populate
374 $options.each(function (index) {
375 if (this.selected) {
376 $customSelect.find('li').eq(index).addClass('selected');
377 $customSelect.find('.current').html($(this).html());
378 }
379 if ($(this).is(':disabled')) {
380 $customSelect.find('li').eq(index).addClass('disabled');
381 }
382 });
383
384 // fix width
385 $customSelect.removeAttr('style')
386 .find('ul').removeAttr('style');
387 $customSelect.find('li').each(function () {
388 $customSelect.addClass('open');
389 if (self.outerWidth($(this)) > maxWidth) {
390 maxWidth = self.outerWidth($(this));
391 }
392 $customSelect.removeClass('open');
393 });
394
395 $listItems = $customSelect.find('li');
396 // cache list length
397 this.cache[$customSelect.data('id')] = $listItems.length;
398 }
399 },
400
401 toggle_checkbox: function ($element) {
402 var $input = $element.prev(),
403 input = $input[0];
404
405 if (false === $input.is(':disabled')) {
406 input.checked = ((input.checked) ? false : true);
407 $element.toggleClass('checked');
408
409 $input.trigger('change');
410 }
411 },
412
413 toggle_radio: function ($element) {
414 var $input = $element.prev(),
415 $form = $input.closest('form.custom'),
416 input = $input[0];
417
418 if (false === $input.is(':disabled')) {
419 $form.find('input[type="radio"][name="' + this.escape($input.attr('name')) + '"]')
420 .next().not($element).removeClass('checked');
421
422 if (!$element.hasClass('checked')) {
423 $element.toggleClass('checked');
424 }
425
426 input.checked = $element.hasClass('checked');
427
428 $input.trigger('change');
429 }
430 },
431
432 escape: function (text) {
433 if (!text) return '';
434 return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
435 },
436
437 hidden_fix: {
438 /**
439 * Sets all hidden parent elements and self to visibile.
440 *
441 * @method adjust
442 * @param {jQuery Object} $child
443 */
444
445 // We'll use this to temporarily store style properties.
446 tmp: [],
447
448 // We'll use this to set hidden parent elements.
449 hidden: null,
450
451 adjust: function ($child) {
452 // Internal reference.
453 var _self = this;
454
455 // Set all hidden parent elements, including this element.
456 _self.hidden = $child.parents();
457 _self.hidden = _self.hidden.add($child).filter(":hidden");
458
459 // Loop through all hidden elements.
460 _self.hidden.each(function () {
461
462 // Cache the element.
463 var $elem = $(this);
464
465 // Store the style attribute.
466 // Undefined if element doesn't have a style attribute.
467 _self.tmp.push($elem.attr('style'));
468
469 // Set the element's display property to block,
470 // but ensure it's visibility is hidden.
471 $elem.css({
472 'visibility': 'hidden',
473 'display': 'block'
474 });
475 });
476
477 }, // end adjust
478
479 /**
480 * Resets the elements previous state.
481 *
482 * @method reset
483 */
484 reset: function () {
485 // Internal reference.
486 var _self = this;
487 // Loop through our hidden element collection.
488 _self.hidden.each(function (i) {
489 // Cache this element.
490 var $elem = $(this),
491 _tmp = _self.tmp[i]; // Get the stored 'style' value for this element.
492
493 // If the stored value is undefined.
494 if (_tmp === undefined)
495 // Remove the style attribute.
496 $elem.removeAttr('style');
497 else
498 // Otherwise, reset the element style attribute.
499 $elem.attr('style', _tmp);
500 });
501 // Reset the tmp array.
502 _self.tmp = [];
503 // Reset the hidden elements variable.
504 _self.hidden = null;
505
506 } // end reset
507 },
508
509 off: function () {
510 $(this.scope).off('.fndtn.forms');
511 },
512
513 reflow : function () {}
514 };
515
516 var getFirstPrevSibling = function($el, selector) {
517 var $el = $el.prev();
518 while ($el.length) {
519 if ($el.is(selector)) return $el;
520 $el = $el.prev();
521 }
522 return $();
523 };
524 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.interchange = {
6 name : 'interchange',
7
8 version : '4.2.2',
9
10 cache : {},
11
12 settings : {
13 load_attr : 'interchange',
14
15 named_queries : {
16 'default' : 'only screen and (min-width: 1px)',
17 small : 'only screen and (min-width: 768px)',
18 medium : 'only screen and (min-width: 1280px)',
19 large : 'only screen and (min-width: 1440px)',
20 landscape : 'only screen and (orientation: landscape)',
21 portrait : 'only screen and (orientation: portrait)',
22 retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
23 'only screen and (min--moz-device-pixel-ratio: 2),' +
24 'only screen and (-o-min-device-pixel-ratio: 2/1),' +
25 'only screen and (min-device-pixel-ratio: 2),' +
26 'only screen and (min-resolution: 192dpi),' +
27 'only screen and (min-resolution: 2dppx)'
28 },
29
30 directives : {
31 replace : function (el, path) {
32 if (/IMG/.test(el[0].nodeName)) {
33 var path_parts = path.split('/'),
34 path_file = path_parts[path_parts.length - 1],
35 orig_path = el[0].src;
36
37 if (new RegExp(path_file, 'i').test(el[0].src)) return;
38
39 el[0].src = path;
40
41 return el.trigger('replace', [el[0].src, orig_path]);
42 }
43 }
44 }
45 },
46
47 init : function (scope, method, options) {
48 Foundation.inherit(this, 'throttle');
49
50 if (typeof method === 'object') {
51 $.extend(true, this.settings, method);
52 }
53
54 this.events();
55 this.images();
56
57 if (typeof method !== 'string') {
58 return this.settings.init;
59 } else {
60 return this[method].call(this, options);
61 }
62 },
63
64 events : function () {
65 var self = this;
66
67 $(window).on('resize.fndtn.interchange', self.throttle(function () {
68 self.resize.call(self);
69 }, 50));
70 },
71
72 resize : function () {
73 var cache = this.cache;
74
75 for (var uuid in cache) {
76 if (cache.hasOwnProperty(uuid)) {
77 var passed = this.results(uuid, cache[uuid]);
78
79 if (passed) {
80 this.settings.directives[passed
81 .scenario[1]](passed.el, passed.scenario[0]);
82 }
83 }
84 }
85
86 },
87
88 results : function (uuid, scenarios) {
89 var count = scenarios.length,
90 results_arr = [];
91
92 if (count > 0) {
93 var el = $('[data-uuid="' + uuid + '"]');
94
95 for (var i = count - 1; i >= 0; i--) {
96 var rule = scenarios[i][2];
97 if (this.settings.named_queries.hasOwnProperty(rule)) {
98 var mq = matchMedia(this.settings.named_queries[rule]);
99 } else {
100 var mq = matchMedia(scenarios[i][2]);
101 }
102 if (mq.matches) {
103 return {el: el, scenario: scenarios[i]};
104 }
105 }
106 }
107
108 return false;
109 },
110
111 images : function (force_update) {
112 if (typeof this.cached_images === 'undefined' || force_update) {
113 return this.update_images();
114 }
115
116 return this.cached_images;
117 },
118
119 update_images : function () {
120 var images = document.getElementsByTagName('img'),
121 count = images.length,
122 data_attr = 'data-' + this.settings.load_attr;
123
124 this.cached_images = [];
125
126 for (var i = count - 1; i >= 0; i--) {
127 this.loaded($(images[i]), (i === 0), function (image, last) {
128 if (image) {
129 var str = image.getAttribute(data_attr) || '';
130
131 if (str.length > 0) {
132 this.cached_images.push(image);
133 }
134 }
135
136 if (last) this.enhance();
137
138 }.bind(this));
139 }
140
141 return 'deferred';
142 },
143
144 // based on jquery.imageready.js
145 // @weblinc, @jsantell, (c) 2012
146
147 loaded : function (image, last, callback) {
148 function loaded () {
149 callback(image[0], last);
150 }
151
152 function bindLoad () {
153 this.one('load', loaded);
154
155 if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
156 var src = this.attr( 'src' ),
157 param = src.match( /\?/ ) ? '&' : '?';
158
159 param += 'random=' + (new Date()).getTime();
160 this.attr('src', src + param);
161 }
162 }
163
164 if (!image.attr('src')) {
165 loaded();
166 return;
167 }
168
169 if (image[0].complete || image[0].readyState === 4) {
170 loaded();
171 } else {
172 bindLoad.call(image);
173 }
174 },
175
176 enhance : function () {
177 var count = this.images().length;
178
179 for (var i = count - 1; i >= 0; i--) {
180 this._object($(this.images()[i]));
181 }
182
183 return $(window).trigger('resize');
184 },
185
186 parse_params : function (path, directive, mq) {
187 return [this.trim(path), this.convert_directive(directive), this.trim(mq)];
188 },
189
190 convert_directive : function (directive) {
191 var trimmed = this.trim(directive);
192
193 if (trimmed.length > 0) {
194 return trimmed;
195 }
196
197 return 'replace';
198 },
199
200 _object : function(el) {
201 var raw_arr = this.parse_data_attr(el),
202 scenarios = [], count = raw_arr.length;
203
204 if (count > 0) {
205 for (var i = count - 1; i >= 0; i--) {
206 var split = raw_arr[i].split(/\((.*?)(\))$/);
207
208 if (split.length > 1) {
209 var cached_split = split[0].split(','),
210 params = this.parse_params(cached_split[0],
211 cached_split[1], split[1]);
212
213 scenarios.push(params);
214 }
215 }
216 }
217
218 return this.store(el, scenarios);
219 },
220
221 uuid : function (separator) {
222 var delim = separator || "-";
223
224 function S4() {
225 return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
226 }
227
228 return (S4() + S4() + delim + S4() + delim + S4()
229 + delim + S4() + delim + S4() + S4() + S4());
230 },
231
232 store : function (el, scenarios) {
233 var uuid = this.uuid(),
234 current_uuid = el.data('uuid');
235
236 if (current_uuid) return this.cache[current_uuid];
237
238 el.attr('data-uuid', uuid);
239
240 return this.cache[uuid] = scenarios;
241 },
242
243 trim : function(str) {
244 if (typeof str === 'string') {
245 return $.trim(str);
246 }
247
248 return str;
249 },
250
251 parse_data_attr : function (el) {
252 var raw = el.data(this.settings.load_attr).split(/\[(.*?)\]/),
253 count = raw.length, output = [];
254
255 for (var i = count - 1; i >= 0; i--) {
256 if (raw[i].replace(/[\W\d]+/, '').length > 4) {
257 output.push(raw[i]);
258 }
259 }
260
261 return output;
262 },
263
264 reflow : function () {
265 this.images(true);
266 }
267
268 };
269
270 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 (function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.joyride = {
6 name: 'joyride',
7
8 version : '4.2.2',
9
10 defaults : {
11 expose : false, // turn on or off the expose feature
12 modal : false, // Whether to cover page with modal during the tour
13 tipLocation : 'bottom', // 'top' or 'bottom' in relation to parent
14 nubPosition : 'auto', // override on a per tooltip bases
15 scrollSpeed : 300, // Page scrolling speed in milliseconds, 0 = no scroll animation
16 timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
17 startTimerOnClick : true, // true or false - true requires clicking the first button start the timer
18 startOffset : 0, // the index of the tooltip you want to start on (index of the li)
19 nextButton : true, // true or false to control whether a next button is used
20 tipAnimation : 'fade', // 'pop' or 'fade' in each tip
21 pauseAfter : [], // array of indexes where to pause the tour after
22 exposed : [], // array of expose elements
23 tipAnimationFadeSpeed: 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
24 cookieMonster : false, // true or false to control whether cookies are used
25 cookieName : 'joyride', // Name the cookie you'll use
26 cookieDomain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
27 cookieExpires : 365, // set when you would like the cookie to expire.
28 tipContainer : 'body', // Where will the tip be attached
29 postRideCallback : function (){}, // A method to call once the tour closes (canceled or complete)
30 postStepCallback : function (){}, // A method to call after each step
31 preStepCallback : function (){}, // A method to call before each step
32 preRideCallback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
33 postExposeCallback : function (){}, // A method to call after an element has been exposed
34 template : { // HTML segments for tip layout
35 link : '<a href="#close" class="joyride-close-tip">&times;</a>',
36 timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
37 tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
38 wrapper : '<div class="joyride-content-wrapper"></div>',
39 button : '<a href="#" class="small button joyride-next-tip"></a>',
40 modal : '<div class="joyride-modal-bg"></div>',
41 expose : '<div class="joyride-expose-wrapper"></div>',
42 exposeCover: '<div class="joyride-expose-cover"></div>'
43 },
44 exposeAddClass : '' // One or more space-separated class names to be added to exposed element
45 },
46
47 settings : {},
48
49 init : function (scope, method, options) {
50 this.scope = scope || this.scope;
51 Foundation.inherit(this, 'throttle data_options scrollTo scrollLeft delay');
52
53 if (typeof method === 'object') {
54 $.extend(true, this.settings, this.defaults, method);
55 } else {
56 $.extend(true, this.settings, this.defaults, options);
57 }
58
59 if (typeof method !== 'string') {
60 if (!this.settings.init) this.events();
61
62 return this.settings.init;
63 } else {
64 return this[method].call(this, options);
65 }
66 },
67
68 events : function () {
69 var self = this;
70
71 $(this.scope)
72 .on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
73 e.preventDefault();
74
75 if (this.settings.$li.next().length < 1) {
76 this.end();
77 } else if (this.settings.timer > 0) {
78 clearTimeout(this.settings.automate);
79 this.hide();
80 this.show();
81 this.startTimer();
82 } else {
83 this.hide();
84 this.show();
85 }
86
87 }.bind(this))
88
89 .on('click.joyride', '.joyride-close-tip', function (e) {
90 e.preventDefault();
91 this.end();
92 }.bind(this));
93
94 $(window).on('resize.fndtn.joyride', self.throttle(function () {
95 if ($('[data-joyride]').length > 0 && self.settings.$next_tip) {
96 if (self.settings.exposed.length > 0) {
97 var $els = $(self.settings.exposed);
98
99 $els.each(function () {
100 var $this = $(this);
101 self.un_expose($this);
102 self.expose($this);
103 });
104 }
105
106 if (self.is_phone()) {
107 self.pos_phone();
108 } else {
109 self.pos_default(false, true);
110 }
111 }
112 }, 100));
113
114 this.settings.init = true;
115 },
116
117 start : function () {
118 var self = this,
119 $this = $(this.scope).find('[data-joyride]'),
120 integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
121 int_settings_count = integer_settings.length;
122
123 if (!this.settings.init) this.init();
124
125 // non configureable settings
126 this.settings.$content_el = $this;
127 this.settings.$body = $(this.settings.tipContainer);
128 this.settings.body_offset = $(this.settings.tipContainer).position();
129 this.settings.$tip_content = this.settings.$content_el.find('> li');
130 this.settings.paused = false;
131 this.settings.attempts = 0;
132
133 this.settings.tipLocationPatterns = {
134 top: ['bottom'],
135 bottom: [], // bottom should not need to be repositioned
136 left: ['right', 'top', 'bottom'],
137 right: ['left', 'top', 'bottom']
138 };
139
140 // can we create cookies?
141 if (typeof $.cookie !== 'function') {
142 this.settings.cookieMonster = false;
143 }
144
145 // generate the tips and insert into dom.
146 if (!this.settings.cookieMonster || this.settings.cookieMonster && $.cookie(this.settings.cookieName) === null) {
147 this.settings.$tip_content.each(function (index) {
148 var $this = $(this);
149 $.extend(true, self.settings, self.data_options($this));
150 // Make sure that settings parsed from data_options are integers where necessary
151 for (var i = int_settings_count - 1; i >= 0; i--) {
152 self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
153 }
154 self.create({$li : $this, index : index});
155 });
156
157 // show first tip
158 if (!this.settings.startTimerOnClick && this.settings.timer > 0) {
159 this.show('init');
160 this.startTimer();
161 } else {
162 this.show('init');
163 }
164
165 }
166 },
167
168 resume : function () {
169 this.set_li();
170 this.show();
171 },
172
173 tip_template : function (opts) {
174 var $blank, content;
175
176 opts.tip_class = opts.tip_class || '';
177
178 $blank = $(this.settings.template.tip).addClass(opts.tip_class);
179 content = $.trim($(opts.li).html()) +
180 this.button_text(opts.button_text) +
181 this.settings.template.link +
182 this.timer_instance(opts.index);
183
184 $blank.append($(this.settings.template.wrapper));
185 $blank.first().attr('data-index', opts.index);
186 $('.joyride-content-wrapper', $blank).append(content);
187
188 return $blank[0];
189 },
190
191 timer_instance : function (index) {
192 var txt;
193
194 if ((index === 0 && this.settings.startTimerOnClick && this.settings.timer > 0) || this.settings.timer === 0) {
195 txt = '';
196 } else {
197 txt = this.outerHTML($(this.settings.template.timer)[0]);
198 }
199 return txt;
200 },
201
202 button_text : function (txt) {
203 if (this.settings.nextButton) {
204 txt = $.trim(txt) || 'Next';
205 txt = this.outerHTML($(this.settings.template.button).append(txt)[0]);
206 } else {
207 txt = '';
208 }
209 return txt;
210 },
211
212 create : function (opts) {
213 var buttonText = opts.$li.attr('data-button') || opts.$li.attr('data-text'),
214 tipClass = opts.$li.attr('class'),
215 $tip_content = $(this.tip_template({
216 tip_class : tipClass,
217 index : opts.index,
218 button_text : buttonText,
219 li : opts.$li
220 }));
221
222 $(this.settings.tipContainer).append($tip_content);
223 },
224
225 show : function (init) {
226 var $timer = null;
227
228 // are we paused?
229 if (this.settings.$li === undefined
230 || ($.inArray(this.settings.$li.index(), this.settings.pauseAfter) === -1)) {
231
232 // don't go to the next li if the tour was paused
233 if (this.settings.paused) {
234 this.settings.paused = false;
235 } else {
236 this.set_li(init);
237 }
238
239 this.settings.attempts = 0;
240
241 if (this.settings.$li.length && this.settings.$target.length > 0) {
242 if (init) { //run when we first start
243 this.settings.preRideCallback(this.settings.$li.index(), this.settings.$next_tip);
244 if (this.settings.modal) {
245 this.show_modal();
246 }
247 }
248
249 this.settings.preStepCallback(this.settings.$li.index(), this.settings.$next_tip);
250
251 if (this.settings.modal && this.settings.expose) {
252 this.expose();
253 }
254
255 this.settings.tipSettings = $.extend(this.settings, this.data_options(this.settings.$li));
256
257 this.settings.timer = parseInt(this.settings.timer, 10);
258
259 this.settings.tipSettings.tipLocationPattern = this.settings.tipLocationPatterns[this.settings.tipSettings.tipLocation];
260
261 // scroll if not modal
262 if (!/body/i.test(this.settings.$target.selector)) {
263 this.scroll_to();
264 }
265
266 if (this.is_phone()) {
267 this.pos_phone(true);
268 } else {
269 this.pos_default(true);
270 }
271
272 $timer = this.settings.$next_tip.find('.joyride-timer-indicator');
273
274 if (/pop/i.test(this.settings.tipAnimation)) {
275
276 $timer.width(0);
277
278 if (this.settings.timer > 0) {
279
280 this.settings.$next_tip.show();
281
282 this.delay(function () {
283 $timer.animate({
284 width: $timer.parent().width()
285 }, this.settings.timer, 'linear');
286 }.bind(this), this.settings.tipAnimationFadeSpeed);
287
288 } else {
289 this.settings.$next_tip.show();
290
291 }
292
293
294 } else if (/fade/i.test(this.settings.tipAnimation)) {
295
296 $timer.width(0);
297
298 if (this.settings.timer > 0) {
299
300 this.settings.$next_tip
301 .fadeIn(this.settings.tipAnimationFadeSpeed)
302 .show();
303
304 this.delay(function () {
305 $timer.animate({
306 width: $timer.parent().width()
307 }, this.settings.timer, 'linear');
308 }.bind(this), this.settings.tipAnimationFadeSpeed);
309
310 } else {
311 this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed);
312
313 }
314 }
315
316 this.settings.$current_tip = this.settings.$next_tip;
317
318 // skip non-existant targets
319 } else if (this.settings.$li && this.settings.$target.length < 1) {
320
321 this.show();
322
323 } else {
324
325 this.end();
326
327 }
328 } else {
329
330 this.settings.paused = true;
331
332 }
333
334 },
335
336 is_phone : function () {
337 if (Modernizr) {
338 return Modernizr.mq('only screen and (max-width: 767px)') || $('.lt-ie9').length > 0;
339 }
340
341 return (this.settings.$window.width() < 767);
342 },
343
344 hide : function () {
345 if (this.settings.modal && this.settings.expose) {
346 this.un_expose();
347 }
348
349 if (!this.settings.modal) {
350 $('.joyride-modal-bg').hide();
351 }
352 this.settings.$current_tip.hide();
353 this.settings.postStepCallback(this.settings.$li.index(),
354 this.settings.$current_tip);
355 },
356
357 set_li : function (init) {
358 if (init) {
359 this.settings.$li = this.settings.$tip_content.eq(this.settings.startOffset);
360 this.set_next_tip();
361 this.settings.$current_tip = this.settings.$next_tip;
362 } else {
363 this.settings.$li = this.settings.$li.next();
364 this.set_next_tip();
365 }
366
367 this.set_target();
368 },
369
370 set_next_tip : function () {
371 this.settings.$next_tip = $(".joyride-tip-guide[data-index='" + this.settings.$li.index() + "']");
372 this.settings.$next_tip.data('closed', '');
373 },
374
375 set_target : function () {
376 var cl = this.settings.$li.attr('data-class'),
377 id = this.settings.$li.attr('data-id'),
378 $sel = function () {
379 if (id) {
380 return $(document.getElementById(id));
381 } else if (cl) {
382 return $('.' + cl).first();
383 } else {
384 return $('body');
385 }
386 };
387
388 this.settings.$target = $sel();
389 },
390
391 scroll_to : function () {
392 var window_half, tipOffset;
393
394 window_half = $(window).height() / 2;
395 tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.outerHeight(this.settings.$next_tip));
396 if (tipOffset > 0) {
397 this.scrollTo($('html, body'), tipOffset, this.settings.scrollSpeed);
398 }
399 },
400
401 paused : function () {
402 return ($.inArray((this.settings.$li.index() + 1), this.settings.pauseAfter) === -1);
403 },
404
405 restart : function () {
406 this.hide();
407 this.settings.$li = undefined;
408 this.show('init');
409 },
410
411 pos_default : function (init, resizing) {
412 var half_fold = Math.ceil($(window).height() / 2),
413 tip_position = this.settings.$next_tip.offset(),
414 $nub = this.settings.$next_tip.find('.joyride-nub'),
415 nub_width = Math.ceil(this.outerWidth($nub) / 2),
416 nub_height = Math.ceil(this.outerHeight($nub) / 2),
417 toggle = init || false;
418
419 // tip must not be "display: none" to calculate position
420 if (toggle) {
421 this.settings.$next_tip.css('visibility', 'hidden');
422 this.settings.$next_tip.show();
423 }
424
425 if (typeof resizing === 'undefined') {
426 resizing = false;
427 }
428
429 if (!/body/i.test(this.settings.$target.selector)) {
430
431 if (this.bottom()) {
432 var leftOffset = this.settings.$target.offset().left;
433 if (Foundation.rtl) {
434 leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset;
435 }
436 this.settings.$next_tip.css({
437 top: (this.settings.$target.offset().top + nub_height + this.outerHeight(this.settings.$target)),
438 left: leftOffset});
439
440 this.nub_position($nub, this.settings.tipSettings.nubPosition, 'top');
441
442 } else if (this.top()) {
443 var leftOffset = this.settings.$target.offset().left;
444 if (Foundation.rtl) {
445 leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset;
446 }
447 this.settings.$next_tip.css({
448 top: (this.settings.$target.offset().top - this.outerHeight(this.settings.$next_tip) - nub_height),
449 left: leftOffset});
450
451 this.nub_position($nub, this.settings.tipSettings.nubPosition, 'bottom');
452
453 } else if (this.right()) {
454
455 this.settings.$next_tip.css({
456 top: this.settings.$target.offset().top,
457 left: (this.outerWidth(this.settings.$target) + this.settings.$target.offset().left + nub_width)});
458
459 this.nub_position($nub, this.settings.tipSettings.nubPosition, 'left');
460
461 } else if (this.left()) {
462
463 this.settings.$next_tip.css({
464 top: this.settings.$target.offset().top,
465 left: (this.settings.$target.offset().left - this.outerWidth(this.settings.$next_tip) - nub_width)});
466
467 this.nub_position($nub, this.settings.tipSettings.nubPosition, 'right');
468
469 }
470
471 if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tipSettings.tipLocationPattern.length) {
472
473 $nub.removeClass('bottom')
474 .removeClass('top')
475 .removeClass('right')
476 .removeClass('left');
477
478 this.settings.tipSettings.tipLocation = this.settings.tipSettings.tipLocationPattern[this.settings.attempts];
479
480 this.settings.attempts++;
481
482 this.pos_default();
483
484 }
485
486 } else if (this.settings.$li.length) {
487
488 this.pos_modal($nub);
489
490 }
491
492 if (toggle) {
493 this.settings.$next_tip.hide();
494 this.settings.$next_tip.css('visibility', 'visible');
495 }
496
497 },
498
499 pos_phone : function (init) {
500 var tip_height = this.outerHeight(this.settings.$next_tip),
501 tip_offset = this.settings.$next_tip.offset(),
502 target_height = this.outerHeight(this.settings.$target),
503 $nub = $('.joyride-nub', this.settings.$next_tip),
504 nub_height = Math.ceil(this.outerHeight($nub) / 2),
505 toggle = init || false;
506
507 $nub.removeClass('bottom')
508 .removeClass('top')
509 .removeClass('right')
510 .removeClass('left');
511
512 if (toggle) {
513 this.settings.$next_tip.css('visibility', 'hidden');
514 this.settings.$next_tip.show();
515 }
516
517 if (!/body/i.test(this.settings.$target.selector)) {
518
519 if (this.top()) {
520
521 this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height});
522 $nub.addClass('bottom');
523
524 } else {
525
526 this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height});
527 $nub.addClass('top');
528
529 }
530
531 } else if (this.settings.$li.length) {
532 this.pos_modal($nub);
533 }
534
535 if (toggle) {
536 this.settings.$next_tip.hide();
537 this.settings.$next_tip.css('visibility', 'visible');
538 }
539 },
540
541 pos_modal : function ($nub) {
542 this.center();
543 $nub.hide();
544
545 this.show_modal();
546 },
547
548 show_modal : function () {
549 if (!this.settings.$next_tip.data('closed')) {
550 var joyridemodalbg = $('.joyride-modal-bg');
551 if (joyridemodalbg.length < 1) {
552 $('body').append(this.settings.template.modal).show();
553 }
554
555 if (/pop/i.test(this.settings.tipAnimation)) {
556 joyridemodalbg.show();
557 } else {
558 joyridemodalbg.fadeIn(this.settings.tipAnimationFadeSpeed);
559 }
560 }
561 },
562
563 expose : function () {
564 var expose,
565 exposeCover,
566 el,
567 origCSS,
568 origClasses,
569 randId = 'expose-'+Math.floor(Math.random()*10000);
570
571 if (arguments.length > 0 && arguments[0] instanceof $) {
572 el = arguments[0];
573 } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
574 el = this.settings.$target;
575 } else {
576 return false;
577 }
578
579 if(el.length < 1){
580 if(window.console){
581 console.error('element not valid', el);
582 }
583 return false;
584 }
585
586 expose = $(this.settings.template.expose);
587 this.settings.$body.append(expose);
588 expose.css({
589 top: el.offset().top,
590 left: el.offset().left,
591 width: this.outerWidth(el, true),
592 height: this.outerHeight(el, true)
593 });
594
595 exposeCover = $(this.settings.template.exposeCover);
596
597 origCSS = {
598 zIndex: el.css('z-index'),
599 position: el.css('position')
600 };
601
602 origClasses = el.attr('class') == null ? '' : el.attr('class');
603
604 el.css('z-index',parseInt(expose.css('z-index'))+1);
605
606 if (origCSS.position == 'static') {
607 el.css('position','relative');
608 }
609
610 el.data('expose-css',origCSS);
611 el.data('orig-class', origClasses);
612 el.attr('class', origClasses + ' ' + this.settings.exposeAddClass);
613
614 exposeCover.css({
615 top: el.offset().top,
616 left: el.offset().left,
617 width: this.outerWidth(el, true),
618 height: this.outerHeight(el, true)
619 });
620
621 this.settings.$body.append(exposeCover);
622 expose.addClass(randId);
623 exposeCover.addClass(randId);
624 el.data('expose', randId);
625 this.settings.postExposeCallback(this.settings.$li.index(), this.settings.$next_tip, el);
626 this.add_exposed(el);
627 },
628
629 un_expose : function () {
630 var exposeId,
631 el,
632 expose ,
633 origCSS,
634 origClasses,
635 clearAll = false;
636
637 if (arguments.length > 0 && arguments[0] instanceof $) {
638 el = arguments[0];
639 } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
640 el = this.settings.$target;
641 } else {
642 return false;
643 }
644
645 if(el.length < 1){
646 if (window.console) {
647 console.error('element not valid', el);
648 }
649 return false;
650 }
651
652 exposeId = el.data('expose');
653 expose = $('.' + exposeId);
654
655 if (arguments.length > 1) {
656 clearAll = arguments[1];
657 }
658
659 if (clearAll === true) {
660 $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
661 } else {
662 expose.remove();
663 }
664
665 origCSS = el.data('expose-css');
666
667 if (origCSS.zIndex == 'auto') {
668 el.css('z-index', '');
669 } else {
670 el.css('z-index', origCSS.zIndex);
671 }
672
673 if (origCSS.position != el.css('position')) {
674 if(origCSS.position == 'static') {// this is default, no need to set it.
675 el.css('position', '');
676 } else {
677 el.css('position', origCSS.position);
678 }
679 }
680
681 origClasses = el.data('orig-class');
682 el.attr('class', origClasses);
683 el.removeData('orig-classes');
684
685 el.removeData('expose');
686 el.removeData('expose-z-index');
687 this.remove_exposed(el);
688 },
689
690 add_exposed: function(el){
691 this.settings.exposed = this.settings.exposed || [];
692 if (el instanceof $ || typeof el === 'object') {
693 this.settings.exposed.push(el[0]);
694 } else if (typeof el == 'string') {
695 this.settings.exposed.push(el);
696 }
697 },
698
699 remove_exposed: function(el){
700 var search, count;
701 if (el instanceof $) {
702 search = el[0]
703 } else if (typeof el == 'string'){
704 search = el;
705 }
706
707 this.settings.exposed = this.settings.exposed || [];
708 count = this.settings.exposed.length;
709
710 for (var i=0; i < count; i++) {
711 if (this.settings.exposed[i] == search) {
712 this.settings.exposed.splice(i, 1);
713 return;
714 }
715 }
716 },
717
718 center : function () {
719 var $w = $(window);
720
721 this.settings.$next_tip.css({
722 top : ((($w.height() - this.outerHeight(this.settings.$next_tip)) / 2) + $w.scrollTop()),
723 left : ((($w.width() - this.outerWidth(this.settings.$next_tip)) / 2) + this.scrollLeft($w))
724 });
725
726 return true;
727 },
728
729 bottom : function () {
730 return /bottom/i.test(this.settings.tipSettings.tipLocation);
731 },
732
733 top : function () {
734 return /top/i.test(this.settings.tipSettings.tipLocation);
735 },
736
737 right : function () {
738 return /right/i.test(this.settings.tipSettings.tipLocation);
739 },
740
741 left : function () {
742 return /left/i.test(this.settings.tipSettings.tipLocation);
743 },
744
745 corners : function (el) {
746 var w = $(window),
747 window_half = w.height() / 2,
748 //using this to calculate since scroll may not have finished yet.
749 tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
750 right = w.width() + this.scrollLeft(w),
751 offsetBottom = w.height() + tipOffset,
752 bottom = w.height() + w.scrollTop(),
753 top = w.scrollTop();
754
755 if (tipOffset < top) {
756 if (tipOffset < 0) {
757 top = 0;
758 } else {
759 top = tipOffset;
760 }
761 }
762
763 if (offsetBottom > bottom) {
764 bottom = offsetBottom;
765 }
766
767 return [
768 el.offset().top < top,
769 right < el.offset().left + el.outerWidth(),
770 bottom < el.offset().top + el.outerHeight(),
771 this.scrollLeft(w) > el.offset().left
772 ];
773 },
774
775 visible : function (hidden_corners) {
776 var i = hidden_corners.length;
777
778 while (i--) {
779 if (hidden_corners[i]) return false;
780 }
781
782 return true;
783 },
784
785 nub_position : function (nub, pos, def) {
786 if (pos === 'auto') {
787 nub.addClass(def);
788 } else {
789 nub.addClass(pos);
790 }
791 },
792
793 startTimer : function () {
794 if (this.settings.$li.length) {
795 this.settings.automate = setTimeout(function () {
796 this.hide();
797 this.show();
798 this.startTimer();
799 }.bind(this), this.settings.timer);
800 } else {
801 clearTimeout(this.settings.automate);
802 }
803 },
804
805 end : function () {
806 if (this.settings.cookieMonster) {
807 $.cookie(this.settings.cookieName, 'ridden', { expires: this.settings.cookieExpires, domain: this.settings.cookieDomain });
808 }
809
810 if (this.settings.timer > 0) {
811 clearTimeout(this.settings.automate);
812 }
813
814 if (this.settings.modal && this.settings.expose) {
815 this.un_expose();
816 }
817
818 this.settings.$next_tip.data('closed', true);
819
820 $('.joyride-modal-bg').hide();
821 this.settings.$current_tip.hide();
822 this.settings.postStepCallback(this.settings.$li.index(), this.settings.$current_tip);
823 this.settings.postRideCallback(this.settings.$li.index(), this.settings.$current_tip);
824 $('.joyride-tip-guide').remove();
825 },
826
827 outerHTML : function (el) {
828 // support FireFox < 11
829 return el.outerHTML || new XMLSerializer().serializeToString(el);
830 },
831
832 off : function () {
833 $(this.scope).off('.joyride');
834 $(window).off('.joyride');
835 $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
836 $('.joyride-tip-guide, .joyride-modal-bg').remove();
837 clearTimeout(this.settings.automate);
838 this.settings = {};
839 },
840
841 reflow : function () {}
842 };
843 }(Foundation.zj, this, this.document));
0 /*
1 * Foundation Responsive Library
2 * http://foundation.zurb.com
3 * Copyright 2013, ZURB
4 * Free to use under the MIT license.
5 * http://www.opensource.org/licenses/mit-license.php
6 */
7
8 /*jslint unparam: true, browser: true, indent: 2 */
9
10 // Accommodate running jQuery or Zepto in noConflict() mode by
11 // using an anonymous function to redefine the $ shorthand name.
12 // See http://docs.jquery.com/Using_jQuery_with_Other_Libraries
13 // and http://zeptojs.com/
14 var libFuncName = null;
15
16 if (typeof jQuery === "undefined" &&
17 typeof Zepto === "undefined" &&
18 typeof $ === "function") {
19 libFuncName = $;
20 } else if (typeof jQuery === "function") {
21 libFuncName = jQuery;
22 } else if (typeof Zepto === "function") {
23 libFuncName = Zepto;
24 } else {
25 throw new TypeError();
26 }
27
28 (function ($, window, document, undefined) {
29 'use strict';
30
31 /*
32 matchMedia() polyfill - Test a CSS media
33 type/query in JS. Authors & copyright (c) 2012:
34 Scott Jehl, Paul Irish, Nicholas Zakas.
35 Dual MIT/BSD license
36
37 https://github.com/paulirish/matchMedia.js
38 */
39
40 window.matchMedia = window.matchMedia || (function( doc, undefined ) {
41
42 "use strict";
43
44 var bool,
45 docElem = doc.documentElement,
46 refNode = docElem.firstElementChild || docElem.firstChild,
47 // fakeBody required for <FF4 when executed in <head>
48 fakeBody = doc.createElement( "body" ),
49 div = doc.createElement( "div" );
50
51 div.id = "mq-test-1";
52 div.style.cssText = "position:absolute;top:-100em";
53 fakeBody.style.background = "none";
54 fakeBody.appendChild(div);
55
56 return function(q){
57
58 div.innerHTML = "&shy;<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>";
59
60 docElem.insertBefore( fakeBody, refNode );
61 bool = div.offsetWidth === 42;
62 docElem.removeChild( fakeBody );
63
64 return {
65 matches: bool,
66 media: q
67 };
68
69 };
70
71 }( document ));
72
73 // add dusty browser stuff
74 if (!Array.prototype.filter) {
75 Array.prototype.filter = function(fun /*, thisp */) {
76 "use strict";
77
78 if (this == null) {
79 throw new TypeError();
80 }
81
82 var t = Object(this),
83 len = t.length >>> 0;
84 if (typeof fun !== "function") {
85 return;
86 }
87
88 var res = [],
89 thisp = arguments[1];
90 for (var i = 0; i < len; i++) {
91 if (i in t) {
92 var val = t[i]; // in case fun mutates this
93 if (fun && fun.call(thisp, val, i, t)) {
94 res.push(val);
95 }
96 }
97 }
98
99 return res;
100 }
101 }
102
103 if (!Function.prototype.bind) {
104 Function.prototype.bind = function (oThis) {
105 if (typeof this !== "function") {
106 // closest thing possible to the ECMAScript 5 internal IsCallable function
107 throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
108 }
109
110 var aArgs = Array.prototype.slice.call(arguments, 1),
111 fToBind = this,
112 fNOP = function () {},
113 fBound = function () {
114 return fToBind.apply(this instanceof fNOP && oThis
115 ? this
116 : oThis,
117 aArgs.concat(Array.prototype.slice.call(arguments)));
118 };
119
120 fNOP.prototype = this.prototype;
121 fBound.prototype = new fNOP();
122
123 return fBound;
124 };
125 }
126
127 if (!Array.prototype.indexOf) {
128 Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
129 "use strict";
130 if (this == null) {
131 throw new TypeError();
132 }
133 var t = Object(this);
134 var len = t.length >>> 0;
135 if (len === 0) {
136 return -1;
137 }
138 var n = 0;
139 if (arguments.length > 1) {
140 n = Number(arguments[1]);
141 if (n != n) { // shortcut for verifying if it's NaN
142 n = 0;
143 } else if (n != 0 && n != Infinity && n != -Infinity) {
144 n = (n > 0 || -1) * Math.floor(Math.abs(n));
145 }
146 }
147 if (n >= len) {
148 return -1;
149 }
150 var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
151 for (; k < len; k++) {
152 if (k in t && t[k] === searchElement) {
153 return k;
154 }
155 }
156 return -1;
157 }
158 }
159
160 // fake stop() for zepto.
161 $.fn.stop = $.fn.stop || function() {
162 return this;
163 };
164
165 window.Foundation = {
166 name : 'Foundation',
167
168 version : '4.2.2',
169
170 cache : {},
171
172 init : function (scope, libraries, method, options, response, /* internal */ nc) {
173 var library_arr,
174 args = [scope, method, options, response],
175 responses = [],
176 nc = nc || false;
177
178 // disable library error catching,
179 // used for development only
180 if (nc) this.nc = nc;
181
182 // check RTL
183 this.rtl = /rtl/i.test($('html').attr('dir'));
184
185 // set foundation global scope
186 this.scope = scope || this.scope;
187
188 if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) {
189 if (/off/i.test(libraries)) return this.off();
190
191 library_arr = libraries.split(' ');
192
193 if (library_arr.length > 0) {
194 for (var i = library_arr.length - 1; i >= 0; i--) {
195 responses.push(this.init_lib(library_arr[i], args));
196 }
197 }
198 } else {
199 if (/reflow/i.test(libraries)) args[1] = 'reflow';
200
201 for (var lib in this.libs) {
202 responses.push(this.init_lib(lib, args));
203 }
204 }
205
206 // if first argument is callback, add to args
207 if (typeof libraries === 'function') {
208 args.unshift(libraries);
209 }
210
211 return this.response_obj(responses, args);
212 },
213
214 response_obj : function (response_arr, args) {
215 for (var i = 0, len = args.length; i < len; i++) {
216 if (typeof args[i] === 'function') {
217 return args[i]({
218 errors: response_arr.filter(function (s) {
219 if (typeof s === 'string') return s;
220 })
221 });
222 }
223 }
224
225 return response_arr;
226 },
227
228 init_lib : function (lib, args) {
229 return this.trap(function () {
230 if (this.libs.hasOwnProperty(lib)) {
231 this.patch(this.libs[lib]);
232 return this.libs[lib].init.apply(this.libs[lib], args);
233 }
234 else {
235 return function () {};
236 }
237 }.bind(this), lib);
238 },
239
240 trap : function (fun, lib) {
241 if (!this.nc) {
242 try {
243 return fun();
244 } catch (e) {
245 return this.error({name: lib, message: 'could not be initialized', more: e.name + ' ' + e.message});
246 }
247 }
248
249 return fun();
250 },
251
252 patch : function (lib) {
253 this.fix_outer(lib);
254 lib.scope = this.scope;
255 lib.rtl = this.rtl;
256 },
257
258 inherit : function (scope, methods) {
259 var methods_arr = methods.split(' ');
260
261 for (var i = methods_arr.length - 1; i >= 0; i--) {
262 if (this.lib_methods.hasOwnProperty(methods_arr[i])) {
263 this.libs[scope.name][methods_arr[i]] = this.lib_methods[methods_arr[i]];
264 }
265 }
266 },
267
268 random_str : function (length) {
269 var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split('');
270
271 if (!length) {
272 length = Math.floor(Math.random() * chars.length);
273 }
274
275 var str = '';
276 for (var i = 0; i < length; i++) {
277 str += chars[Math.floor(Math.random() * chars.length)];
278 }
279 return str;
280 },
281
282 libs : {},
283
284 // methods that can be inherited in libraries
285 lib_methods : {
286 set_data : function (node, data) {
287 // this.name references the name of the library calling this method
288 var id = [this.name,+new Date(),Foundation.random_str(5)].join('-');
289
290 Foundation.cache[id] = data;
291 node.attr('data-' + this.name + '-id', id);
292 return data;
293 },
294
295 get_data : function (node) {
296 return Foundation.cache[node.attr('data-' + this.name + '-id')];
297 },
298
299 remove_data : function (node) {
300 if (node) {
301 delete Foundation.cache[node.attr('data-' + this.name + '-id')];
302 node.attr('data-' + this.name + '-id', '');
303 } else {
304 $('[data-' + this.name + '-id]').each(function () {
305 delete Foundation.cache[$(this).attr('data-' + this.name + '-id')];
306 $(this).attr('data-' + this.name + '-id', '');
307 });
308 }
309 },
310
311 throttle : function(fun, delay) {
312 var timer = null;
313 return function () {
314 var context = this, args = arguments;
315 clearTimeout(timer);
316 timer = setTimeout(function () {
317 fun.apply(context, args);
318 }, delay);
319 };
320 },
321
322 // parses data-options attribute on nodes and turns
323 // them into an object
324 data_options : function (el) {
325 var opts = {}, ii, p,
326 opts_arr = (el.attr('data-options') || ':').split(';'),
327 opts_len = opts_arr.length;
328
329 function isNumber (o) {
330 return ! isNaN (o-0) && o !== null && o !== "" && o !== false && o !== true;
331 }
332
333 function trim(str) {
334 if (typeof str === 'string') return $.trim(str);
335 return str;
336 }
337
338 // parse options
339 for (ii = opts_len - 1; ii >= 0; ii--) {
340 p = opts_arr[ii].split(':');
341
342 if (/true/i.test(p[1])) p[1] = true;
343 if (/false/i.test(p[1])) p[1] = false;
344 if (isNumber(p[1])) p[1] = parseInt(p[1], 10);
345
346 if (p.length === 2 && p[0].length > 0) {
347 opts[trim(p[0])] = trim(p[1]);
348 }
349 }
350
351 return opts;
352 },
353
354 delay : function (fun, delay) {
355 return setTimeout(fun, delay);
356 },
357
358 // animated scrolling
359 scrollTo : function (el, to, duration) {
360 if (duration < 0) return;
361 var difference = to - $(window).scrollTop();
362 var perTick = difference / duration * 10;
363
364 this.scrollToTimerCache = setTimeout(function() {
365 if (!isNaN(parseInt(perTick, 10))) {
366 window.scrollTo(0, $(window).scrollTop() + perTick);
367 this.scrollTo(el, to, duration - 10);
368 }
369 }.bind(this), 10);
370 },
371
372 // not supported in core Zepto
373 scrollLeft : function (el) {
374 if (!el.length) return;
375 return ('scrollLeft' in el[0]) ? el[0].scrollLeft : el[0].pageXOffset;
376 },
377
378 // test for empty object or array
379 empty : function (obj) {
380 if (obj.length && obj.length > 0) return false;
381 if (obj.length && obj.length === 0) return true;
382
383 for (var key in obj) {
384 if (hasOwnProperty.call(obj, key)) return false;
385 }
386
387 return true;
388 }
389 },
390
391 fix_outer : function (lib) {
392 lib.outerHeight = function (el, bool) {
393 if (typeof Zepto === 'function') {
394 return el.height();
395 }
396
397 if (typeof bool !== 'undefined') {
398 return el.outerHeight(bool);
399 }
400
401 return el.outerHeight();
402 };
403
404 lib.outerWidth = function (el) {
405 if (typeof Zepto === 'function') {
406 return el.width();
407 }
408
409 if (typeof bool !== 'undefined') {
410 return el.outerWidth(bool);
411 }
412
413 return el.outerWidth();
414 };
415 },
416
417 error : function (error) {
418 return error.name + ' ' + error.message + '; ' + error.more;
419 },
420
421 // remove all foundation events.
422 off: function () {
423 $(this.scope).off('.fndtn');
424 $(window).off('.fndtn');
425 return true;
426 },
427
428 zj : function () {
429 if (typeof Zepto !== 'undefined') {
430 return Zepto;
431 } else {
432 return jQuery;
433 }
434 }()
435 };
436
437 $.fn.foundation = function () {
438 var args = Array.prototype.slice.call(arguments, 0);
439
440 return this.each(function () {
441 Foundation.init.apply(Foundation, [this].concat(args));
442 return this;
443 });
444 };
445
446 }(libFuncName, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.magellan = {
6 name : 'magellan',
7
8 version : '4.2.2',
9
10 settings : {
11 activeClass: 'active'
12 },
13
14 init : function (scope, method, options) {
15 this.scope = scope || this.scope;
16 Foundation.inherit(this, 'data_options');
17
18 if (typeof method === 'object') {
19 $.extend(true, this.settings, method);
20 }
21
22 if (typeof method !== 'string') {
23 if (!this.settings.init) {
24 this.fixed_magellan = $("[data-magellan-expedition]");
25 this.set_threshold();
26 this.last_destination = $('[data-magellan-destination]').last();
27 this.events();
28 }
29
30 return this.settings.init;
31 } else {
32 return this[method].call(this, options);
33 }
34 },
35
36 events : function () {
37 var self = this;
38 $(this.scope).on('arrival.fndtn.magellan', '[data-magellan-arrival]', function (e) {
39 var $destination = $(this),
40 $expedition = $destination.closest('[data-magellan-expedition]'),
41 activeClass = $expedition.attr('data-magellan-active-class')
42 || self.settings.activeClass;
43
44 $destination
45 .closest('[data-magellan-expedition]')
46 .find('[data-magellan-arrival]')
47 .not($destination)
48 .removeClass(activeClass);
49 $destination.addClass(activeClass);
50 });
51
52 this.fixed_magellan
53 .on('update-position.fndtn.magellan', function(){
54 var $el = $(this);
55 // $el.data("magellan-fixed-position","");
56 // $el.data("magellan-top-offset", "");
57 })
58 .trigger('update-position');
59
60 $(window)
61 .on('resize.fndtn.magellan', function() {
62 this.fixed_magellan.trigger('update-position');
63 }.bind(this))
64
65 .on('scroll.fndtn.magellan', function() {
66 var windowScrollTop = $(window).scrollTop();
67 self.fixed_magellan.each(function() {
68 var $expedition = $(this);
69 if (typeof $expedition.data('magellan-top-offset') === 'undefined') {
70 $expedition.data('magellan-top-offset', $expedition.offset().top);
71 }
72 if (typeof $expedition.data('magellan-fixed-position') === 'undefined') {
73 $expedition.data('magellan-fixed-position', false)
74 }
75 var fixed_position = (windowScrollTop + self.settings.threshold) > $expedition.data("magellan-top-offset");
76 var attr = $expedition.attr('data-magellan-top-offset');
77
78 if ($expedition.data("magellan-fixed-position") != fixed_position) {
79 $expedition.data("magellan-fixed-position", fixed_position);
80 if (fixed_position) {
81 $expedition.addClass('fixed');
82 $expedition.css({position:"fixed", top:0});
83 } else {
84 $expedition.removeClass('fixed');
85 $expedition.css({position:"", top:""});
86 }
87 if (fixed_position && typeof attr != 'undefined' && attr != false) {
88 $expedition.css({position:"fixed", top:attr + "px"});
89 }
90 }
91 });
92 });
93
94
95 if (this.last_destination.length > 0) {
96 $(window).on('scroll.fndtn.magellan', function (e) {
97 var windowScrollTop = $(window).scrollTop(),
98 scrolltopPlusHeight = windowScrollTop + $(window).height(),
99 lastDestinationTop = Math.ceil(self.last_destination.offset().top);
100
101 $('[data-magellan-destination]').each(function () {
102 var $destination = $(this),
103 destination_name = $destination.attr('data-magellan-destination'),
104 topOffset = $destination.offset().top - windowScrollTop;
105
106 if (topOffset <= self.settings.threshold) {
107 $("[data-magellan-arrival='" + destination_name + "']").trigger('arrival');
108 }
109 // In large screens we may hit the bottom of the page and dont reach the top of the last magellan-destination, so lets force it
110 if (scrolltopPlusHeight >= $(self.scope).height() && lastDestinationTop > windowScrollTop && lastDestinationTop < scrolltopPlusHeight) {
111 $('[data-magellan-arrival]').last().trigger('arrival');
112 }
113 });
114 });
115 }
116
117 this.settings.init = true;
118 },
119
120 set_threshold : function () {
121 if (!this.settings.threshold) {
122 this.settings.threshold = (this.fixed_magellan.length > 0) ?
123 this.outerHeight(this.fixed_magellan, true) : 0;
124 }
125 },
126
127 off : function () {
128 $(this.scope).off('.fndtn.magellan');
129 },
130
131 reflow : function () {}
132 };
133 }(Foundation.zj, this, this.document));
0 ;(function ($, window, document, undefined) {
1 'use strict';
2
3 Foundation.libs = Foundation.libs || {};
4
5 Foundation.libs.orbit = {
6 name: 'orbit',
7
8 version: '4.2.0',
9
10 settings: {
11 timer_speed: 10000,
12 pause_on_hover: true,
13 resume_on_mouseout: false,
14 animation_speed: 500,
15 bullets: true,
16 stack_on_small: true,
17 navigation_arrows: true,
18 slide_number: true,
19 container_class: 'orbit-container',
20 stack_on_small_class: 'orbit-stack-on-small',
21 next_class: 'orbit-next',
22 prev_class: 'orbit-prev',
23 timer_container_class: 'orbit-timer',
24 timer_paused_class: 'paused',
25 timer_progress_class: 'orbit-progress',
26 slides_container_class: 'orbit-slides-container',
27 bullets_container_class: 'orbit-bullets',
28 bullets_active_class: 'active',
29 slide_number_class: 'orbit-slide-number',
30 caption_class: 'orbit-caption',
31 active_slide_class: 'active',
32 orbit_transition_class: 'orbit-transitioning'
33 },
34
35 init: function (scope, method, options) {
36 var self = this;
37 Foundation.inherit(self, 'data_options');
38
39 if (typeof method === 'object') {
40 $.extend(true, self.settings, method);
41 }
42
43 if ($(scope).is('[data-orbit]')) {
44 var scoped_self = $.extend(true, {}, self);
45 scoped_self._init(idx, el);
46 }
47
48 $('[data-orbit]', scope).each(function(idx, el) {
49 var scoped_self = $.extend(true, {}, self);
50 scoped_self._init(idx, el);
51 });
52 },
53
54 _container_html: function() {
55 var self = this;
56 return '<div class="' + self.settings.container_class + '"></div>';
57 },
58
59 _bullets_container_html: function($slides) {
60 var self = this,
61 $list = $('<ol class="' + self.settings.bullets_container_class + '"></ol>');
62 $slides.each(function(idx, slide) {
63 var $item = $('<li data-orbit-slide-number="' + (idx+1) + '" class=""></li>');
64 if (idx === 0) {
65 $item.addClass(self.settings.bullets_active_class);
66 }
67 $list.append($item);
68 });
69 return $list;
70 },
71
72 _slide_number_html: function(slide_number, total_slides) {
73 var self = this,
74 $container = $('<div class="' + self.settings.slide_number_class + '"></div>');
75 $container.append('<span>' + slide_number + '</span> of <span>' + total_slides + '</span>');
76 return $container;
77 },
78
79 _timer_html: function() {
80 var self = this;
81 if (typeof self.settings.timer_speed === 'number' && self.settings.timer_speed > 0) {
82 return '<div class="' + self.settings.timer_container_class
83 + '"><span></span><div class="' + self.settings.timer_progress_class
84 + '"></div></div>';
85 } else {
86 return '';
87 }
88 },
89
90 _next_html: function() {
91 var self = this;
92 return '<a href="#" class="' + self.settings.next_class + '">Next <span></span></a>';
93 },
94
95 _prev_html: function() {
96 var self = this;
97 return '<a href="#" class="' + self.settings.prev_class + '">Prev <span></span></a>';
98 },
99
100 _init: function (idx, slider) {
101 var self = this,
102 $slides_container = $(slider),
103 $container = $slides_container.wrap(self._container_html()).parent(),
104 $slides = $slides_container.children();
105
106 $.extend(true, self.settings, self.data_options($slides_container));
107
108 if (self.settings.navigation_arrows) {
109 $container.append(self._prev_html());
110 $container.append(self._next_html());
111 }
112 $slides_container.addClass(self.settings.slides_container_class);
113 if (self.settings.stack_on_small) {
114 $container.addClass(self.settings.stack_on_small_class);
115 }
116 if (self.settings.slide_number) {
117 $container.append(self._slide_number_html(1, $slides.length));
118 }
119 $container.append(self._timer_html());
120 if (self.settings.bullets) {
121 $container.after(self._bullets_container_html($slides));
122 }
123 // To better support the "sliding" effect it's easier
124 // if we just clone the first and last slides
125 $slides_container.append($slides.first().clone().attr('data-orbit-slide',''));
126 $slides_container.prepend($slides.last().clone().attr('data-orbit-slide',''));
127 // Make the first "real" slide active
128 $slides_container.css(Foundation.rtl ? 'marginRight' : 'marginLeft', '-100%');
129 $slides.first().addClass(self.settings.active_slide_class);
130
131 self._init_events($slides_container);
132 self._init_dimensions($slides_container);
133 self._start_timer($slides_container);
134 },
135
136 _init_events: function ($slides_container) {
137 var self = this,
138 $container = $slides_container.parent();
139
140 $(window)
141 .on('load.fndtn.orbit', function() {
142 $slides_container.height('');
143 $slides_container.height($slides_container.height($container.height()));
144 $slides_container.trigger('orbit:ready');
145 })
146 .on('resize.fndtn.orbit', function() {
147 $slides_container.height('');
148 $slides_container.height($slides_container.height($container.height()));
149 });
150
151 $(document).on('click.fndtn.orbit', '[data-orbit-link]', function(e) {
152 e.preventDefault();
153 var id = $(e.currentTarget).attr('data-orbit-link'),
154 $slide = $slides_container.find('[data-orbit-slide=' + id + ']').first();
155
156 if ($slide.length === 1) {
157 self._reset_timer($slides_container, true);
158 self._goto($slides_container, $slide.index(), function() {});
159 }
160 });
161
162 $container.siblings('.' + self.settings.bullets_container_class)
163 .on('click.fndtn.orbit', '[data-orbit-slide-number]', function(e) {
164 e.preventDefault();
165 self._reset_timer($slides_container, true);
166 self._goto($slides_container, $(e.currentTarget).data('orbit-slide-number'),function() {});
167 });
168
169 $container
170 .on('mouseenter.fndtn.orbit', function(e) {
171 if (self.settings.pause_on_hover) {
172 self._stop_timer($slides_container);
173 }
174 })
175 .on('mouseleave.fndtn.orbit', function(e) {
176 if (self.settings.resume_on_mouseout) {
177 self._start_timer($slides_container);
178 }
179 })
180 .on('orbit:after-slide-change.fndtn.orbit', function(e, orbit) {
181 var $slide_number = $container.find('.' + self.settings.slide_number_class);
182
183 if ($slide_number.length === 1) {
184 $slide_number.replaceWith(self._slide_number_html(orbit.slide_number, orbit.total_slides));
185 }
186 })
187 .on('orbit:next-slide.fndtn.orbit click.fndtn.orbit', '.' + self.settings.next_class.split(" ").join("."), function(e) {
188 e.preventDefault();
189 self._reset_timer($slides_container, true);
190 self._goto($slides_container, 'next', function() {});
191 })
192 .on('orbit:prev-slide.fndtn.orbit click.fndtn.orbit', '.' + self.settings.prev_class.split(" ").join("."), function(e) {
193 e.preventDefault();
194 self._reset_timer($slides_container, true);
195 self._goto($slides_container, 'prev', function() {});
196 })
197 .on('orbit:toggle-play-pause.fndtn.orbit click.fndtn.orbit touchstart.fndtn.orbit', '.' + self.settings.timer_container_class, function(e) {
198 e.preventDefault();
199 var $timer = $(e.currentTarget).toggleClass(self.settings.timer_paused_class),
200 $slides_container = $timer.closest('.' + self.settings.container_class)
201 .find('.' + self.settings.slides_container_class);
202
203 if ($timer.hasClass(self.settings.timer_paused_class)) {
204 self._stop_timer($slides_container);
205 } else {
206 self._start_timer($slides_container);
207 }
208 })
209 .on('touchstart.fndtn.orbit', function(e) {
210 if (!e.touches) { e = e.originalEvent; }
211 var data = {
212 start_page_x: e.touches[0].pageX,
213 start_page_y: e.touches[0].pageY,
214 start_time: (new Date()).getTime(),
215 delta_x: 0,
216 is_scrolling: undefined
217 };
218 $container.data('swipe-transition', data);
219 e.stopPropagation();
220 })
221 .on('touchmove.fndtn.orbit', function(e) {
222 if (!e.touches) { e = e.originalEvent; }
223 // Ignore pinch/zoom events
224 if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
225
226 var data = $container.data('swipe-transition');
227 if (typeof data === 'undefined') {
228 data = {};
229 }
230
231 data.delta_x = e.touches[0].pageX - data.start_page_x;
232
233 if ( typeof data.is_scrolling === 'undefined') {
234 data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
235 }
236
237 if (!data.is_scrolling && !data.active) {
238 e.preventDefault();
239 self._stop_timer($slides_container);
240 var direction = (data.delta_x < 0) ? 'next' : 'prev';
241 data.active = true;
242 self._goto($slides_container, direction, function() {});
243 }
244 })
245 .on('touchend.fndtn.orbit', function(e) {
246 $container.data('swipe-transition', {});
247 e.stopPropagation();
248 });
249 },
250
251 _init_dimensions: function ($slides_container) {
252 var $container = $slides_container.parent(),
253 $slides = $slides_container.children();
254
255 $slides_container.css('width', $slides.length * 100 + '%');
256 $slides.css('width', 100 / $slides.length + '%');
257 $slides_container.height($container.height());
258 $slides_container.css('width', $slides.length * 100 + '%');
259 },
260
261 _start_timer: function ($slides_container) {
262 var self = this,
263 $container = $slides_container.parent();
264
265 var callback = function() {
266 self._reset_timer($slides_container, false);
267 self._goto($slides_container, 'next', function() {
268 self._start_timer($slides_container);
269 });
270 };
271
272 var $timer = $container.find('.' + self.settings.timer_container_class),
273 $progress = $timer.find('.' + self.settings.timer_progress_class),
274 progress_pct = ($progress.width() / $timer.width()),
275 delay = self.settings.timer_speed - (progress_pct * self.settings.timer_speed);
276
277 $progress.animate({'width': '100%'}, delay, 'linear', callback);
278 $slides_container.trigger('orbit:timer-started');
279 },
280
281 _stop_timer: function ($slides_container) {
282 var self = this,
283 $container = $slides_container.parent(),
284 $timer = $container.find('.' + self.settings.timer_container_class),
285 $progress = $timer.find('.' + self.settings.timer_progress_class),
286 progress_pct = $progress.width() / $timer.width();
287 self._rebuild_timer($container, progress_pct * 100 + '%');
288 // $progress.stop();
289 $slides_container.trigger('orbit:timer-stopped');
290 $timer = $container.find('.' + self.settings.timer_container_class);
291 $timer.addClass(self.settings.timer_paused_class);
292 },
293
294 _reset_timer: function($slides_container, is_paused) {
295 var self = this,
296 $container = $slides_container.parent();
297 self._rebuild_timer($container, '0%');
298 if (typeof is_paused === 'boolean' && is_paused) {
299 var $timer = $container.find('.' + self.settings.timer_container_class);
300 $timer.addClass(self.settings.timer_paused_class);
301 }
302 },
303
304 _rebuild_timer: function ($container, width_pct) {
305 // Zepto is unable to stop animations since they
306 // are css-based. This is a workaround for that
307 // limitation, which rebuilds the dom element
308 // thus stopping the animation
309 var self = this,
310 $timer = $container.find('.' + self.settings.timer_container_class),
311 $new_timer = $(self._timer_html()),
312 $new_timer_progress = $new_timer.find('.' + self.settings.timer_progress_class);
313
314 if (typeof Zepto === 'function') {
315 $timer.remove();
316 $container.append($new_timer);
317 $new_timer_progress.css('width', width_pct);
318 } else if (typeof jQuery === 'function') {
319 var $progress = $timer.find('.' + self.settings.timer_progress_class);
320 $progress.css('width', width_pct);
321 $progress.stop();
322 }
323 },
324
325 _goto: function($slides_container, index_or_direction, callback) {
326 var self = this,
327 $container = $slides_container.parent(),
328 $slides = $slides_container.children(),
329 $active_slide = $slides_container.find('.' + self.settings.active_slide_class),
330 active_index = $active_slide.index(),
331 margin_position = Foundation.rtl ? 'marginRight' : 'marginLeft';
332
333 if ($container.hasClass(self.settings.orbit_transition_class)) {
334 return false;
335 }
336
337 if (index_or_direction === 'prev') {
338 if (active_index === 0) {
339 active_index = $slides.length - 1;
340 }
341 else {
342 active_index--;
343 }
344 }
345 else if (index_or_direction === 'next') {
346 active_index = (active_index+1) % $slides.length;
347 }
348 else if (typeof index_or_direction === 'number') {
349 active_index = (index_or_direction % $slides.length);
350 }
351 if (active_index === ($slides.length - 1) && index_or_direction === 'next') {
352 $slides_container.css(margin_position, '0%');
353 active_index = 1;
354 }
355 else if (active_index === 0 && index_or_direction === 'prev') {
356 $slides_container.css(margin_position, '-' + ($slides.length - 1) * 100 + '%');
357 active_index = $slides.length - 2;
358 }
359 // Start transition, make next slide active
360 $container.addClass(self.settings.orbit_transition_class);
361 $active_slide.removeClass(self.settings.active_slide_class);
362 $($slides[active_index]).addClass(self.settings.active_slide_class);
363 // Make next bullet active
364 var $bullets = $container.siblings('.' + self.settings.bullets_container_class);
365 if ($bullets.length === 1) {
366 $bullets.children().removeClass(self.settings.bullets_active_class);
367 $($bullets.children()[active_index-1]).addClass(self.settings.bullets_active_class);
368 }
369 var new_margin_left = '-' + (active_index * 100) + '%';
370 // Check to see if animation will occur, otherwise perform
371 // callbacks manually
372 $slides_container.trigger('orbit:before-slide-change');
373 if ($slides_container.css(margin_position) === new_margin_left) {
374 $container.removeClass(self.settings.orbit_transition_class);
375 $slides_container.trigger('orbit:after-slide-change', [{slide_number: active_index, total_slides: $slides_container.children().length - 2}]);
376 callback();
377 } else {
378 var properties = {};
379 properties[margin_position] = new_margin_left;
380
381 $slides_container.animate(properties, self.settings.animation_speed, 'linear', function() {
382 $container.removeClass(self.settings.orbit_transition_class);
383 $slides_container.trigger('orbit:after-slide-change', [{slide_number: active_index, total_slides: $slides_container.children().length - 2}]);
384 callback();
385 });
386 }
387 }
388 };
389 }(Foundation.zj, this, this.document));
0 /*! http://mths.be/placeholder v2.0.7 by @mathias
1 Modified to work with Zepto.js by ZURB
2 */
3 ;(function(window, document, $) {
4
5 var isInputSupported = 'placeholder' in document.createElement('input'),
6 isTextareaSupported = 'placeholder' in document.createElement('textarea'),
7 prototype = $.fn,
8 valHooks = $.valHooks,
9 hooks,
10 placeholder;
11
12 if (isInputSupported && isTextareaSupported) {
13
14 placeholder = prototype.placeholder = function() {
15 return this;
16 };
17
18 placeholder.input = placeholder.textarea = true;
19
20 } else {
21
22 placeholder = prototype.placeholder = function() {
23 var $this = this;
24 $this
25 .filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
26 .not('.placeholder')
27 .bind({
28 'focus.placeholder': clearPlaceholder,
29 'blur.placeholder': setPlaceholder
30 })
31 .data('placeholder-enabled', true)
32 .trigger('blur.placeholder');
33 return $this;
34 };
35
36 placeholder.input = isInputSupported;
37 placeholder.textarea = isTextareaSupported;
38
39 hooks = {
40 'get': function(element) {
41 var $element = $(element);
42 return $element.data('placeholder-enabled') && $element.hasClass('placeholder') ? '' : element.value;
43 },
44 'set': function(element, value) {
45 var $element = $(element);
46 if (!$element.data('placeholder-enabled')) {
47 return element.value = value;
48 }
49 if (value == '') {
50 element.value = value;
51 // Issue #56: Setting the placeholder causes problems if the element continues to have focus.
52 if (element != document.activeElement) {
53 // We can't use `triggerHandler` here because of dummy text/password inputs :(
54 setPlaceholder.call(element);
55 }
56 } else if ($element.hasClass('placeholder')) {
57 clearPlaceholder.call(element, true, value) || (element.value = value);
58 } else {
59 element.value = value;
60 }
61 // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363
62 return $element;
63 }
64 };
65
66 isInputSupported || (valHooks.input = hooks);
67 isTextareaSupported || (valHooks.textarea = hooks);
68
69 $(function() {
70 // Look for forms
71 $(document).delegate('form', 'submit.placeholder', function() {
72 // Clear the placeholder values so they don't get submitted
73 var $inputs = $('.placeholder', this).each(clearPlaceholder);
74 setTimeout(function() {
75 $inputs.each(setPlaceholder);
76 }, 10);
77 });
78 });
79
80 // Clear placeholder values upon page reload
81 $(window).bind('beforeunload.placeholder', function() {
82 $('.placeholder').each(function() {
83 this.value = '';
84 });
85 });
86
87 }
88
89 function args(elem) {
90 // Return an object of element attributes
91 var newAttrs = {},
92 rinlinejQuery = /^jQuery\d+$/;
93 $.each(elem.attributes, function(i, attr) {
94 if (attr.specified && !rinlinejQuery.test(attr.name)) {
95 newAttrs[attr.name] = attr.value;
96 }
97 });
98 return newAttrs;
99 }
100
101 function clearPlaceholder(event, value) {
102 var input = this,
103 $input = $(input);
104 if (input.value == $input.attr('placeholder') && $input.hasClass('placeholder')) {
105 if ($input.data('placeholder-password')) {
106 $input = $input.hide().next().show().attr('id', $input.removeAttr('id').data('placeholder-id'));
107 // If `clearPlaceholder` was called from `$.valHooks.input.set`
108 if (event === true) {
109 return $input[0].value = value;
110 }
111 $input.focus();
112 } else {
113 input.value = '';
114 $input.removeClass('placeholder');
115 input == document.activeElement && input.select();
116 }
117 }
118 }
119
120 function setPlaceholder() {
121 var $replacement,
122 input = this,
123 $input = $(input),
124 $origInput = $input,
125 id = this.id;
126 if (input.value == '') {
127 if (input.type == 'password') {
128 if (!$input.data('placeholder-textinput')) {
129 try {
130 $replacement = $input.clone().attr({ 'type': 'text' });
131 } catch(e) {
132 $replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' }));
133 }
134 $replacement
135 .removeAttr('name')
136 .data({
137 'placeholder-password': true,
138 'placeholder-id': id
139 })
140 .bind('focus.placeholder', clearPlaceholder);
141 $input
142 .data({
143 'placeholder-textinput': $replacement,
144 'placeholder-id': id
145 })
146 .before($replacement);
147 }
148 $input = $input.removeAttr('id').hide().prev().attr('id', id).show();
149 // Note: `$input[0] != input` now!
150 }
151 $input.addClass('placeholder');
152 $input[0].value = $input.attr('placeholder');
153 } else {
154 $input.removeClass('placeholder');
155 }
156 }
157
158 }(this, document, Foundation.zj));
159
160 ;(function ($, window, document, undefined) {
161 'use strict';
162
163 Foundation.libs.placeholder = {
164 name : 'placeholder',
165
166 version : '4.2.2',
167
168 init : function (scope, method, options) {
169 this.scope = scope || this.scope;
170
171 if (typeof method !== 'string') {
172 window.onload = function () {
173 $('input, textarea').placeholder();
174 }
175 }
176 }
177 };
178 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.reveal = {
6 name: 'reveal',
7
8 version : '4.2.2',
9
10 locked : false,
11
12 settings : {
13 animation: 'fadeAndPop',
14 animationSpeed: 250,
15 closeOnBackgroundClick: true,
16 closeOnEsc: true,
17 dismissModalClass: 'close-reveal-modal',
18 bgClass: 'reveal-modal-bg',
19 open: function(){},
20 opened: function(){},
21 close: function(){},
22 closed: function(){},
23 bg : $('.reveal-modal-bg'),
24 css : {
25 open : {
26 'opacity': 0,
27 'visibility': 'visible',
28 'display' : 'block'
29 },
30 close : {
31 'opacity': 1,
32 'visibility': 'hidden',
33 'display': 'none'
34 }
35 }
36 },
37
38 init : function (scope, method, options) {
39 Foundation.inherit(this, 'data_options delay');
40
41 if (typeof method === 'object') {
42 $.extend(true, this.settings, method);
43 } else if (typeof options !== 'undefined') {
44 $.extend(true, this.settings, options);
45 }
46
47 if (typeof method !== 'string') {
48 this.events();
49
50 return this.settings.init;
51 } else {
52 return this[method].call(this, options);
53 }
54 },
55
56 events : function () {
57 var self = this;
58
59 $(this.scope)
60 .off('.fndtn.reveal')
61 .on('click.fndtn.reveal', '[data-reveal-id]', function (e) {
62 e.preventDefault();
63
64 if (!self.locked) {
65 var element = $(this),
66 ajax = element.data('reveal-ajax');
67
68 self.locked = true;
69
70 if (typeof ajax === 'undefined') {
71 self.open.call(self, element);
72 } else {
73 var url = ajax === true ? element.attr('href') : ajax;
74
75 self.open.call(self, element, {url: url});
76 }
77 }
78 })
79 .on('click.fndtn.reveal', this.close_targets(), function (e) {
80 e.preventDefault();
81 if (!self.locked) {
82 var settings = $.extend({}, self.settings, self.data_options($('.reveal-modal.open')));
83 if ($(e.target)[0] === $('.' + settings.bgClass)[0] && !settings.closeOnBackgroundClick) {
84 return;
85 }
86
87 self.locked = true;
88 self.close.call(self, $(this).closest('.reveal-modal'));
89 }
90 })
91 .on('open.fndtn.reveal', '.reveal-modal', this.settings.open)
92 .on('opened.fndtn.reveal', '.reveal-modal', this.settings.opened)
93 .on('opened.fndtn.reveal', '.reveal-modal', this.open_video)
94 .on('close.fndtn.reveal', '.reveal-modal', this.settings.close)
95 .on('closed.fndtn.reveal', '.reveal-modal', this.settings.closed)
96 .on('closed.fndtn.reveal', '.reveal-modal', this.close_video);
97
98 $( 'body' ).bind( 'keyup.reveal', function ( event ) {
99 var open_modal = $('.reveal-modal.open'),
100 settings = $.extend({}, self.settings, self.data_options(open_modal));
101 if ( event.which === 27 && settings.closeOnEsc) { // 27 is the keycode for the Escape key
102 open_modal.foundation('reveal', 'close');
103 }
104 });
105
106 return true;
107 },
108
109 open : function (target, ajax_settings) {
110 if (target) {
111 if (typeof target.selector !== 'undefined') {
112 var modal = $('#' + target.data('reveal-id'));
113 } else {
114 var modal = $(this.scope);
115
116 ajax_settings = target;
117 }
118 } else {
119 var modal = $(this.scope);
120 }
121
122 if (!modal.hasClass('open')) {
123 var open_modal = $('.reveal-modal.open');
124
125 if (typeof modal.data('css-top') === 'undefined') {
126 modal.data('css-top', parseInt(modal.css('top'), 10))
127 .data('offset', this.cache_offset(modal));
128 }
129
130 modal.trigger('open');
131
132 if (open_modal.length < 1) {
133 this.toggle_bg(modal);
134 }
135
136 if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
137 this.hide(open_modal, this.settings.css.close);
138 this.show(modal, this.settings.css.open);
139 } else {
140 var self = this,
141 old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
142
143 $.extend(ajax_settings, {
144 success: function (data, textStatus, jqXHR) {
145 if ( $.isFunction(old_success) ) {
146 old_success(data, textStatus, jqXHR);
147 }
148
149 modal.html(data);
150 $(modal).foundation('section', 'reflow');
151
152 self.hide(open_modal, self.settings.css.close);
153 self.show(modal, self.settings.css.open);
154 }
155 });
156
157 $.ajax(ajax_settings);
158 }
159 }
160 },
161
162 close : function (modal) {
163
164 var modal = modal && modal.length ? modal : $(this.scope),
165 open_modals = $('.reveal-modal.open');
166
167 if (open_modals.length > 0) {
168 this.locked = true;
169 modal.trigger('close');
170 this.toggle_bg(modal);
171 this.hide(open_modals, this.settings.css.close);
172 }
173 },
174
175 close_targets : function () {
176 var base = '.' + this.settings.dismissModalClass;
177
178 if (this.settings.closeOnBackgroundClick) {
179 return base + ', .' + this.settings.bgClass;
180 }
181
182 return base;
183 },
184
185 toggle_bg : function (modal) {
186 if ($('.reveal-modal-bg').length === 0) {
187 this.settings.bg = $('<div />', {'class': this.settings.bgClass})
188 .appendTo('body');
189 }
190
191 if (this.settings.bg.filter(':visible').length > 0) {
192 this.hide(this.settings.bg);
193 } else {
194 this.show(this.settings.bg);
195 }
196 },
197
198 show : function (el, css) {
199 // is modal
200 if (css) {
201 if (/pop/i.test(this.settings.animation)) {
202 css.top = $(window).scrollTop() - el.data('offset') + 'px';
203 var end_css = {
204 top: $(window).scrollTop() + el.data('css-top') + 'px',
205 opacity: 1
206 };
207
208 return this.delay(function () {
209 return el
210 .css(css)
211 .animate(end_css, this.settings.animationSpeed, 'linear', function () {
212 this.locked = false;
213 el.trigger('opened');
214 }.bind(this))
215 .addClass('open');
216 }.bind(this), this.settings.animationSpeed / 2);
217 }
218
219 if (/fade/i.test(this.settings.animation)) {
220 var end_css = {opacity: 1};
221
222 return this.delay(function () {
223 return el
224 .css(css)
225 .animate(end_css, this.settings.animationSpeed, 'linear', function () {
226 this.locked = false;
227 el.trigger('opened');
228 }.bind(this))
229 .addClass('open');
230 }.bind(this), this.settings.animationSpeed / 2);
231 }
232
233 return el.css(css).show().css({opacity: 1}).addClass('open').trigger('opened');
234 }
235
236 // should we animate the background?
237 if (/fade/i.test(this.settings.animation)) {
238 return el.fadeIn(this.settings.animationSpeed / 2);
239 }
240
241 return el.show();
242 },
243
244 hide : function (el, css) {
245 // is modal
246 if (css) {
247 if (/pop/i.test(this.settings.animation)) {
248 var end_css = {
249 top: - $(window).scrollTop() - el.data('offset') + 'px',
250 opacity: 0
251 };
252
253 return this.delay(function () {
254 return el
255 .animate(end_css, this.settings.animationSpeed, 'linear', function () {
256 this.locked = false;
257 el.css(css).trigger('closed');
258 }.bind(this))
259 .removeClass('open');
260 }.bind(this), this.settings.animationSpeed / 2);
261 }
262
263 if (/fade/i.test(this.settings.animation)) {
264 var end_css = {opacity: 0};
265
266 return this.delay(function () {
267 return el
268 .animate(end_css, this.settings.animationSpeed, 'linear', function () {
269 this.locked = false;
270 el.css(css).trigger('closed');
271 }.bind(this))
272 .removeClass('open');
273 }.bind(this), this.settings.animationSpeed / 2);
274 }
275
276 return el.hide().css(css).removeClass('open').trigger('closed');
277 }
278
279 // should we animate the background?
280 if (/fade/i.test(this.settings.animation)) {
281 return el.fadeOut(this.settings.animationSpeed / 2);
282 }
283
284 return el.hide();
285 },
286
287 close_video : function (e) {
288 var video = $(this).find('.flex-video'),
289 iframe = video.find('iframe');
290
291 if (iframe.length > 0) {
292 iframe.attr('data-src', iframe[0].src);
293 iframe.attr('src', 'about:blank');
294 video.hide();
295 }
296 },
297
298 open_video : function (e) {
299 var video = $(this).find('.flex-video'),
300 iframe = video.find('iframe');
301
302 if (iframe.length > 0) {
303 var data_src = iframe.attr('data-src');
304 if (typeof data_src === 'string') {
305 iframe[0].src = iframe.attr('data-src');
306 } else {
307 var src = iframe[0].src;
308 iframe[0].src = undefined;
309 iframe[0].src = src;
310 }
311 video.show();
312 }
313 },
314
315 cache_offset : function (modal) {
316 var offset = modal.show().height() + parseInt(modal.css('top'), 10);
317
318 modal.hide();
319
320 return offset;
321 },
322
323 off : function () {
324 $(this.scope).off('.fndtn.reveal');
325 },
326
327 reflow : function () {}
328 };
329 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.section = {
6 name: 'section',
7
8 version : '4.2.2',
9
10 settings : {
11 deep_linking: false,
12 small_breakpoint: 768,
13 one_up: true,
14 section_selector : '[data-section]',
15 region_selector : 'section, .section, [data-section-region]',
16 title_selector : '.title, [data-section-title]',
17 active_region_selector : 'section.active, .section.active, .active[data-section-region]',
18 content_selector : '.content, [data-section-content]',
19 nav_selector : '[data-section="vertical-nav"], [data-section="horizontal-nav"]',
20 callback: function (){}
21 },
22
23 init : function (scope, method, options) {
24 var self = this;
25 Foundation.inherit(this, 'throttle data_options position_right offset_right');
26
27 if (typeof method === 'object') {
28 $.extend(true, self.settings, method);
29 }
30
31 if (typeof method !== 'string') {
32 this.set_active_from_hash();
33 this.events();
34
35 return true;
36 } else {
37 return this[method].call(this, options);
38 }
39 },
40
41 events : function () {
42 var self = this;
43
44 $(this.scope)
45 .on('click.fndtn.section', '[data-section] .title, [data-section] [data-section-title]', function (e) {
46 var $this = $(this),
47 section = $this.closest(self.settings.region_selector);
48
49 if (section.children(self.settings.content_selector).length > 0) {
50 self.toggle_active.call(this, e, self);
51 self.reflow();
52 }
53 });
54
55 $(window)
56 .on('resize.fndtn.section', self.throttle(function () {
57 self.resize.call(this);
58 }, 30))
59 .on('hashchange', function () {
60 if (!self.settings.toggled){
61 self.set_active_from_hash();
62 $(this).trigger('resize');
63 }
64 }).trigger('resize');
65
66 $(document)
67 .on('click.fndtn.section', function (e) {
68 if ($(e.target).closest(self.settings.title_selector).length < 1) {
69 $(self.settings.nav_selector)
70 .children(self.settings.region_selector)
71 .removeClass('active')
72 .attr('style', '');
73 }
74 });
75
76 },
77
78 toggle_active : function (e, self) {
79 var $this = $(this),
80 self = Foundation.libs.section,
81 region = $this.closest(self.settings.region_selector),
82 content = $this.siblings(self.settings.content_selector),
83 parent = region.parent(),
84 settings = $.extend({}, self.settings, self.data_options(parent)),
85 prev_active_section = parent
86 .children(self.settings.active_region_selector);
87
88 self.settings.toggled = true;
89
90 if (!settings.deep_linking && content.length > 0) {
91 e.preventDefault();
92 }
93
94 if (region.hasClass('active')) {
95 // this is causing the style flash.
96 if (self.small(parent)
97 || self.is_vertical_nav(parent)
98 || self.is_horizontal_nav(parent)
99 || self.is_accordion(parent)) {
100 if (prev_active_section[0] !== region[0]
101 || (prev_active_section[0] === region[0] && !settings.one_up)) {
102 region
103 .removeClass('active')
104 .attr('style', '');
105 }
106 }
107 } else {
108 var prev_active_section = parent
109 .children(self.settings.active_region_selector),
110 title_height = self.outerHeight(region
111 .children(self.settings.title_selector));
112
113 if (self.small(parent) || settings.one_up) {
114
115 if (self.small(parent)) {
116 prev_active_section.attr('style', '');
117 } else {
118 prev_active_section.attr('style',
119 'visibility: hidden; padding-top: '+title_height+'px;');
120 }
121 }
122
123 if (self.small(parent)) {
124 region.attr('style', '');
125 } else {
126 region.css('padding-top', title_height);
127 }
128
129 region.addClass('active');
130
131 if (prev_active_section.length > 0) {
132 prev_active_section
133 .removeClass('active')
134 .attr('style', '');
135 }
136
137 // Toggle the content display attribute. This is done to
138 // ensure accurate outerWidth measurements that account for
139 // the scrollbar.
140 if (self.is_vertical_tabs(parent)) {
141 content.css('display', 'block');
142
143 if (prev_active_section !== null) {
144 prev_active_section
145 .children(self.settings.content_selector)
146 .css('display', 'none');
147 }
148 }
149 }
150
151 setTimeout(function () {
152 self.settings.toggled = false;
153 }, 300);
154
155 settings.callback();
156 },
157
158 resize : function () {
159 var self = Foundation.libs.section,
160 sections = $(self.settings.section_selector);
161
162 sections.each(function() {
163 var $this = $(this),
164 active_section = $this
165 .children(self.settings.active_region_selector),
166 settings = $.extend({}, self.settings, self.data_options($this));
167
168 if (active_section.length > 1) {
169 active_section
170 .not(':first')
171 .removeClass('active')
172 .attr('style', '');
173 } else if (active_section.length < 1
174 && !self.is_vertical_nav($this)
175 && !self.is_horizontal_nav($this)
176 && !self.is_accordion($this)) {
177
178 var first = $this.children(self.settings.region_selector).first();
179
180 if (settings.one_up || !self.small($this)) {
181 first.addClass('active');
182 }
183
184 if (self.small($this)) {
185 first.attr('style', '');
186 } else {
187 first.css('padding-top', self.outerHeight(first
188 .children(self.settings.title_selector)));
189 }
190 }
191
192 if (self.small($this)) {
193 active_section.attr('style', '');
194 } else {
195 active_section.css('padding-top', self.outerHeight(active_section
196 .children(self.settings.title_selector)));
197 }
198
199 self.position_titles($this);
200
201 if ( (self.is_horizontal_nav($this) && !self.small($this))
202 || self.is_vertical_tabs($this) && !self.small($this)) {
203 self.position_content($this);
204 } else {
205 self.position_content($this, false);
206 }
207 });
208 },
209
210 is_vertical_nav : function (el) {
211 return /vertical-nav/i.test(el.data('section'));
212 },
213
214 is_horizontal_nav : function (el) {
215 return /horizontal-nav/i.test(el.data('section'));
216 },
217
218 is_accordion : function (el) {
219 return /accordion/i.test(el.data('section'));
220 },
221
222 is_horizontal_tabs : function (el) {
223 return /^tabs$/i.test(el.data('section'));
224 },
225
226 is_vertical_tabs : function (el) {
227 return /vertical-tabs/i.test(el.data('section'));
228 },
229
230 set_active_from_hash : function () {
231 var hash = window.location.hash.substring(1),
232 sections = $('[data-section]'),
233 self = this;
234 sections.each(function () {
235 var section = $(this),
236 settings = $.extend({}, self.settings, self.data_options(section));
237
238 if (hash.length > 0 && settings.deep_linking) {
239 var regions = section
240 .children(self.settings.region_selector)
241 .attr('style', '')
242 .removeClass('active');
243
244 var hash_regions = regions.map(function () {
245 var content = $(self.settings.content_selector, this),
246 content_slug = content.data('slug');
247
248 if (new RegExp(content_slug, 'i').test(hash))
249 return content;
250 });
251
252
253 var count = hash_regions.length;
254
255 for (var i = count - 1; i >= 0; i--) {
256 $(hash_regions[i]).parent().addClass('active');
257 }
258 }
259 });
260 },
261
262 position_titles : function (section, off) {
263 var self = this,
264 titles = section
265 .children(this.settings.region_selector)
266 .map(function () {
267 return $(this).children(self.settings.title_selector);
268 }),
269 previous_width = 0,
270 previous_height = 0,
271 self = this;
272
273 if (typeof off === 'boolean') {
274 titles.attr('style', '');
275
276 } else {
277 titles.each(function () {
278 if (self.is_vertical_tabs(section)) {
279 $(this).css('top', previous_height);
280 previous_height += self.outerHeight($(this));
281 } else {
282 if (!self.rtl) {
283 $(this).css('left', previous_width);
284 } else {
285 $(this).css('right', previous_width);
286 }
287 previous_width += self.outerWidth($(this));
288 }
289 });
290 }
291 },
292
293 position_content : function (section, off) {
294 var self = this,
295 regions = section.children(self.settings.region_selector),
296 titles = regions
297 .map(function () {
298 return $(this).children(self.settings.title_selector);
299 }),
300 content = regions
301 .map(function () {
302 return $(this).children(self.settings.content_selector);
303 });
304
305 if (typeof off === 'boolean') {
306 content.attr('style', '');
307 section.attr('style', '');
308 } else {
309 if (self.is_vertical_tabs(section)
310 && !self.small(section)) {
311 var content_min_height = 0,
312 content_min_width = Number.MAX_VALUE,
313 title_width = null;
314
315 regions.each(function () {
316 var region = $(this),
317 title = region.children(self.settings.title_selector),
318 content = region.children(self.settings.content_selector),
319 content_width = 0;
320
321 title_width = self.outerWidth(title);
322 content_width = self.outerWidth(section) - title_width;
323
324 if (content_width < content_min_width) {
325 content_min_width = content_width;
326 }
327
328 // Increment the minimum height of the content region
329 // to align with the height of the titles.
330 content_min_height += self.outerHeight(title);
331
332 // Set all of the inactive tabs to 'display: none'
333 // The CSS sets all of the tabs as 'display: block'
334 // in order to account for scrollbars when measuring the width
335 // of the content regions.
336 if (!$(this).hasClass('active')) {
337 content.css('display', 'none');
338 }
339 });
340
341 regions.each(function () {
342 var content = $(this).children(self.settings.content_selector);
343 content.css('minHeight', content_min_height);
344
345 // Remove 2 pixels to account for the right-shift in the CSS
346 content.css('maxWidth', content_min_width - 2);
347 });
348
349 } else {
350 regions.each(function () {
351 var region = $(this),
352 title = region.children(self.settings.title_selector),
353 content = region.children(self.settings.content_selector);
354 if (!self.rtl) {
355 content
356 .css({left: title.position().left - 1,
357 top: self.outerHeight(title) - 2});
358 } else {
359 content
360 .css({right: self.position_right(title) + 1,
361 top: self.outerHeight(title) - 2});
362 }
363 });
364
365 // temporary work around for Zepto outerheight calculation issues.
366 if (typeof Zepto === 'function') {
367 section.height(this.outerHeight($(titles[0])));
368 } else {
369 section.height(this.outerHeight($(titles[0])) - 2);
370 }
371 }
372 }
373 },
374
375 position_right : function (el) {
376 var self = this,
377 section = el.closest(this.settings.section_selector),
378 regions = section.children(this.settings.region_selector),
379 section_width = el.closest(this.settings.section_selector).width(),
380 offset = regions
381 .map(function () {
382 return $(this).children(self.settings.title_selector);
383 }).length;
384 return (section_width - el.position().left - el.width() * (el.index() + 1) - offset);
385 },
386
387 reflow : function (scope) {
388 var scope = scope || document;
389 $(this.settings.section_selector, scope).trigger('resize');
390 },
391
392 small : function (el) {
393 var settings = $.extend({}, this.settings, this.data_options(el));
394
395 if (this.is_horizontal_tabs(el)) {
396 return false;
397 }
398 if (el && this.is_accordion(el)) {
399 return true;
400 }
401 if ($('html').hasClass('lt-ie9')) {
402 return true;
403 }
404 if ($('html').hasClass('ie8compat')) {
405 return true;
406 }
407 return $(this.scope).width() < settings.small_breakpoint;
408 },
409
410 off : function () {
411 $(this.scope).off('.fndtn.section');
412 $(window).off('.fndtn.section');
413 $(document).off('.fndtn.section')
414 }
415 };
416 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.tooltips = {
6 name: 'tooltips',
7
8 version : '4.2.2',
9
10 settings : {
11 selector : '.has-tip',
12 additionalInheritableClasses : [],
13 tooltipClass : '.tooltip',
14 appendTo: 'body',
15 'disable-for-touch': false,
16 tipTemplate : function (selector, content) {
17 return '<span data-selector="' + selector + '" class="'
18 + Foundation.libs.tooltips.settings.tooltipClass.substring(1)
19 + '">' + content + '<span class="nub"></span></span>';
20 }
21 },
22
23 cache : {},
24
25 init : function (scope, method, options) {
26 Foundation.inherit(this, 'data_options');
27 var self = this;
28
29 if (typeof method === 'object') {
30 $.extend(true, this.settings, method);
31 } else if (typeof options !== 'undefined') {
32 $.extend(true, this.settings, options);
33 }
34
35 if (typeof method !== 'string') {
36 if (Modernizr.touch) {
37 $(this.scope)
38 .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip',
39 '[data-tooltip]', function (e) {
40 var settings = $.extend({}, self.settings, self.data_options($(this)));
41 if (!settings['disable-for-touch']) {
42 e.preventDefault();
43 $(settings.tooltipClass).hide();
44 self.showOrCreateTip($(this));
45 }
46 })
47 .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip',
48 this.settings.tooltipClass, function (e) {
49 e.preventDefault();
50 $(this).fadeOut(150);
51 });
52 } else {
53 $(this.scope)
54 .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip',
55 '[data-tooltip]', function (e) {
56 var $this = $(this);
57
58 if (/enter|over/i.test(e.type)) {
59 self.showOrCreateTip($this);
60 } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
61 self.hide($this);
62 }
63 });
64 }
65
66 // $(this.scope).data('fndtn-tooltips', true);
67 } else {
68 return this[method].call(this, options);
69 }
70
71 },
72
73 showOrCreateTip : function ($target) {
74 var $tip = this.getTip($target);
75
76 if ($tip && $tip.length > 0) {
77 return this.show($target);
78 }
79
80 return this.create($target);
81 },
82
83 getTip : function ($target) {
84 var selector = this.selector($target),
85 tip = null;
86
87 if (selector) {
88 tip = $('span[data-selector="' + selector + '"]' + this.settings.tooltipClass);
89 }
90
91 return (typeof tip === 'object') ? tip : false;
92 },
93
94 selector : function ($target) {
95 var id = $target.attr('id'),
96 dataSelector = $target.attr('data-tooltip') || $target.attr('data-selector');
97
98 if ((id && id.length < 1 || !id) && typeof dataSelector != 'string') {
99 dataSelector = 'tooltip' + Math.random().toString(36).substring(7);
100 $target.attr('data-selector', dataSelector);
101 }
102
103 return (id && id.length > 0) ? id : dataSelector;
104 },
105
106 create : function ($target) {
107 var $tip = $(this.settings.tipTemplate(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
108 classes = this.inheritable_classes($target);
109
110 $tip.addClass(classes).appendTo(this.settings.appendTo);
111 if (Modernizr.touch) {
112 $tip.append('<span class="tap-to-close">tap to close </span>');
113 }
114 $target.removeAttr('title').attr('title','');
115 this.show($target);
116 },
117
118 reposition : function (target, tip, classes) {
119 var width, nub, nubHeight, nubWidth, column, objPos;
120
121 tip.css('visibility', 'hidden').show();
122
123 width = target.data('width');
124 nub = tip.children('.nub');
125 nubHeight = this.outerHeight(nub);
126 nubWidth = this.outerHeight(nub);
127
128 objPos = function (obj, top, right, bottom, left, width) {
129 return obj.css({
130 'top' : (top) ? top : 'auto',
131 'bottom' : (bottom) ? bottom : 'auto',
132 'left' : (left) ? left : 'auto',
133 'right' : (right) ? right : 'auto',
134 'width' : (width) ? width : 'auto'
135 }).end();
136 };
137
138 objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', target.offset().left, width);
139
140 if ($(window).width() < 767) {
141 objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', 12.5, $(this.scope).width());
142 tip.addClass('tip-override');
143 objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
144 } else {
145 var left = target.offset().left;
146 if (Foundation.rtl) {
147 left = target.offset().left + target.offset().width - this.outerWidth(tip);
148 }
149 objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', left, width);
150 tip.removeClass('tip-override');
151 if (classes && classes.indexOf('tip-top') > -1) {
152 objPos(tip, (target.offset().top - this.outerHeight(tip)), 'auto', 'auto', left, width)
153 .removeClass('tip-override');
154 } else if (classes && classes.indexOf('tip-left') > -1) {
155 objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left - this.outerWidth(tip) - nubHeight), width)
156 .removeClass('tip-override');
157 } else if (classes && classes.indexOf('tip-right') > -1) {
158 objPos(tip, (target.offset().top + (this.outerHeight(target) / 2) - nubHeight*2.5), 'auto', 'auto', (target.offset().left + this.outerWidth(target) + nubHeight), width)
159 .removeClass('tip-override');
160 }
161 }
162
163 tip.css('visibility', 'visible').hide();
164 },
165
166 inheritable_classes : function (target) {
167 var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'noradius'].concat(this.settings.additionalInheritableClasses),
168 classes = target.attr('class'),
169 filtered = classes ? $.map(classes.split(' '), function (el, i) {
170 if ($.inArray(el, inheritables) !== -1) {
171 return el;
172 }
173 }).join(' ') : '';
174
175 return $.trim(filtered);
176 },
177
178 show : function ($target) {
179 var $tip = this.getTip($target);
180
181 this.reposition($target, $tip, $target.attr('class'));
182 $tip.fadeIn(150);
183 },
184
185 hide : function ($target) {
186 var $tip = this.getTip($target);
187
188 $tip.fadeOut(150);
189 },
190
191 // deprecate reload
192 reload : function () {
193 var $self = $(this);
194
195 return ($self.data('fndtn-tooltips')) ? $self.foundationTooltips('destroy').foundationTooltips('init') : $self.foundationTooltips('init');
196 },
197
198 off : function () {
199 $(this.scope).off('.fndtn.tooltip');
200 $(this.settings.tooltipClass).each(function (i) {
201 $('[data-tooltip]').get(i).attr('title', $(this).text());
202 }).remove();
203 },
204
205 reflow : function () {}
206 };
207 }(Foundation.zj, this, this.document));
0 /*jslint unparam: true, browser: true, indent: 2 */
1
2 ;(function ($, window, document, undefined) {
3 'use strict';
4
5 Foundation.libs.topbar = {
6 name : 'topbar',
7
8 version : '4.2.2',
9
10 settings : {
11 index : 0,
12 stickyClass : 'sticky',
13 custom_back_text: true,
14 back_text: 'Back',
15 is_hover: true,
16 scrolltop : true, // jump to top when sticky nav menu toggle is clicked
17 init : false
18 },
19
20 init : function (section, method, options) {
21 Foundation.inherit(this, 'data_options');
22 var self = this;
23
24 if (typeof method === 'object') {
25 $.extend(true, this.settings, method);
26 } else if (typeof options !== 'undefined') {
27 $.extend(true, this.settings, options);
28 }
29
30 if (typeof method !== 'string') {
31
32 $('.top-bar, [data-topbar]').each(function () {
33 $.extend(true, self.settings, self.data_options($(this)));
34 self.settings.$w = $(window);
35 self.settings.$topbar = $(this);
36 self.settings.$section = self.settings.$topbar.find('section');
37 self.settings.$titlebar = self.settings.$topbar.children('ul').first();
38 self.settings.$topbar.data('index', 0);
39
40 var breakpoint = $("<div class='top-bar-js-breakpoint'/>").insertAfter(self.settings.$topbar);
41 self.settings.breakPoint = breakpoint.width();
42 breakpoint.remove();
43
44 self.assemble();
45
46 if (self.settings.$topbar.parent().hasClass('fixed')) {
47 $('body').css('padding-top', self.outerHeight(self.settings.$topbar));
48 }
49 });
50
51 if (!self.settings.init) {
52 this.events();
53 }
54
55 return this.settings.init;
56 } else {
57 // fire method
58 return this[method].call(this, options);
59 }
60 },
61
62 events : function () {
63 var self = this;
64 var offst = this.outerHeight($('.top-bar, [data-topbar]'));
65 $(this.scope)
66 .off('.fndtn.topbar')
67 .on('click.fndtn.topbar', '.top-bar .toggle-topbar, [data-topbar] .toggle-topbar', function (e) {
68 var topbar = $(this).closest('.top-bar, [data-topbar]'),
69 section = topbar.find('section, .section'),
70 titlebar = topbar.children('ul').first();
71
72 e.preventDefault();
73
74 if (self.breakpoint()) {
75 if (!self.rtl) {
76 section.css({left: '0%'});
77 section.find('>.name').css({left: '100%'});
78 } else {
79 section.css({right: '0%'});
80 section.find('>.name').css({right: '100%'});
81 }
82
83 section.find('li.moved').removeClass('moved');
84 topbar.data('index', 0);
85
86 topbar
87 .toggleClass('expanded')
88 .css('max-height', '');
89 }
90
91 if (!topbar.hasClass('expanded')) {
92 if (topbar.hasClass('fixed')) {
93 topbar.parent().addClass('fixed');
94 topbar.removeClass('fixed');
95 $('body').css('padding-top',offst);
96 }
97 } else if (topbar.parent().hasClass('fixed')) {
98 topbar.parent().removeClass('fixed');
99 topbar.addClass('fixed');
100 $('body').css('padding-top','0');
101
102 if (self.settings.scrolltop) {
103 window.scrollTo(0,0);
104 }
105 }
106 })
107
108 .on('mouseenter mouseleave', '.top-bar li', function (e) {
109 if (!self.settings.is_hover) return;
110
111 if (/enter|over/i.test(e.type)) {
112 $(this).addClass('hover');
113 } else {
114 $(this).removeClass('hover');
115 }
116 })
117
118 .on('click.fndtn.topbar', '.top-bar li.has-dropdown', function (e) {
119 if (self.breakpoint()) return;
120
121 var li = $(this),
122 target = $(e.target),
123 topbar = li.closest('[data-topbar], .top-bar'),
124 is_hover = topbar.data('topbar');
125
126 if (self.settings.is_hover && !Modernizr.touch) return;
127
128 e.stopImmediatePropagation();
129
130 if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
131 e.preventDefault();
132 }
133
134 if (li.hasClass('hover')) {
135 li
136 .removeClass('hover')
137 .find('li')
138 .removeClass('hover');
139 } else {
140 li.addClass('hover');
141 }
142 })
143
144 .on('click.fndtn.topbar', '.top-bar .has-dropdown>a, [data-topbar] .has-dropdown>a', function (e) {
145 if (self.breakpoint()) {
146 e.preventDefault();
147
148 var $this = $(this),
149 topbar = $this.closest('.top-bar, [data-topbar]'),
150 section = topbar.find('section, .section'),
151 titlebar = topbar.children('ul').first(),
152 dropdownHeight = $this.next('.dropdown').outerHeight(),
153 $selectedLi = $this.closest('li');
154
155 topbar.data('index', topbar.data('index') + 1);
156 $selectedLi.addClass('moved');
157
158 if (!self.rtl) {
159 section.css({left: -(100 * topbar.data('index')) + '%'});
160 section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
161 } else {
162 section.css({right: -(100 * topbar.data('index')) + '%'});
163 section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
164 }
165
166 topbar.css('max-height', self.height($this.siblings('ul')) + self.outerHeight(titlebar, true));
167 }
168 });
169
170 $(window).on('resize.fndtn.topbar', function () {
171 if (!self.breakpoint()) {
172 $('.top-bar, [data-topbar]')
173 .css('max-height', '')
174 .removeClass('expanded')
175 .find('li')
176 .removeClass('hover');
177 }
178 }.bind(this));
179
180 $('body').on('click.fndtn.topbar', function (e) {
181 var parent = $(e.target).closest('[data-topbar], .top-bar');
182
183 if (parent.length > 0) {
184 return;
185 }
186
187 $('.top-bar li, [data-topbar] li').removeClass('hover');
188 });
189
190 // Go up a level on Click
191 $(this.scope).on('click.fndtn', '.top-bar .has-dropdown .back, [data-topbar] .has-dropdown .back', function (e) {
192 e.preventDefault();
193
194 var $this = $(this),
195 topbar = $this.closest('.top-bar, [data-topbar]'),
196 titlebar = topbar.children('ul').first(),
197 section = topbar.find('section, .section'),
198 $movedLi = $this.closest('li.moved'),
199 $previousLevelUl = $movedLi.parent();
200
201 topbar.data('index', topbar.data('index') - 1);
202
203 if (!self.rtl) {
204 section.css({left: -(100 * topbar.data('index')) + '%'});
205 section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
206 } else {
207 section.css({right: -(100 * topbar.data('index')) + '%'});
208 section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
209 }
210
211 if (topbar.data('index') === 0) {
212 topbar.css('max-height', '');
213 } else {
214 topbar.css('max-height', self.height($previousLevelUl) + self.outerHeight(titlebar, true));
215 }
216
217 setTimeout(function () {
218 $movedLi.removeClass('moved');
219 }, 300);
220 });
221 },
222
223 breakpoint : function () {
224 return $(document).width() <= this.settings.breakPoint || $('html').hasClass('lt-ie9');
225 },
226
227 assemble : function () {
228 var self = this;
229 // Pull element out of the DOM for manipulation
230 this.settings.$section.detach();
231
232 this.settings.$section.find('.has-dropdown>a').each(function () {
233 var $link = $(this),
234 $dropdown = $link.siblings('.dropdown'),
235 url = $link.attr('href');
236
237 if (url && url.length > 1) {
238 var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
239 } else {
240 var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');
241 }
242
243 // Copy link to subnav
244 if (self.settings.custom_back_text == true) {
245 $titleLi.find('h5>a').html('&laquo; ' + self.settings.back_text);
246 } else {
247 $titleLi.find('h5>a').html('&laquo; ' + $link.html());
248 }
249 $dropdown.prepend($titleLi);
250 });
251
252 // Put element back in the DOM
253 this.settings.$section.appendTo(this.settings.$topbar);
254
255 // check for sticky
256 this.sticky();
257 },
258
259 height : function (ul) {
260 var total = 0,
261 self = this;
262
263 ul.find('> li').each(function () { total += self.outerHeight($(this), true); });
264
265 return total;
266 },
267
268 sticky : function () {
269 var klass = '.' + this.settings.stickyClass;
270 if ($(klass).length > 0) {
271 var distance = $(klass).length ? $(klass).offset().top: 0,
272 $window = $(window);
273 var offst = this.outerHeight($('.top-bar'));
274
275 $window.scroll(function() {
276 if ($window.scrollTop() >= (distance)) {
277 $(klass).addClass("fixed");
278 $('body').css('padding-top',offst);
279 }
280
281 else if ($window.scrollTop() < distance) {
282 $(klass).removeClass("fixed");
283 $('body').css('padding-top','0');
284 }
285 });
286 }
287 },
288
289 off : function () {
290 $(this.scope).off('.fndtn.topbar');
291 $(window).off('.fndtn.topbar');
292 },
293
294 reflow : function () {}
295 };
296 }(Foundation.zj, this, this.document));
0 /*
1 * Foundation Responsive Library
2 * http://foundation.zurb.com
3 * Copyright 2013, ZURB
4 * Free to use under the MIT license.
5 * http://www.opensource.org/licenses/mit-license.php
6 */
7 /*jslint unparam: true, browser: true, indent: 2 */
8 // Accommodate running jQuery or Zepto in noConflict() mode by
9 // using an anonymous function to redefine the $ shorthand name.
10 // See http://docs.jquery.com/Using_jQuery_with_Other_Libraries
11 // and http://zeptojs.com/
12 var libFuncName=null;if(typeof jQuery=="undefined"&&typeof Zepto=="undefined"&&typeof $=="function")libFuncName=$;else if(typeof jQuery=="function")libFuncName=jQuery;else{if(typeof Zepto!="function")throw new TypeError;libFuncName=Zepto}(function(e,t,n,r){"use strict";t.matchMedia=t.matchMedia||function(e,t){var n,r=e.documentElement,i=r.firstElementChild||r.firstChild,s=e.createElement("body"),o=e.createElement("div");return o.id="mq-test-1",o.style.cssText="position:absolute;top:-100em",s.style.background="none",s.appendChild(o),function(e){return o.innerHTML='&shy;<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',r.insertBefore(s,i),n=o.offsetWidth===42,r.removeChild(s),{matches:n,media:e}}}(n),Array.prototype.filter||(Array.prototype.filter=function(e){if(this==null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(typeof e!="function")return;var r=[],i=arguments[1];for(var s=0;s<n;s++)if(s in t){var o=t[s];e&&e.call(i,o,s,t)&&r.push(o)}return r}),Function.prototype.bind||(Function.prototype.bind=function(e){if(typeof this!="function")throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(this==null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(n===0)return-1;var r=0;arguments.length>1&&(r=Number(arguments[1]),r!=r?r=0:r!=0&&r!=Infinity&&r!=-Infinity&&(r=(r>0||-1)*Math.floor(Math.abs(r))));if(r>=n)return-1;var i=r>=0?r:Math.max(n-Math.abs(r),0);for(;i<n;i++)if(i in t&&t[i]===e)return i;return-1}),e.fn.stop=e.fn.stop||function(){return this},t.Foundation={name:"Foundation",version:"4.2.2",cache:{},init:function(t,n,r,i,s,o){var u,a=[t,r,i,s],f=[],o=o||!1;o&&(this.nc=o),this.rtl=/rtl/i.test(e("html").attr("dir")),this.scope=t||this.scope;if(n&&typeof n=="string"&&!/reflow/i.test(n)){if(/off/i.test(n))return this.off();u=n.split(" ");if(u.length>0)for(var l=u.length-1;l>=0;l--)f.push(this.init_lib(u[l],a))}else{/reflow/i.test(n)&&(a[1]="reflow");for(var c in this.libs)f.push(this.init_lib(c,a))}return typeof n=="function"&&a.unshift(n),this.response_obj(f,a)},response_obj:function(e,t){for(var n=0,r=t.length;n<r;n++)if(typeof t[n]=="function")return t[n]({errors:e.filter(function(e){if(typeof e=="string")return e})});return e},init_lib:function(e,t){return this.trap(function(){return this.libs.hasOwnProperty(e)?(this.patch(this.libs[e]),this.libs[e].init.apply(this.libs[e],t)):function(){}}.bind(this),e)},trap:function(e,t){if(!this.nc)try{return e()}catch(n){return this.error({name:t,message:"could not be initialized",more:n.name+" "+n.message})}return e()},patch:function(e){this.fix_outer(e),e.scope=this.scope,e.rtl=this.rtl},inherit:function(e,t){var n=t.split(" ");for(var r=n.length-1;r>=0;r--)this.lib_methods.hasOwnProperty(n[r])&&(this.libs[e.name][n[r]]=this.lib_methods[n[r]])},random_str:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split("");e||(e=Math.floor(Math.random()*t.length));var n="";for(var r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n},libs:{},lib_methods:{set_data:function(e,t){var n=[this.name,+(new Date),Foundation.random_str(5)].join("-");return Foundation.cache[n]=t,e.attr("data-"+this.name+"-id",n),t},get_data:function(e){return Foundation.cache[e.attr("data-"+this.name+"-id")]},remove_data:function(t){t?(delete Foundation.cache[t.attr("data-"+this.name+"-id")],t.attr("data-"+this.name+"-id","")):e("[data-"+this.name+"-id]").each(function(){delete Foundation.cache[e(this).attr("data-"+this.name+"-id")],e(this).attr("data-"+this.name+"-id","")})},throttle:function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}},data_options:function(t){function u(e){return!isNaN(e-0)&&e!==null&&e!==""&&e!==!1&&e!==!0}function a(t){return typeof t=="string"?e.trim(t):t}var n={},r,i,s=(t.attr("data-options")||":").split(";"),o=s.length;for(r=o-1;r>=0;r--)i=s[r].split(":"),/true/i.test(i[1])&&(i[1]=!0),/false/i.test(i[1])&&(i[1]=!1),u(i[1])&&(i[1]=parseInt(i[1],10)),i.length===2&&i[0].length>0&&(n[a(i[0])]=a(i[1]));return n},delay:function(e,t){return setTimeout(e,t)},scrollTo:function(n,r,i){if(i<0)return;var s=r-e(t).scrollTop(),o=s/i*10;this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(o,10))||(t.scrollTo(0,e(t).scrollTop()+o),this.scrollTo(n,r,i-10))}.bind(this),10)},scrollLeft:function(e){if(!e.length)return;return"scrollLeft"in e[0]?e[0].scrollLeft:e[0].pageXOffset},empty:function(e){if(e.length&&e.length>0)return!1;if(e.length&&e.length===0)return!0;for(var t in e)if(hasOwnProperty.call(e,t))return!1;return!0}},fix_outer:function(e){e.outerHeight=function(e,t){return typeof Zepto=="function"?e.height():typeof t!="undefined"?e.outerHeight(t):e.outerHeight()},e.outerWidth=function(e){return typeof Zepto=="function"?e.width():typeof bool!="undefined"?e.outerWidth(bool):e.outerWidth()}},error:function(e){return e.name+" "+e.message+"; "+e.more},off:function(){return e(this.scope).off(".fndtn"),e(t).off(".fndtn"),!0},zj:function(){return typeof Zepto!="undefined"?Zepto:jQuery}()},e.fn.foundation=function(){var e=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(e)),this})}})(libFuncName,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.interchange={name:"interchange",version:"4.2.2",cache:{},settings:{load_attr:"interchange",named_queries:{"default":"only screen and (min-width: 1px)",small:"only screen and (min-width: 768px)",medium:"only screen and (min-width: 1280px)",large:"only screen and (min-width: 1440px)",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(e,t){if(/IMG/.test(e[0].nodeName)){var n=t.split("/"),r=n[n.length-1],i=e[0].src;if((new RegExp(r,"i")).test(e[0].src))return;return e[0].src=t,e.trigger("replace",[e[0].src,i])}}}},init:function(t,n,r){return Foundation.inherit(this,"throttle"),typeof n=="object"&&e.extend(!0,this.settings,n),this.events(),this.images(),typeof n!="string"?this.settings.init:this[n].call(this,r)},events:function(){var n=this;e(t).on("resize.fndtn.interchange",n.throttle(function(){n.resize.call(n)},50))},resize:function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var n=this.results(t,e[t]);n&&this.settings.directives[n.scenario[1]](n.el,n.scenario[0])}},results:function(t,n){var r=n.length,i=[];if(r>0){var s=e('[data-uuid="'+t+'"]');for(var o=r-1;o>=0;o--){var u=n[o][2];if(this.settings.named_queries.hasOwnProperty(u))var a=matchMedia(this.settings.named_queries[u]);else var a=matchMedia(n[o][2]);if(a.matches)return{el:s,scenario:n[o]}}}return!1},images:function(e){return typeof this.cached_images=="undefined"||e?this.update_images():this.cached_images},update_images:function(){var t=n.getElementsByTagName("img"),r=t.length,i="data-"+this.settings.load_attr;this.cached_images=[];for(var s=r-1;s>=0;s--)this.loaded(e(t[s]),s===0,function(e,t){if(e){var n=e.getAttribute(i)||"";n.length>0&&this.cached_images.push(e)}t&&this.enhance()}.bind(this));return"deferred"},loaded:function(e,t,n){function r(){n(e[0],t)}function i(){this.one("load",r);if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var e=this.attr("src"),t=e.match(/\?/)?"&":"?";t+="random="+(new Date).getTime(),this.attr("src",e+t)}}if(!e.attr("src")){r();return}e[0].complete||e[0].readyState===4?r():i.call(e)},enhance:function(){var n=this.images().length;for(var r=n-1;r>=0;r--)this._object(e(this.images()[r]));return e(t).trigger("resize")},parse_params:function(e,t,n){return[this.trim(e),this.convert_directive(t),this.trim(n)]},convert_directive:function(e){var t=this.trim(e);return t.length>0?t:"replace"},_object:function(e){var t=this.parse_data_attr(e),n=[],r=t.length;if(r>0)for(var i=r-1;i>=0;i--){var s=t[i].split(/\((.*?)(\))$/);if(s.length>1){var o=s[0].split(","),u=this.parse_params(o[0],o[1],s[1]);n.push(u)}}return this.store(e,n)},uuid:function(e){function n(){return((1+Math.random())*65536|0).toString(16).substring(1)}var t=e||"-";return n()+n()+t+n()+t+n()+t+n()+t+n()+n()+n()},store:function(e,t){var n=this.uuid(),r=e.data("uuid");return r?this.cache[r]:(e.attr("data-uuid",n),this.cache[n]=t)},trim:function(t){return typeof t=="string"?e.trim(t):t},parse_data_attr:function(e){var t=e.data(this.settings.load_attr).split(/\[(.*?)\]/),n=t.length,r=[];for(var i=n-1;i>=0;i--)t[i].replace(/[\W\d]+/,"").length>4&&r.push(t[i]);return r},reflow:function(){this.images(!0)}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"4.2.0",settings:{activeClass:"open",is_hover:!1,opened:function(){},closed:function(){}},init:function(t,n,r){return this.scope=t||this.scope,Foundation.inherit(this,"throttle scrollLeft data_options"),typeof n=="object"&&e.extend(!0,this.settings,n),typeof n!="string"?(this.settings.init||this.events(),this.settings.init):this[n].call(this,r)},events:function(){var n=this;e(this.scope).on("click.fndtn.dropdown","[data-dropdown]",function(t){var r=e.extend({},n.settings,n.data_options(e(this)));t.preventDefault(),r.is_hover||n.toggle(e(this))}).on("mouseenter","[data-dropdown]",function(t){var r=e.extend({},n.settings,n.data_options(e(this)));r.is_hover&&n.toggle(e(this))}).on("mouseleave","[data-dropdown-content]",function(t){var r=e('[data-dropdown="'+e(this).attr("id")+'"]'),i=e.extend({},n.settings,n.data_options(r));i.is_hover&&n.close.call(n,e(this))}).on("opened.fndtn.dropdown","[data-dropdown-content]",this.settings.opened).on("closed.fndtn.dropdown","[data-dropdown-content]",this.settings.closed),e("body").on("click.fndtn.dropdown",function(t){var r=e(t.target).closest("[data-dropdown-content]");if(e(t.target).data("dropdown"))return;if(r.length>0&&(e(t.target).is("[data-dropdown-content]")||e.contains(r.first()[0],t.target))){t.stopPropagation();return}n.close.call(n,e("[data-dropdown-content]"))}),e(t).on("resize.fndtn.dropdown",n.throttle(function(){n.resize.call(n)},50)).trigger("resize"),this.settings.init=!0},close:function(t){var n=this;t.each(function(){e(this).hasClass(n.settings.activeClass)&&(e(this).css(Foundation.rtl?"right":"left","-99999px").removeClass(n.settings.activeClass),e(this).trigger("closed"))})},open:function(e,t){this.css(e.addClass(this.settings.activeClass),t),e.trigger("opened")},toggle:function(t){var n=e("#"+t.data("dropdown"));this.close.call(this,e("[data-dropdown-content]").not(n)),n.hasClass(this.settings.activeClass)?this.close.call(this,n):(this.close.call(this,e("[data-dropdown-content]")),this.open.call(this,n,t))},resize:function(){var t=e("[data-dropdown-content].open"),n=e("[data-dropdown='"+t.attr("id")+"']");t.length&&n.length&&this.css(t,n)},css:function(n,r){var i=n.offsetParent();if(i.length>0&&/body/i.test(n.offsetParent()[0].nodeName)){var s=r.offset();s.top-=n.offsetParent().offset().top,s.left-=n.offsetParent().offset().left}else var s=r.position();if(this.small())n.css({position:"absolute",width:"95%",left:"2.5%","max-width":"none",top:s.top+this.outerHeight(r)});else{if(!Foundation.rtl&&e(t).width()>this.outerWidth(n)+r.offset().left){var o=s.left;n.hasClass("right")&&n.removeClass("right")}else{n.hasClass("right")||n.addClass("right");var o=s.left-(this.outerWidth(n)-this.outerWidth(r))}n.attr("style","").css({position:"absolute",top:s.top+this.outerHeight(r),left:o})}return n},small:function(){return e(t).width()<768||e("html").hasClass("lt-ie9")},off:function(){e(this.scope).off(".fndtn.dropdown"),e("html, body").off(".fndtn.dropdown"),e(t).off(".fndtn.dropdown"),e("[data-dropdown-content]").off(".fndtn.dropdown"),this.settings.init=!1},reflow:function(){}}}(Foundation.zj,this,this.document),function(e,t,n){function f(e){var t={},r=/^jQuery\d+$/;return n.each(e.attributes,function(e,n){n.specified&&!r.test(n.name)&&(t[n.name]=n.value)}),t}function l(e,r){var i=this,s=n(i);if(i.value==s.attr("placeholder")&&s.hasClass("placeholder"))if(s.data("placeholder-password")){s=s.hide().next().show().attr("id",s.removeAttr("id").data("placeholder-id"));if(e===!0)return s[0].value=r;s.focus()}else i.value="",s.removeClass("placeholder"),i==t.activeElement&&i.select()}function c(){var e,t=this,r=n(t),i=r,s=this.id;if(t.value==""){if(t.type=="password"){if(!r.data("placeholder-textinput")){try{e=r.clone().attr({type:"text"})}catch(o){e=n("<input>").attr(n.extend(f(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":s}).bind("focus.placeholder",l),r.data({"placeholder-textinput":e,"placeholder-id":s}).before(e)}r=r.removeAttr("id").hide().prev().attr("id",s).show()}r.addClass("placeholder"),r[0].value=r.attr("placeholder")}else r.removeClass("placeholder")}var r="placeholder"in t.createElement("input"),i="placeholder"in t.createElement("textarea"),s=n.fn,o=n.valHooks,u,a;r&&i?(a=s.placeholder=function(){return this},a.input=a.textarea=!0):(a=s.placeholder=function(){var e=this;return e.filter((r?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":l,"blur.placeholder":c}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e},a.input=r,a.textarea=i,u={get:function(e){var t=n(e);return t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,r){var i=n(e);return i.data("placeholder-enabled")?(r==""?(e.value=r,e!=t.activeElement&&c.call(e)):i.hasClass("placeholder")?l.call(e,!0,r)||(e.value=r):e.value=r,i):e.value=r}},r||(o.input=u),i||(o.textarea=u),n(function(){n(t).delegate("form","submit.placeholder",function(){var e=n(".placeholder",this).each(l);setTimeout(function(){e.each(c)},10)})}),n(e).bind("beforeunload.placeholder",function(){n(".placeholder").each(function(){this.value=""})}))}(this,document,Foundation.zj),function(e,t,n,r){"use strict";Foundation.libs.placeholder={name:"placeholder",version:"4.2.2",init:function(n,r,i){this.scope=n||this.scope,typeof r!="string"&&(t.onload=function(){e("input, textarea").placeholder()})}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.forms={name:"forms",version:"4.2.2",cache:{},settings:{disable_class:"no-custom",last_combo:null},init:function(t,n,r){return typeof n=="object"&&e.extend(!0,this.settings,n),typeof n!="string"?(this.settings.init||this.events(),this.assemble(),this.settings.init):this[n].call(this,r)},assemble:function(){e('form.custom input[type="radio"]',e(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).each(this.append_custom_markup),e('form.custom input[type="checkbox"]',e(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).each(this.append_custom_markup),e("form.custom select",e(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).not("[multiple=multiple]").each(this.append_custom_select)},events:function(){var r=this;e(this.scope).on("click.fndtn.forms","form.custom span.custom.checkbox",function(t){t.preventDefault(),t.stopPropagation(),r.toggle_checkbox(e(this))}).on("click.fndtn.forms","form.custom span.custom.radio",function(t){t.preventDefault(),t.stopPropagation(),r.toggle_radio(e(this))}).on("change.fndtn.forms","form.custom select",function(t,n){if(!e(this).not('[data-customforms="disabled"])'))return;r.refresh_custom_select(e(this),n)}).on("click.fndtn.forms","form.custom label",function(t){if(e(t.target).is("label")){var n=e("#"+r.escape(e(this).attr("for"))).not('[data-customforms="disabled"]'),i,s;n.length!==0&&(n.attr("type")==="checkbox"?(t.preventDefault(),i=e(this).find("span.custom.checkbox"),i.length===0&&(i=n.add(this).siblings("span.custom.checkbox").first()),r.toggle_checkbox(i)):n.attr("type")==="radio"&&(t.preventDefault(),s=e(this).find("span.custom.radio"),s.length===0&&(s=n.add(this).siblings("span.custom.radio").first()),r.toggle_radio(s)))}}).on("mousedown.fndtn.forms","form.custom div.custom.dropdown",function(){return!1}).on("click.fndtn.forms","form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector",function(t){var n=e(this),s=n.closest("div.custom.dropdown"),o=i(s,"select");s.hasClass("open")||e(r.scope).trigger("click"),t.preventDefault();if(!1===o.is(":disabled"))return s.toggleClass("open"),s.hasClass("open")?e(r.scope).on("click.fndtn.forms.customdropdown",function(){s.removeClass("open"),e(r.scope).off(".fndtn.forms.customdropdown")}):e(r.scope).on(".fndtn.forms.customdropdown"),!1}).on("click.fndtn.forms touchend.fndtn.forms","form.custom div.custom.dropdown li",function(t){var n=e(this),r=n.closest("div.custom.dropdown"),s=i(r,"select"),o=0;t.preventDefault(),t.stopPropagation();if(!e(this).hasClass("disabled")){e("div.dropdown").not(r).removeClass("open");var u=n.closest("ul").find("li.selected");u.removeClass("selected"),n.addClass("selected"),r.removeClass("open").find("a.current").text(n.text()),n.closest("ul").find("li").each(function(e){n[0]===this&&(o=e)}),s[0].selectedIndex=o,s.data("prevalue",u.html()),s.trigger("change")}}),e(t).on("keydown",function(t){var r=n.activeElement,i=Foundation.libs.forms,s=e(".custom.dropdown.open");if(s.length>0){t.preventDefault(),t.which===13&&s.find("li.selected").trigger("click"),t.which===27&&s.removeClass("open");if(t.which>=65&&t.which<=90){var o=i.go_to(s,t.which),u=s.find("li.selected");o&&(u.removeClass("selected"),i.scrollTo(o.addClass("selected"),300))}if(t.which===38){var u=s.find("li.selected"),a=u.prev(":not(.disabled)");a.length>0&&(a.parent()[0].scrollTop=a.parent().scrollTop()-i.outerHeight(a),u.removeClass("selected"),a.addClass("selected"))}else if(t.which===40){var u=s.find("li.selected"),o=u.next(":not(.disabled)");o.length>0&&(o.parent()[0].scrollTop=o.parent().scrollTop()+i.outerHeight(o),u.removeClass("selected"),o.addClass("selected"))}}}),this.settings.init=!0},go_to:function(e,t){var n=e.find("li"),r=n.length;if(r>0)for(var i=0;i<r;i++){var s=n.eq(i).text().charAt(0).toLowerCase();if(s===String.fromCharCode(t).toLowerCase())return n.eq(i)}},scrollTo:function(e,t){if(t<0)return;var n=e.parent(),r=this.outerHeight(e),i=r*e.index()-n.scrollTop(),s=i/t*10;this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(s,10))||(n[0].scrollTop=n.scrollTop()+s,this.scrollTo(e,t-10))}.bind(this),10)},append_custom_markup:function(t,n){var r=e(n),i=r.attr("type"),s=r.next("span.custom."+i);r.parent().hasClass("switch")||r.addClass("hidden-field"),s.length===0&&(s=e('<span class="custom '+i+'"></span>').insertAfter(r)),s.toggleClass("checked",r.is(":checked")),s.toggleClass("disabled",r.is(":disabled"))},append_custom_select:function(t,n){var r=Foundation.libs.forms,i=e(n),s=i.next("div.custom.dropdown"),o=s.find("ul"),u=s.find(".current"),a=s.find(".selector"),f=i.find("option"),l=f.filter(":selected"),c=i.attr("class")?i.attr("class").split(" "):[],h=0,p="",d,v=!1;if(s.length===0){var m=i.hasClass("small")?"small":i.hasClass("medium")?"medium":i.hasClass("large")?"large":i.hasClass("expand")?"expand":"";s=e('<div class="'+["custom","dropdown",m].concat(c).filter(function(e,t,n){return e===""?!1:n.indexOf(e)===t}).join(" ")+'"><a href="#" class="selector"></a><ul /></div>'),a=s.find(".selector"),o=s.find("ul"),p=f.map(function(){var t=e(this).attr("class")?e(this).attr("class"):"";return"<li class='"+t+"'>"+e(this).html()+"</li>"}).get().join(""),o.append(p),v=s.prepend('<a href="#" class="current">'+l.html()+"</a>").find(".current"),i.after(s).addClass("hidden-field")}else p=f.map(function(){return"<li>"+e(this).html()+"</li>"}).get().join(""),o.html("").append(p);r.assign_id(i,s),s.toggleClass("disabled",i.is(":disabled")),d=o.find("li"),r.cache[s.data("id")]=d.length,f.each(function(t){this.selected&&(d.eq(t).addClass("selected"),v&&v.html(e(this).html())),e(this).is(":disabled")&&d.eq(t).addClass("disabled")});if(!s.is(".small, .medium, .large, .expand")){s.addClass("open");var r=Foundation.libs.forms;r.hidden_fix.adjust(o),h=r.outerWidth(d)>h?r.outerWidth(d):h,Foundation.libs.forms.hidden_fix.reset(),s.removeClass("open")}},assign_id:function(e,t){var n=[+(new Date),Foundation.random_str(5)].join("-");e.attr("data-id",n),t.attr("data-id",n)},refresh_custom_select:function(t,n){var r=this,i=0,s=t.next(),o=t.find("option"),u=s.find("li");if(u.length!==this.cache[s.data("id")]||n)s.find("ul").html(""),o.each(function(){var t=e("<li>"+e(this).html()+"</li>");s.find("ul").append(t)}),o.each(function(t){this.selected&&(s.find("li").eq(t).addClass("selected"),s.find(".current").html(e(this).html())),e(this).is(":disabled")&&s.find("li").eq(t).addClass("disabled")}),s.removeAttr("style").find("ul").removeAttr("style"),s.find("li").each(function(){s.addClass("open"),r.outerWidth(e(this))>i&&(i=r.outerWidth(e(this))),s.removeClass("open")}),u=s.find("li"),this.cache[s.data("id")]=u.length},toggle_checkbox:function(e){var t=e.prev(),n=t[0];!1===t.is(":disabled")&&(n.checked=n.checked?!1:!0,e.toggleClass("checked"),t.trigger("change"))},toggle_radio:function(e){var t=e.prev(),n=t.closest("form.custom"),r=t[0];!1===t.is(":disabled")&&(n.find('input[type="radio"][name="'+this.escape(t.attr("name"))+'"]').next().not(e).removeClass("checked"),e.hasClass("checked")||e.toggleClass("checked"),r.checked=e.hasClass("checked"),t.trigger("change"))},escape:function(e){return e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},hidden_fix:{tmp:[],hidden:null,adjust:function(t){var n=this;n.hidden=t.parents(),n.hidden=n.hidden.add(t).filter(":hidden"),n.hidden.each(function(){var t=e(this);n.tmp.push(t.attr("style")),t.css({visibility:"hidden",display:"block"})})},reset:function(){var t=this;t.hidden.each(function(n){var i=e(this),s=t.tmp[n];s===r?i.removeAttr("style"):i.attr("style",s)}),t.tmp=[],t.hidden=null}},off:function(){e(this.scope).off(".fndtn.forms")},reflow:function(){}};var i=function(t,n){var t=t.prev();while(t.length){if(t.is(n))return t;t=t.prev()}return e()}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.alerts={name:"alerts",version:"4.2.2",settings:{speed:300,callback:function(){}},init:function(t,n,r){return this.scope=t||this.scope,typeof n=="object"&&e.extend(!0,this.settings,n),typeof n!="string"?(this.settings.init||this.events(),this.settings.init):this[n].call(this,r)},events:function(){var t=this;e(this.scope).on("click.fndtn.alerts","[data-alert] a.close",function(n){n.preventDefault(),e(this).closest("[data-alert]").fadeOut(t.speed,function(){e(this).remove(),t.settings.callback()})}),this.settings.init=!0},off:function(){e(this.scope).off(".fndtn.alerts")},reflow:function(){}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.magellan={name:"magellan",version:"4.2.2",settings:{activeClass:"active"},init:function(t,n,r){return this.scope=t||this.scope,Foundation.inherit(this,"data_options"),typeof n=="object"&&e.extend(!0,this.settings,n),typeof n!="string"?(this.settings.init||(this.fixed_magellan=e("[data-magellan-expedition]"),this.set_threshold(),this.last_destination=e("[data-magellan-destination]").last(),this.events()),this.settings.init):this[n].call(this,r)},events:function(){var n=this;e(this.scope).on("arrival.fndtn.magellan","[data-magellan-arrival]",function(t){var r=e(this),i=r.closest("[data-magellan-expedition]"),s=i.attr("data-magellan-active-class")||n.settings.activeClass;r.closest("[data-magellan-expedition]").find("[data-magellan-arrival]").not(r).removeClass(s),r.addClass(s)}),this.fixed_magellan.on("update-position.fndtn.magellan",function(){var t=e(this)}).trigger("update-position"),e(t).on("resize.fndtn.magellan",function(){this.fixed_magellan.trigger("update-position")}.bind(this)).on("scroll.fndtn.magellan",function(){var r=e(t).scrollTop();n.fixed_magellan.each(function(){var t=e(this);typeof t.data("magellan-top-offset")=="undefined"&&t.data("magellan-top-offset",t.offset().top),typeof t.data("magellan-fixed-position")=="undefined"&&t.data("magellan-fixed-position",!1);var i=r+n.settings.threshold>t.data("magellan-top-offset"),s=t.attr("data-magellan-top-offset");t.data("magellan-fixed-position")!=i&&(t.data("magellan-fixed-position",i),i?(t.addClass("fixed"),t.css({position:"fixed",top:0})):(t.removeClass("fixed"),t.css({position:"",top:""})),i&&typeof s!="undefined"&&s!=0&&t.css({position:"fixed",top:s+"px"}))})}),this.last_destination.length>0&&e(t).on("scroll.fndtn.magellan",function(r){var i=e(t).scrollTop(),s=i+e(t).height(),o=Math.ceil(n.last_destination.offset().top);e("[data-magellan-destination]").each(function(){var t=e(this),r=t.attr("data-magellan-destination"),u=t.offset().top-i;u<=n.settings.threshold&&e("[data-magellan-arrival='"+r+"']").trigger("arrival"),s>=e(n.scope).height()&&o>i&&o<s&&e("[data-magellan-arrival]").last().trigger("arrival")})}),this.settings.init=!0},set_threshold:function(){this.settings.threshold||(this.settings.threshold=this.fixed_magellan.length>0?this.outerHeight(this.fixed_magellan,!0):0)},off:function(){e(this.scope).off(".fndtn.magellan")},reflow:function(){}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.reveal={name:"reveal",version:"4.2.2",locked:!1,settings:{animation:"fadeAndPop",animationSpeed:250,closeOnBackgroundClick:!0,closeOnEsc:!0,dismissModalClass:"close-reveal-modal",bgClass:"reveal-modal-bg",open:function(){},opened:function(){},close:function(){},closed:function(){},bg:e(".reveal-modal-bg"),css:{open:{opacity:0,visibility:"visible",display:"block"},close:{opacity:1,visibility:"hidden",display:"none"}}},init:function(t,n,r){return Foundation.inherit(this,"data_options delay"),typeof n=="object"?e.extend(!0,this.settings,n):typeof r!="undefined"&&e.extend(!0,this.settings,r),typeof n!="string"?(this.events(),this.settings.init):this[n].call(this,r)},events:function(){var t=this;return e(this.scope).off(".fndtn.reveal").on("click.fndtn.reveal","[data-reveal-id]",function(n){n.preventDefault();if(!t.locked){var r=e(this),i=r.data("reveal-ajax");t.locked=!0;if(typeof i=="undefined")t.open.call(t,r);else{var s=i===!0?r.attr("href"):i;t.open.call(t,r,{url:s})}}}).on("click.fndtn.reveal",this.close_targets(),function(n){n.preventDefault();if(!t.locked){var r=e.extend({},t.settings,t.data_options(e(".reveal-modal.open")));if(e(n.target)[0]===e("."+r.bgClass)[0]&&!r.closeOnBackgroundClick)return;t.locked=!0,t.close.call(t,e(this).closest(".reveal-modal"))}}).on("open.fndtn.reveal",".reveal-modal",this.settings.open).on("opened.fndtn.reveal",".reveal-modal",this.settings.opened).on("opened.fndtn.reveal",".reveal-modal",this.open_video).on("close.fndtn.reveal",".reveal-modal",this.settings.close).on("closed.fndtn.reveal",".reveal-modal",this.settings.closed).on("closed.fndtn.reveal",".reveal-modal",this.close_video),e("body").bind("keyup.reveal",function(n){var r=e(".reveal-modal.open"),i=e.extend({},t.settings,t.data_options(r));n.which===27&&i.closeOnEsc&&r.foundation("reveal","close")}),!0},open:function(t,n){if(t)if(typeof t.selector!="undefined")var r=e("#"+t.data("reveal-id"));else{var r=e(this.scope);n=t}else var r=e(this.scope);if(!r.hasClass("open")){var i=e(".reveal-modal.open");typeof r.data("css-top")=="undefined"&&r.data("css-top",parseInt(r.css("top"),10)).data("offset",this.cache_offset(r)),r.trigger("open"),i.length<1&&this.toggle_bg(r);if(typeof n=="undefined"||!n.url)this.hide(i,this.settings.css.close),this.show(r,this.settings.css.open);else{var s=this,o=typeof n.success!="undefined"?n.success:null;e.extend(n,{success:function(t,n,u){e.isFunction(o)&&o(t,n,u),r.html(t),e(r).foundation("section","reflow"),s.hide(i,s.settings.css.close),s.show(r,s.settings.css.open)}}),e.ajax(n)}}},close:function(t){var t=t&&t.length?t:e(this.scope),n=e(".reveal-modal.open");n.length>0&&(this.locked=!0,t.trigger("close"),this.toggle_bg(t),this.hide(n,this.settings.css.close))},close_targets:function(){var e="."+this.settings.dismissModalClass;return this.settings.closeOnBackgroundClick?e+", ."+this.settings.bgClass:e},toggle_bg:function(t){e(".reveal-modal-bg").length===0&&(this.settings.bg=e("<div />",{"class":this.settings.bgClass}).appendTo("body")),this.settings.bg.filter(":visible").length>0?this.hide(this.settings.bg):this.show(this.settings.bg)},show:function(n,r){if(r){if(/pop/i.test(this.settings.animation)){r.top=e(t).scrollTop()-n.data("offset")+"px";var i={top:e(t).scrollTop()+n.data("css-top")+"px",opacity:1};return this.delay(function(){return n.css(r).animate(i,this.settings.animationSpeed,"linear",function(){this.locked=!1,n.trigger("opened")}.bind(this)).addClass("open")}.bind(this),this.settings.animationSpeed/2)}if(/fade/i.test(this.settings.animation)){var i={opacity:1};return this.delay(function(){return n.css(r).animate(i,this.settings.animationSpeed,"linear",function(){this.locked=!1,n.trigger("opened")}.bind(this)).addClass("open")}.bind(this),this.settings.animationSpeed/2)}return n.css(r).show().css({opacity:1}).addClass("open").trigger("opened")}return/fade/i.test(this.settings.animation)?n.fadeIn(this.settings.animationSpeed/2):n.show()},hide:function(n,r){if(r){if(/pop/i.test(this.settings.animation)){var i={top:-e(t).scrollTop()-n.data("offset")+"px",opacity:0};return this.delay(function(){return n.animate(i,this.settings.animationSpeed,"linear",function(){this.locked=!1,n.css(r).trigger("closed")}.bind(this)).removeClass("open")}.bind(this),this.settings.animationSpeed/2)}if(/fade/i.test(this.settings.animation)){var i={opacity:0};return this.delay(function(){return n.animate(i,this.settings.animationSpeed,"linear",function(){this.locked=!1,n.css(r).trigger("closed")}.bind(this)).removeClass("open")}.bind(this),this.settings.animationSpeed/2)}return n.hide().css(r).removeClass("open").trigger("closed")}return/fade/i.test(this.settings.animation)?n.fadeOut(this.settings.animationSpeed/2):n.hide()},close_video:function(t){var n=e(this).find(".flex-video"),r=n.find("iframe");r.length>0&&(r.attr("data-src",r[0].src),r.attr("src","about:blank"),n.hide())},open_video:function(t){var n=e(this).find(".flex-video"),i=n.find("iframe");if(i.length>0){var s=i.attr("data-src");if(typeof s=="string")i[0].src=i.attr("data-src");else{var o=i[0].src;i[0].src=r,i[0].src=o}n.show()}},cache_offset:function(e){var t=e.show().height()+parseInt(e.css("top"),10);return e.hide(),t},off:function(){e(this.scope).off(".fndtn.reveal")},reflow:function(){}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.tooltips={name:"tooltips",version:"4.2.2",settings:{selector:".has-tip",additionalInheritableClasses:[],tooltipClass:".tooltip",appendTo:"body","disable-for-touch":!1,tipTemplate:function(e,t){return'<span data-selector="'+e+'" class="'+Foundation.libs.tooltips.settings.tooltipClass.substring(1)+'">'+t+'<span class="nub"></span></span>'}},cache:{},init:function(t,n,r){Foundation.inherit(this,"data_options");var i=this;typeof n=="object"?e.extend(!0,this.settings,n):typeof r!="undefined"&&e.extend(!0,this.settings,r);if(typeof n=="string")return this[n].call(this,r);Modernizr.touch?e(this.scope).on("click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip","[data-tooltip]",function(t){var n=e.extend({},i.settings,i.data_options(e(this)));n["disable-for-touch"]||(t.preventDefault(),e(n.tooltipClass).hide(),i.showOrCreateTip(e(this)))}).on("click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip",this.settings.tooltipClass,function(t){t.preventDefault(),e(this).fadeOut(150)}):e(this.scope).on("mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip","[data-tooltip]",function(t){var n=e(this);/enter|over/i.test(t.type)?i.showOrCreateTip(n):(t.type==="mouseout"||t.type==="mouseleave")&&i.hide(n)})},showOrCreateTip:function(e){var t=this.
13 getTip(e);return t&&t.length>0?this.show(e):this.create(e)},getTip:function(t){var n=this.selector(t),r=null;return n&&(r=e('span[data-selector="'+n+'"]'+this.settings.tooltipClass)),typeof r=="object"?r:!1},selector:function(e){var t=e.attr("id"),n=e.attr("data-tooltip")||e.attr("data-selector");return(t&&t.length<1||!t)&&typeof n!="string"&&(n="tooltip"+Math.random().toString(36).substring(7),e.attr("data-selector",n)),t&&t.length>0?t:n},create:function(t){var n=e(this.settings.tipTemplate(this.selector(t),e("<div></div>").html(t.attr("title")).html())),r=this.inheritable_classes(t);n.addClass(r).appendTo(this.settings.appendTo),Modernizr.touch&&n.append('<span class="tap-to-close">tap to close </span>'),t.removeAttr("title").attr("title",""),this.show(t)},reposition:function(n,r,i){var s,o,u,a,f,l;r.css("visibility","hidden").show(),s=n.data("width"),o=r.children(".nub"),u=this.outerHeight(o),a=this.outerHeight(o),l=function(e,t,n,r,i,s){return e.css({top:t?t:"auto",bottom:r?r:"auto",left:i?i:"auto",right:n?n:"auto",width:s?s:"auto"}).end()},l(r,n.offset().top+this.outerHeight(n)+10,"auto","auto",n.offset().left,s);if(e(t).width()<767)l(r,n.offset().top+this.outerHeight(n)+10,"auto","auto",12.5,e(this.scope).width()),r.addClass("tip-override"),l(o,-u,"auto","auto",n.offset().left);else{var c=n.offset().left;Foundation.rtl&&(c=n.offset().left+n.offset().width-this.outerWidth(r)),l(r,n.offset().top+this.outerHeight(n)+10,"auto","auto",c,s),r.removeClass("tip-override"),i&&i.indexOf("tip-top")>-1?l(r,n.offset().top-this.outerHeight(r),"auto","auto",c,s).removeClass("tip-override"):i&&i.indexOf("tip-left")>-1?l(r,n.offset().top+this.outerHeight(n)/2-u*2.5,"auto","auto",n.offset().left-this.outerWidth(r)-u,s).removeClass("tip-override"):i&&i.indexOf("tip-right")>-1&&l(r,n.offset().top+this.outerHeight(n)/2-u*2.5,"auto","auto",n.offset().left+this.outerWidth(n)+u,s).removeClass("tip-override")}r.css("visibility","visible").hide()},inheritable_classes:function(t){var n=["tip-top","tip-left","tip-bottom","tip-right","noradius"].concat(this.settings.additionalInheritableClasses),r=t.attr("class"),i=r?e.map(r.split(" "),function(t,r){if(e.inArray(t,n)!==-1)return t}).join(" "):"";return e.trim(i)},show:function(e){var t=this.getTip(e);this.reposition(e,t,e.attr("class")),t.fadeIn(150)},hide:function(e){var t=this.getTip(e);t.fadeOut(150)},reload:function(){var t=e(this);return t.data("fndtn-tooltips")?t.foundationTooltips("destroy").foundationTooltips("init"):t.foundationTooltips("init")},off:function(){e(this.scope).off(".fndtn.tooltip"),e(this.settings.tooltipClass).each(function(t){e("[data-tooltip]").get(t).attr("title",e(this).text())}).remove()},reflow:function(){}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.clearing={name:"clearing",version:"4.2.2",settings:{templates:{viewing:'<a href="#" class="clearing-close">&times;</a><div class="visible-img" style="display: none"><img src="//:0"><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",init:!1,locked:!1},init:function(t,n,r){var i=this;return Foundation.inherit(this,"set_data get_data remove_data throttle data_options"),typeof n=="object"&&(r=e.extend(!0,this.settings,n)),typeof n!="string"?(e(this.scope).find("ul[data-clearing]").each(function(){var t=e(this),n=n||{},r=t.find("li"),s=i.get_data(t);!s&&r.length>0&&(n.$parent=t.parent(),i.set_data(t,e.extend({},i.settings,n,i.data_options(t))),i.assemble(t.find("li")),i.settings.init||i.events().swipe_events())}),this.settings.init):this[n].call(this,r)},events:function(){var n=this;return e(this.scope).on("click.fndtn.clearing","ul[data-clearing] li",function(t,r,i){var r=r||e(this),i=i||r,s=r.next("li"),o=n.get_data(r.parent()),u=e(t.target);t.preventDefault(),o||n.init(),i.hasClass("visible")&&r[0]===i[0]&&s.length>0&&n.is_open(r)&&(i=s,u=i.find("img")),n.open(u,r,i),n.update_paddles(i)}).on("click.fndtn.clearing",".clearing-main-next",function(e){this.nav(e,"next")}.bind(this)).on("click.fndtn.clearing",".clearing-main-prev",function(e){this.nav(e,"prev")}.bind(this)).on("click.fndtn.clearing",this.settings.close_selectors,function(e){Foundation.libs.clearing.close(e,this)}).on("keydown.fndtn.clearing",function(e){this.keydown(e)}.bind(this)),e(t).on("resize.fndtn.clearing",function(){this.resize()}.bind(this)),this.settings.init=!0,this},swipe_events:function(){var t=this;e(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(t){t.touches||(t=t.originalEvent);var n={start_page_x:t.touches[0].pageX,start_page_y:t.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:r};e(this).data("swipe-transition",n),t.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(n){n.touches||(n=n.originalEvent);if(n.touches.length>1||n.scale&&n.scale!==1)return;var r=e(this).data("swipe-transition");typeof r=="undefined"&&(r={}),r.delta_x=n.touches[0].pageX-r.start_page_x,typeof r.is_scrolling=="undefined"&&(r.is_scrolling=!!(r.is_scrolling||Math.abs(r.delta_x)<Math.abs(n.touches[0].pageY-r.start_page_y)));if(!r.is_scrolling&&!r.active){n.preventDefault();var i=r.delta_x<0?"next":"prev";r.active=!0,t.nav(n,i)}}).on("touchend.fndtn.clearing",".visible-img",function(t){e(this).data("swipe-transition",{}),t.stopPropagation()})},assemble:function(t){var n=t.parent();n.after('<div id="foundationClearingHolder"></div>');var r=e("#foundationClearingHolder"),i=this.get_data(n),s=n.detach(),o={grid:'<div class="carousel">'+this.outerHTML(s[0])+"</div>",viewing:i.templates.viewing},u='<div class="clearing-assembled"><div>'+o.viewing+o.grid+"</div></div>";return r.after(u).remove()},open:function(e,t,n){var r=n.closest(".clearing-assembled"),i=r.find("div").first(),s=i.find(".visible-img"),o=s.find("img").not(e);this.locked()||(o.attr("src",this.load(e)).css("visibility","hidden"),this.loaded(o,function(){o.css("visibility","visible"),r.addClass("clearing-blackout"),i.addClass("clearing-container"),s.show(),this.fix_height(n).caption(s.find(".clearing-caption"),e).center(o).shift(t,n,function(){n.siblings().removeClass("visible"),n.addClass("visible")})}.bind(this)))},close:function(t,n){t.preventDefault();var r=function(e){return/blackout/.test(e.selector)?e:e.closest(".clearing-blackout")}(e(n)),i,s;return n===t.target&&r&&(i=r.find("div").first(),s=i.find(".visible-img"),this.settings.prev_index=0,r.find("ul[data-clearing]").attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),i.removeClass("clearing-container"),s.hide()),!1},is_open:function(e){return e.parent().attr("style").length>0},keydown:function(t){var n=e(".clearing-blackout").find("ul[data-clearing]");t.which===39&&this.go(n,"next"),t.which===37&&this.go(n,"prev"),t.which===27&&e("a.clearing-close").trigger("click")},nav:function(t,n){var r=e(".clearing-blackout").find("ul[data-clearing]");t.preventDefault(),this.go(r,n)},resize:function(){var t=e(".clearing-blackout .visible-img").find("img");t.length&&this.center(t)},fix_height:function(t){var n=t.parent().children(),r=this;return n.each(function(){var t=e(this),n=t.find("img");t.height()>r.outerHeight(n)&&t.addClass("fix-height")}).closest("ul").width(n.length*100+"%"),this},update_paddles:function(e){var t=e.closest(".carousel").siblings(".visible-img");e.next().length>0?t.find(".clearing-main-next").removeClass("disabled"):t.find(".clearing-main-next").addClass("disabled"),e.prev().length>0?t.find(".clearing-main-prev").removeClass("disabled"):t.find(".clearing-main-prev").addClass("disabled")},center:function(e){return this.rtl?e.css({marginRight:-(this.outerWidth(e)/2),marginTop:-(this.outerHeight(e)/2)}):e.css({marginLeft:-(this.outerWidth(e)/2),marginTop:-(this.outerHeight(e)/2)}),this},load:function(e){if(e[0].nodeName==="A")var t=e.attr("href");else var t=e.parent().attr("href");return this.preload(e),t?t:e.attr("src")},preload:function(e){this.img(e.closest("li").next()).img(e.closest("li").prev())},loaded:function(e,t){function n(){t()}function r(){this.one("load",n);if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var e=this.attr("src"),t=e.match(/\?/)?"&":"?";t+="random="+(new Date).getTime(),this.attr("src",e+t)}}if(!e.attr("src")){n();return}e[0].complete||e[0].readyState===4?n():r.call(e)},img:function(e){if(e.length){var t=new Image,n=e.find("a");n.length?t.src=n.attr("href"):t.src=e.find("img").attr("src")}return this},caption:function(e,t){var n=t.data("caption");return n?e.html(n).show():e.text("").hide(),this},go:function(e,t){var n=e.find(".visible"),r=n[t]();r.length&&r.find("img").trigger("click",[n,r])},shift:function(e,t,n){var r=t.parent(),i=this.settings.prev_index||t.index(),s=this.direction(r,e,t),o=parseInt(r.css("left"),10),u=this.outerWidth(t),a;t.index()!==i&&!/skip/.test(s)?/left/.test(s)?(this.lock(),r.animate({left:o+u},300,this.unlock())):/right/.test(s)&&(this.lock(),r.animate({left:o-u},300,this.unlock())):/skip/.test(s)&&(a=t.index()-this.settings.up_count,this.lock(),a>0?r.animate({left:-(a*u)},300,this.unlock()):r.animate({left:0},300,this.unlock())),n()},direction:function(t,n,r){var i=t.find("li"),s=this.outerWidth(i)+this.outerWidth(i)/4,o=Math.floor(this.outerWidth(e(".clearing-container"))/s)-1,u=i.index(r),a;return this.settings.up_count=o,this.adjacent(this.settings.prev_index,u)?u>o&&u>this.settings.prev_index?a="right":u>o-1&&u<=this.settings.prev_index?a="left":a=!1:a="skip",this.settings.prev_index=u,a},adjacent:function(e,t){for(var n=t+1;n>=t-1;n--)if(n===e)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},outerHTML:function(e){return e.outerHTML||(new XMLSerializer).serializeToString(e)},off:function(){e(this.scope).off(".fndtn.clearing"),e(t).off(".fndtn.clearing"),this.remove_data(),this.settings.init=!1},reflow:function(){this.init()}}}(Foundation.zj,this,this.document),function(e,t,n){function i(e){return e}function s(e){return decodeURIComponent(e.replace(r," "))}var r=/\+/g,o=e.cookie=function(r,u,a){if(u!==n){a=e.extend({},o.defaults,a),u===null&&(a.expires=-1);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setDate(l.getDate()+f)}return u=o.json?JSON.stringify(u):String(u),t.cookie=[encodeURIComponent(r),"=",o.raw?u:encodeURIComponent(u),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=o.raw?i:s,h=t.cookie.split("; ");for(var p=0,d=h.length;p<d;p++){var v=h[p].split("=");if(c(v.shift())===r){var m=c(v.join("="));return o.json?JSON.parse(m):m}}return null};o.defaults={},e.removeCookie=function(t,n){return e.cookie(t)!==null?(e.cookie(t,null,n),!0):!1}}(Foundation.zj,document),function(e,t,n,r){"use strict";Foundation.libs.joyride={name:"joyride",version:"4.2.2",defaults:{expose:!1,modal:!1,tipLocation:"bottom",nubPosition:"auto",scrollSpeed:300,timer:0,startTimerOnClick:!0,startOffset:0,nextButton:!0,tipAnimation:"fade",pauseAfter:[],exposed:[],tipAnimationFadeSpeed:300,cookieMonster:!1,cookieName:"joyride",cookieDomain:!1,cookieExpires:365,tipContainer:"body",postRideCallback:function(){},postStepCallback:function(){},preStepCallback:function(){},preRideCallback:function(){},postExposeCallback: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>',exposeCover:'<div class="joyride-expose-cover"></div>'},exposeAddClass:""},settings:{},init:function(t,n,r){return this.scope=t||this.scope,Foundation.inherit(this,"throttle data_options scrollTo scrollLeft delay"),typeof n=="object"?e.extend(!0,this.settings,this.defaults,n):e.extend(!0,this.settings,this.defaults,r),typeof n!="string"?(this.settings.init||this.events(),this.settings.init):this[n].call(this,r)},events:function(){var n=this;e(this.scope).on("click.joyride",".joyride-next-tip, .joyride-modal-bg",function(e){e.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.joyride",".joyride-close-tip",function(e){e.preventDefault(),this.end()}.bind(this)),e(t).on("resize.fndtn.joyride",n.throttle(function(){if(e("[data-joyride]").length>0&&n.settings.$next_tip){if(n.settings.exposed.length>0){var t=e(n.settings.exposed);t.each(function(){var t=e(this);n.un_expose(t),n.expose(t)})}n.is_phone()?n.pos_phone():n.pos_default(!1,!0)}},100)),this.settings.init=!0},start:function(){var t=this,n=e(this.scope).find("[data-joyride]"),r=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],i=r.length;this.settings.init||this.init(),this.settings.$content_el=n,this.settings.$body=e(this.settings.tipContainer),this.settings.body_offset=e(this.settings.tipContainer).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.tipLocationPatterns={top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},typeof e.cookie!="function"&&(this.settings.cookieMonster=!1);if(!this.settings.cookieMonster||this.settings.cookieMonster&&e.cookie(this.settings.cookieName)===null)this.settings.$tip_content.each(function(n){var s=e(this);e.extend(!0,t.settings,t.data_options(s));for(var o=i-1;o>=0;o--)t.settings[r[o]]=parseInt(t.settings[r[o]],10);t.create({$li:s,index:n})}),!this.settings.startTimerOnClick&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init")},resume:function(){this.set_li(),this.show()},tip_template:function(t){var n,r;return t.tip_class=t.tip_class||"",n=e(this.settings.template.tip).addClass(t.tip_class),r=e.trim(e(t.li).html())+this.button_text(t.button_text)+this.settings.template.link+this.timer_instance(t.index),n.append(e(this.settings.template.wrapper)),n.first().attr("data-index",t.index),e(".joyride-content-wrapper",n).append(r),n[0]},timer_instance:function(t){var n;return t===0&&this.settings.startTimerOnClick&&this.settings.timer>0||this.settings.timer===0?n="":n=this.outerHTML(e(this.settings.template.timer)[0]),n},button_text:function(t){return this.settings.nextButton?(t=e.trim(t)||"Next",t=this.outerHTML(e(this.settings.template.button).append(t)[0])):t="",t},create:function(t){var n=t.$li.attr("data-button")||t.$li.attr("data-text"),r=t.$li.attr("class"),i=e(this.tip_template({tip_class:r,index:t.index,button_text:n,li:t.$li}));e(this.settings.tipContainer).append(i)},show:function(t){var n=null;this.settings.$li===r||e.inArray(this.settings.$li.index(),this.settings.pauseAfter)===-1?(this.settings.paused?this.settings.paused=!1:this.set_li(t),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0?(t&&(this.settings.preRideCallback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.preStepCallback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tipSettings=e.extend(this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tipSettings.tipLocationPattern=this.settings.tipLocationPatterns[this.settings.tipSettings.tipLocation],/body/i.test(this.settings.$target.selector)||this.scroll_to(),this.is_phone()?this.pos_phone(!0):this.pos_default(!0),n=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tipAnimation)?(n.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),this.delay(function(){n.animate({width:n.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tipAnimationFadeSpeed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tipAnimation)&&(n.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed).show(),this.delay(function(){n.animate({width:n.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tipAnimationFadeSpeed)):this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed)),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 Modernizr?Modernizr.mq("only screen and (max-width: 767px)")||e(".lt-ie9").length>0:this.settings.$window.width()<767},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||e(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),this.settings.postStepCallback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(e){e?(this.settings.$li=this.settings.$tip_content.eq(this.settings.startOffset),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=e(".joyride-tip-guide[data-index='"+this.settings.$li.index()+"']"),this.settings.$next_tip.data("closed","")},set_target:function(){var t=this.settings.$li.attr("data-class"),r=this.settings.$li.attr("data-id"),i=function(){return r?e(n.getElementById(r)):t?e("."+t).first():e("body")};this.settings.$target=i()},scroll_to:function(){var n,r;n=e(t).height()/2,r=Math.ceil(this.settings.$target.offset().top-n+this.outerHeight(this.settings.$next_tip)),r>0&&this.scrollTo(e("html, body"),r,this.settings.scrollSpeed)},paused:function(){return e.inArray(this.settings.$li.index()+1,this.settings.pauseAfter)===-1},restart:function(){this.hide(),this.settings.$li=r,this.show("init")},pos_default:function(n,r){var i=Math.ceil(e(t).height()/2),s=this.settings.$next_tip.offset(),o=this.settings.$next_tip.find(".joyride-nub"),u=Math.ceil(this.outerWidth(o)/2),a=Math.ceil(this.outerHeight(o)/2),f=n||!1;f&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),typeof r=="undefined"&&(r=!1);if(!/body/i.test(this.settings.$target.selector)){if(this.bottom()){var l=this.settings.$target.offset().left;Foundation.rtl&&(l=this.settings.$target.offset().width-this.settings.$next_tip.width()+l),this.settings.$next_tip.css({top:this.settings.$target.offset().top+a+this.outerHeight(this.settings.$target),left:l}),this.nub_position(o,this.settings.tipSettings.nubPosition,"top")}else if(this.top()){var l=this.settings.$target.offset().left;Foundation.rtl&&(l=this.settings.$target.offset().width-this.settings.$next_tip.width()+l),this.settings.$next_tip.css({top:this.settings.$target.offset().top-this.outerHeight(this.settings.$next_tip)-a,left:l}),this.nub_position(o,this.settings.tipSettings.nubPosition,"bottom")}else this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.outerWidth(this.settings.$target)+this.settings.$target.offset().left+u}),this.nub_position(o,this.settings.tipSettings.nubPosition,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.settings.$target.offset().left-this.outerWidth(this.settings.$next_tip)-u}),this.nub_position(o,this.settings.tipSettings.nubPosition,"right"));!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts<this.settings.tipSettings.tipLocationPattern.length&&(o.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),this.settings.tipSettings.tipLocation=this.settings.tipSettings.tipLocationPattern[this.settings.attempts],this.settings.attempts++,this.pos_default())}else this.settings.$li.length&&this.pos_modal(o);f&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_phone:function(t){var n=this.outerHeight(this.settings.$next_tip),r=this.settings.$next_tip.offset(),i=this.outerHeight(this.settings.$target),s=e(".joyride-nub",this.settings.$next_tip),o=Math.ceil(this.outerHeight(s)/2),u=t||!1;s.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left"),u&&(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(s):this.top()?(this.settings.$next_tip.offset({top:this.settings.$target.offset().top-n-o}),s.addClass("bottom")):(this.settings.$next_tip.offset({top:this.settings.$target.offset().top+i+o}),s.addClass("top")),u&&(this.settings.$next_tip.hide(),this.settings.$next_tip.css("visibility","visible"))},pos_modal:function(e){this.center(),e.hide(),this.show_modal()},show_modal:function(){if(!this.settings.$next_tip.data("closed")){var t=e(".joyride-modal-bg");t.length<1&&e("body").append(this.settings.template.modal).show(),/pop/i.test(this.settings.tipAnimation)?t.show():t.fadeIn(this.settings.tipAnimationFadeSpeed)}},expose:function(){var n,r,i,s,o,u="expose-"+Math.floor(Math.random()*1e4);if(arguments.length>0&&arguments[0]instanceof e)i=arguments[0];else{if(!this.settings.$target||!!/body/i.test(this.settings.$target.selector))return!1;i=this.settings.$target}if(i.length<1)return t.console&&console.error("element not valid",i),!1;n=e(this.settings.template.expose),this.settings.$body.append(n),n.css({top:i.offset().top,left:i.offset().left,width:this.outerWidth(i,!0),height:this.outerHeight(i,!0)}),r=e(this.settings.template.exposeCover),s={zIndex:i.css("z-index"),position:i.css("position")},o=i.attr("class")==null?"":i.attr("class"),i.css("z-index",parseInt(n.css("z-index"))+1),s.position=="static"&&i.css("position","relative"),i.data("expose-css",s),i.data("orig-class",o),i.attr("class",o+" "+this.settings.exposeAddClass),r.css({top:i.offset().top,left:i.offset().left,width:this.outerWidth(i,!0),height:this.outerHeight(i,!0)}),this.settings.$body.append(r),n.addClass(u),r.addClass(u),i.data("expose",u),this.settings.postExposeCallback(this.settings.$li.index(),this.settings.$next_tip,i),this.add_exposed(i)},un_expose:function(){var n,r,i,s,o,u=!1;if(arguments.length>0&&arguments[0]instanceof e)r=arguments[0];else{if(!this.settings.$target||!!/body/i.test(this.settings.$target.selector))return!1;r=this.settings.$target}if(r.length<1)return t.console&&console.error("element not valid",r),!1;n=r.data("expose"),i=e("."+n),arguments.length>1&&(u=arguments[1]),u===!0?e(".joyride-expose-wrapper,.joyride-expose-cover").remove():i.remove(),s=r.data("expose-css"),s.zIndex=="auto"?r.css("z-index",""):r.css("z-index",s.zIndex),s.position!=r.css("position")&&(s.position=="static"?r.css("position",""):r.css("position",s.position)),o=r.data("orig-class"),r.attr("class",o),r.removeData("orig-classes"),r.removeData("expose"),r.removeData("expose-z-index"),this.remove_exposed(r)},add_exposed:function(t){this.settings.exposed=this.settings.exposed||[],t instanceof e||typeof t=="object"?this.settings.exposed.push(t[0]):typeof t=="string"&&this.settings.exposed.push(t)},remove_exposed:function(t){var n,r;t instanceof e?n=t[0]:typeof t=="string"&&(n=t),this.settings.exposed=this.settings.exposed||[],r=this.settings.exposed.length;for(var i=0;i<r;i++)if(this.settings.exposed[i]==n){this.settings.exposed.splice(i,1);return}},center:function(){var n=e(t);return this.settings.$next_tip.css({top:(n.height()-this.outerHeight(this.settings.$next_tip))/2+n.scrollTop(),left:(n.width()-this.outerWidth(this.settings.$next_tip))/2+this.scrollLeft(n)}),!0},bottom:function(){return/bottom/i.test(this.settings.tipSettings.tipLocation)},top:function(){return/top/i.test(this.settings.tipSettings.tipLocation)},right:function(){return/right/i.test(this.settings.tipSettings.tipLocation)},left:function(){return/left/i.test(this.settings.tipSettings.tipLocation)},corners:function(n){var r=e(t),i=r.height()/2,s=Math.ceil(this.settings.$target.offset().top-i+this.settings.$next_tip.outerHeight()),o=r.width()+this.scrollLeft(r),u=r.height()+s,a=r.height()+r.scrollTop(),f=r.scrollTop();return s<f&&(s<0?f=0:f=s),u>a&&(a=u),[n.offset().top<f,o<n.offset().left+n.outerWidth(),a<n.offset().top+n.outerHeight(),this.scrollLeft(r)>n.offset().left]},visible:function(e){var t=e.length;while(t--)if(e[t])return!1;return!0},nub_position:function(e,t,n){t==="auto"?e.addClass(n):e.addClass(t)},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(){this.settings.cookieMonster&&e.cookie(this.settings.cookieName,"ridden",{expires:this.settings.cookieExpires,domain:this.settings.cookieDomain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.$next_tip.data("closed",!0),e(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),this.settings.postStepCallback(this.settings.$li.index(),this.settings.$current_tip),this.settings.postRideCallback(this.settings.$li.index(),this.settings.$current_tip),e(".joyride-tip-guide").remove()},outerHTML:function(e){return e.outerHTML||(new XMLSerializer).serializeToString(e)},off:function(){e(this.scope).off(".joyride"),e(t).off(".joyride"),e(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),e(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs=Foundation.libs||{},Foundation.libs.orbit={name:"orbit",version:"4.2.0",settings:{timer_speed:1e4,pause_on_hover:!0,resume_on_mouseout:!1,animation_speed:500,bullets:!0,stack_on_small:!0,navigation_arrows:!0,slide_number:!0,container_class:"orbit-container",stack_on_small_class:"orbit-stack-on-small",next_class:"orbit-next",prev_class:"orbit-prev",timer_container_class:"orbit-timer",timer_paused_class:"paused",timer_progress_class:"orbit-progress",slides_container_class:"orbit-slides-container",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"},init:function(t,n,r){var i=this;Foundation.inherit(i,"data_options"),typeof n=="object"&&e.extend(!0,i.settings,n);if(e(t).is("[data-orbit]")){var s=e.extend(!0,{},i);s._init(idx,el)}e("[data-orbit]",t).each(function(t,n){var r=e.extend(!0,{},i);r._init(t,n)})},_container_html:function(){var e=this;return'<div class="'+e.settings.container_class+'"></div>'},_bullets_container_html:function(t){var n=this,r=e('<ol class="'+n.settings.bullets_container_class+'"></ol>');return t.each(function(t,i){var s=e('<li data-orbit-slide-number="'+(t+1)+'" class=""></li>');t===0&&s.addClass(n.settings.bullets_active_class),r.append(s)}),r},_slide_number_html:function(t,n){var r=this,i=e('<div class="'+r.settings.slide_number_class+'"></div>');return i.append("<span>"+t+"</span> of <span>"+n+"</span>"),i},_timer_html:function(){var e=this;return typeof e.settings.timer_speed=="number"&&e.settings.timer_speed>0?'<div class="'+e.settings.timer_container_class+'"><span></span><div class="'+e.settings.timer_progress_class+'"></div></div>':""},_next_html:function(){var e=this;return'<a href="#" class="'+e.settings.next_class+'">Next <span></span></a>'},_prev_html:function(){var e=this;return'<a href="#" class="'+e.settings.prev_class+'">Prev <span></span></a>'},_init:function(t,n){var r=this,i=e(n),s=i.wrap(r._container_html()).parent(),o=i.children();e.extend(!0,r.settings,r.data_options(i)),r.settings.navigation_arrows&&(s.append(r._prev_html()),s.append(r._next_html())),i.addClass(r.settings.slides_container_class),r.settings.stack_on_small&&s.addClass(r.settings.stack_on_small_class),r.settings.slide_number&&s.append(r._slide_number_html(1,o.length)),s.append(r._timer_html()),r.settings.bullets&&s.after(r._bullets_container_html(o)),i.append(o.first().clone().attr("data-orbit-slide","")),i.prepend(o.last().clone().attr("data-orbit-slide","")),i.css(Foundation.rtl?"marginRight":"marginLeft","-100%"),o.first().addClass(r.settings.active_slide_class),r._init_events(i),r._init_dimensions(i),r._start_timer(i)},_init_events:function(i){var s=this,o=i.parent();e(t).on("load.fndtn.orbit",function(){i.height(""),i.height(i.height(o.height())),i.trigger("orbit:ready")}).on("resize.fndtn.orbit",function(){i.height(""),i.height(i.height(o.height()))}),e(n).on("click.fndtn.orbit","[data-orbit-link]",function(t){t.preventDefault();var n=e(t.currentTarget).attr("data-orbit-link"),r=i.find("[data-orbit-slide="+n+"]").first();r.length===1&&(s._reset_timer(i,!0),s._goto(i,r.index(),function(){}))}),o.siblings("."+s.settings.bullets_container_class).on("click.fndtn.orbit","[data-orbit-slide-number]",function(t){t.preventDefault(),s._reset_timer(i,!0),s._goto(i,e(t.currentTarget).data("orbit-slide-number"),function(){})}),o.on("mouseenter.fndtn.orbit",function(e){s.settings.pause_on_hover&&s._stop_timer(i)}).on("mouseleave.fndtn.orbit",function(e){s.settings.resume_on_mouseout&&s._start_timer(i)}).on("orbit:after-slide-change.fndtn.orbit",function(e,t){var n=o.find("."+s.settings.slide_number_class);n.length===1&&n.replaceWith(s._slide_number_html(t.slide_number,t.total_slides))}).on("orbit:next-slide.fndtn.orbit click.fndtn.orbit","."+s.settings.next_class.split(" ").join("."),function(e){e.preventDefault(),s._reset_timer(i,!0),s._goto(i,"next",function(){})}).on("orbit:prev-slide.fndtn.orbit click.fndtn.orbit","."+s.settings.prev_class.split(" ").join("."),function(e){e.preventDefault(),s._reset_timer(i,!0),s._goto(i,"prev",function(){})}).on("orbit:toggle-play-pause.fndtn.orbit click.fndtn.orbit touchstart.fndtn.orbit","."+s.settings.timer_container_class,function(t){t.preventDefault();var n=e(t.currentTarget).toggleClass(s.settings.timer_paused_class),r=n.closest("."+s.settings.container_class).find("."+s.settings.slides_container_class);n.hasClass(s.settings.timer_paused_class)?s._stop_timer(r):s._start_timer(r)}).on("touchstart.fndtn.orbit",function(e){e.touches||(e=e.originalEvent);var t={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:r};o.data("swipe-transition",t),e.stopPropagation()}).on("touchmove.fndtn.orbit",function(e){e.touches||(e=e.originalEvent);if(e.touches.length>1||e.scale&&e.scale!==1)return;var t=o.data("swipe-transition");typeof t=="undefined"&&(t={}),t.delta_x=e.touches[0].pageX-t.start_page_x,typeof t.is_scrolling=="undefined"&&(t.is_scrolling=!!(t.is_scrolling||Math.abs(t.delta_x)<Math.abs(e.touches[0].pageY-t.start_page_y)));if(!t.is_scrolling&&!t.active){e.preventDefault(),s._stop_timer(i);var n=t.delta_x<0?"next":"prev";t.active=!0,s._goto(i,n,function(){})}}).on("touchend.fndtn.orbit",function(e){o.data("swipe-transition",{}),e.stopPropagation()})},_init_dimensions:function(e){var t=e.parent(),n=e.children();e.css("width",n.length*100+"%"),n.css("width",100/n.length+"%"),e.height(t.height()),e.css("width",n.length*100+"%")},_start_timer:function(e){var t=this,n=e.parent(),r=function(){t._reset_timer(e,!1),t._goto(e,"next",function(){t._start_timer(e)})},i=n.find("."+t.settings.timer_container_class),s=i.find("."+t.settings.timer_progress_class),o=s.width()/i.width(),u=t.settings.timer_speed-o*t.settings.timer_speed;s.animate({width:"100%"},u,"linear",r),e.trigger("orbit:timer-started")},_stop_timer:function(e){var t=this,n=e.parent(),r=n.find("."+t.settings.timer_container_class),i=r.find("."+t.settings.timer_progress_class),s=i.width()/r.width();t._rebuild_timer(n,s*100+"%"),e.trigger("orbit:timer-stopped"),r=n.find("."+t.settings.timer_container_class),r.addClass(t.settings.timer_paused_class)},_reset_timer:function(e,t){var n=this,r=e.parent();n._rebuild_timer(r,"0%");if(typeof t=="boolean"&&t){var i=r.find("."+n.settings.timer_container_class);i.addClass(n.settings.timer_paused_class)}},_rebuild_timer:function(t,n){var r=this,i=t.find("."+r.settings.timer_container_class),s=e(r._timer_html()),o=s.find("."+r.settings.timer_progress_class);if(typeof Zepto=="function")i.remove(),t.append(s),o.css("width",n);else if(typeof jQuery=="function"){var u=i.find("."+r.settings.timer_progress_class);u.css("width",n),u.stop()}},_goto
14 :function(t,n,r){var i=this,s=t.parent(),o=t.children(),u=t.find("."+i.settings.active_slide_class),a=u.index(),f=Foundation.rtl?"marginRight":"marginLeft";if(s.hasClass(i.settings.orbit_transition_class))return!1;n==="prev"?a===0?a=o.length-1:a--:n==="next"?a=(a+1)%o.length:typeof n=="number"&&(a=n%o.length),a===o.length-1&&n==="next"?(t.css(f,"0%"),a=1):a===0&&n==="prev"&&(t.css(f,"-"+(o.length-1)*100+"%"),a=o.length-2),s.addClass(i.settings.orbit_transition_class),u.removeClass(i.settings.active_slide_class),e(o[a]).addClass(i.settings.active_slide_class);var l=s.siblings("."+i.settings.bullets_container_class);l.length===1&&(l.children().removeClass(i.settings.bullets_active_class),e(l.children()[a-1]).addClass(i.settings.bullets_active_class));var c="-"+a*100+"%";t.trigger("orbit:before-slide-change");if(t.css(f)===c)s.removeClass(i.settings.orbit_transition_class),t.trigger("orbit:after-slide-change",[{slide_number:a,total_slides:t.children().length-2}]),r();else{var h={};h[f]=c,t.animate(h,i.settings.animation_speed,"linear",function(){s.removeClass(i.settings.orbit_transition_class),t.trigger("orbit:after-slide-change",[{slide_number:a,total_slides:t.children().length-2}]),r()})}}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.section={name:"section",version:"4.2.2",settings:{deep_linking:!1,small_breakpoint:768,one_up:!0,section_selector:"[data-section]",region_selector:"section, .section, [data-section-region]",title_selector:".title, [data-section-title]",active_region_selector:"section.active, .section.active, .active[data-section-region]",content_selector:".content, [data-section-content]",nav_selector:'[data-section="vertical-nav"], [data-section="horizontal-nav"]',callback:function(){}},init:function(t,n,r){var i=this;return Foundation.inherit(this,"throttle data_options position_right offset_right"),typeof n=="object"&&e.extend(!0,i.settings,n),typeof n!="string"?(this.set_active_from_hash(),this.events(),!0):this[n].call(this,r)},events:function(){var r=this;e(this.scope).on("click.fndtn.section","[data-section] .title, [data-section] [data-section-title]",function(t){var n=e(this),i=n.closest(r.settings.region_selector);i.children(r.settings.content_selector).length>0&&(r.toggle_active.call(this,t,r),r.reflow())}),e(t).on("resize.fndtn.section",r.throttle(function(){r.resize.call(this)},30)).on("hashchange",function(){r.settings.toggled||(r.set_active_from_hash(),e(this).trigger("resize"))}).trigger("resize"),e(n).on("click.fndtn.section",function(t){e(t.target).closest(r.settings.title_selector).length<1&&e(r.settings.nav_selector).children(r.settings.region_selector).removeClass("active").attr("style","")})},toggle_active:function(t,n){var r=e(this),n=Foundation.libs.section,i=r.closest(n.settings.region_selector),s=r.siblings(n.settings.content_selector),o=i.parent(),u=e.extend({},n.settings,n.data_options(o)),a=o.children(n.settings.active_region_selector);n.settings.toggled=!0,!u.deep_linking&&s.length>0&&t.preventDefault();if(i.hasClass("active"))(n.small(o)||n.is_vertical_nav(o)||n.is_horizontal_nav(o)||n.is_accordion(o))&&(a[0]!==i[0]||a[0]===i[0]&&!u.one_up)&&i.removeClass("active").attr("style","");else{var a=o.children(n.settings.active_region_selector),f=n.outerHeight(i.children(n.settings.title_selector));if(n.small(o)||u.one_up)n.small(o)?a.attr("style",""):a.attr("style","visibility: hidden; padding-top: "+f+"px;");n.small(o)?i.attr("style",""):i.css("padding-top",f),i.addClass("active"),a.length>0&&a.removeClass("active").attr("style",""),n.is_vertical_tabs(o)&&(s.css("display","block"),a!==null&&a.children(n.settings.content_selector).css("display","none"))}setTimeout(function(){n.settings.toggled=!1},300),u.callback()},resize:function(){var t=Foundation.libs.section,n=e(t.settings.section_selector);n.each(function(){var n=e(this),r=n.children(t.settings.active_region_selector),i=e.extend({},t.settings,t.data_options(n));if(r.length>1)r.not(":first").removeClass("active").attr("style","");else if(r.length<1&&!t.is_vertical_nav(n)&&!t.is_horizontal_nav(n)&&!t.is_accordion(n)){var s=n.children(t.settings.region_selector).first();(i.one_up||!t.small(n))&&s.addClass("active"),t.small(n)?s.attr("style",""):s.css("padding-top",t.outerHeight(s.children(t.settings.title_selector)))}t.small(n)?r.attr("style",""):r.css("padding-top",t.outerHeight(r.children(t.settings.title_selector))),t.position_titles(n),t.is_horizontal_nav(n)&&!t.small(n)||t.is_vertical_tabs(n)&&!t.small(n)?t.position_content(n):t.position_content(n,!1)})},is_vertical_nav:function(e){return/vertical-nav/i.test(e.data("section"))},is_horizontal_nav:function(e){return/horizontal-nav/i.test(e.data("section"))},is_accordion:function(e){return/accordion/i.test(e.data("section"))},is_horizontal_tabs:function(e){return/^tabs$/i.test(e.data("section"))},is_vertical_tabs:function(e){return/vertical-tabs/i.test(e.data("section"))},set_active_from_hash:function(){var n=t.location.hash.substring(1),r=e("[data-section]"),i=this;r.each(function(){var t=e(this),r=e.extend({},i.settings,i.data_options(t));if(n.length>0&&r.deep_linking){var s=t.children(i.settings.region_selector).attr("style","").removeClass("active"),o=s.map(function(){var t=e(i.settings.content_selector,this),r=t.data("slug");if((new RegExp(r,"i")).test(n))return t}),u=o.length;for(var a=u-1;a>=0;a--)e(o[a]).parent().addClass("active")}})},position_titles:function(t,n){var r=this,i=t.children(this.settings.region_selector).map(function(){return e(this).children(r.settings.title_selector)}),s=0,o=0,r=this;typeof n=="boolean"?i.attr("style",""):i.each(function(){r.is_vertical_tabs(t)?(e(this).css("top",o),o+=r.outerHeight(e(this))):(r.rtl?e(this).css("right",s):e(this).css("left",s),s+=r.outerWidth(e(this)))})},position_content:function(t,n){var r=this,i=t.children(r.settings.region_selector),s=i.map(function(){return e(this).children(r.settings.title_selector)}),o=i.map(function(){return e(this).children(r.settings.content_selector)});if(typeof n=="boolean")o.attr("style",""),t.attr("style","");else if(r.is_vertical_tabs(t)&&!r.small(t)){var u=0,a=Number.MAX_VALUE,f=null;i.each(function(){var n=e(this),i=n.children(r.settings.title_selector),s=n.children(r.settings.content_selector),o=0;f=r.outerWidth(i),o=r.outerWidth(t)-f,o<a&&(a=o),u+=r.outerHeight(i),e(this).hasClass("active")||s.css("display","none")}),i.each(function(){var t=e(this).children(r.settings.content_selector);t.css("minHeight",u),t.css("maxWidth",a-2)})}else i.each(function(){var t=e(this),n=t.children(r.settings.title_selector),i=t.children(r.settings.content_selector);r.rtl?i.css({right:r.position_right(n)+1,top:r.outerHeight(n)-2}):i.css({left:n.position().left-1,top:r.outerHeight(n)-2})}),typeof Zepto=="function"?t.height(this.outerHeight(e(s[0]))):t.height(this.outerHeight(e(s[0]))-2)},position_right:function(t){var n=this,r=t.closest(this.settings.section_selector),i=r.children(this.settings.region_selector),s=t.closest(this.settings.section_selector).width(),o=i.map(function(){return e(this).children(n.settings.title_selector)}).length;return s-t.position().left-t.width()*(t.index()+1)-o},reflow:function(t){var t=t||n;e(this.settings.section_selector,t).trigger("resize")},small:function(t){var n=e.extend({},this.settings,this.data_options(t));return this.is_horizontal_tabs(t)?!1:t&&this.is_accordion(t)?!0:e("html").hasClass("lt-ie9")?!0:e("html").hasClass("ie8compat")?!0:e(this.scope).width()<n.small_breakpoint},off:function(){e(this.scope).off(".fndtn.section"),e(t).off(".fndtn.section"),e(n).off(".fndtn.section")}}}(Foundation.zj,this,this.document),function(e,t,n,r){"use strict";Foundation.libs.topbar={name:"topbar",version:"4.2.2",settings:{index:0,stickyClass:"sticky",custom_back_text:!0,back_text:"Back",is_hover:!0,scrolltop:!0,init:!1},init:function(n,r,i){Foundation.inherit(this,"data_options");var s=this;return typeof r=="object"?e.extend(!0,this.settings,r):typeof i!="undefined"&&e.extend(!0,this.settings,i),typeof r!="string"?(e(".top-bar, [data-topbar]").each(function(){e.extend(!0,s.settings,s.data_options(e(this))),s.settings.$w=e(t),s.settings.$topbar=e(this),s.settings.$section=s.settings.$topbar.find("section"),s.settings.$titlebar=s.settings.$topbar.children("ul").first(),s.settings.$topbar.data("index",0);var n=e("<div class='top-bar-js-breakpoint'/>").insertAfter(s.settings.$topbar);s.settings.breakPoint=n.width(),n.remove(),s.assemble(),s.settings.$topbar.parent().hasClass("fixed")&&e("body").css("padding-top",s.outerHeight(s.settings.$topbar))}),s.settings.init||this.events(),this.settings.init):this[r].call(this,i)},events:function(){var n=this,r=this.outerHeight(e(".top-bar, [data-topbar]"));e(this.scope).off(".fndtn.topbar").on("click.fndtn.topbar",".top-bar .toggle-topbar, [data-topbar] .toggle-topbar",function(i){var s=e(this).closest(".top-bar, [data-topbar]"),o=s.find("section, .section"),u=s.children("ul").first();i.preventDefault(),n.breakpoint()&&(n.rtl?(o.css({right:"0%"}),o.find(">.name").css({right:"100%"})):(o.css({left:"0%"}),o.find(">.name").css({left:"100%"})),o.find("li.moved").removeClass("moved"),s.data("index",0),s.toggleClass("expanded").css("max-height","")),s.hasClass("expanded")?s.parent().hasClass("fixed")&&(s.parent().removeClass("fixed"),s.addClass("fixed"),e("body").css("padding-top","0"),n.settings.scrolltop&&t.scrollTo(0,0)):s.hasClass("fixed")&&(s.parent().addClass("fixed"),s.removeClass("fixed"),e("body").css("padding-top",r))}).on("mouseenter mouseleave",".top-bar li",function(t){if(!n.settings.is_hover)return;/enter|over/i.test(t.type)?e(this).addClass("hover"):e(this).removeClass("hover")}).on("click.fndtn.topbar",".top-bar li.has-dropdown",function(t){if(n.breakpoint())return;var r=e(this),i=e(t.target),s=r.closest("[data-topbar], .top-bar"),o=s.data("topbar");if(n.settings.is_hover&&!Modernizr.touch)return;t.stopImmediatePropagation(),i[0].nodeName==="A"&&i.parent().hasClass("has-dropdown")&&t.preventDefault(),r.hasClass("hover")?r.removeClass("hover").find("li").removeClass("hover"):r.addClass("hover")}).on("click.fndtn.topbar",".top-bar .has-dropdown>a, [data-topbar] .has-dropdown>a",function(t){if(n.breakpoint()){t.preventDefault();var r=e(this),i=r.closest(".top-bar, [data-topbar]"),s=i.find("section, .section"),o=i.children("ul").first(),u=r.next(".dropdown").outerHeight(),a=r.closest("li");i.data("index",i.data("index")+1),a.addClass("moved"),n.rtl?(s.css({right:-(100*i.data("index"))+"%"}),s.find(">.name").css({right:100*i.data("index")+"%"})):(s.css({left:-(100*i.data("index"))+"%"}),s.find(">.name").css({left:100*i.data("index")+"%"})),i.css("max-height",n.height(r.siblings("ul"))+n.outerHeight(o,!0))}}),e(t).on("resize.fndtn.topbar",function(){n.breakpoint()||e(".top-bar, [data-topbar]").css("max-height","").removeClass("expanded").find("li").removeClass("hover")}.bind(this)),e("body").on("click.fndtn.topbar",function(t){var n=e(t.target).closest("[data-topbar], .top-bar");if(n.length>0)return;e(".top-bar li, [data-topbar] li").removeClass("hover")}),e(this.scope).on("click.fndtn",".top-bar .has-dropdown .back, [data-topbar] .has-dropdown .back",function(t){t.preventDefault();var r=e(this),i=r.closest(".top-bar, [data-topbar]"),s=i.children("ul").first(),o=i.find("section, .section"),u=r.closest("li.moved"),a=u.parent();i.data("index",i.data("index")-1),n.rtl?(o.css({right:-(100*i.data("index"))+"%"}),o.find(">.name").css({right:100*i.data("index")+"%"})):(o.css({left:-(100*i.data("index"))+"%"}),o.find(">.name").css({left:100*i.data("index")+"%"})),i.data("index")===0?i.css("max-height",""):i.css("max-height",n.height(a)+n.outerHeight(s,!0)),setTimeout(function(){u.removeClass("moved")},300)})},breakpoint:function(){return e(n).width()<=this.settings.breakPoint||e("html").hasClass("lt-ie9")},assemble:function(){var t=this;this.settings.$section.detach(),this.settings.$section.find(".has-dropdown>a").each(function(){var n=e(this),r=n.siblings(".dropdown"),i=n.attr("href");if(i&&i.length>1)var s=e('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a class="parent-link js-generated" href="'+i+'">'+n.text()+"</a></li>");else var s=e('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');t.settings.custom_back_text==1?s.find("h5>a").html("&laquo; "+t.settings.back_text):s.find("h5>a").html("&laquo; "+n.html()),r.prepend(s)}),this.settings.$section.appendTo(this.settings.$topbar),this.sticky()},height:function(t){var n=0,r=this;return t.find("> li").each(function(){n+=r.outerHeight(e(this),!0)}),n},sticky:function(){var n="."+this.settings.stickyClass;if(e(n).length>0){var r=e(n).length?e(n).offset().top:0,i=e(t),s=this.outerHeight(e(".top-bar"));i.scroll(function(){i.scrollTop()>=r?(e(n).addClass("fixed"),e("body").css("padding-top",s)):i.scrollTop()<r&&(e(n).removeClass("fixed"),e("body").css("padding-top","0"))})}},off:function(){e(this.scope).off(".fndtn.topbar"),e(t).off(".fndtn.topbar")},reflow:function(){}}}(Foundation.zj,this,this.document);
0 /*! jQuery v1.7 jquery.com | jquery.org/license */
1 (function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cd(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function cc(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bG.test(a)?d(a,e):cc(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)cc(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bV,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=ca(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=ca(a,c,d,e,"*",g));return l}function b_(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bR),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bE(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bz:bA;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bl(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a){var b=Y.split(" "),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())}),typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments)},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h<g;h++)e=d[h].toLowerCase(),c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1)}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return b;h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&&
2 (b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k<c.length;k++){l=E.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,namespace:n.join(".")},p),g&&(o.quick=J(g),!o.quick&&f.expr.match.POS.test(g)&&(o.isPositional=!0)),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d){var e=f.hasData(a)&&f._data(a),g,h,i,j,k,l,m,n,o,p,q;if(!!e&&!!(m=e.events)){b=L(b||"").split(" ");for(g=0;g<b.length;g++){h=E.exec(b[g])||[],i=h[1],j=h[2];if(!i){j=j?"."+j:"";for(l in m)f.event.remove(a,l+j,c,d);return}n=f.event.special[i]||{},i=(d?n.delegateType:n.bindType)||i,p=m[i]||[],k=p.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(c||j||d||n.remove)for(l=0;l<p.length;l++){q=p[l];if(!c||c.guid===q.guid)if(!j||j.test(q.namespace))if(!d||d===q.selector||d==="**"&&q.selector)p.splice(l--,1),q.selector&&p.delegateCount--,n.remove&&n.remove.call(a,q)}else p.length=0;p.length===0&&k!==p.length&&((!n.teardown||n.teardown.call(a,j)===!1)&&f.removeEvent(a,i,e.handle),delete m[i])}f.isEmptyObject(m)&&(o=e.handle,o&&(o.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length;l++){m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d);if(c.isPropagationStopped())break}c.type=h,c.isDefaultPrevented()||(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=(f.event.special[c.type]||{}).handle,j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click"))for(m=c.target;m!=this;m=m.parentNode||this){o={},q=[];for(k=0;k<e;k++)r=d[k],s=r.selector,t=o[s],r.isPositional?t=(t||(o[s]=f(s))).index(m)>=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){p=j[k],c.currentTarget=p.elem;for(l=0;l<p.matches.length&&!c.isImmediatePropagationStopped();l++){r=p.matches[l];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=(i||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?N:M):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=N;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=N;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=N,this.stopPropagation()},isDefaultPrevented:M,isPropagationStopped:M,isImmediatePropagationStopped:M},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]=f.event.special[b]={delegateType:b,bindType:b,handle:function(a){var b=this,c=a.relatedTarget,d=a.handleObj,e=d.selector,g,h;if(!c||d.origType===a.type||c!==b&&!f.contains(b,c))g=a.type,a.type=d.origType,h=d.handler.apply(this,arguments),a.type=g;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(A.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;A.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return A.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=M;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=M);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw"Syntax error, unrecognized expression: "+a};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?T.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/<tbody/i,bc=/<|&#?\w+;/,bd=/<(?:script|style)/i,be=/<(?:script|object|embed|option|style)/i,bf=new RegExp("<(?:"+Y.replace(" ","|")+")","i"),bg=/checked\s*(?:[^=]|=\s*.checked.)/i,bh=/\/(java|ecma)script/i,bi=/^\s*<!(?:\[CDATA\[|\-\-)/,bj={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after"
3 ,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bg.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bl(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,br)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!be.test(j)&&(f.support.checkClone||!bg.test(j))&&!f.support.unknownElems&&bf.test(j)&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1></$2>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bq(k[i]);else bq(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bh.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bs=/alpha\([^)]*\)/i,bt=/opacity=([^)]*)/,bu=/([A-Z]|^ms)/g,bv=/^-?\d+(?:px)?$/i,bw=/^-?\d/,bx=/^([\-+])=([\-+.\de]+)/,by={position:"absolute",visibility:"hidden",display:"block"},bz=["Left","Right"],bA=["Top","Bottom"],bB,bC,bD;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bB(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bx.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bB)return bB(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bE(a,b,d);f.swap(a,by,function(){e=bE(a,b,d)});return e}},set:function(a,b){if(!bv.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cx(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cw("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cw("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cx(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cp.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=cq.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cw("show",1),slideUp:cw("hide",1),slideToggle:cw("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=ct||cu(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cr&&(cr=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=ct||cu(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cr),cr=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now))}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cy=/^t(?:able|d|h)$/i,cz=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cA(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cy.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
0 /*!
1 * jQuery Cookie Plugin v1.4.1
2 * https://github.com/carhartl/jquery-cookie
3 *
4 * Copyright 2006, 2014 Klaus Hartl
5 * Released under the MIT license
6 */
7 (function (factory) {
8 if (typeof define === 'function' && define.amd) {
9 // AMD (Register as an anonymous module)
10 define(['jquery'], factory);
11 } else if (typeof exports === 'object') {
12 // Node/CommonJS
13 module.exports = factory(require('jquery'));
14 } else {
15 // Browser globals
16 factory(jQuery);
17 }
18 }(function ($) {
19
20 var pluses = /\+/g;
21
22 function encode(s) {
23 return config.raw ? s : encodeURIComponent(s);
24 }
25
26 function decode(s) {
27 return config.raw ? s : decodeURIComponent(s);
28 }
29
30 function stringifyCookieValue(value) {
31 return encode(config.json ? JSON.stringify(value) : String(value));
32 }
33
34 function parseCookieValue(s) {
35 if (s.indexOf('"') === 0) {
36 // This is a quoted cookie as according to RFC2068, unescape...
37 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
38 }
39
40 try {
41 // Replace server-side written pluses with spaces.
42 // If we can't decode the cookie, ignore it, it's unusable.
43 // If we can't parse the cookie, ignore it, it's unusable.
44 s = decodeURIComponent(s.replace(pluses, ' '));
45 return config.json ? JSON.parse(s) : s;
46 } catch(e) {}
47 }
48
49 function read(s, converter) {
50 var value = config.raw ? s : parseCookieValue(s);
51 return $.isFunction(converter) ? converter(value) : value;
52 }
53
54 var config = $.cookie = function (key, value, options) {
55
56 // Write
57
58 if (arguments.length > 1 && !$.isFunction(value)) {
59 options = $.extend({}, config.defaults, options);
60
61 if (typeof options.expires === 'number') {
62 var days = options.expires, t = options.expires = new Date();
63 t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
64 }
65
66 return (document.cookie = [
67 encode(key), '=', stringifyCookieValue(value),
68 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
69 options.path ? '; path=' + options.path : '',
70 options.domain ? '; domain=' + options.domain : '',
71 options.secure ? '; secure' : ''
72 ].join(''));
73 }
74
75 // Read
76
77 var result = key ? undefined : {},
78 // To prevent the for loop in the first place assign an empty array
79 // in case there are no cookies at all. Also prevents odd result when
80 // calling $.cookie().
81 cookies = document.cookie ? document.cookie.split('; ') : [],
82 i = 0,
83 l = cookies.length;
84
85 for (; i < l; i++) {
86 var parts = cookies[i].split('='),
87 name = decode(parts.shift()),
88 cookie = parts.join('=');
89
90 if (key === name) {
91 // If second argument (value) is a function it's a converter...
92 result = read(cookie, value);
93 break;
94 }
95
96 // Prevent storing a cookie that we couldn't decode.
97 if (!key && (cookie = read(cookie)) !== undefined) {
98 result[name] = cookie;
99 }
100 }
101
102 return result;
103 };
104
105 config.defaults = {};
106
107 $.removeCookie = function (key, options) {
108 // Must not alter options, thus extending a fresh object...
109 $.cookie(key, '', $.extend({}, options, { expires: -1 }));
110 return !$.cookie(key);
111 };
112
113 }));
0 $(function(){var a=0;$(".github-widget").each(function(){if(a==0)$("head").append('<style type="text/css">.github-box{font-family:helvetica,arial,sans-serif;font-size:13px;line-height:18px;background:#fafafa;border:1px solid #ddd;color:#666;border-radius:3px}.github-box a{color:#4183c4;border:0;text-decoration:none}.github-box .github-box-title{position:relative;border-bottom:1px solid #ddd;border-radius:3px 3px 0 0;background:#fcfcfc;background:-moz-linear-gradient(#fcfcfc,#ebebeb);background:-webkit-linear-gradient(#fcfcfc,#ebebeb);}.github-box .github-box-title h3{font-family:helvetica,arial,sans-serif;font-weight:normal;font-size:16px;color:gray;margin:0;padding:10px 10px 10px 30px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAXCAMAAAAx3e/WAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpEQjIyNkJERkM0NjYxMUUxOEFDQzk3ODcxRDkzRjhCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpEQjIyNkJFMEM0NjYxMUUxOEFDQzk3ODcxRDkzRjhCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkRCMjI2QkREQzQ2NjExRTE4QUNDOTc4NzFEOTNGOEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkRCMjI2QkRFQzQ2NjExRTE4QUNDOTc4NzFEOTNGOEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+dka2KgAAAEVQTFRFxMTEyMjI0tLSvb29vr6+zc3Ny8vLxcXFz8/P6enp3t7ex8fH0dHR1NTUw8PDwMDAzs7OvLy8wcHBu7u7v7+/zMzM////budQFwAAABd0Uk5T/////////////////////////////wDmQOZeAAAAcklEQVR42tSQSQ7DMAwD6chOukWs5eX/Ty2coo0T9wOdEzEgdRBuzNmnDofgja52JDyz5TCqUp0O6kfrb4bzSXkRiTviEZZ6JKLMJ5VQ2v8iGbtbfEwXmjFMG0VwdQo10hQNxYqtLMv9O6xvpZ/QeAkwAKjwHiJLaJc3AAAAAElFTkSuQmCC) 7px center no-repeat}.github-box .github-box-title h3 .repo{font-weight:bold}.github-box .github-box-title .github-stats{position:absolute;top:8px;right:10px;background:white;border:1px solid #ddd;border-radius:3px;font-size:11px;font-weight:bold;line-height:21px;height:21px}.github-box .github-box-title .github-stats a{display:inline-block;height:21px;color:#666;padding:0 5px 0 18px;background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAqCAMAAACEJ4viAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpEQjIyNkJEQkM0NjYxMUUxOEFDQzk3ODcxRDkzRjhCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpEQjIyNkJEQ0M0NjYxMUUxOEFDQzk3ODcxRDkzRjhCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkRCMjI2QkQ5QzQ2NjExRTE4QUNDOTc4NzFEOTNGOEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkRCMjI2QkRBQzQ2NjExRTE4QUNDOTc4NzFEOTNGOEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+h1kA9gAAAK5QTFRF+fn5sbGx8fHx09PTmpqa2dnZ/f3919fX9PT00NDQ1dXVpKSk+vr6+/v7vb298vLyycnJ8/PztLS0zc3N6enp/v7+q6ur2NjY9/f3srKy/Pz8p6en7u7uoaGhnJyc4eHhtbW1pqam6Ojo9fX17e3toqKirKys1NTUzs7Ox8fHwcHBwMDA5eXlnZ2dpaWl0dHR9vb25ubm4uLi3d3dqqqqwsLCv7+/oKCgmZmZ////8yEsbwAAAMBJREFUeNrE0tcOgjAUBuDSliUoMhTEvfdef9//xUQjgaLX0Ium/ZLT/+SkRPxZpGykvuf5VMJogy5jY9yjDHcWFhqlcRuHc4o6B1QK0BDg+hcZgNDh3NWTwzItH/bRrhvT+g3zSxZkNGCZpoWGIbU0a3Y6zV5VA6keyeDxiw62P0gUqEW0FbDim4nVikFJbU2zZXybUEaxhCqOQqyh5/G0wpWICUwthyqwD4InOMuXJ7/gs7WkoPdVg1vykF8CDACEFanKO3aSYwAAAABJRU5ErkJggg==) no-repeat}.github-box .github-box-title .github-stats .watchers{border-right:1px solid #ddd}.github-box .github-box-title .github-stats .forks{background-position:-4px -21px;padding-left:15px}.github-box .github-box-content{padding:10px;font-weight:300}.github-box .github-box-content p{margin:0}.github-box .github-box-content .link{font-weight:bold}.github-box .github-box-download{position:relative;border-top:1px solid #ddd;background:white;border-radius:0 0 3px 3px;padding:10px;height:24px}.github-box .github-box-download .updated{margin:0;font-size:11px;color:#666;line-height:24px;font-weight:300}.github-box .github-box-download .updated strong{font-weight:bold;color:#000}.github-box .github-box-download .download{position:absolute;display:block;top:10px;right:10px;height:24px;line-height:24px;font-size:12px;color:#666;font-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,0.9);padding:0 10px;border:1px solid #ddd;border-bottom-color:#bbb;border-radius:3px;background:#f5f5f5;background:-moz-linear-gradient(#f5f5f5,#e5e5e5);background:-webkit-linear-gradient(#f5f5f5,#e5e5e5);}.github-box .github-box-download .download:hover{color:#527894;border-color:#cfe3ed;border-bottom-color:#9fc7db;background:#f1f7fa;background:-moz-linear-gradient(#f1f7fa,#dbeaf1);background:-webkit-linear-gradient(#f1f7fa,#dbeaf1);</style>');a++;var b=$(this);var c=b.data("repo");$.ajax({url:"https://api.github.com/repos/"+c,dataType:"jsonp",success:function(a){var c=a.data;var d=new Date(c.pushed_at);var e=d.getMonth()+1+"-"+d.getDate()+"-"+d.getFullYear();var f=$(' <div class="github-box repo"> <div class="github-box-title"> <h3> <a class="owner" href="'+c.owner.url.replace("api.","").replace("users/","")+'">'+c.owner.login+'</a> / <a class="repo" href="'+c.url.replace("api.","").replace("repos/","")+'">'+c.name+'</a> </h3> <div class="github-stats"> <a class="watchers" href="'+c.url.replace("api.","").replace("repos/","")+'/watchers">'+c.watchers+'</a> <a class="forks" href="'+c.url.replace("api.","").replace("repos/","")+'/forks">'+c.forks+'</a> </div> </div> <div class="github-box-content"> <p class="description">'+c.description+' — <a href="'+c.url.replace("api.","").replace("repos/","")+'#readme">Read More</a></p> <p class="link"><a href="'+c.homepage+'">'+c.homepage+'</a></p> </div> <div class="github-box-download"> <p class="updated">Latest commit to the <strong>master</strong> branch on '+e+'</p> <a class="download" href="'+c.url.replace("api.","").replace("repos/","")+'/zipball/master">Download as zip</a> </div> </div> ');f.appendTo(b)}})})})
0 /* Rainbow v1.2 rainbowco.de | included languages: c, shell, java, d, coffeescript, generic, scheme, javascript, r, haskell, python, html, smalltalk, csharp, go, php, ruby, lua, css */
1 var k=!0;
2 window.Rainbow=function(){function r(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return c}function C(a){var b=r(a)||r(a.parentNode);if(!b){var c=/\blang(?:uage)?-(\w+)/;(a=a.className.match(c)||a.parentNode.className.match(c))&&(b=a[1])}return b}function D(a,b){for(var c in f[d]){c=parseInt(c,10);if(a==c&&b==f[d][c]?0:a<=c&&b>=f[d][c])delete f[d][c],delete j[d][c];if(a>=c&&a<f[d][c]||
3 b>c&&b<f[d][c])return k}return!1}function s(a,b){return'<span class="'+a.replace(/\./g," ")+(m?" "+m:"")+'">'+b+"</span>"}function t(a,b,c,i){var e=a.exec(c);if(e){++u;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var l=e[0],g=e.index,v=e[0].length+g,h=function(){function e(){t(a,b,c,i)}u%100>0?e():setTimeout(e,0)};if(D(g,v))h();else{var n=w(b.matches),m=function(a,c,i){if(a>=c.length)i(l);else{var d=e[c[a]];if(d){var g=b.matches[c[a]],f=g.language,h=g.name&&g.matches?
4 g.matches:g,j=function(b,d,g){var f;f=0;var h;for(h=1;h<c[a];++h)e[h]&&(f=f+e[h].length);d=g?s(g,d):d;l=l.substr(0,f)+l.substr(f).replace(b,d);m(++a,c,i)};f?o(d,f,function(a){j(d,a)}):typeof g==="string"?j(d,d,g):x(d,h.length?h:[h],function(a){j(d,a,g.matches?g.name:0)})}else m(++a,c,i)}};m(0,n,function(a){b.name&&(a=s(b.name,a));if(!j[d]){j[d]={};f[d]={}}j[d][g]={replace:e[0],"with":a};f[d][g]=v;h()})}}else i()}function w(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort(function(a,
5 b){return b-a})}function x(a,b,c){function i(b,l){l<b.length?t(b[l].pattern,b[l],a,function(){i(b,++l)}):E(a,function(a){delete j[d];delete f[d];--d;c(a)})}++d;i(b,0)}function E(a,b){function c(a,b,i,f){if(i<b.length){++y;var h=b[i],m=j[d][h],a=a.substr(0,h)+a.substr(h).replace(m.replace,m["with"]),h=function(){c(a,b,++i,f)};0<y%250?h():setTimeout(h,0)}else f(a)}var i=w(j[d]);c(a,i,0,b)}function o(a,b,c){var d=n[b]||[],e=n[z]||[],b=A[b]?d:d.concat(e);x(a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&(?![\w\#]+;)/g,
6 "&amp;"),b,c)}function p(a,b,c){if(b<a.length){var d=a[b],e=C(d);return!(-1<(" "+d.className+" ").indexOf(" rainbow "))&&e?(e=e.toLowerCase(),d.className+=d.className?" rainbow":"rainbow",o(d.innerHTML,e,function(l){d.innerHTML=l;j={};f={};q&&q(d,e);setTimeout(function(){p(a,++b,c)},0)})):p(a,++b,c)}c&&c()}function B(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,c=a.getElementsByTagName("pre"),d=a.getElementsByTagName("code"),e,f=[],g=[];for(e=0;e<c.length;++e)c[e].getElementsByTagName("code").length?
7 c[e].innerHTML=c[e].innerHTML.replace(/^\s+/,"").replace(/\s+$/,""):f.push(c[e]);for(e=0;e<d.length;++e)g.push(d[e]);p(g.concat(f),0,b)}var j={},f={},n={},A={},d=0,z=0,u=0,y=0,m,q;return{extend:function(a,b,c){1==arguments.length&&(b=a,a=z);A[a]=c;n[a]=b.concat(n[a]||[])},c:function(a){q=a},a:function(a){m=a},color:function(a,b,c){if("string"==typeof a)return o(a,b,c);if("function"==typeof a)return B(0,a);B(a,b)}}}();
8 document.addEventListener?document.addEventListener("DOMContentLoaded",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color);Rainbow.onHighlight=Rainbow.c;Rainbow.addClass=Rainbow.a;Rainbow.extend("c",[{name:"meta.preprocessor",matches:{1:[{matches:{1:"keyword.define",2:"entity.name"},pattern:/(\w+)\s(\w+)\b/g},{name:"keyword.define",pattern:/endif/g},{name:"constant.numeric",pattern:/\d+/g},{matches:{1:"keyword.include",2:"string"},pattern:/(include)\s(.*?)$/g}]},pattern:/\#([\S\s]*?)$/gm},{name:"keyword",pattern:/\b(do|goto|typedef)\b/g},{name:"entity.label",pattern:/\w+:/g},{matches:{1:"storage.type",3:"storage.type",4:"entity.name.function"},pattern:/\b((un)?signed|const)? ?(void|char|short|int|long|float|double)\*? +((\w+)(?= ?\())?/g},
9 {matches:{2:"entity.name.function"},pattern:/(\w|\*) +((\w+)(?= ?\())/g},{name:"storage.modifier",pattern:/\b(static|extern|auto|register|volatile|inline)\b/g},{name:"support.type",pattern:/\b(struct|union|enum)\b/g}]);Rainbow.extend("shell",[{name:"shell",matches:{1:{language:"shell"}},pattern:/\$\(([\s\S]*?)\)/gm},{matches:{2:"string"},pattern:/(\(|\s|\[|\=)(('|")[\s\S]*?(\3))/gm},{name:"keyword.operator",pattern:/&lt;|&gt;|&amp;/g},{name:"comment",pattern:/\#[\s\S]*?$/gm},{name:"storage.function",pattern:/(.+?)(?=\(\)\s{0,}\{)/g},{name:"support.command",pattern:/\b(echo|rm|ls|(mk|rm)dir|cd|find|cp|exit|pwd|exec|trap|source|shift|unset)/g},{matches:{1:"keyword"},pattern:/\b(break|case|continue|do|done|elif|else|esac|eval|export|fi|for|function|if|in|local|return|set|then|unset|until|while)(?=\(|\b)/g}],
10 k);Rainbow.extend("java",[{name:"constant",pattern:/\b(false|null|true|[A-Z_]+)\b/g},{b:{1:"keyword",2:"support.namespace"},pattern:/(import|package)\s(.+)/g},{name:"keyword",pattern:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/g},
11 {name:"string",pattern:/(".*?")/g},{name:"char",pattern:/(')(.|\\.|\\u[\dA-Fa-f]{4})\1/g},{name:"integer",pattern:/\b(0x[\da-f]+|\d+)L?\b/g},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/).*?$/gm},{name:"support.annotation",pattern:/@\w+/g},{b:{1:"entity.function"},pattern:/([^@\.\s]+)\(/g},{name:"entity.class",pattern:/\b([A-Z]\w*)\b/g},{name:"operator",pattern:/(\+{1,2}|-{1,2}|~|!|\*|\/|%|(?:&lt;){1,2}|(?:&gt;){1,3}|instanceof|(?:&amp;){1,2}|\^|\|{1,2}|\?|:|(?:=|!|\+|-|\*|\/|%|\^|\||(?:&lt;){1,2}|(?:&gt;){1,3})?=)/g}],
12 k);Rainbow.extend("d",[{name:"constant",pattern:/\b(false|null|true)\b/g},{name:"keyword",pattern:/\b(abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|in|inout|int|interface|invariant|ireal|is|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__FILE__|__LINE__|__gshared|__traits|__vector|__parameters)\b/g},
13 {matches:{1:"keyword",2:{name:"support.class",pattern:/\w+/g}},pattern:/(typeof)\s([^\$].*?)(\)|;)/g},{matches:{1:"keyword.namespace",2:{name:"support.namespace",pattern:/\w+/g}},pattern:/\b(namespace)\s(.*?);/g},{matches:{1:"storage.modifier",2:"storage.class",3:"entity.name.class",4:"storage.modifier.extends",5:"entity.other.inherited-class"},pattern:/\b(abstract|sealed)?\s?(class)\s(\w+)(\sextends\s)?([\w\\]*)?\s?\{?(\n|\})/g},{name:"keyword.static",pattern:/\b(static)\b/g},{matches:{1:"keyword.new",
14 2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s([^\$].*?)(?=\)|\(|;|&)/g},{name:"string",pattern:/("|')(.*?)\1/g},{name:"integer",pattern:/\b(0x[\da-f]+|\d+)\b/g},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|\/\+[\s\S]*?\+\/|(\/\/)[\s\S]*?$/gm},{name:"operator",pattern:/(\/|\/=|.|..|...|&amp;|&amp;=|&amp;&amp;|\||\|=|\|\||\-|\-=|\-\-|\+|\+=|\+\+|&lt;|&lt;=|&lt;&lt;|&lt;&lt;=|&lt;&gt;|&lt;&gt;=|&gt;|&gt;=|&gt;&gt;=|&gt;&gt;&gt;=|&gt;&gt;|&gt;&gt;&gt;|!|!=|!&lt;&gt;|!&lt;&gt;=|!&lt;|!&lt;=|!&gt;|!&gt;=|\(|\)|[|]|\{|\}|\?|,|;|:|\$|=|==|\*|\*=|%|%=|\^|\^=|\^\^|\^\^=|~|~=|@|=&gt;|\#)/g}],
15 k);Rainbow.extend("coffeescript",[{name:"comment.block",pattern:/(\#{3})[\s\S]*\1/gm},{name:"string.block",pattern:/('{3}|"{3})[\s\S]*\1/gm},{name:"string.regex",matches:{2:{name:"comment",pattern:/\#(.*?)\n/g}},pattern:/(\/{3})([\s\S]*)\1/gm},{matches:{1:"keyword"},pattern:/\b(in|when|is|isnt|of|not|unless|until|super)(?=\b)/gi},{name:"keyword.operator",pattern:/\?/g},{name:"constant.language",pattern:/\b(undefined|yes|on|no|off)\b/g},{name:"keyword.variable.coffee",pattern:/@(\w+)/gi},{name:"reset",
16 pattern:/object|class|print/gi},{matches:{1:"entity.name.function",2:"keyword.operator",3:{name:"function.argument.coffee",pattern:/([\@\w]+)/g},4:"keyword.function"},pattern:/(\w+)\s{0,}(=|:)\s{0,}\((.*?)((-|=)&gt;)/gi},{matches:{1:{name:"function.argument.coffee",pattern:/([\@\w]+)/g},2:"keyword.function"},pattern:/\s\((.*?)\)\s{0,}((-|=)&gt;)/gi},{matches:{1:"entity.name.function",2:"keyword.operator",3:"keyword.function"},pattern:/(\w+)\s{0,}(=|:)\s{0,}((-|=)&gt;)/gi},{matches:{1:"storage.class",
17 2:"entity.name.class",3:"storage.modifier.extends",4:"entity.other.inherited-class"},pattern:/\b(class)\s(\w+)(\sextends\s)?([\w\\]*)?\b/g},{matches:{1:"keyword.new",2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s(.*?)(?=\s)/g}]);Rainbow.extend([{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b(and|array|as|b(ool(ean)?|reak)|c(ase|atch|har|lass|on(st|tinue))|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi},
18 {name:"constant.language",pattern:/true|false|null/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g},{matches:{1:"function.call"},pattern:/(\w+?)(?=\()/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(function)\s(.*?)(?=\()/g}]);Rainbow.extend("scheme",[{name:"plain",pattern:/&gt;|&lt;/g},{name:"comment",pattern:/;.*$/gm},{name:"constant.language",pattern:/#t|#f|'\(\)/g},{name:"constant.symbol",pattern:/'[^()\s#]+/g},{name:"constant.number",pattern:/\b\d+(?:\.\d*)?\b/g},{name:"string",pattern:/".+?"/g},{matches:{1:"storage.function",2:"variable"},pattern:/\(\s*(define)\s+\(?(\S+)/g},{matches:{1:"keyword"},pattern:/\(\s*(begin|define\-syntax|if|lambda|quasiquote|quote|set!|syntax\-rules|and|and\-let\*|case|cond|delay|do|else|or|let|let\*|let\-syntax|letrec|letrec\-syntax)(?=[\]()\s#])/g},
19 {matches:{1:"entity.function"},pattern:/\(\s*(eqv\?|eq\?|equal\?|number\?|complex\?|real\?|rational\?|integer\?|exact\?|inexact\?|=|<|>|<=|>=|zero\?|positive\?|negative\?|odd\?|even\?|max|min|\+|\-|\*|\/|abs|quotient|remainder|modulo|gcd|lcm|numerator|denominator|floor|ceiling|truncate|round|rationalize|exp|log|sin|cos|tan|asin|acos|atan|sqrt|expt|make\-rectangular|make\-polar|real\-part|imag\-part|magnitude|angle|exact\->inexact|inexact\->exact|number\->string|string\->number|not|boolean\?|pair\?|cons|car|cdr|set\-car!|set\-cdr!|caar|cadr|cdar|cddr|caaar|caadr|cadar|caddr|cdaar|cdadr|cddar|cdddr|caaaar|caaadr|caadar|caaddr|cadaar|cadadr|caddar|cadddr|cdaaar|cdaadr|cdadar|cdaddr|cddaar|cddadr|cdddar|cddddr|null\?|list\?|list|length|append|reverse|list\-tail|list\-ref|memq|memv|member|assq|assv|assoc|symbol\?|symbol\->string|string\->symbol|char\?|char=\?|char<\?|char>\?|char<=\?|char>=\?|char\-ci=\?|char\-ci<\?|char\-ci>\?|char\-ci<=\?|char\-ci>=\?|char\-alphabetic\?|char\-numeric\?|char\-whitespace\?|char\-upper\-case\?|char\-lower\-case\?|char\->integer|integer\->char|char\-upcase|char\-downcase|string\?|make\-string|string|string\-length|string\-ref|string\-set!|string=\?|string\-ci=\?|string<\?|string>\?|string<=\?|string>=\?|string\-ci<\?|string\-ci>\?|string\-ci<=\?|string\-ci>=\?|substring|string\-append|string\->list|list\->string|string\-copy|string\-fill!|vector\?|make\-vector|vector|vector\-length|vector\-ref|vector\-set!|vector\->list|list\->vector|vector\-fill!|procedure\?|apply|map|for\-each|force|call\-with\-current\-continuation|call\/cc|values|call\-with\-values|dynamic\-wind|eval|scheme\-report\-environment|null\-environment|interaction\-environment|call\-with\-input\-file|call\-with\-output\-file|input\-port\?|output\-port\?|current\-input\-port|current\-output\-port|with\-input\-from\-file|with\-output\-to\-file|open\-input\-file|open\-output\-file|close\-input\-port|close\-output\-port|read|read\-char|peek\-char|eof\-object\?|char\-ready\?|write|display|newline|write\-char|load|transcript\-on|transcript\-off)(?=[\]()\s#])/g}],
20 k);Rainbow.extend("javascript",[{name:"selector",pattern:/(\s|^)\$(?=\.|\()/g},{name:"support",pattern:/\b(window|document)\b/g},{matches:{1:"support.property"},pattern:/\.(length|node(Name|Value))\b/g},{matches:{1:"support.function"},pattern:/(setTimeout|setInterval)(?=\()/g},{matches:{1:"support.method"},pattern:/\.(getAttribute|push|getElementById|getElementsByClassName|log|setTimeout|setInterval)(?=\()/g},{matches:{1:"support.tag.script",2:[{name:"string",pattern:/('|")(.*?)(\1)/g},{name:"entity.tag.script",
21 pattern:/(\w+)/g}],3:"support.tag.script"},pattern:/(&lt;\/?)(script.*?)(&gt;)/g},{name:"string.regexp",matches:{1:"string.regexp.open",2:{name:"constant.regexp.escape",pattern:/\\(.){1}/g},3:"string.regexp.close",4:"string.regexp.modifier"},pattern:/(\/)(?!\*)(.+)(\/)([igm]{0,3})/g},{matches:{1:"storage",3:"entity.function"},pattern:/(var)?(\s|^)(\S*)(?=\s?=\s?function\()/g},{matches:{1:"keyword",2:"entity.function"},pattern:/(new)\s+(.*)(?=\()/g},{name:"entity.function",pattern:/(\w+)(?=:\s{0,}function)/g}]);Rainbow.extend("r",[{matches:{1:{name:"keyword.operator",pattern:/\=|<\-|&lt;-/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm},{matches:{1:"constant.language"},pattern:/\b(NULL|NA|TRUE|FALSE|T|F|NaN|Inf|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/g},{matches:{1:"constant.symbol"},pattern:/[^0-9a-zA-Z\._](LETTERS|letters|month\.(abb|name)|pi)/g},{name:"keyword.operator",pattern:/&lt;-|<-|-|==|&lt;=|<=|&gt;>|>=|<|>|&amp;&amp;|&&|&amp;|&|!=|\|\|?|\*|\+|\^|\/|%%|%\/%|\=|%in%|%\*%|%o%|%x%|\$|:|~|\[{1,2}|\]{1,2}/g},
22 {matches:{1:"storage",3:"entity.function"},pattern:/(\s|^)(.*)(?=\s?=\s?function\s\()/g},{matches:{1:"storage.function"},pattern:/[^a-zA-Z0-9._](function)(?=\s*\()/g},{matches:{1:"namespace",2:"keyword.operator",3:"function.call"},pattern:/([a-zA-Z][a-zA-Z0-9._]+)([:]{2,3})([.a-zA-Z][a-zA-Z0-9._]*(?=\s*\())\b/g},{name:"support.function",pattern:/(^|[^0-9a-zA-Z\._])(array|character|complex|data\.frame|double|integer|list|logical|matrix|numeric|vector)(?=\s*\()/g}]);Rainbow.extend("haskell",[{name:"comment",pattern:/\{\-\-[\s\S(\w+)]+[\-\-][\}$]/gm},{name:"comment",pattern:/\-\-(.*)/g},{matches:{1:"keyword",2:"support.namespace"},pattern:/\b(module)\s(\w+)\s[\(]?(\w+)?[\)?]\swhere/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\/\=|\||\@|\:|\.|\+{2}|\:|\*|\=|#|\.{2}|(\\)[a-zA-Z_]/g},{name:"keyword",pattern:/\b(case|class|foreign|hiding|qualified|data|family|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|in|otherwise|module|newtype|of|then|type|where)\b/g},
23 {name:"keyword",pattern:/[\`][a-zA-Z_']*?[\`]/g},{matches:{1:"keyword",2:"keyword.operator"},pattern:/\b(infix|infixr|infixl)+\s\d+\s(\w+)*/g},{name:"entity.class",pattern:/\b([A-Z][A-Za-z0-9_']*)/g},{name:"meta.preprocessor",matches:{1:[{matches:{1:"keyword.define",2:"entity.name"},pattern:/(\w+)\s(\w+)\b/g},{name:"keyword.define",pattern:/endif/g},{name:"constant.numeric",pattern:/\d+/g},{matches:{1:"keyword.include",2:"string"},pattern:/(include)\s(.*?)$/g}]},pattern:/^\#([\S\s]*?)$/gm}]);Rainbow.extend("python",[{name:"variable.self",pattern:/self/g},{name:"constant.language",pattern:/None|True|False|NotImplemented|\.\.\./g},{name:"support.object",pattern:/object/g},{name:"support.function.python",pattern:/\b(bs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|bin|file|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern)(?=\()/g},
24 {matches:{1:"keyword"},pattern:/\b(pass|lambda|with|is|not|in|from|elif|raise|del)(?=\(|\b)/g},{matches:{1:"storage.class",2:"entity.name.class",3:"entity.other.inherited-class"},pattern:/(class)\s+(\w+)\((\w+?)\)/g},{matches:{1:"storage.function",2:"support.magic"},pattern:/(def)\s+(__\w+)(?=\()/g},{name:"support.magic",pattern:/__(name)__/g},{matches:{1:"keyword.control",2:"support.exception.type"},pattern:/(except) (\w+):/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(def)\s+(\w+)(?=\()/g},
25 {name:"entity.name.function.decorator",pattern:/@([\w\.]+)/g},{name:"comment.docstring",pattern:/('{3}|"{3})[\s\S]*?\1/gm}]);Rainbow.extend("html",[{name:"source.php.embedded",matches:{2:{language:"php"}},pattern:/&lt;\?=?(?!xml)(php)?([\s\S]*?)(\?&gt;)/gm},{name:"source.css.embedded",matches:{"0":{language:"css"}},pattern:/&lt;style(.*?)&gt;([\s\S]*?)&lt;\/style&gt;/gm},{name:"source.js.embedded",matches:{"0":{language:"javascript"}},pattern:/&lt;script(?! src)(.*?)&gt;([\s\S]*?)&lt;\/script&gt;/gm},{name:"comment.html",pattern:/&lt;\!--[\S\s]*?--&gt;/g},{matches:{1:"support.tag.open",2:"support.tag.close"},pattern:/(&lt;)|(\/?\??&gt;)/g},
26 {name:"support.tag",matches:{1:"support.tag",2:"support.tag.special",3:"support.tag-name"},pattern:/(&lt;\??)(\/|\!?)(\w+)/g},{matches:{1:"support.attribute"},pattern:/([a-z-]+)(?=\=)/gi},{matches:{1:"support.operator",2:"string.quote",3:"string.value",4:"string.quote"},pattern:/(=)('|")(.*?)(\2)/g},{matches:{1:"support.operator",2:"support.value"},pattern:/(=)([a-zA-Z\-0-9]*)\b/g},{matches:{1:"support.attribute"},pattern:/\s(\w+)(?=\s|&gt;)(?![\s\S]*&lt;)/g}],k);Rainbow.extend("smalltalk",[{name:"keyword.pseudovariable",pattern:/self|thisContext/g},{name:"keyword.constant",pattern:/false|nil|true/g},{name:"string",pattern:/'([^']|'')*'/g},{name:"string.symbol",pattern:/#\w+|#'([^']|'')*'/g},{name:"string.character",pattern:/\$\w+/g},{name:"comment",pattern:/"([^"]|"")*"/g},{name:"constant.numeric",pattern:/-?\d+(\.\d+)?((r-?|s)[A-Za-z0-9]+|e-?[0-9]+)?/g},{name:"entity.name.class",pattern:/\b[A-Z]\w*/g},{name:"entity.name.function",pattern:/\b[a-z]\w*:?/g},
27 {name:"entity.name.binary",pattern:/(&lt;|&gt;|&amp;|[=~\|\\\/!@*\-_+])+/g},{name:"operator.delimiter",pattern:/;[\(\)\[\]\{\}]|#\[|#\(^\./g}],k);Rainbow.extend("csharp",[{name:"constant",pattern:/\b(false|null|true)\b/g},{name:"keyword",pattern:/\b(abstract|add|alias|ascending|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|double|do|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|foreach|for|from|get|global|goto|group|if|implicit|int|interface|internal|into|in|is|join|let|lock|long|namespace|new|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|try|typeof|uint|unchecked|ulong|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/g},
28 {matches:{1:"keyword",2:{name:"support.class",pattern:/\w+/g}},pattern:/(typeof)\s([^\$].*?)(\)|;)/g},{matches:{1:"keyword.namespace",2:{name:"support.namespace",pattern:/\w+/g}},pattern:/\b(namespace)\s(.*?);/g},{matches:{1:"storage.modifier",2:"storage.class",3:"entity.name.class",4:"storage.modifier.extends",5:"entity.other.inherited-class"},pattern:/\b(abstract|sealed)?\s?(class)\s(\w+)(\sextends\s)?([\w\\]*)?\s?\{?(\n|\})/g},{name:"keyword.static",pattern:/\b(static)\b/g},{matches:{1:"keyword.new",
29 2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s([^\$].*?)(?=\)|\(|;|&)/g},{name:"string",pattern:/(")(.*?)\1/g},{name:"integer",pattern:/\b(0x[\da-f]+|\d+)\b/g},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/)[\s\S]*?$/gm},{name:"operator",pattern:/(\+\+|\+=|\+|--|-=|-|&lt;&lt;=|&lt;&lt;|&lt;=|=&gt;|&gt;&gt;=|&gt;&gt;|&gt;=|!=|!|~|\^|\|\||&amp;&amp;|&amp;=|&amp;|\?\?|::|:|\*=|\*|\/=|%=|\|=|==|=)/g},{name:"preprocessor",pattern:/(\#if|\#else|\#elif|\#endif|\#define|\#undef|\#warning|\#error|\#line|\#region|\#endregion|\#pragma)[\s\S]*?$/gm}],
30 k);Rainbow.extend("go",[{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\(`|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)((`|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/)[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b(break|c(ase|onst|ontinue)|d(efault|efer)|else|fallthrough|for|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)(?=\(|\b)/gi},
31 {name:"constant.language",pattern:/true|false|null|string|byte|rune|u?int(8|16|32|64)?|float(32|64)|complex(64|128)/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\:?=/g},{matches:{1:"function.call"},pattern:/(\w+?)(?=\()/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(func)\s(.*?)(?=\()/g}]);Rainbow.extend("php",[{name:"support",pattern:/\becho\b/g},{matches:{1:"variable.dollar-sign",2:"variable"},pattern:/(\$)(\w+)\b/g},{name:"constant.language",pattern:/true|false|null/ig},{name:"constant",pattern:/\b[A-Z0-9_]{2,}\b/g},{name:"keyword.dot",pattern:/\./g},{name:"keyword",pattern:/\b(die|end(for(each)?|switch|if)|case|require(_once)?|include(_once)?)(?=\(|\b)/g},{matches:{1:"keyword",2:{name:"support.class",pattern:/\w+/g}},pattern:/(instanceof)\s([^\$].*?)(\)|;)/g},{matches:{1:"support.function"},
32 pattern:/\b(array(_key_exists|_merge|_keys|_shift)?|isset|count|empty|unset|printf|is_(array|string|numeric|object)|sprintf|each|date|time|substr|pos|str(len|pos|tolower|_replace|totime)?|ord|trim|in_array|implode|end|preg_match|explode|fmod|define|link|list|get_class|serialize|file|sort|mail|dir|idate|log|intval|header|chr|function_exists|dirname|preg_replace|file_exists)(?=\()/g},{name:"variable.language.php-tag",pattern:/(&lt;\?(php)?|\?&gt;)/g},{matches:{1:"keyword.namespace",2:{name:"support.namespace",
33 pattern:/\w+/g}},pattern:/\b(namespace|use)\s(.*?);/g},{matches:{1:"storage.modifier",2:"storage.class",3:"entity.name.class",4:"storage.modifier.extends",5:"entity.other.inherited-class",6:"storage.modifier.extends",7:"entity.other.inherited-class"},pattern:/\b(abstract|final)?\s?(class|interface|trait)\s(\w+)(\sextends\s)?([\w\\]*)?(\simplements\s)?([\w\\]*)?\s?\{?(\n|\})/g},{name:"keyword.static",pattern:/self::|static::/g},{matches:{1:"storage.function",2:"support.magic"},pattern:/(function)\s(__.*?)(?=\()/g},
34 {matches:{1:"keyword.new",2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s([^\$].*?)(?=\)|\(|;)/g},{matches:{1:{name:"support.class",pattern:/\w+/g},2:"keyword.static"},pattern:/([\w\\]*?)(::)(?=\b|\$)/g},{matches:{2:{name:"support.class",pattern:/\w+/g}},pattern:/(\(|,\s?)([\w\\]*?)(?=\s\$)/g}]);Rainbow.extend("ruby",[{name:"string",matches:{1:"string.open",2:{name:"string.keyword",pattern:/(\#\{.*?\})/g},3:"string.close"},pattern:/("|`)(.*?[^\\\1])?(\1)/g},{name:"string",pattern:/('|"|`)([^\\\1\n]|\\.)*\1/g},{name:"string",pattern:/%[qQ](?=(\(|\[|\{|&lt;|.)(.*?)(?:'|\)|\]|\}|&gt;|\1))(?:\(\2\)|\[\2\]|\{\2\}|\&lt;\2&gt;|\1\2\1)/g},{matches:{1:"string",2:"string",3:"string"},pattern:/(&lt;&lt;)(\w+).*?$([\s\S]*?^\2)/gm},{matches:{1:"string",2:"string",3:"string"},pattern:/(&lt;&lt;\-)(\w+).*?$([\s\S]*?\2)/gm},
35 {name:"string.regexp",matches:{1:"string.regexp",2:{name:"string.regexp",pattern:/\\(.){1}/g},3:"string.regexp",4:"string.regexp"},pattern:/(\/)(.*?)(\/)([a-z]*)/g},{name:"string.regexp",matches:{1:"string.regexp",2:{name:"string.regexp",pattern:/\\(.){1}/g},3:"string.regexp",4:"string.regexp"},pattern:/%r(?=(\(|\[|\{|&lt;|.)(.*?)('|\)|\]|\}|&gt;|\1))(?:\(\2\)|\[\2\]|\{\2\}|\&lt;\2&gt;|\1\2\1)([a-z]*)/g},{name:"comment",pattern:/#.*$/gm},{name:"comment",pattern:/^\=begin[\s\S]*?\=end$/gm},{matches:{1:"constant"},
36 pattern:/(\w+:)[^:]/g},{matches:{1:"constant.symbol"},pattern:/[^:](:(?:\w+|(?=['"](.*?)['"])(?:"\2"|'\2')))/g},{name:"constant.numeric",pattern:/\b(0x[\da-f]+|\d+)\b/g},{name:"support.class",pattern:/\b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[))/g},{name:"constant",pattern:/\b[A-Z]\w*\b/g},{matches:{1:"storage.class",2:"entity.name.class",3:"entity.other.inherited-class"},pattern:/\s*(class)\s+((?:(?:::)?[A-Z]\w*)+)(?:\s+&lt;\s+((?:(?:::)?[A-Z]\w*)+))?/g},{matches:{1:"storage.module",2:"entity.name.class"},
37 pattern:/\s*(module)\s+((?:(?:::)?[A-Z]\w*)+)/g},{name:"variable.global",pattern:/\$([a-zA-Z_]\w*)\b/g},{name:"variable.class",pattern:/@@([a-zA-Z_]\w*)\b/g},{name:"variable.instance",pattern:/@([a-zA-Z_]\w*)\b/g},{matches:{1:"keyword.control"},pattern:/[^\.]\b(BEGIN|begin|case|class|do|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!])/g},{matches:{1:"keyword.control.pseudo-method"},pattern:/[^\.]\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?/g},
38 {matches:{1:"constant.language"},pattern:/\b(nil|true|false)\b(?![?!])/g},{matches:{1:"variable.language"},pattern:/\b(__(FILE|LINE)__|self)\b(?![?!])/g},{matches:{1:"keyword.special-method"},pattern:/\b(require|gem|initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!])/g},{name:"keyword.operator",pattern:/\s\?\s|=|&lt;&lt;|&lt;&lt;=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|&lt;&lt;|&lt;=&gt;|&lt;(?!&lt;|=)|&gt;(?!&lt;|=|&gt;)|&lt;=|&gt;=|===|==|=~|!=|!~|%|&amp;|\*\*|\*|\+|\-|\/|\||~|&gt;&gt;/g},
39 {matches:{1:"keyword.operator.logical"},pattern:/[^\.]\b(and|not|or)\b/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(def)\s(.*?)(?=(\s|\())/g}],k);Rainbow.extend("lua",[{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=)(('|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\-{2}\[{2}\-{2}[\s\S]*?\-{2}\]{2}\-{2}|(\-{2})[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b((a|e)nd|in|repeat|break|local|return|do|for|then|else(if)?|function|not|if|or|until|while)(?=\(|\b)/gi},
40 {name:"constant.language",pattern:/true|false|nil/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\=|#|\.{2}/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(function)\s+(\w+[\:|\.]?\w+?)(?=\()/g},{matches:{1:"support.function"},pattern:/\b(print|require|module|\w+\.\w+)(?=\()/g}],k);Rainbow.extend("css",[{name:"comment",pattern:/\/\*[\s\S]*?\*\//gm},{name:"constant.hex-color",pattern:/#([a-f0-9]{3}|[a-f0-9]{6})(?=;|\s|,|\))/gi},{matches:{1:"constant.numeric",2:"keyword.unit"},pattern:/(\d+)(px|em|cm|s|%)?/g},{name:"string",pattern:/('|")(.*?)\1/g},{name:"support.css-property",matches:{1:"support.vendor-prefix"},pattern:/(-o-|-moz-|-webkit-|-ms-)?[\w-]+(?=\s?:)(?!.*\{)/g},{matches:{1:[{name:"entity.name.sass",pattern:/&amp;/g},{name:"direct-descendant",pattern:/&gt;/g},{name:"entity.name.class",
41 pattern:/\.[\w\-_]+/g},{name:"entity.name.id",pattern:/\#[\w\-_]+/g},{name:"entity.name.pseudo",pattern:/:[\w\-_]+/g},{name:"entity.name.tag",pattern:/\w+/g}]},pattern:/([\w\ ,:\.\#\&\;\-_]+)(?=.*\{)/g},{matches:{2:"support.vendor-prefix",3:"support.css-value"},pattern:/(:|,)\s*(-o-|-moz-|-webkit-|-ms-)?([a-zA-Z-]*)(?=\b)(?!.*\{)/g},{matches:{1:"support.tag.style",2:[{name:"string",pattern:/('|")(.*?)(\1)/g},{name:"entity.tag.style",pattern:/(\w+)/g}],3:"support.tag.style"},pattern:/(&lt;\/?)(style.*?)(&gt;)/g}],
42 k);
0 <?xml version="1.0" standalone="no"?>
1 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
2 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
3 <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
4 width="630.000000pt" height="630.000000pt" viewBox="0 0 630.000000 630.000000"
5 preserveAspectRatio="xMidYMid meet">
6 <metadata>
7 Created by potrace 1.11, written by Peter Selinger 2001-2013
8 </metadata>
9 <g transform="translate(0.000000,630.000000) scale(0.100000,-0.100000)"
10 fill="#000000" stroke="none">
11 <path d="M3089 6296 c-2 -2 -40 -6 -84 -10 -109 -9 -165 -17 -350 -51 -74 -14
12 -275 -69 -378 -105 -383 -132 -726 -329 -1035 -595 -141 -121 -351 -341 -411
13 -428 -8 -12 -18 -24 -21 -27 -18 -14 -147 -202 -210 -307 -176 -290 -310 -628
14 -379 -953 -54 -253 -65 -374 -66 -675 0 -250 5 -325 36 -510 6 -33 13 -76 16
15 -95 9 -61 71 -296 104 -392 301 -894 983 -1605 1864 -1945 100 -38 329 -110
16 378 -118 18 -3 40 -8 49 -11 22 -6 55 -13 98 -20 19 -3 41 -7 49 -10 8 -2 37
17 -7 65 -10 28 -3 53 -7 56 -9 44 -27 699 -27 870 1 157 25 195 32 310 59 376
18 89 788 280 1100 509 53 39 182 143 244 196 93 79 266 262 375 395 41 50 123
19 166 120 169 -8 6 -816 571 -880 615 -37 25 -109 76 -162 113 -53 38 -99 68
20 -104 68 -4 -1 -26 -27 -48 -58 -51 -72 -252 -276 -325 -329 -169 -122 -275
21 -182 -426 -241 -99 -39 -262 -85 -336 -96 -21 -3 -53 -8 -70 -11 -162 -24
22 -383 -20 -538 10 -101 19 -147 31 -230 57 -142 46 -231 87 -390 179 -55 32
23 -209 151 -278 215 -256 237 -459 603 -517 934 -2 14 -10 57 -16 95 -24 135
24 -15 476 16 585 2 8 7 30 10 48 3 18 23 88 45 155 170 519 566 923 1085 1107
25 50 17 97 33 105 35 193 47 334 63 515 59 83 -2 159 -5 170 -7 11 -3 43 -8 70
26 -11 70 -10 197 -42 280 -72 39 -14 79 -29 90 -32 70 -20 337 -172 410 -233 11
27 -9 53 -45 93 -80 l74 -62 -248 -248 -247 -247 51 -59 c27 -32 76 -99 109 -149
28 45 -70 62 -89 73 -82 14 7 142 67 295 138 33 15 129 60 214 99 268 126 305
29 143 366 171 120 55 192 89 307 144 65 31 120 56 122 56 2 0 59 26 127 59 68
30 32 149 70 179 84 30 14 91 42 135 63 44 21 82 38 85 39 14 2 50 27 50 34 0 17
31 -138 263 -208 371 -152 235 -316 424 -547 636 -88 80 -110 97 -270 212 -305
32 219 -645 380 -1010 477 -49 13 -103 26 -120 29 -16 3 -45 10 -63 15 -18 5 -33
33 10 -35 9 -3 0 -96 13 -121 18 -10 2 -44 6 -75 9 -31 4 -67 9 -81 12 -29 6
34 -525 15 -531 9z"/>
35 </g>
36 </svg>
0 {
1 "name": "Capistrano",
2 "short_name": "Capistrano",
3 "icons": [
4 {
5 "src": "android-chrome-192x192.png",
6 "sizes": "192x192",
7 "type": "image/png"
8 },
9 {
10 "src": "android-chrome-512x512.png",
11 "sizes": "512x512",
12 "type": "image/png"
13 }
14 ],
15 "theme_color": "#1c1b39",
16 "background_color": "#1c1b39",
17 "display": "standalone"
18 }
0 ---
1 title: Console
2 layout: default
3 ---
4
5 **Note:** Here be dragons. The console is very immature, but it's much more
6 cleanly architected than previous incarnations and it'll only get better from
7 here on in.
8
9 Execute arbitrary remote commands, to use this simply add
10 `require 'capistrano/console'` which will add the necessary tasks to your
11 environment:
12
13 ```bash
14 $ bundle exec cap staging console
15 ```
16
17 Then, after setting up the server connections, this is how that might look:
18
19 ```bash
20 $ bundle exec cap production console
21 capistrano console - enter command to execute on production
22 production> uptime
23 INFO [94db8027] Running /usr/bin/env uptime on leehambley@example.com:22
24 DEBUG [94db8027] Command: /usr/bin/env uptime
25 DEBUG [94db8027] 17:11:17 up 50 days, 22:31, 1 user, load average: 0.02, 0.02, 0.05
26 INFO [94db8027] Finished in 0.435 seconds command successful.
27 production> who
28 INFO [9ce34809] Running /usr/bin/env who on leehambley@example.com:22
29 DEBUG [9ce34809] Command: /usr/bin/env who
30 DEBUG [9ce34809] leehambley pts/0 2013-06-13 17:11 (port-11262.pppoe.wtnet.de)
31 INFO [9ce34809] Finished in 0.420 seconds command successful.
32 ```
0 ---
1 title: Custom Filters
2 layout: default
3 ---
4
5 Custom filters (specifically, Custom On-Filters) limit the hosts that are being
6 deployed to, in the same way as
7 [Host](/documentation/advanced-features/host-filtering/) and
8 [Role](/documentation/advanced-features/role-filtering/) filters, but the exact
9 method used to filter servers is up to the user of Capistrano.
10
11 Filters may be added to Capistrano's list of filters by using the
12 `Configuration#add_filter` method. Filters must respond to a `filter` method,
13 which will be given an array of Servers, and should return a subset of that
14 array (the servers which passed the filter).
15
16 `Configuration#add_filter` may also take a block, in which case the block is
17 expected to be unary. The block will be passed an array of servers, and is
18 expected to return a subset of that array.
19
20 Either a block or object may be passed to `add_filter`, but not both.
21
22 ### Example
23
24 You may have a large group of servers that are partitioned into separate regions
25 that correspond to actual geographic regions. Usually, you deploy to all of
26 them, but there are cases where you want to deploy to a specific region.
27
28 Capistrano recognizes the concept of a server's *role* and *hostname*, but has
29 no concept of a *region*. In this case, you can construct your own filter that
30 selects servers based on their region. When defining servers, you may provide
31 them with a `region` property, and use that property in your filter.
32
33
34 The filter could look like this:
35
36 `config/deploy.rb`
37
38 ```ruby
39 class RegionFilter
40
41 def initialize(regions)
42 @regions = Array(regions)
43 end
44
45 def filter(servers)
46 servers.select {|server|
47 region = server.fetch(:region)
48 region && @regions.include?(region)
49 }
50 end
51
52 end
53 ```
54
55 You would add servers like this:
56
57 `config/deploy/production.rb`
58
59 ```ruby
60 server('123.123.123.123', region: 'north-east')
61 server('12.12.12.12', region: 'south-west')
62 server('4.5.6.7', region: 'mid-west')
63 ```
64
65 To tell Capistrano to use this filter, you would use the
66 `Configuration#add_filter` method. In this example, we look at the `REGIONS`
67 environment variable, and take it to be a comma-separated list of regions that
68 we're interested in:
69
70 `config/deploy.rb`
71
72 ```ruby
73 if ENV['REGIONS']
74 regions = ENV['REGIONS'].split(',')
75 filter = RegionFilter.new(regions)
76 Capistrano::Configuration.env.add_filter(filter)
77 end
78 ```
79
80 We obtain a list of regions to deploy to from the environment variable,
81 construct a new filter with those regions, and add it to Capistrano's list of
82 filters.
83
84 Of course, we're not limited to regions. Any time you can classify or partition
85 a list of servers in a way that you only want to deploy to some of them, you can
86 use a custom filter. For another example, you might arbitrarily assign your
87 servers to either an *A* group or a *B* group, and deploy a new version only to
88 the *B* group as a simple variant of A/B Testing.
0 ---
1 title: Custom SCM
2 layout: default
3 ---
4
5 Capistrano uses what it calls "SCM plugins" (Source Code Management), to deploy
6 your source code from a central repository. Out of the box, Capistrano has three
7 plugins to handle Git, Subversion, and Mercurial repositories.
8
9 Most Capistrano users are well-served by these default implementations. To
10 choose an SCM, users add it to their Capfile, like this:
11
12 ```ruby
13 require "capistrano/scm/git"
14 install_plugin Capistrano::SCM::Git
15 ```
16
17 It is also possible to provide a custom SCM plugin, in order to change how
18 Capistrano checks out your application's source code. SCM plugins can be
19 packaged as Ruby gems and distributed to other users.
20
21 This document is a short guide to writing your own plugin. *It applies to
22 Capistrano 3.7.0 and newer.*
23
24 ### 1. Write a Ruby class that extends Capistrano::SCM::Plugin
25
26 Let's say you want to create a "Foo" SCM. You'll need to write a plugin class,
27 like this:
28
29 ```ruby
30 require "capistrano/scm/plugin"
31
32 # By convention, Capistrano plugins are placed in the
33 # Capistrano namespace. This is completely optional.
34 module Capistrano
35 class FooPlugin < ::Capistrano::SCM::Plugin
36 def set_defaults
37 # Define any variables needed to configure the plugin.
38 # set_if_empty :myvar, "my-default-value"
39 end
40 end
41 end
42 ```
43
44 ### 2. Implement a create_release task
45
46 When the user runs `cap deploy`, your SCM is responsible for creating the
47 release directory and copying the application source code into it. You need to
48 do this using a task that is registered to run after `deploy:new_release_path`.
49
50 By convention (not a requirement), this task is called `create_release`.
51
52 Inside your plugin class, use the `define_tasks` and `register_hooks` methods
53 like this:
54
55 ```ruby
56 def define_tasks
57 # The namespace can be whatever you want, but its best
58 # to choose a name that matches your plugin name.
59 namespace :foo do
60 task :create_release do
61 # Your code to create the release directory and copy
62 # the source code into it goes here.
63 on release_roles :all do
64 execute :mkdir, "-p", release_path
65 # ...
66 end
67 end
68 end
69 end
70
71 def register_hooks
72 # Tell Capistrano to run the custom create_release task
73 # during deploy.
74 after "deploy:new_release_path", "foo:create_release"
75 end
76 ```
77
78 ### 3. Implement the set_current_revision task
79
80 Similar to how you defined a `create_release`, you should also define a
81 `set_current_revision` task. The purpose of this task is to set a special
82 variable that Capistrano uses to write to the deployment log.
83
84 ```ruby
85 # Your task should do something like this
86 set :current_revision, "..."
87
88 # Register this hook to ensure your task runs
89 before "deploy:set_current_revision", "foo:set_current_revision"
90 ```
91
92 ### 4. Use the plugin
93
94 To use your plugin, simply `require` the file where your plugin class is
95 defined, and then use `install_plugin`.
96
97 ```ruby
98 # In Capfile
99 require_relative "path/to/foo_plugin.rb"
100 install_plugin Capistrano::FooPlugin
101 ```
102
103 That's it!
104
105 ### 5. Distribute your plugin as a gem
106
107 Packaging and distributing Ruby gems is outside the scope of this document.
108 However, there is nothing Capistrano-specific that needs to be done here; just
109 create a standard gem that contains your plugin class.
110
111 Users can then install your plugin by adding its gem to their Gemfile:
112
113 ```ruby
114 gem "your-gem-name", :group => :development
115 ```
116
117 And then add it the Capfile:
118
119 ```ruby
120 require "your-gem-name"
121 install_plugin YourPluginClass
122 ```
123
124 ### 6. Getting help
125
126 For more techniques and ideas, check out the implementations of the default Git,
127 Subversion, and Mercurial plugins in the official
128 [Capistrano repository](https://github.com/capistrano/capistrano) on GitHub.
129 All three follow the same patterns described in this document.
130
131 Otherwise open a [GitHub issue](https://github.com/capistrano/capistrano/issues)
132 with your questions or feedback. Thanks!
0 ---
1 title: Filtering
2 layout: default
3 ---
4
5 Filtering is the term given to reducing the entire set of servers declared in a stage file
6 to a smaller set. There are three types of filters used in Capistrano (Host, Role and
7 Property) and they take effect in two quite different ways because of the two distinct
8 uses to which the declarations of servers, roles and properties are put in tasks:
9
10 * To determine _configurations_: typically by using the `roles()`, `release_roles()` and
11 `primary()` methods. Typically these are used outside the scope of the `on()` method.
12
13 * To _interact_ with remote hosts using the `on()` method
14
15 An illustration of this would be to create a `/etc/krb5.conf` file containing the list of
16 available KDC's by using the list of servers returned by `roles(:kdc)` and then uploading
17 it to all client machines using `on(roles(:all)) do upload!(file) end`
18
19 A problem with this arises when _filters_ are used. Filters are designed to limit the
20 actual set of hosts that are used to a subset of those in the overall stage, but how
21 should that apply in the above case?
22
23 If the filter applies to both the _interaction_ and _configuration_ aspects, any configuration
24 files deployed will not be the same as those on the hosts excluded by the filters. This is
25 almost certainly not what is wanted, the filters should apply only to the _interactions_
26 ensuring that any configuration files deployed will be identical across the stage.
27
28 So we define two different categories of filter, the interaction ones which are called _On-Filters_
29 and the configuration ones which are _Property-Filters_
30
31 ### On-Filtering
32
33 On-filters apply only to the `on()` method that invokes SSH. There are two default types:
34
35 * [Host Filters](/documentation/advanced-features/host-filtering/), and
36
37 * [Role Filters](/documentation/advanced-features/role-filtering/)
38
39
40 In both the above cases, when filters are specified using comma separated lists, the final
41 filter is the _union_ of all of the components. However when multiple filters are declared
42 the result is the _intersection_.
43
44 This means that you can filter by both role and host but you will get the _intersection_
45 of the servers. For example, lets say you filtered by the role `app`, then by
46 the hostnames `server1` and `server2`. Capistrano would first filter the
47 available servers to only those with the role `app`, then filter them
48 to look for servers with the hostname `server1` or `server2`. If only `server2`
49 had the role `app` (`server1` has some other role), then in this situation your
50 task would only run on `server2`.
51
52 Custom filters may also be added; see
53 [Custom Filters](/documentation/advanced-features/custom-filters/).
54
55 ### Property-Filtering
56
57 Property-filters select servers based on the value of their properties alone and
58 are specified by options passed to the `roles()` method (and implicitly in methods
59 like `release_roles()` and `primary()`)
60
61 An example of that is the 'no_release' property and it's use in the `release_roles()` method.
62
63 See the [documentation](/documentation/advanced-features/property-filtering/) for
64 details
0 ---
1 title: Host filtering
2 layout: default
3 ---
4
5 You may encounter situations where you only want to deploy to a subset of
6 the servers defined in your configuration. For example, a single server or
7 set of servers may be misbehaving, and you want to re-deploy to just these
8 servers without deploying to every server.
9
10 You can use the *host filter* to restrict Capistrano tasks to only servers
11 that match a given set of hostnames.
12
13 If the filter matches no servers, no actions will be taken.
14
15 If you specify a filter, it will match servers that have the listed hostnames,
16 and it will run *all* the roles for each server. In other words, it only affects
17 the servers the task runs on, not what tasks are run on a server.
18
19 ### Specifying a host filter
20
21 There are three ways to specify the host filter.
22
23 #### Environment variable
24
25 Capistrano will read the host filter from the environment variable `HOSTS`
26 if it is set. You can set it inline:
27
28 ```bash
29 HOSTS=server1,server2 cap production deploy
30 ```
31
32 Specify multiple hosts by separating them with a comma.
33
34 #### In configuration
35
36 You can set the host filter inside your deploy configuration. For example,
37 you can set the following inside `config/deploy.rb`:
38
39 ```ruby
40 set :filter, :hosts => %w{server1 server2}
41 ```
42
43 Note that you specify the filter as an array rather than as a comma-separated
44 list of servers when using this method.
45
46 Note that the keyname `:host` is also supported.
47
48 #### On the command line
49
50 In a similar way to using the environment variable, you can set the role
51 filter by specifying it as a command line argument to `cap`:
52
53 ```bash
54 cap --hosts=server1,server2 production deploy
55 ```
56
57 Like the environment variable method, specify multiple servers by separating
58 them with a comma.
59
60 ### Using Regular Expressions
61
62 If the host name in a filter doesn't match the set of valid characters for a DNS name
63 (Given by the regular expression `/^[-A-Za-z0-9.]+$/`) then it's assumed to be a regular
64 expression in standard Ruby syntax.
65
66 For example, if you had three servers named localrubyserver1, localrubyserver2, and amazonrubyserver1, but only wanted to deploy to localrubyserver*, you call Capistrano with a regex:
67
68 ```bash
69 cap --hosts=^localrubyserver production deploy
70 ```
0 ---
1 title: Ignoring
2 layout: default
3 ---
4
5 Files committed to version control (i.e. not in .gitignore) can still be ignored when deploying. To ignore these files or directories, simply add them to .gitattributes:
6
7 ```bash
8 config/deploy/deploy.rb export-ignore
9 config/deploy/ export-ignore
10 ```
11
12 These files will be kept in version control but not deployed to the server.
13
14 *Note:* This feature is probably unnecessary unless the root of your repository is also your web server's docroot. For example, in a Rails application, the docroot is the `public/` folder. Since all of the Capistrano configuration lives above or beside this folder, it cannot be served and is not a security risk. If the docroot is indeed at the base of the repository, consider changing that by moving the code at the repository base to a subdirectory such as public_html instead of using this feature. Note that this feature is very specific to Git and will not work on other SCMs.
0 ---
1 title: Overriding Capistrano tasks
2 layout: default
3 ---
4
5 When re-defining a task in Capistrano v2, the original task was replaced. The
6 Rake DSL on which Capistrano v3 is built is additive however, which means that
7 given the following definitions
8
9 ```ruby
10 task :foo do
11 puts "foo"
12 end
13
14 task :foo do
15 puts "bar"
16 end
17 ```
18
19 Will print both `foo` and `bar`.
20
21 But it is also possible to completely clear a task and then re-defining it
22 from scratch. A `Rake::Task` provides the `clear` method for this, which
23 internally performs three separate actions:
24
25 - `clear_prerequisites`
26 - `clear_actions`
27 - `clear_comments`
28
29 Clearing the prerequisites (i.e. any dependencies that may have been defined
30 for a task) is probably not what you want, though. Let's say, for example,
31 that you want to re-define the `deploy:revert_release` task, which is defined
32 as follows:
33
34 ```ruby
35 task :revert_release => :rollback_release_path do
36 # ...
37 end
38 ```
39
40 Calling `clear` on this task and then re-defining it results in
41 `rollback_release_path` never being called, thus breaking rollback behavior.
42
43 Under most circumstances, you will simply want to use `clear_actions`, which
44 removes the specified task's behaviour, but does not alter it's dependencies
45 or comments:
46
47 ```ruby
48 task :init do
49 puts "init"
50 end
51
52 task :foo => :init do
53 puts "foo"
54 end
55
56 Rake::Task["foo"].clear_actions
57 task :foo do
58 puts "bar"
59 end
60 ```
61
62 Running the `foo` task will print
63
64 ```ruby
65 init
66 bar
67 ```
68
69 ---
0 ---
1 title: Properties
2 layout: default
3 ---
4
5 Server objects in Capistrano essentially consist of a name and a hash: The name is the DNS
6 name (or IP address) and the hash contains the 'Properties' of the server. These
7 properties are of two sorts: ones required by Capistrano (_Capistrano Properties_) and
8 ones available for use by the Application (_Custom Properties_). These share the same
9 namespace (there is only one underlying hash!) so the names of custom properties are
10 restricted.
11
12 ### Capistrano Properties
13
14 The Capistrano properties are those used to SSH into the server and those that support the
15 basic _role_ functionality. These are:
16
17 * `:user` - the name of the SSH user for the server
18 * `:password` - for the SSH user
19 * `:port` - the port number of the SSH daemon on the server
20 * `:roles` - an array of rolenames
21 * `:ssh_options` - a hash of SSH parameters (see below)
22 * `:primary` - a boolean that indicates whether the server should be considered primary or
23 not.
24
25 The `:user`, `:port` and `:password` may be specified as follows:
26
27 * As part of the hostname in the form 'user@host:port' without a password,
28 * In the properties `:user`, `:password` and `:port`, and
29 * In the property `:ssh_options` (with the same keys)
30
31 #### Precedence
32
33 The SSH related properties are set with the following precedence, beginning with the
34 highest:
35
36 * Property declarations on the server or role. The last property declaration overrides all
37 the previous server or role declarations
38 * Values specified in the hostname string
39 * Values in the server or role `:ssh_options` property
40 * The stage global variable `:ssh_options`
41 * The SSHKit backend `ssh_options`
42 * The settings in your local `~/.ssh/config` file
43
44 Note however that defaults taken from these places will _not_ be reflected back into the
45 server properties, so `host.user` will be nil if a lower precedence default is being used.
46
47 ### Custom Properties
48
49 When using Capistrano as a general purpose deployment framework (above and beyond it's
50 traditional use for Rails deployments) it becomes important to be able to store additional
51 parameters. You can think of Capistrano as an _MVC_ framework for deployments, where the
52 stage file (representing all the relationships between application components) is the
53 _Model_, the tasks (enabling model changes to be actioned) are the _Controllers_, and the
54 actual physical embodiments (typically configuration files on running servers) are the
55 _Views_.
56
57 ### Property Access from within Tasks
58
59 The properties on Capistrano server are accessible programmatically from a Capistrano
60 task. _Capistrano_ properties are available through methods on the host object itself and
61 _Custom_ properties via methods on the `properties` attribute of the host.
62
63 These methods have the expected names: `user`, `port` and so on. An exception is the
64 `ssh_config` which is available via the `netssh_options` method.
65
66 The following feature is new in Capistrano 3.3.6 and above.
67
68 Within the scope of an `on()` block, the host that is yielded is a *copy* of the underlying
69 host, which allows you to temporarily override any of the properties by calling the setter
70 method. An example is:
71
72 ```ruby
73 on roles(:all) do |host|
74 host.user = 'root'
75 host.password = 'supersecret'
76 execute :yum, 'makecache'
77 end
78 ```
79
80 This temporarily sets the SSH user to 'root' (with an appropriate password) without
81 affecting the SSH user defined for the server in the configuration.
82
83 ### Property setting in Complex Configurations
84
85 As configurations involve more servers it helps to be able to define a set of
86 properties at the role level, and have those be overridden by a later definition at the
87 server level. This keeps your configuration as DRY as possible. A typical requirement is
88 defining a set of Redis servers which all have the same port parameter and are all slaves
89 except for one which is the master.
90
91 To allow this properties can be set at both the _Server_ and _Role_ level. The guiding
92 principle is that the properties are _merged_ and that __the last definition wins__.
93 In practice we finesse this slightly depending on the type of the properties value:
94
95 * _scalar_ values will be overridden
96 * _hash_ values will have their keys merged with duplicate keys taking on
97 the value of the last one.
98 * _array_ values will have subsequent entries appended to the array
99
100 #### Example of Server and Role Properties
101
102 The above Redis requirement can be met using the following declarations in the stage file:
103
104 ```ruby
105 role :redis, %w{ r1.example.com r2.example.com r3.example.com }, redis: { port: 6379, master: false },
106 server 'r1.example.com', redis: { port: 6380, master: true }
107 ```
108
109 #### Conventions for Role Properties
110
111 This is complicated by the fact that a single machine may serve multiple roles, and in
112 fact a single machine may need to do the same role twice! An example of this might be in a
113 development situation where you want a single machine to be the database server, a primary
114 Redis server and a slave Redis server.
115
116 To solve this problem we adopt a convention for the use of server properties:
117
118 * Server properties for a given role should be stored with the keyname equal to the role.
119 The contents of the property can be a scalar, array or hash.
120
121 * Multiple occurrences of a role on the same server should have the contents be an array,
122 in which the successive elements denote each instance.
123
124 The following example shows a configuration with multiple Redis and Sentinel roles on the
125 same server:
126
127 ```ruby
128 server 'dev.local', roles: %w{db web redis sentinel worker}, primary: true,
129 redis: [ { name: 'resque', port: 6379, db: 0, downtime: 10, master: true },
130 { name: 'resque', port: 6380, db: 0, downtime: 10 } ],
131 sentinel: [ { port: 26379 }, { port: 26380 }, { port: 26381 } ]
132 ```
133
134 These properties can be accessed in the ordinary way, but to assist in obtaining them you
135 can use the `role_properties()` function (see below).
136
137 ## Setting Properties
138
139 Properties can be set at both the role and server levels.
140
141 ### Role Properties
142
143 The declaration of a role takes an array of server names and a trailing hash of
144 properties. By convention the first server in a role declaration is taken to be the
145 primary, but the `:primary` property will not actually be set in such a case.
146
147 ### Server Properties
148
149 The declaration of a server takes the name of a server and a trailing hash of properties.
150 One of those properties must be `:role` and have a value which is an array of role names.
151
152 ### Accessing Properties
153
154 #### The `roles()` Method
155
156 The `roles()` method takes one or more role names (or an array of roles) followed by an
157 optional [Property Filter](/documentation/advanced-features/property-filtering)) and
158 returns an array of `Capistrano::Configuration::Server` objects that belong to those
159 roles. These have the following useful attributes:
160
161 * `hostname` - a String
162 * `properties.keys` - the names of the available properties
163 * `properties` - a hash-like object that stores the properties.
164 It uses Ruby's 'method_missing' to provide a method for each valid key.
165 * `roles` - a Set of role names as symbols
166
167 The servers retrieved by this method are NOT filtered by any host or role filters.
168
169 #### The `role_properties()` Method
170
171 This takes a list of roles (followed by an optional [Property
172 Filter](/documentation/advanced-features/property-filtering)) and returns an array of
173 hashes containing the properties with the keys `:hostname` and `:role` added:
174
175 ```ruby
176 task :props do
177 rps = role_properties(:redis, :sentinel)
178 rps.each do |props|
179 puts props.inspect
180 end
181 end
182
183 # Produces...
184
185 {:name=>"resque", :port=>6379, :db=>0, :downtime=>10, :master=>true, :role=>:redis, :hostname=>"dev.local"}
186 {:name=>"resque", :port=>6380, :db=>0, :downtime=>10, :role=>:redis, :hostname=>"dev.local"}
187 {:port=>26379, :role=>:sentinel, :hostname=>"dev.local"}
188 {:port=>26380, :role=>:sentinel, :hostname=>"dev.local"}
189 {:port=>26381, :role=>:sentinel, :hostname=>"dev.local"}
190 ```
191
192 Alternatively you can supply a block and it will yield the hostname, role and properties:
193
194 ```ruby
195 task :props_block do
196 role_properties(:sentinel) do |hostname, role, props|
197 puts "Host: #{hostname}, Role: #{role}, #{props.inspect}"
198 end
199 end
200
201 # Produces...
202
203 Host: dev.local, Role: sentinel, {:port=>26379}
204 Host: dev.local, Role: sentinel, {:port=>26380}
205 Host: dev.local, Role: sentinel, {:port=>26381}
206 ```
207
208 Note that unlike `on()` this function doesn't cause any remote execution to occur, it is purely for
209 configuration purposes.
0 ---
1 title: Property Filtering
2 layout: default
3 ---
4
5 Options may be passed to the `roles()` method (and implicitly in methods like
6 `release_roles()` and `primary()`) that affect the set of servers returned. These options
7 take the form of a Hash passed as the last parameter. Each of the key/value pairs in the
8 hash are evaluated in the sequence they are declared and if all are true for a specific
9 server then the server will be returned. The keys must always be symbols which have the
10 following meaning:
11
12 * `:filter`, or `:select`: The value is either a property keyname or a lambda which is
13 called with the server as parameter. The value must return true for the server to be
14 included.
15
16 * `:exclude`: As above but the value must return false for the server to be included.
17
18 * Any other symbol is taken as a server property name whose value must equal the given value.
19 A lambda will not be called if one is supplied!
20
21 ### Examples
22
23 ```ruby
24 server 'example1.com', roles: %w{web}, active: true
25 server 'example2.com', roles: %w{web}
26 server 'example3.com', roles: %w{app web}, active: true
27 server 'example4.com', roles: %w{app}, primary: true
28 server 'example5.com', roles: %w{db}, no_release: true, active: true
29
30 task :demo do
31 puts "All active release roles: 1,3"
32 release_roles(:all, filter: :active).each do |r|
33 puts "#{r.hostname}"
34 end
35 puts "All active roles: 1,3,5"
36 roles(:all, active: true).each do |r|
37 puts "#{r.hostname}"
38 end
39 puts "All web and db roles with selected names: 2,3"
40 roles(:web, :db, select: ->(s){ s.hostname =~ /[234]/}).each do |r|
41 puts "#{r.hostname}"
42 end
43 puts "All with no active property: 2,4"
44 roles(:all, active: nil).each do |r|
45 puts "#{r.hostname}"
46 end
47 puts "All except active: 2,4"
48 roles(:all, exclude: :active).each do |r|
49 puts "#{r.hostname}"
50 end
51 puts "All primary: 4"
52 roles(:all, select: :primary).each do |r|
53 puts "#{r.hostname}"
54 end
55 end
56 ```
0 ---
1 title: PTYs
2 layout: default
3 ---
4
5 There is a configuration option which asks the backend driver to ask the
6 remote host to assign the connection a *pty*. A *pty* is a pseudo-terminal,
7 which in effect means *tell the backend that this is an __interactive__
8 session*. This is normally a bad idea.
9
10 Most of the differences are best explained by [this
11 page](https://github.com/sstephenson/rbenv/wiki/Unix-shell-initialization)
12 from the author of *rbenv*.
13
14 **When Capistrano makes a connection it is a *non-login*, *non-interactive*
15 shell. This was not an accident!**
16
17 It's often used as a band aid to cure issues related to RVM and rbenv not
18 loading login and shell initialisation scripts. In these scenarios RVM and
19 rbenv are the tools at fault, or at least they are being used incorrectly.
20
21 Whilst, especially in the case of language runtimes (Ruby, Node, Python and
22 friends in particular) there is a temptation to run multiple versions in
23 parallel on a single server and to switch between them using environmental
24 variables, this is an anti-pattern, and symptomatic of bad design (e.g. you're
25 testing a second version of Ruby in production because your company lacks the
26 infrastructure to test this in a staging environment).
0 ---
1 title: Remote file task
2 layout: default
3 ---
4
5 **Warning: `remote_file` is deprecated and was removed in Capistrano 3.7.0**
6
7 The `remote_file` task is allowing the existence of a remote file to be set as a prerequisite. These tasks can in turn depend on local files if required. In this implementation, the fact that we're dealing with a file in the shared path is assumed.
8
9 As an example, this task can be used to ensure that files to be linked exist
10 before running the check:linked_files task:
11
12 ```ruby
13 namespace :deploy do
14 namespace :check do
15 task :linked_files => 'config/newrelic.yml'
16 end
17 end
18
19 remote_file 'config/newrelic.yml' => '/tmp/newrelic.yml', roles: :app
20
21 file '/tmp/newrelic.yml' do |t|
22 sh "curl -o #{t.name} https://rpm.newrelic.com/accounts/xx/newrelic.yml"
23 end
24 ```
0 ---
1 title: Role filtering
2 layout: default
3 ---
4
5 You may have situations where you only want to deploy to servers matching
6 a single role. For example, you may have changed some aspect of how the web
7 role works, but don't want to trigger a deployment to your database servers.
8
9 You can use the *role filter* to restrict Capistrano tasks to only servers
10 match a given role or roles.
11
12 If the filter matches no servers, no actions will be taken.
13
14 If you specify a filter, it will match any servers that have that role, and
15 it will run _all_ tasks for each of the roles that server has. For example,
16 if you filtered for servers with the `web` role, and a server had both the
17 `web` and `db` role, both the `web` and `db` role tasks would be executed on it.
18
19 ### Specifying a role filter
20
21 There are three ways to specify the role filter.
22
23 #### Environment variable
24
25 Capistrano will read the role filter from the environment variable `ROLES`
26 if it is set. You can set it inline:
27
28 ```bash
29 ROLES=app,web cap production deploy
30 ```
31
32 Specify multiple roles by separating them with a comma.
33
34 #### In configuration
35
36 You can set the role filter inside your deploy configuration. For example,
37 you can set the following inside `config/deploy.rb`:
38
39 ```ruby
40 set :filter, :roles => %w{app web}
41 ```
42
43 Note that you specify the filter as an array rather than as a comma-separated
44 list of roles when using this method.
45
46 Note that the keyname `:role` is also supported.
47
48 #### On the command line
49
50 In a similar way to using the environment variable, you can set the role
51 filter by specifying it as a command line argument to `cap`:
52
53 ```bash
54 cap --roles=app,web production deploy
55 ```
56
57 Like the environment variable method, specify multiple roles by separating them
58 with a comma.
59
60 ### Using Regular Expressions
61
62 Since role names are Ruby symbols they can legitimately contain any characters. However to
63 allow multiple of them to be specified on one line we use the comma as a separator.
64
65 To use a regular expression for a role filter begin and end the string with '/'. Because
66 of the above these regular expressions may not contain a comma.
0 ---
1 title: Remote commands with SSH Kit
2 layout: default
3 ---
4
5 Capistrano executes commands on remote servers using [**SSHKit**](https://github.com/capistrano/sshkit).
6
7 An example setting a working directory, user and environment variable:
8
9 ```ruby
10 on roles(:app), in: :sequence, wait: 5 do
11 within "/opt/sites/example.com" do
12 # commands in this block execute in the
13 # directory: /opt/sites/example.com
14 as :deploy do
15 # commands in this block execute as the "deploy" user.
16 with rails_env: :production do
17 # commands in this block execute with the environment
18 # variable RAILS_ENV=production
19 rake "assets:precompile"
20 runner "S3::Sync.notify"
21 end
22 end
23 end
24 end
25 ```
26
27 For more examples, see the EXAMPLES.md file in the [**SSHKit**](https://github.com/capistrano/sshkit) project:
28
29 [https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md](https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md)
0 ---
1 layout: default
2 title: Validation of variables
3 ---
4
5 To validate a variable, each time before it is set, define a validation:
6
7 ```ruby
8 validate :some_key do |key, value|
9 if value.length < 5
10 raise Capistrano::ValidationError, "Length of #{key} is too short!"
11 end
12 end
13 ```
14
15 Multiple validations can be assigned to a single key. Validations will be executed in the order of registration.
0 ---
1 title: How can I access stage configuration variables?
2 layout: default
3 ---
4
5 Configuration variables are accessed with the fetch method, like so:
6
7 ```ruby
8 local = fetch(:configuration_variable, _default_value_)
9 ```
10
11 This works fine when accessing configuration variables defined within the same file. For example accessing a previously set configuration variable defined in deploy.rb or accessing a set configuration variable in a stage file.
12
13 The deploy.rb configuration is executed first and then the stage file(s) from config/deploy/*.rb are executed next. This means that the configuration variables set in deploy.rb are available to the stage files, but configuration variables created in a stage file are not available in deploy.rb. To access them they must be lazily loaded in deploy.rb. This works because all configuration variables (from both deploy.rb and the current stage file) have been defined by the time the tasks run and access the variables.
14
15 For example, let's create a configuration variable in the production and staging files and access the current one from deploy.rb.
16
17 config/deploy/production.rb
18
19 ```ruby
20 set :app_domain, "www.my_application.com"
21 ```
22
23 config/deploy/staging.rb
24
25 ```ruby
26 set :app_domain, "stage.application_test.com"
27 ```
28
29 These variables are not available in deploy.rb using `fetch(:nginx_port)` or `fetch(:app_domain)` because they are not defined when deploy.rb is executed. They can, however, be lazily loaded using a lambda in deploy.rb like this:
30
31 config/deploy.rb
32
33 ```ruby
34 set :nginx_server_name, ->{ fetch(:app_domain) }
35 set :puma_bind, ->{ "unix:/tmp/#{fetch(:app_domain)}.sock" }
36 ```
37
38 Now the `:nginx_server_name` and `:puma_bind` variables will be lazily assigned the values set in which ever stage file was used to deploy.
39
40 If you need to create nested hashes, you might find `do/end` syntax more readable:
41
42 ```ruby
43 set :database_yml, -> do
44 {
45 production: {
46 host: 'localhost'
47 }
48 }
49 end
50 ```
0 ---
1 title: How can I check for existing remote file?
2 layout: default
3 ---
4
5 The `test` method is best used for file checking with bash conditionals
6
7 ```ruby
8 if test("[ -f /tmp/foo ]")
9 # do stuff
10 end
11 ```
12
0 ---
1 title: How can I get Capistrano to prompt for a password?
2 layout: default
3 ---
4
5 Password authentication can be done via `ask` in your deploy environment file (e.g.: config/environments/production.rb)
6
7 ```ruby
8 # Capistrano > 3.2.0 supports echo: false
9 ask(:password, nil, echo: false)
10 server 'server.domain.com', user: 'ssh_user_name', port: 22, password: fetch(:password), roles: %w{web app db}
11 ```
0 ---
1 title: How can I set Capistrano configuration paths?
2 layout: default
3 ---
4
5 Capistrano `config` and `tasks` paths can be explicitly defined, like so:
6
7 Capfile
8
9 ```ruby
10 # default deploy_config_path is 'config/deploy.rb'
11 set :deploy_config_path, 'cap/deploy.rb'
12 # default stage_config_path is 'config/deploy'
13 set :stage_config_path, 'cap/stages'
14
15 # previous variables MUST be set before 'capistrano/setup'
16 require 'capistrano/setup'
17
18 # default tasks path is `lib/capistrano/tasks/*.rake`
19 # (note that you can also change the file extensions)
20 Dir.glob('cap/tasks/*.rb').each { |r| import r }
21 ```
22
23 Here is the corresponding capistrano configuration structure:
24
25 ```bash
26 ├── Capfile
27 └── cap
28 ├── stages
29 │ ├── production.rb
30 │ └── staging.rb
31 ├── tasks
32 │ └── custom_tasks.rb
33 └── deploy.rb
34 ```
35
36 <p class="alert-box alert">
37 Be aware that you will have to provide an absolute path, if you want your "deploy_config_path" to be "capistrano/deploy.rb".
38 See <a href="https://github.com/capistrano/capistrano/issues/1519#issuecomment-152357282">this issue</a> for more explanations and how to get an absolute path in Ruby.
39 </p>
0 ---
1 title: Why does something work in my SSH session, but not in Capistrano?
2 layout: default
3 ---
4
5 This is possibly one of the most complicated support questions that can be
6 asked, the only real answer is ***it depends***.
7
8 It's really a question of which *kind* of shell Capistrano is using, it's a
9 matrix of possibilities concerning `login`, `non-login`, `interactive`, or
10 `non-interactive`.
11
12 **By default Capistrano always assigns a `non-login`, `non-interactive` shell.**
13
14 ## Shell Modes
15
16 Unix shells can be started in one of three modes, an unnamed *basic* mode,
17 which almost never happens, as a `login` shell, or as an `interactive` shell.
18
19 Depending which mode a shell starts in (and which shell you are using) this
20 will affect which startup (more commonly known as *dot*-files) files, if any
21 are loaded, [here's](#which_startup_files_loaded) more or less the matrix of what is loaded when.
22
23 ## What about the Capistrano option to assign a `pty`?
24
25 This option has been hugely misleadingly used, if you ask SSH to provide a
26 `pty` you are effectively telling SSH that *"I'll connect this session to a
27 user terminal"*, thus programs on the receiving end expect that they can prompt
28 for input, and provide coloured output, etc. In short they think they're
29 talking to you over an interactive session, because by assigning a `pty`, Bash
30 has been started in `non-login`, `interactive` mode.
31
32 Read more about this:
33
34 * [In the "Bash Startup Files" section of the Bash
35 manual](https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html)
36 * [At Sam Stephenson's excellent *Unix shell initialization* wiki
37 page](https://github.com/sstephenson/rbenv/wiki/Unix-shell-initialization)
38 * [Interactive and non-interactive shells and scripts
39 documentation](https://www.tldp.org/LDP/abs/html/intandnonint.html)
40
41 ## How does what Capistrano does differ from an SSH session
42
43 By default Capistrano prefers to start a *non-login, non-interactive
44 shell*, to try and isolate the environment and make sure that things work as
45 expected, regardless of any changes that might happen on the server side.
46
47 In contrast when you log into a machine with your terminal, into a regular
48 Bash session, the `--login` option to Bash is implied granting you a `login`
49 shell, and because you are in a terminal, ssh asks the ssh server to provide a
50 pty so that you may start an interactive session. Thus you get an `interactive
51 login` shell, the exact opposite of what we need for Capistrano!
52
53 ## How can I check?
54
55 I actually had to look this up, most of the time it's common sense, but
56 [stackoverflow to the rescue](https://unix.stackexchange.com/a/26782), let's
57 figure this out!
58
59 First, we'll try a *real* SSH session, logging in via our terminal, and seeing
60 what happens:
61
62 ```bash
63 me@localhost $ ssh me@remote
64 me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
65 Interactive
66 me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
67 Login shell
68 ```
69
70 Contrast that with what happens when we hand the command to run to the SSH
71 command line without logging in first...
72
73 ```bash
74 me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
75 Interactive
76 me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
77 Not login shell
78 ```
79
80 Here we can see that Bash is still starting in **interactive** mode when we're
81 just running a single command, that's because the terminal we are using is
82 interactive, and SSH inherits that and passes that on to the remote server.
83
84 When we try the same with Capistrano we'll see yet another set of results; we
85 can have a very simple, Capfile, we don't even need to load the default
86 recipes to test this:
87
88 ```ruby
89 # Capistrano 3
90 task :query_interactive do
91 on 'me@remote' do
92 info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
93 end
94 end
95 task :query_login do
96 on 'me@remote' do
97 info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
98 end
99 end
100 ```
101
102 Gives us the following:
103
104 ```bash
105 me@localhost $ cap query_login
106 INFO Not login shell
107 me@localhost $ cap query_interactive
108 INFO Not interactive
109 ```
110
111 ## <a id="which_startup_files_loaded"></a>Which shell startup files do get loaded?
112
113 Best explained with this diagram, yes it's that complicated:
114
115 <figure class="panel">
116 <img src="/assets/images/BashStartupFiles1.png" title="Bash Startup Files" alt="Bash Startup Files" />
117 <figcaption>
118 <p>Source: <a href="http://www.solipsys.co.uk/new/BashInitialisationFiles.html">http://www.solipsys.co.uk/new/BashInitialisationFiles.html</a></p>
119 </figcaption>
120 </figure>
121
0 ---
1 title: Authentication & Authorisation
2 layout: default
3 ---
4
5 **Note:** In the documentation we simply recommend creating a single
6 deployment user, and sharing it between team members. If you know why this is
7 a bad idea (or why this may be against regulations in your jurisdiction in
8 some cases), we assume that you know well enough how to use groups, umasking
9 and setgid bits to make this work reliably for unique logins across team
10 members.
11
12 To create this deploy user we'll assume something like the following has been
13 done:
14
15 ```bash
16 root@remote $ adduser deploy
17 root@remote $ passwd -l deploy
18 ```
19
20 The first line creates a completely standard user, it has a home directory,
21 which we'll need in a moment, and has a shell, so it may log in. This needs to
22 be done **on every server in your environment**.
23
24 The second line *locks* the user, it changes the user's password to an
25 untypable string, guaranteeing that the user has no password which can be used
26 to log in.
27
28 ### Authentication
29
30 There are two places that we need automated, promptless authentication:
31
32 1. **From our workstation/notebook/etc to our servers.** We do this with **SSH
33 keys**, passphrase protected, ideally, using a **key agent**.
34 2. **From our servers to the repository host**. We do this so that our servers
35 can check out our application code from Github, or similar and install it
36 to the servers. This is usually done using **SSH agent forwarding**, HTTP
37 authentication, or with deploy keys.
38
39 #### 1.1 SSH keys from workstation to servers
40
41 An SSH key is a mechanism that allows a *public* half one key to be placed on
42 a server, when we want to authenticate with that server, our SSH client uses
43 the **private** part of that key to negotiate with the server, if the keys are
44 correct, we are allowed to login.
45
46 **Note:** If you are on Windows, you can use Git for Windows to generate ssh keys. To do this, follow this steps:
47
48 1. Install [Git for Windows](https://git-scm.com/download/win).
49 2. Open "Git Bash" and follow next instructions always inside Git Bash prompt.
50 3. Activate ssh-agent: ```$ eval "$(ssh-agent -s)" ```
51
52 **Note:** If you want to use [Putty tool](https://www.putty.org/) to connect to remote server (from Windows) with ssh keys, then you need to generate ppk file, through puttygen tool.
53
54
55 **Hint:** If you have more than one developer in your team, they should all add their
56 public key to the `deploy` user's `authorized_keys` file, that way if someone
57 quits or gets fired, you can remove their key from that file, and the rest of
58 you can keep on shipping!
59
60 Then we need to create the key.
61
62 ```bash
63 me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'
64 ```
65
66 You'll be prompted for a passphrase, that's fine. Type one and keep it safe.
67 This passphrase ensures that if your computer is stolen, people still need a
68 passphrase to access your keys, in order to access your servers.
69
70 To avoid having to type this passphrase every time you need to use a key, most
71 operating systems have a concept of a *key agent*. This *key agent* stores SSH
72 keys securely between uses, typically the first time a key is needed in a
73 given time period, the SSH agent will load the key, prompt you for your
74 passphrase and then the key agent will remember the key for a certain amount
75 of time (on OSX it tends to be indefinite, on linux this can vary from 15
76 minutes upwards.)
77
78 We can see which keys are loaded in the SSH agent by running `ssh-add -l`
79
80 ```bash
81 me@localhost $ ssh-add -l
82 2048 af:ce:7e:c5:93:18:39:ff:54:20:7a:2d:ec:05:7c:a5 /Users/me/.ssh/id_rsa (RSA)
83 ```
84
85 If you don't see any keys listed, you can simply run `ssh-add`:
86
87 ```bash
88 me@localhost $ ssh-add
89 Identity added: /Users/me/.ssh/id_rsa (/Users/me/.ssh/id_rsa)
90 ```
91
92 Typically, ssh-add will ask you for the passphrase when you add a key.
93
94 **Note:** Although it's not mandatory to use an SSH agent (one could simply
95 use an unpassphrased key, and rely on SSH to find the key and exchange it).
96 Using an SSH agent makes things more secure, because we can use a passphrased
97 key without being prompts every time it is used. It **also** allows us to use
98 this same key to access the repository *via* the server without creating an
99 additional identity.
100
101 At this point with the key loaded into the agent, we need to put the
102 **public** part of the key into a file on each remote server called
103 `/home/users/deploy/.ssh/authorized_keys`, to get the contents of that file,
104 we can ask our local key agent for the public parts of the keys it has loaded:
105
106 ```bash
107 me@localhost $ ssh-add -L
108 ssh-rsa jccXJ/JRfGxnkh/8iL........dbfCH/9cDiKa0Dw8XGAo01mU/w== /Users/me/.ssh/id_rsa
109 ```
110
111 This will be a lot longer when you run it, I snipped the output because it
112 looked bad.
113
114 This line, as one line, needs to make it to the remote server and be added *to
115 it's own line* of the `deploy` user's `~/.ssh/authorized_keys` file. This file
116 then needs to be changed to permission mode `0600` (owner read/write, group
117 none, other none), in the `~/.ssh` directory which needs the permissions
118 `0700` (owner read/write/execute, group none, other none).
119
120 If you are on linux there often exists a command
121 [`ssh-copy-id`](https://linux.die.net/man/1/ssh-copy-id) which streamlines this
122 process, otherwise the workflow is something like:
123
124 ```bash
125 me@localhost $ ssh root@remote
126 root@remote $ su - deploy
127 deploy@remote $ cd ~
128 deploy@remote $ mkdir .ssh
129 deploy@remote $ echo "ssh-rsa jccXJ/JRfGxnkh/8iL........dbfCH/9cDiKa0Dw8XGAo01mU/w== /Users/me/.ssh/id_rsa" >> .ssh/authorized_keys
130 deploy@remote $ chmod 700 .ssh
131 deploy@remote $ chmod 600 .ssh/authorized_keys
132 ```
133
134 **Remember:** This needs to be done on every server you want to use, you can
135 use the same key for each one, but only one key per developer is recommended.
136 *Private* keys are named as such for a reason!
137
138 If we did all that correctly, we should now be able to do something like this:
139
140 ```bash
141 me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
142 one-of-my-servers.com
143 19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05
144 ```
145
146 That should happen without having to enter a passphrase for your SSH key, or
147 prompting you for an SSH password (which the deploy user doesn't have anyway).
148
149 Verify that this works for all of your servers, and put your private key
150 somewhere safe. If you're working with multiple team members, it often pays to
151 collect everyone's public keys, indeed if your team is already using SSH keys
152 to access Github, you can reach any user's SSH keys at the following URL:
153
154 * `https://github.com/theirusername.keys`
155
156 This can make getting user's keys onto servers much easier, as you can simply
157 `curl`/`wget` each user's key into the authorized keys file on the server
158 directly from Github.
159
160 <blockquote class="twitter-tweet"><p>TIL <a
161 href="https://twitter.com/github">@github</a> exposes the ssh public keys for
162 users. <a href="https://t.co/Wo9g8nxI">https://t.co/Wo9g8nxI</a> Handy for
163 adding devs to servers/repos.</p>&mdash; Postmodern (@postmodern_mod3) <a
164 href="https://twitter.com/postmodern_mod3/statuses/300438256200339456">February
165 10, 2013</a></blockquote>
166 <script async src="//platform.twitter.com/widgets.js"
167 charset="utf-8"></script>
168
169 If your server isn't accessible directly and you need to use the SSH
170 ProxyCommand option, you should do
171
172 ```ruby
173 require 'net/ssh/proxy/command'
174
175 set :ssh_options, proxy: Net::SSH::Proxy::Command.new('ssh mygateway.com -W %h:%p')
176
177 # OR
178
179 server 'internal-hostname',
180 ssh_options: {
181 proxy: Net::SSH::Proxy::Command.new('ssh mygateway.com -W %h:%p'),
182 }
183 ```
184
185 #### 1.2 From our servers to the repository host
186
187 With access from workstations to the servers settled, there is another hop to
188 contend with, which is letting the deploy user get access to the code
189 repository automatically. The options in order of preference:
190
191 ##### 1.2.1 SSH Agent Forwarding
192
193 As we've already set up an SSH agent, we can use the *agent forwarding*
194 feature of SSH to make this key agent available to further *hops*. In short,
195 we can use **our own ssh key** to authenticate ourselves from the server to
196 Github.
197
198 Here's how we can check if that works, first get the URL of the repository:
199
200 ```bash
201 me@localhost $ git config remote.origin.url
202 git@github.com:capistrano/rails3-bootstrap-devise-cancan.git
203 ```
204
205 Here we're listing our private (for testing purposes) fork of the
206 rails3-bootstrap-devise-cancan repository forked from the Rails Examples and
207 Tutorials project.
208
209 We can try to access the repository via our server by doing the following:
210
211 ```bash
212 # List SSH keys that are loaded into the agent
213 me@localhost $ ssh-add -l
214 # Make sure they key is loaded if 'ssh-add -l' didn't show anything
215 me@localhost $ ssh-add
216 me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git'
217 ```
218
219 We first check that the agent has the keys loaded. If not we simply load it
220 and enter the passphrase when prompted.
221
222 Finally we use `ls-remote` from Git to list the remote objects, this is the
223 exact same check that Capistrano does internally before attempting to deploy.
224 The `-A` option may, or may not be required on your system, it's worth trying
225 it both ways just to know how your system treats agent forwarding by default.
226
227 If you get the error "host key verification failed." log in into your server
228 and run as the deploy user the command `ssh git@github.com` to add github.com
229 to the list of known hosts.
230
231 From the SSH documentation:
232
233 ```bash
234 -A Enables forwarding of the authentication agent connection. This can also be
235 specified on a per-host basis in a configuration file.
236
237 Agent forwarding should be enabled with caution. Users with the ability to
238 bypass file permissions on the remote host (for the agent's UNIX-domain
239 socket) can access the local agent through the forwarded connection. An
240 attacker cannot obtain key material from the agent, however they can perform
241 operations on the keys that enable them to authenticate using the identities
242 loaded into the agent.
243 ```
244
245 In layman's terms, you shouldn't use SSH agent forwarding to machines where you
246 don't trust the administrators, as they can can override the permissions on
247 the system and use your keys as if they were you. That said, if you can't
248 trust your server administrators, perhaps they shouldn't have access to your
249 servers!
250
251 ##### 1.2.2 HTTP Authentication
252
253 In the case of HTTP authentication **be sure to use HTTPS**, otherwise your
254 password will be sent in cleartext over the network, depending what your hosts
255 network infrastructure looks like that might be *very* bad news.
256
257 Typically when we try and list our remote objects, using the https method from
258 Github, we'll be prompted for a username and password:
259
260 ##### 1.2.2.1 With a regular username/password
261
262 ```bash
263 me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
264 Username for 'https://github.com': myownusername
265 Password for 'https://capistrano@github.com':
266 ```
267
268 This challenge response prompt doesn't work well for automating things, so
269 there are two ways to get around this depending on your server's host
270 operating system, the first is to use a `netrc` file, we won't talk about that
271 because the netrc is a global file that doesn't lend itself well to security.
272
273 The other mechanism, and the reason that its **very** important to always use
274 HTTPS not plain ol' HTTP is to embed the username and password in the URL,
275 note this won't work well if your password has special characters:
276
277 ```bash
278 me@localhost $ git ls-remote https://capistrano:ourverysecretpassword@github.com/capistrano/rails3-bootstrap-devise-cancan.git
279 3419812c9f146d9a84b44bcc2c3caef94da54758HEAD
280 3419812c9f146d9a84b44bcc2c3caef94da54758HEADrefs/heads/master
281 ```
282
283 The bigger problem with passwords, whether inlined into the URL, or entered
284 into a `netrc` file, is that the password gives access to **your entire Github
285 Account** not just to one single repository.
286
287 ##### 1.2.2.2 With an OAuth Personal API Token
288
289 This mechanism still gives access to **every repository** you can access, but
290 at Github, they recently rolled out a feature called [Personal API
291 Tokens](https://github.com/blog/1509-personal-api-tokens) which allow you to
292 do something like this:
293
294 ```bash
295 me@localhost $ git ls-remote https://XXXX:@github.com/capistrano/rails3-bootstrap-devise-cancan.git
296 3419812c9f146d9a84b44bcc2c3caef94da54758HEAD
297 3419812c9f146d9a84b44bcc2c3caef94da54758HEADrefs/heads/master
298 ```
299
300 Where `XXXX` is a personal API token, as such:
301
302 ![Github Personal API Token Page](/assets/images/github-personal-api-token-page.png)
303
304 ##### 1.2.3 Deploy Keys
305
306 Deploy keys, a feature of Github, and some other platforms allow you to
307 generate a **second** set of SSH keys for the connection between Github and
308 the servers themselves.
309
310 Slightly perversely in this case the public key is uploaded to the repository
311 host, and the private key must be copied to each server that you want to
312 deploy to.
313
314 Github has a quite excellent guide on this, much of which (unsurprisingly)
315 overlaps with the SSH key instructions above.
316
317 * [Github Help: Managing Deploy Keys](https://help.github.com/articles/managing-deploy-keys)
318
319 ### Authorisation
320
321 The second part of this topic is that our deploy user needs to be authorised
322 to work in the deployment directory, on the server. That means we need to be
323 able to work, ideally without `sudo` (none of the default Capistrano recipes
324 expect `sudo` to be available), or for your custom recipes, you will need to
325 have configured *passwordless* `sudo`. Configuring `sudo` to give some users
326 access to some commands under some circumstances is beyond the scope of this
327 documentation, but sufficed to say something like:
328
329 ```bash
330 deploy ALL=NOPASSWD:/etc/init.d/mysqld, /etc/init.d/apache2
331 ```
332
333 This example would give the user named `deploy` access to call `sudo
334 /etc/init.d/mysql _________` and the same for the `apache2` control script.
335
336 **Granting passwordless sudo should not be done lightly.** It can be dangerous.
337 For example if an unprivileged user can *edit* the script that they can run
338 as root, they can easily edit it to do anything they want that is evil. Use
339 this carefully, and ideally architect your systems so that non-privileged
340 users can restart services, or that services restart *themselves* when they
341 notice a change.
342
343 To configure this hierarchy, ignoring for the moment the passwordless `sudo`
344 access that you may or may not need depending how well your servers are setup:
345
346 ```bash
347 me@localhost $ ssh root@remote
348 # Capistrano will use /var/www/....... where ... is the value set in
349 # :application, you can override this by setting the ':deploy_to' variable
350 root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
351 root@remote $ mkdir -p ${deploy_to}
352 root@remote $ chown deploy:deploy ${deploy_to}
353 root@remote $ umask 0002
354 root@remote $ chmod g+s ${deploy_to}
355 root@remote $ mkdir ${deploy_to}/{releases,shared}
356 root@remote $ chown deploy ${deploy_to}/{releases,shared}
357 ```
358
359 **Note:** The `chmod g+s` is a really handy, and little known Unix feature, it
360 means that at the operating system level, without having to pay much attention
361 to the permissions at runtime, all files an directories created inside the
362 `${deploy_to}` directory will inherit the group ownership, that means in this
363 case even though we are root, the files will be created being owned by `root`
364 with the group `deploy`, the `umask 0002` ensures that the files created
365 *during this session* are created with the permissions *owner read/write,
366 group: read/write, other: none*. This means that we'll be able to read these
367 files from Apache, or our web server by running the web server in the `deploy`
368 group namespace.
369
370 ```bash
371 root@remote # stat -c "%A (%a) %n" ${deploy_to}/
372 drwx--S--- (2700) /var/www/rails3-bootstrap-devise-cancan-demo
373
374 root@remote # stat -c "%A (%a) %n" ${deploy_to}/*
375 drwxrwsr-x (2775) /var/www/rails3-bootstrap-devise-cancan-demo/releases
376 drwxrwsr-x (2775) /var/www/rails3-bootstrap-devise-cancan-demo/shared
377 ```
378
0 ---
1 title: Before / After Hooks
2 layout: default
3 ---
4
5 Where calling on the same task name, executed in order of inclusion
6
7 ```ruby
8 # call an existing task
9 before :starting, :ensure_user
10
11 after :finishing, :notify
12
13
14 # or define in block
15 namespace :deploy do
16 before :starting, :ensure_user do
17 #
18 end
19
20 after :finishing, :notify do
21 #
22 end
23 end
24 ```
25
26 If it makes sense for your use case (often, that means *generating a file*)
27 the Rake prerequisite mechanism can be used:
28
29 ```ruby
30 desc "Create Important File"
31 file 'important.txt' do |t|
32 sh "touch #{t.name}"
33 end
34 desc "Upload Important File"
35 task :upload => 'important.txt' do |t|
36 on roles(:all) do
37 upload!(t.prerequisites.first, '/tmp')
38 end
39 end
40 ```
41
42 The final way to call out to other tasks is to simply `invoke()` them:
43
44 ```ruby
45 namespace :example do
46 task :one do
47 on roles(:all) { info "One" }
48 end
49 task :two do
50 invoke "example:one"
51 on roles(:all) { info "Two" }
52 end
53 end
54 ```
55
56 This method is widely used.
0 ---
1 title: Cold Start
2 layout: default
3 ---
4
5 At this point we should have a deploy user on all the servers we intend to
6 deploy to, that user should have permission to write to wherever we plan on
7 deploying to, by default that'll be something like `/var/www/my-application`.
8
9 We've set up the directory with decent permissions so that we can deploy
10 without breaking things, and that everyone on our team can deploy, too.
11
12 Let's run through what we've done so far, and how to check it's all working,
13 in the last step of this part of the guide we'll create the production-only
14 shared files.
15
16 Again, this guide assumes Ruby on Rails, but most of everything we're doing so
17 far is applicable in slightly modified forms to other frameworks and
18 technologies.
19
20 ### 1. Checking the directory structure on the remote machine:
21
22 ```bash
23 me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
24 my-application:
25 total 8
26 drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
27 drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 shared
28
29 my-application/releases:
30 total 0
31
32 my-application/shared:
33 total 0
34 ```
35
36 This checks in one simple command that the ssh keys you setup are working (you
37 might yet be prompted for the password), and the permissions on the directory
38 can be seen.
39
40 ### 2. Writing our first *cap task* to formalize this into a check!
41
42 Now that we know how to check for permissions, and repository access, we'll
43 quickly introduce ourselves to a quick Cap task to check these things on all
44 the machines for us:
45
46 ```ruby
47 desc "Check that we can access everything"
48 task :check_write_permissions do
49 on roles(:all) do |host|
50 if test("[ -w #{fetch(:deploy_to)} ]")
51 info "#{fetch(:deploy_to)} is writable on #{host}"
52 else
53 error "#{fetch(:deploy_to)} is not writable on #{host}"
54 end
55 end
56 end
57 ```
58
59 Running this should give you a pretty decent overview, one line of output for
60 each server. It's also your first introduction to the API of Capistrano for
61 writing your own tasks, namely `desc()`, `task()`, `on()`, `roles()`,
62 `test()`, `info()`, and `error()`.
63
64 The first two methods, `desc()` and `task()` are actually from Rake, the
65 library that forms the foundation of the Capistrano task system, the other
66 methods are part of our sub-project
67 [**SSHKit**](https://github.com/capistrano/sshkit). We'll dive into those more
68 later, but add those lines to a file in `./lib/capistrano/tasks`, call it
69 something like `access_check.rake`, and run `cap -T` from the top directory and
70 we'll be able to see the task listed:
71
72 ```bash
73 me@localhost $ bundle exec cap -T
74 # ... lots of other tasks ...
75 cap check_write_permissions # Check that we can access everything
76 # ... lots of other tasks ...
77 ```
78
79 Then we simply call it:
80
81 ```bash
82 me@localhost $ bundle exec cap staging check_write_permissions
83 DEBUG [82c92144] Running /usr/bin/env [ -w /var/www/my-application ] on myserver.com
84 DEBUG [82c92144] Command: [ -w /var/www/my-application ]
85 DEBUG [82c92144] Finished in 0.456 seconds command successful.
86 INFO /var/www/my-application is writable on myserver.com
87 ```
88
89 If we've done something wrong, that won't happen and we'll know that we need
90 to jump on the mailing list to get help, into IRC or ask a friend.
91
92 Depending how you have set your Git authentication credentials up, checking
93 Git can be a bit complicated, so we've shipped a task in the core library that
94 can check your git access, Git isn't particularly scriptable, so one has to
95 wrap Git in a shell script that makes it behave.
96
97 Capistrano does just this, so to check if the Git access is working, we can
98 simply call:
99
100 ```bash
101 me@localhost $ cap staging git:check
102 ```
103
104 This task is defined in the default Git SCM-strategy and looks a lot like what
105 we wrote above to check the file permissions, however the Git check recipe is
106 a bit more complicated, having to potentially deal with three different
107 authentication schemes, which need to be worked around differently. This task
108 expresses a *dependency* on the `git:git-wrapper` task which is resolved first
109 for us by Capistrano. (This is one of the pieces we inherit from Rake)
110
111 If this fails we'll see:
112
113 ```bash
114 me@localhost $ cap staging git:check
115 cap staging git:check
116 DEBUG Uploading /tmp/git-ssh.sh 0%
117 INFO Uploading /tmp/git-ssh.sh 100%
118 INFO [118bd3e4] Running /usr/bin/env chmod +x /tmp/git-ssh.sh on example.com
119 DEBUG [118bd3e4] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh
120 INFO [118bd3e4] Finished in 0.049 seconds command successful.
121 INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
122 DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
123 DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
124 DEBUG [a996463f] Permission denied (publickey).
125 DEBUG [a996463f] fatal: The remote end hung up unexpectedly
126 cap aborted!
127 git stdout: Nothing written
128 git stderr: Nothing written
129
130 Tasks: TOP => git:check
131 (See full trace by running task with --trace)
132 ```
133
134 This'll typically come out looking more beautiful depending on your terminal
135 colour support, you may well see something like this:
136
137 ![Capistrano Git Check Colour Example](/assets/images/git-check-example-screenshot.png)
138
139 To run through that shortly, what did we do:
140
141 1. We asked Capistrano to run the command `git:check`.
142 2. Capistrano recognised that in order to fulfil this request, it had to first
143 execute the task `git:wrapper`, a *prerequisite*.
144 3. Capistrano executed the `git:wrapper` task, and uploaded the
145 `/tmp/git-ssh.sh` file, and made it executable.
146 This script is actually processed as a template.
147 4. With the git wrapper in place, we can safely script against Git without it
148 prompting us for input, so we ask git to `ls-remote` on the repository we
149 defined. As this exited with an [unclean
150 status](https://en.wikipedia.org/wiki/Exit_status), Capistrano aborted, and
151 printed out the error messages for us to try and figure out what broke.
152
153 In this case, we'll be using SSH agent forwarding, we can check if that's
154 working by writing a tiny Cap task, or simply using SSH to do it for us, the
155 choice is yours:
156
157 ```ruby
158 # lib/capistrano/tasks/agent_forwarding.rake
159 desc "Check if agent forwarding is working"
160 task :forwarding do
161 on roles(:all) do |h|
162 if test("env | grep SSH_AUTH_SOCK")
163 info "Agent forwarding is up to #{h}"
164 else
165 error "Agent forwarding is NOT up to #{h}"
166 end
167 end
168 end
169 ```
170
171 That gave the output:
172
173 ```bash
174 cap staging forwarding
175 DEBUG [f1269276] Running /usr/bin/env env | grep SSH_AUTH_SOCK on example.com
176 DEBUG [f1269276] Command: env | grep SSH_AUTH_SOCK
177 DEBUG [f1269276] SSH_AUTH_SOCK=/tmp/ssh-nQUEmyQ2nS/agent.2546
178 DEBUG [f1269276] Finished in 0.453 seconds command successful.
179 INFO Agent forwarding is up to example.com
180 ```
181
182 If you don't feel like writing a Capistrano task, one could simply do:
183
184 ```bash
185 me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
186 SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934
187 ```
188
189 If we see the `SSH_AUTH_SOCK` output, that's a pretty good indication that SSH
190 agent forwarding is enabled, and if on your local machine `ssh-add -l` shows
191 you an SSH key, then we're good to go. **Make sure that you're using the
192 `git@...` repository URL**
193
194 ```bash
195 cap staging git:check
196 DEBUG Uploading /tmp/git-ssh.sh 0%
197 INFO Uploading /tmp/git-ssh.sh 100%
198 INFO [21382716] Running /usr/bin/env chmod +x /tmp/git-ssh.sh on example.com
199 DEBUG [21382716] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh
200 INFO [21382716] Finished in 0.047 seconds command successful.
201 INFO [f40edfbb] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on example.com
202 DEBUG [f40edfbb] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
203 DEBUG [f40edfbb] 3419812c9f146d9a84b44bcc2c3caef94da54758 HEAD
204 DEBUG [f40edfbb] 3419812c9f146d9a84b44bcc2c3caef94da54758 refs/heads/master
205 INFO [f40edfbb] Finished in 3.319 seconds command successful.
206 ```
207
208 ![Capistrano Git Check Colour Example](/assets/images/successful-git-check-example-screenshot.png)
209
210 *Note:* If you get an error like `scp: /tmp/git-ssh.sh: Permission denied`, you may need to set the `:tmp_dir` param.
0 ---
1 title: Configuration
2 layout: default
3 ---
4
5 ## Location
6
7 Configuration variables can be either global or specific to your stage.
8
9 * global
10 * `config/deploy.rb`
11 * stage specific
12 * `config/deploy/<stage_name>.rb`
13
14 ## Access
15
16 Each variable can be set to a specific value:
17
18 ```ruby
19 set :application, 'MyLittleApplication'
20
21 # use a lambda to delay evaluation
22 set :special_thing, -> { "SomeThing_#{fetch :other_config}" }
23 ```
24
25 A value can be retrieved from the configuration at any time:
26
27 ```ruby
28 fetch :application
29 # => "MyLittleApplication"
30
31 fetch(:special_thing, 'some_default_value')
32 # will return the value if set, or the second argument as default value
33 ```
34
35 **New in Capistrano 3.5:** for a variable that holds an Array, easily add values to it using `append`. This comes in especially handy for `:linked_dirs` and `:linked_files` (see Variables reference below).
36
37 ```ruby
38 append :linked_dirs, ".bundle", "tmp"
39 ```
40
41 The inverse is also available: `remove` will strive to drop an entry from an array. This comes in handy if you have a shared configuration which sets an array but a specific config doesn't need one of the elements.
42
43 ```ruby
44 remove :linked_dirs, ".bundle", "tmp"
45 ```
46
47 ## Variables
48
49 The following variables are settable:
50
51 * `:application`
52 * The name of the application.
53
54 * `:deploy_to`
55 * **default:** `-> { "/var/www/#{fetch(:application)}" }`
56 * The path on the remote server where the application should be deployed.
57 * If application contains whitespace or such this path might be invalid. See Structure for the exact directories used.
58
59 * `:repo_url`
60 * URL to the repository.
61 * Must be a valid URL for the used SCM.
62 * Example: `set :repo_url, 'git@example.com:me/my_repo.git'` for a git repo located in /home/git/me
63 * Hint #1: to access a repo on a machine using a non-standard ssh port: `set :repo_url, 'ssh://git@example.com:30000/~/me/my_repo.git'`
64 * Hint #2: when using :svn and branches, declare the repo_url like this: `set :repo_url, -> { "svn://myhost/myrepo/#{fetch(:branch)}" }`
65 * Warning: if you move your repository to a new URL when using an SCM other than Git and change this variable, already deployed remote servers won't reflect this change automatically, you have to manually re-configure the repository on the remote servers (in path determined by `:repo_path`) or delete it (`rm -rf repo` in the default setup) and let Capistrano recreate it on the next deploy using the updated URL.
66
67 * `:branch`
68 * **default:** `'master'`
69 * The branch name to be deployed from SCM.
70
71 * `:svn_username`
72 * When using :svn, provides the username for authentication.
73
74 * `:svn_password`
75 * When using :svn, provides the password for authentication.
76
77 * `:svn_revision`
78 * **New in version 3.5**
79 * When using :svn, set the specific revision number you want to deploy.
80
81 * `:repo_path`
82 * **default:** `-> { "#{fetch(:deploy_to)}/repo" }`
83 * The path on the remote server where the repository should be placed.
84 * This does not normally need to be set
85
86 * `:repo_tree`
87 * **default:** None. The whole repository is normally deployed.
88 * The subtree of the repository to deploy.
89 * Currently only implemented for Git and Hg.
90
91 * `:linked_files`
92 * **default:** `[]`
93 * Listed files will be symlinked from the shared folder of the application into each release directory during deployment.
94 * Can be used for persistent configuration files like `database.yml`. See Structure for the exact directories.
95
96 * `:linked_dirs`
97 * **default:** `[]`
98 * Listed directories will be symlinked into the release directory during deployment.
99 * Can be used for persistent directories like uploads or other data. See Structure for the exact directories.
100
101 * `:default_env`
102 * **default:** `{}`
103 * Default shell environment used during command execution.
104 * Can be used to set or manipulate specific environment variables (e.g. `$PATH` and such).
105
106 * `:keep_releases`
107 * **default:** `5`
108 * The last `n` releases are kept for possible rollbacks.
109 * The cleanup task detects outdated release folders and removes them if needed.
110
111 * `:tmp_dir`
112 * **default:** `'/tmp'`
113 * Temporary directory used during deployments to store data.
114 * If you have a shared web host, this setting may need to be set (e.g. /home/user/tmp/capistrano).
115
116 * `:local_user`
117 * **default:** `-> { ENV["USER"] || ENV["LOGNAME"] || ENV["USERNAME"] }`
118 * Username of the local machine used to update the revision log.
119
120 * `:pty`
121 * **default:** `false`
122 * Used in SSHKit.
123
124 * `:log_level`
125 * **default:** `:debug`
126 * Used in SSHKit.
127 * Other available options are :info, :warn and :error.
128
129 * `:format`
130 * **default:** `:airbrussh`
131 * Used in SSHKit.
132 * Other available options are :dot and :pretty.
133 * The default formatter :airbrussh will print the output even when :log_level is :warn or :error, while :dot and :pretty will use the defined :log_level.
134
135 * `:shared_directory`
136 * **default:** `shared`
137 * Name for shared directory, containing files and directories symlinked into the release directory during deployment.
138
139 * `:releases_directory`
140 * **default:** `releases`
141 * Name for releases directory, target location for releases.
142
143 * `:current_directory`
144 * **default:** `current`
145 * Name for `current` link pointing to the newest successful deployment's release folder.
146
147 * `:git_max_concurrent_connections`
148 * **default:** `10`
149 * Number of concurrent connections to Git repository - useful when your Git server limits the number of simultaneous connections while using SSH (like Gitlab CE).
150
151 * `:git_wait_interval`
152 * **default:** `0`
153 * Number of seconds to wait after you reach the limit of concurrent connections to Git repository server and disconnect afterwards to initialize new connections. This prevents from being cut out of SSH server when you use `fail2ban` or similar software for limiting connections to server.
154
155 * `:git_verify_commit`
156 * **default:** `false`
157 * Whether to check if a valid signature exists on the Git commit to be deployed.
158
159 Capistrano plugins can provide their own configuration variables. Please refer
160 to the plugin documentation for the specifics. Plugins are allowed to add or
161 manipulate default values as well as already user-defined values after the
162 plugin is loaded.
0 ---
1 title: Flow
2 layout: default
3 ---
4
5 Capistrano v3 provides a default **deploy flow** and a **rollback flow**:
6
7 ### Deploy flow
8
9 When you run `cap production deploy`, it invokes the following tasks in
10 sequence:
11
12 ```ruby
13 deploy:starting - start a deployment, make sure everything is ready
14 deploy:started - started hook (for custom tasks)
15 deploy:updating - update server(s) with a new release
16 deploy:updated - updated hook
17 deploy:publishing - publish the new release
18 deploy:published - published hook
19 deploy:finishing - finish the deployment, clean up everything
20 deploy:finished - finished hook
21 ```
22
23 Notice there are several hook tasks e.g. `:started`, `:updated` for
24 you to hook up custom tasks into the flow using `after()` and `before()`.
25
26 ### Rollback flow
27
28 When you run `cap production deploy:rollback`, it invokes the following
29 tasks in sequence:
30
31 ```ruby
32 deploy:starting
33 deploy:started
34 deploy:reverting - revert server(s) to previous release
35 deploy:reverted - reverted hook
36 deploy:publishing
37 deploy:published
38 deploy:finishing_rollback - finish the rollback, clean up everything
39 deploy:finished
40 ```
41
42 As you can see, rollback flow shares many tasks with deploy flow. But note
43 that, rollback flow runs its own `:finishing_rollback` task because its
44 cleanup process is usually different from deploy flow.
45
46 ### Flow examples
47
48 Assume you require the following files in `Capfile`,
49
50 ```ruby
51 # Capfile
52 require 'capistrano/setup'
53 require 'capistrano/deploy'
54 require 'capistrano/bundler'
55 require 'capistrano/rails/assets'
56 require 'capistrano/rails/migrations'
57 ```
58
59 When you run `cap production deploy`, it runs these tasks:
60
61 ```ruby
62 deploy
63 deploy:starting
64 [before]
65 deploy:ensure_stage
66 deploy:set_shared_assets
67 deploy:check
68 deploy:started
69 deploy:updating
70 git:create_release
71 deploy:symlink:shared
72 deploy:updated
73 [before]
74 deploy:bundle
75 [after]
76 deploy:migrate
77 deploy:compile_assets
78 deploy:normalize_assets
79 deploy:publishing
80 deploy:symlink:release
81 deploy:published
82 deploy:finishing
83 deploy:cleanup
84 deploy:finished
85 deploy:log_revision
86 ```
87
88 For `cap production deploy:rollback`, it runs these tasks:
89
90 ```ruby
91 deploy
92 deploy:starting
93 [before]
94 deploy:ensure_stage
95 deploy:set_shared_assets
96 deploy:check
97 deploy:started
98 deploy:reverting
99 deploy:revert_release
100 deploy:reverted
101 [after]
102 deploy:rollback_assets
103 deploy:publishing
104 deploy:symlink:release
105 deploy:published
106 deploy:finishing_rollback
107 deploy:cleanup_rollback
108 deploy:finished
109 deploy:log_revision
110 ```
0 ---
1 title: Installation
2 layout: default
3 ---
4
5 Capistrano is bundled as a Ruby Gem. **It requires Ruby 2.0 or newer.**
6
7 Capistrano can be installed as a standalone Gem, or bundled into your
8 application.
9
10 <p class="alert-box alert">
11 It is recommended to fix the version number when using Capistrano, and is
12 therefore recommended to use an appropriate bundler.
13 </p>
14
15 ### General Usage
16
17 The following command will install the latest released capistrano `v3` revision:
18
19 ```bash
20 $ gem install capistrano
21 ```
22
23 Or grab the bleeding edge head from:
24
25 ```bash
26 $ git clone https://github.com/capistrano/capistrano.git
27 $ cd capistrano
28 $ gem build *.gemspec
29 $ gem install *.gem
30 ```
31
32 ### Usage in a Rails project
33
34 Add the following lines to the Gemfile:
35
36 ```ruby
37 group :development do
38 gem "capistrano", "~> 3.10", require: false
39 gem "capistrano-rails", "~> 1.3", require: false
40 end
41 ```
42
43 The `capistrano-rails` gem includes extras specifically designed for Ruby on
44 Rails, specifically:
45
46 * Asset Pipeline Support
47 * Database Migration Support
48
49 The documentation for these components can be found in
50 [their][capistrano-rails-asset-pipeline-readme],
51 [respective][capistrano-rails-gem-bundler-readme],
52 [READMEs][capistrano-rails-database-migrations-readme]. However for the most
53 part, to get the best, and most sensible results, simply `require` in
54 Capfile, after the `require 'capistrano/deploy'` line:
55
56 ```ruby
57 require 'capistrano/rails'
58 ```
59
60 ##### SSH
61
62 Capistrano deploys using SSH. Thus, you must be able to SSH (ideally with keys
63 and ssh-agent) from the deployment system to the destination system for
64 Capistrano to work.
65
66 You can test this using a ssh client, e.g. `ssh myuser@destinationserver`. If
67 you cannot connect at all, you may need to set up the SSH server or resolve
68 firewall/network issues. Look for a tutorial (here are suggestions for
69 [Ubuntu](https://help.ubuntu.com/community/SSH) and
70 [RedHat/CentOS](https://www.cyberciti.biz/faq/centos-ssh/)).
71
72 If a password is requested when you log in, you may need to set up SSH keys.
73 GitHub has a [good tutorial](https://help.github.com/articles/generating-ssh-keys/)
74 on creating these (follow steps 1 through 3). You will need to add your public
75 key to `~/.ssh/authorized_keys` on the destination server as the deployment user
76 (append on a new line).
77
78 More information on SSH and login is available via the
79 [Authentication and Authorisation](https://capistranorb.com/documentation/getting-started/authentication-and-authorisation/)
80 section of the guide.
81
82 If you are still struggling to get login working, try the
83 [Capistrano SSH Doctor](https://github.com/capistrano-plugins/capistrano-ssh-doctor)
84 plugin.
85
86 ##### Help! I was using Capistrano `v2.x` and I didn't want to upgrade!
87
88 If you are using Capistrano `v2.x.x` and have also installed Capistrano `v3`
89 by mistake, then you can lock your Gem version for Capistrano at something
90 like:
91
92 ```ruby
93 gem 'capistrano', '~> 2.15' # Or whatever patch release you are using
94 ```
95
96 This is the [pessimistic operator][rubygems-pessimistic-operator] which
97 installs the closest matching version, at the time of writing this would
98 install `2.15.4`, and any other point-release in the `2.15.x` family without
99 the risk of accidentally upgrading to `v3`.
100
101
102 [rubygems]: http://rubygems.org/
103 [rubygems-pessimistic-operator]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
104 [capistrano-rails-asset-pipeline-readme]: https://github.com/capistrano/rails/blob/master/README.md
105 [capistrano-rails-database-migrations-readme]: https://github.com/capistrano/rails/blob/master/README.md
106 [capistrano-rails-gem-bundler-readme]: https://github.com/capistrano/bundler/blob/master/README.md
0 ---
1 title: Local Tasks
2 layout: default
3 ---
4
5 Local tasks can be run by replacing `on` with `run_locally`:
6
7 ```ruby
8 desc 'Notify service of deployment'
9 task :notify do
10 run_locally do
11 with rails_env: :development do
12 rake 'service:notify'
13 end
14 end
15 end
16 ```
17
18 Of course, you can always just use standard ruby syntax to run things locally:
19
20 ```ruby
21 desc 'Notify service of deployment'
22 task :notify do
23 %x(RAILS_ENV=development bundle exec rake "service:notify")
24 end
25 ```
26
27 Alternatively you could use the rake syntax:
28
29 ```ruby
30 desc "Notify service of deployment"
31 task :notify do
32 sh 'RAILS_ENV=development bundle exec rake "service:notify"'
33 end
34 ```
0 ---
1 title: Preparing Your Application
2 layout: default
3 ---
4
5 <p class="alert-box">
6 This will focus on preparing a Rails application, but most ideas expressed
7 here have parallels in Python, or PHP applications
8 </p>
9
10 ### 1. Commit your application to some externally available source control hosting provider.
11
12 If you are not doing so already, you should host your code somewhere with a
13 provider such as GitHub, BitBucket, Codeplane, or repositoryhosting.com.
14
15 Capistrano currently supports Git, Mercurial, and SVN out of the box.
16 There might be 3<sup>rd</sup> party plugins adding support for various other systems.
17
18 ### 2. Move secrets out of the repository.
19
20 <p class="alert-box alert">
21 If you've accidentally committed state secrets to the repository, you might
22 want to take
23 <a href="https://help.github.com/articles/remove-sensitive-data">special steps</a>
24 to erase them from the repository history for all time.
25 </p>
26
27 Ideally one should remove `config/database.yml` to something like
28 `config/database.yml.example`. You and your team should copy the example file
29 into place on their development machines, under Capistrano. This leaves the
30 `database.yml` filename unused so that we can symlink the production database
31 configuration into place at deploy time.
32
33 The original `database.yml` should be added to the `.gitignore` (or your SCM's
34 parallel concept of ignored files)
35
36 ```bash
37 $ cp config/database.yml{,.example}
38 $ echo config/database.yml >> .gitignore
39 ```
40
41 This should be done for any other secret files, we'll create the production
42 version of the file when we deploy, and symlink it into place.
43
44 ### 3. Initialize Capistrano in your application.
45
46 ```bash
47 $ cd my-project
48 $ cap install
49 ```
50
51 This will create a bunch of files, the important ones are:
52
53 ```bash
54 ├── Capfile
55 ├── config
56 │   ├── deploy
57 │   │   ├── production.rb
58 │   │   └── staging.rb
59 │   └── deploy.rb
60 └── lib
61 └── capistrano
62 └── tasks
63 ```
64
65 Your new Capfile will automatically include any tasks from any `*.rake` files
66 in `lib/capistrano/tasks`.
67
68
69 ### 4. Configure your server addresses in the generated files.
70
71 We'll just work with the staging environment here, so you can pretend that
72 `config/deploy/production.rb` doesn't exist, for the most part that's your
73 business.
74
75 Capistrano breaks down common tasks into a notion of *roles*, that is, taking
76 a typical Rails application that we have roughly speaking three roles, `web`,
77 `app`, and `db`.
78
79 The three roles can be confusing, as the boundary of web and app servers is a bit blurry if, for example,
80 using [Passenger](https://www.phusionpassenger.com/) with Apache, which in effect embeds your app server in the
81 web server (embeds Passenger in the Apache process itself). Confusingly,
82 Passenger can also be used in modes where this isn't true, so we'll ignore
83 that for the time being. If you know the difference (i.e you are using
84 nginx as your web server, and puma/unicorn, or similar for your app server,
85 that should be fine), then we can assume that they're the same, which is pretty
86 common.
87
88 The example file generated will look something like this:
89
90 ```ruby
91 set :stage, :staging
92
93 # Simple Role Syntax
94 # ==================
95 # Supports bulk-adding hosts to roles, the primary
96 # server in each group is considered to be the first
97 # unless any hosts have the primary property set.
98 role :app, %w{example.com}
99 role :web, %w{example.com}
100 role :db, %w{example.com}
101
102 # Extended Server Syntax
103 # ======================
104 # This can be used to drop a more detailed server
105 # definition into the server list. The second argument
106 # is something that quacks like a hash and can be used
107 # to set extended properties on the server.
108 server 'example.com', roles: %w{web app}, my_property: :my_value
109
110 # set :rails_env, :staging
111 ```
112
113 Servers can be defined in two ways, implicitly using the simple `role` syntax and
114 explicitly using the extended `server` syntax. Both result in one or more servers for
115 each role being defined. The `app` and `db` roles are just placeholders, if you are using
116 the `capistrano/rails-*` addons (more on that later) then they have a meaning, but if you
117 are deploying something simpler, feel free to delete them if they're meaningless to you.
118
119 Both types can specify optional _properties_ to be associated with a server or role. These
120 properties include Capistrano-required ones such as the SSH options (username, port, keys
121 etc.) and also arbitrary custom properties. They are there in case people want to build the
122 server list more comprehensively from something like the *EC2* command line tools, and
123 want to use the extended properties for something that makes sense in their environment.
124
125 The following shows defining two servers: one where we set the
126 username, and another where we set the port. These host strings are parsed and expanded
127 out in to the equivalent of the server line after the comment:
128
129 ```ruby
130 # using simple syntax
131 role :web, %w{hello@world.com example.com:1234}
132
133 # using extended syntax (which is equivalent)
134 server 'world.com', roles: [:web], user: 'hello'
135 server 'example.com', roles: [:web], port: 1234
136 ```
137
138 <p class="alert-box"> You can define a server or role using both syntaxes and the
139 properties will be merged. See the Properties Documentation for details
140 </p>
141
142 <p class="alert-box alert"> If you define servers with either the simple or the extended
143 syntax and explicitly specify a user or a port number, the last definition will win. This
144 is identical behaviour to scalar custom properties. In older versions of Capistrano,
145 <b>multiple</b> servers were created and the merging was ill-defined. </p>
146
147 ### 5. Set the shared information in `deploy.rb`.
148
149 The `deploy.rb` is a place where the configuration common to each environment
150 can be specified, normally the *repository URL* and the *user as whom to
151 deploy* are specified here.
152
153 The generated sample file starts with the following, and is followed by a few
154 self-documenting, commented-out configuration options, feel free to play with
155 them a little:
156
157 ```ruby
158 set :application, 'my_app_name'
159 set :repo_url, 'git@example.com:me/my_repo.git'
160 ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
161 ```
162
163 Here we'd set the name of the application, ideally in a way that's safe for
164 filenames on your target operating system.
165
166 Second we set the repository URL, and this *MUST* be somewhere that the server we
167 are deploying to can reach.
168
169 Here's how this might look in a typical example: note that we'll cover
170 authentication in the next chapter, but for now we'll assume this repository is
171 open source, taking an example application from the [Rails Examples and
172 Tutorials](https://railsapps.github.io/) site. There we'll find maintained a
173 handful of typical Rails apps with typical dependencies.
174
175 The Rails application they host, which uses Devise (for authentication) and
176 Cancan (for authorisation) along side Twitter Bootstrap for assets has been
177 forked to the Capistrano repository, but you can find the (unchanged) original
178 [here](https://github.com/RailsApps/rails3-bootstrap-devise-cancan).
179
180 ```ruby
181 set :application, 'rails3-bootstrap-devise-cancan-demo'
182 set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
183 set :branch, 'master'
184 ```
185
186 I've simplified the `:branch` variable to simply be a `set` variable, and not a
187 question prompt, as this repository only has a master branch.
188
189 ## Roundup
190
191 **At this point Capistrano knows where to find our servers, and where to find
192 our code.**
193
194 We've not covered how we authorise our servers to check out our code (there
195 are three pretty good ways of doing that with Git), nor have we determined how
196 to authorise Capistrano on our servers yet.
0 ---
1 title: Rollbacks
2 layout: default
3 ---
4
5 In the majority of failed deployment situations, it probably makes more sense to revert the bad code and redeploy, rather than running deploy:rollback. Capistrano provides basic rollback support, but as each application and system handles rollbacks differently, it is up to the individual to test and validate that rollback behaves correctly for their use case. For example, capistrano-rails will run special tasks on rollback to fix the assets, but does nothing special with database migrations.
6
7 Correctly rolling back a release is a complex process that depends on the specifics of your application and the Capistrano plugins you've assembled. *Be proactive and test your rollback procedure before trying it for the first time in a time of crisis.*
8
9 When a deployment is run, Capistrano executes one task at a time on all servers and waits for that task to be done before moving on to the next one. If a task fails on a server, Capistrano exits without waiting for further tasks. In a multiple server situation, when a task fails on one server by exiting with a non-0 exit code, Capistrano closes the SSH connections to any still in-progress servers and their tasks exit.
10
11 If the error occurs during a deployment task which is prior to the final cutover, for example during creation of symlinks, the process will simply stop and the previously deployed application will continue to run. However if the failing deployment task is after `deploy:symlink:release`, during which the `current` symlink is moved to the newly deployed code, this may result in an inconsistent state which may be solved by executing `cap [stage] deploy:rollback`. Rollback can also be a solution for issues with failed deployments due to buggy code or other reasons.
12
13 Per https://capistranorb.com/documentation/getting-started/flow/, the standard deployment and rollback processes are nearly identical. The difference is that in a deploy, the `deploy:updating` and `deploy:updated` tasks are executed, while in a rollback, the `deploy:reverting` and `deploy:reverted` (a hook task) tasks are run. Also, instead of `deploy:finishing`, `deploy:finishing_rollback` is run, as cleanup can sometimes be different.
14
15 ### `deploy:reverting`
16
17 This starts by setting the release_path to the last known good release path. It does this by obtaining a list of folders in the releases folder and if there are at least two, sets the second to last release as the release_path. It also sets the `rollback_timestamp` to this same release which it uses for the log entry.
18
19 Once this has been set, the remaining standard deployment tasks flip the symlink accordingly.
20
21 ### `deploy:finishing_rollback`
22
23 To finish the rollback, Capistrano creates a tarball of the failed release in the deploy path, and then deletes the release folder.
24
25 ### `deploy:failed`
26
27 In a situation where `cap [stage] deploy` fails, the `deploy:failed` hook is invoked. You can add custom rollback tasks to this hook:
28
29 ```ruby
30 after 'deploy:failed', :send_for_help do
31 #
32 end
33 ```
34
35 This is different from a specifically invoked rollback, and is application specific. *For reasons stated above, it can be dangerous to use this hook without careful testing.*
36
37 ### `deploy:rollback ROLLBACK_RELEASE=release`
38
39 Rollback to a specific release using the `ROLLBACK_RELEASE` environment variable.
40
41 e.g. `cap staging deploy:rollback ROLLBACK_RELEASE=20160614133327`
0 ---
1 title: Structure
2 layout: default
3 ---
4
5 Capistrano uses a strictly defined directory hierarchy on each remote server to organise the source code and other deployment-related data. The root path of this structure can be defined with the configuration variable `:deploy_to`.
6
7 Assuming your `config/deploy.rb` contains this:
8
9 ```ruby
10 set :deploy_to, '/var/www/my_app_name'
11 ```
12
13
14 Then inspecting the directories inside `/var/www/my_app_name` looks like this:
15
16 ```bash
17 ├── current -> /var/www/my_app_name/releases/20150120114500/
18 ├── releases
19 │   ├── 20150080072500
20 │   ├── 20150090083000
21 │   ├── 20150100093500
22 │   ├── 20150110104000
23 │   └── 20150120114500
24 ├── repo
25 │ └── <VCS related data>
26 ├── revisions.log
27 └── shared
28 └── <linked_files and linked_dirs>
29 ```
30
31
32 * `current` is a symlink pointing to the latest release. This symlink is
33 updated at the end of a successful deployment. If the deployment fails in any
34 step the `current` symlink still points to the old release.
35
36 * `releases` holds all deployments in a timestamped folder. These folders are
37 the target of the `current` symlink.
38
39 * `repo` holds the version control system configured. In case of a git
40 repository the content will be a raw git repository (e.g. objects, refs,
41 etc.).
42
43 * `revisions.log` is used to log every deploy or rollback. Each entry is
44 timestamped and the executing user (`:local_user`, defaulting to the local
45 username) is listed. Depending on your VCS data like branch names or revision
46 numbers are listed as well.
47
48 * `shared` contains the `linked_files` and `linked_dirs` which are symlinked
49 into each release. This data persists across deployments and releases. It
50 should be used for things like database configuration files and static and
51 persistent user storage handed over from one release to the next.
52
53 The application is completely contained within the path of `:deploy_to`. If
54 you plan on deploying multiple applications to the same server, simply choose
55 a different `:deploy_to` path.
0 ---
1 title: Tasks
2 layout: default
3 ---
4
5 ```ruby
6 server 'example.com', roles: [:web, :app]
7 server 'example.org', roles: [:db, :workers]
8 desc "Report Uptimes"
9 task :uptime do
10 on roles(:all) do |host|
11 execute :any_command, "with args", :here, "and here"
12 info "Host #{host} (#{host.roles.to_a.join(', ')}):\t#{capture(:uptime)}"
13 end
14 end
15 ```
16
17 **Note**:
18
19 **tl;dr**: `execute(:bundle, :install)` and `execute('bundle install')` don't behave identically!
20
21 `execute()` has a subtle behaviour. When calling `within './directory' { execute(:bundle, :install) }` for example, the first argument to `execute()` is a *Stringish* with ***no whitespace***. This allows the command to pass through the [SSHKit::CommandMap](https://github.com/capistrano/sshkit#the-command-map) which enables a number of powerful features.
22
23 When the first argument to `execute()` contains whitespace, for example `within './directory' { execute('bundle install') }` (or when using a heredoc), neither Capistrano, nor SSHKit can reliably predict how it should be shell escaped, and thus cannot perform any context, or command mapping, that means that the `within(){}` (as well as `with()`, `as()`, etc) have no effect. There have been a few attempts to resolve this, but we don't consider it a bug although we acknowledge that it might be a little counter intuitive.
0 ---
1 title: User Input
2 layout: default
3 ---
4
5 User input can be required in a task or during configuration:
6
7 ```ruby
8 # used in a configuration
9 ask(:database_name, "default_database_name")
10
11 # used in a task
12 desc "Ask about breakfast"
13 task :breakfast do
14 ask(:breakfast, "pancakes")
15 on roles(:all) do |h|
16 execute "echo \"$(whoami) wants #{fetch(:breakfast)} for breakfast!\""
17 end
18 end
19 ```
20
21 When using `ask` to get user input, you can pass `echo: false` to prevent the
22 input from being displayed. This option should be used to ask the user for
23 passwords and other sensitive data during a deploy run.
24
25 ```ruby
26 ask(:database_password, 'default_password', echo: false)
27 ```
28
29
30 The symbol passed as a parameter will be printed as text for the user and the
31 input will be saved to this variable:
32
33 ```ruby
34 ask(:database_encoding, 'UTF-8')
35 # Please enter :database_encoding (UTF-8):
36
37 fetch(:database_encoding)
38 # => contains the user input (or the default)
39 # once the above line got executed
40 ```
41
42
43 You can use `ask` to set a server- or role-specific configuration variable.
44
45 ```ruby
46 ask(:password, nil)
47 server 'example.com', user: 'ssh_user_name', port: 22, password: fetch(:password), roles: %w{web app db}
48 ```
49
50
51 You can also show your own message by using `prompt` option:
52
53 ```ruby
54 ask(:breakfast, "pancakes", prompt: "What's for breakfast?")
55 ```
56
57 **Important!** `ask` will not prompt the user immediately. The question is
58 deferred until the first time `fetch` is used to obtain the setting. That means
59 you can `ask` for many variables, but only the variables used by your task(s)
60 will actually prompt the user for input.
0 ---
1 title: Version Locking
2 layout: default
3 ---
4
5 Capistrano will, by default, include a `lock` command at the top of `deploy.rb`. This checks that the version of Capistrano running the configuration is the same as was intended to run it.
6
7 The reasoning for this is that, in a pre-Bundler world, or when Bundler is not being used, Capistrano could behave in an unexpected and unclear manner with an incompatible configuration. Even today, it is easy to run Capistrano without `bundle exec` or a binstub (`bin/cap`, obtained through `bundle binstub capistrano`), resulting in unexpected behavior.
8
9 The syntax for the lock is the same as that used by Bundler in a Gemfile (see the Implementation section below).
10
11 The simplest form is: `lock '3.9.0'`. This locks the configuration to the exact version given.
12
13 The most useful form uses the pessimistic operator: `~> 3.9.0`. This allows the version of the last segment to be increased, and all prior segments are locked. For example, if you used `lock '~> 3.9.2'`, version `3.9.3` would be allowed, but `3.9.1`, `3.10.0`, and `4.0.0` would not. Generally, you will want to lock to the `major.minor` revision. This means that the major version cannot increase, but the minor version can, which is consistent with semantic versioning (which Capistrano follows, [loosely](https://github.com/capistrano/capistrano/pull/1894/files)).
14
15 You can also use `>`, `<`, `<=`, `>=`, and `=` before the version, as in `lock '>= 3.9.0'`. These are useful if you want to lock to a specific set of rules.
16
17 For more complex usage, you can combine operators. For example, you can write `lock ['>= 3.9.0', '< 3.9.10']`, which would allow everything from 3.9.0 to 3.9.9, but not 3.9.10 or greater.
18
19 ## Implementation
20
21 The code reuses RubyGems core [version comparison logic](https://ruby-doc.org/stdlib-2.4.2/libdoc/rubygems/rdoc/Gem/Dependency.html#method-i-3D-7E). So anything you can do in RubyGems, you can do here.
0 ---
1 title: What is Harrow?
2 layout: default
3 ---
4
5 ### Harrow is a web-based platform for continuous integration and deployment built by the Capistrano team.
6
7 There are many continuous integration tools in the world already, Harrow is
8 ours. It is designed to "feel" familiar to Capistrano users.
9
10 ![Harrow, web-based Capistrano](/assets/images/capistrano-logo-harrow-logo-c-primary-darker-w640.png)
11
12 Although Harrow is designed to work well for Capistrano-style use-cases, it is
13 by no means limited to only being used for Capistrano, or even for deployment.
14
15 Some of the features which make Harrow ideal for automating tools such as
16 Capistrano:
17
18 * A discrete concept of scripts and environments, allowing reuse of scripts in
19 different settings using different configurations
20 * A pure JSON-HAL API allowing integrations and tools
21 * Powerful triggers and notifications allowing the construction of pipelines
22 starting with git changes
23
24 Harrow, much like Capistrano can also be used to:
25
26 * To automate common tasks in software teams
27 * To drive infrastructure provisioning tools such as *chef-solo*, *Ansible* or similar
28
29 Again, like Capistrano, Harrow is also *very* scriptable, and can be integrated
30 with any other software to form part of a larger tool.
31
32 #### How To Use Harrow
33
34 1. Sign up for a Harrow [account](https://www.app.harrow.io/#/a/signin)
35 2. Connect your Git repository using our setup wizard
36 3. Choose "Capistrano" as the project template
37
38 #### What does it cost, and how does that affect Capistrano
39
40 Harrow has very reasonable [pricing](https://harrow.io/pricing/). As a
41 comparison with other continuous integration tools, some of our customers have
42 cut their monthly outgoing by a factor of 5 or more.
43
44 For individual users, it's free to use forever. To work with collaborators in
45 your projects, paid plans start at just $29/mo.
46
47 Capistrano is unaffected by Harrow. Capistrano will remain liberally licensed
48 (currently MIT) and will include discrete hooks offering Harrow to users
49 without being intrusive.
0 ---
1 title: What is Capistrano?
2 layout: default
3 ---
4
5 ### Capistrano is a remote server automation tool.
6
7 It supports the scripting and execution of arbitrary tasks, and includes a set of sane-default deployment workflows.
8
9 Capistrano can be used to:
10
11 * Reliably deploy web application to any number of machines simultaneously,
12 in sequence or as a rolling set
13 * To automate audits of any number of machines (checking login logs,
14 enumerating uptimes, and/or applying security patches)
15 * To script arbitrary workflows over SSH
16 * To automate common tasks in software teams.
17 * To drive infrastructure provisioning tools such as *chef-solo*, *Ansible* or similar.
18
19 Capistrano is also *very* scriptable, and can be integrated with any other
20 Ruby software to form part of a larger tool.
21
22 #### What does it look like?
23
24 ![Capistrano 3.5 / Airbrussh formatter screenshot](/assets/images/airbrussh-screenshot.png)
25
26
27 #### What else is in the box?
28
29 There's lots of cool stuff in the Capistrano toy box:
30
31 * Interchangeable output formatters (progress, pretty, html, etc)
32 * Easy to add support for other source control management software.
33 * A rudimentary multi-console for running Capistrano interactively.
34 * Host and Role filters for partial deploys, or partial-cluster maintenance.
35 * Recipes for the Rails asset pipelines, and database migrations.
36 * Support for complex environments.
37 * A sane, expressive API:
38
39 ```ruby
40 desc "Show off the API"
41 task :ditty do
42
43 on roles(:all) do |host|
44 # Capture output from the remote host, and re-use it
45 # we can reflect on the `host` object passed to the block
46 # and use the `info` logger method to benefit from the
47 # output formatter that is selected.
48 uptime = capture('uptime')
49 if host.roles.include?(:web)
50 info "Your webserver #{host} has uptime: #{uptime}"
51 end
52 end
53
54 on roles(:app) do
55 # We can set environmental variables for the duration of a block
56 # and move the process into a directoy, executing arbitrary tasks
57 # such as letting Rails do some heavy lifting.
58 with({:rails_env => :production}) do
59 within('/var/www/my/rails/app') do
60 execute :rails, :runner, 'MyModel.something'
61 end
62 end
63 end
64
65 on roles(:db) do
66 # We can even switch users, provided we have support on the remote
67 # server for switching to that user without being prompted for a
68 # passphrase.
69 as 'postgres' do
70 widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
71 if widgets.to_i < 50
72 warn "There are fewer than 50 widgets in the database on #{host}!"
73 end
74 end
75 end
76
77 on roles(:all) do
78 # We can even use `test` the way the Unix gods intended
79 if test("[ -d /some/directory ]")
80 info "Phew, it's ok, the directory exists!"
81 end
82 end
83 end
84 ```
0 ---
1 title: Official Plugins
2 layout: default
3 ---
4
5 This is the list of official Capistrano Plugins.
6
7 <ul>
8 <li><a href="https://github.com/capistrano/bundler/">Bundler</a></li>
9 <li><a href="https://github.com/capistrano/composer/">Composer</a></li>
10 <li><a href="https://github.com/capistrano/drupal-deploy/">Drupal</a></li>
11 <li><a href="https://github.com/capistrano/laravel/">Laravel</a></li>
12 <li><a href="https://github.com/capistrano/npm/">npm</a></li>
13 <li><a href="https://github.com/capistrano/passenger/">Phusion Passenger</a></li>
14 <li><a href="https://github.com/capistrano/chruby/">chruby</a></li>
15 <li><a href="https://github.com/capistrano/rbenv/">rbenv</a></li>
16 <li><a href="https://github.com/capistrano/rvm/">RVM</a></li>
17 <li><a href="https://github.com/capistrano/rails/">Ruby on Rails</a></li>
18 <li><a href="https://github.com/capistrano/symfony/">Symfony</a></li>
19 </ul>
0 ---
1 title: Task Cookbook
2 layout: default
3 ---
4
5 These pages document common custom tasks for specific use cases. It is hoped that these will be copied and modified for your use case, and also provide a basis for understanding how to extend Capistrano for your own usage.
6
7 You can also look in most Capistrano repositories (including core) for rake tasks to see further example of how it works.
8
9 Feel free to contribute more via a Pull Request.
10
11 ### Pages
12
13 <!-- Also add to navigation.html -->
14 * [Rails related tasks](/documentation/tasks/rails/)
0 ---
1 title: Custom Rails Tasks
2 layout: default
3 ---
4
5 Many of these tasks probably require [Capistrano::Rails](https://github.com/capistrano/rails).
6
7 ### Run arbitrary rake tasks from environment variables
8
9 From [Capistrano/Rails PR #209](https://github.com/capistrano/rails/pull/209)
10
11 ```ruby
12 namespace :deploy do
13 desc 'Runs any rake task, cap deploy:rake task=db:rollback'
14 task rake: [:set_rails_env] do
15 on release_roles([:db]) do
16 within release_path do
17 with rails_env: fetch(:rails_env) do
18 execute :rake, ENV['task']
19 end
20 end
21 end
22 end
23 end
24 ```
25
26 Passes in the rake task to be run via an environment variable. Also a simple example of running a rake task on the server.
27
28 ```bash
29 bundle exec cap production deploy:rake task=db:seed
30 ```
31
32
33 ### Conditional migrations
34
35 Arising from [Capistrano/Rails issue #199](https://github.com/capistrano/rails/issues/199)
36
37 A frequent issue on deploy are slow migrations which involve downtime. In this case, you often want to run the migrations conditionally, where the main deploy doesn't run them, but you can do so manually at a better point. To do so, you could put the following in your `Capfile`:
38
39 ```ruby
40 require 'capistrano/rails/migrations' if ENV['RUN_MIGRATIONS']
41 ```
42
43 Now the migrations do not run by default, but they will run with the following command:
44
45 ```bash
46 RUN_MIGRATIONS=1 bundle exec cap production deploy:migrate
47 ```
0 ---
1 title: 3rd Party Plugins
2 layout: default
3 ---
4
5 Here are some Capistrano plugins you might find useful.
6 This list is neither complete nor audited in any way.
7
8 You can help us expanding this list by sending us a pull request on
9 <a href="https://github.com/capistrano/capistrano/pulls">GitHub</a>.
10
11 <div class="github-widget" data-repo="capistrano-plugins/capistrano-postgresql"></div>
12
13 <div class="github-widget" data-repo="capistrano-plugins/capistrano-unicorn-nginx"></div>
14
15 <div class="github-widget" data-repo="capistrano-plugins/capistrano-rbenv-install"></div>
16
17 <div class="github-widget" data-repo="capistrano-plugins/capistrano-safe-deploy-to"></div>
18
19 <div class="github-widget" data-repo="capistrano-plugins/capistrano-ssh-doctor"></div>
20
21 <div class="github-widget" data-repo="scottsuch/capistrano-graphite"></div>
22
23 <div class="github-widget" data-repo="dei79/capistrano-rails-collection"></div>
24
25 <div class="github-widget" data-repo="qhwa/capistrano-hostmenu"></div>
26
27 <div class="github-widget" data-repo="mattbrictson/airbrussh"></div>
28
29 <div class="github-widget" data-repo="capistrano-plugins/capistrano-faster-assets"></div>
30
31 <div class="github-widget" data-repo="ydkn/capistrano-rails-console"></div>
32
33 <div class="github-widget" data-repo="seuros/capistrano-sidekiq"></div>
34
35 <div class="github-widget" data-repo="sgruhier/capistrano-db-tasks"></div>
36
37 <div class="github-widget" data-repo="mydrive/capistrano-deploytags"></div>
38
39 <div class="github-widget" data-repo="a2ikm/capistrano-pending"></div>
40
41 <div class="github-widget" data-repo="seuros/capistrano-puma"></div>
42
43 <div class="github-widget" data-repo="sambauers/capistrano-committed"></div>
44
45 <div class="github-widget" data-repo="aidistan/capistrano-pm2"></div>
46
47 <div class="github-widget" data-repo="mgrachev/capistrano-hanami"></div>
48
49 <div class="github-widget" data-repo="dkdeploy/dkdeploy-core"></div>
50
51 <div class="github-widget" data-repo="dkdeploy/dkdeploy-php"></div>
52
53 <div class="github-widget" data-repo="dkdeploy/dkdeploy-typo3-cms"></div>
54
55 <div class="github-widget" data-repo="aeroastro/capistrano-lazy_cleanup"></div>
56
57 <div class="github-widget" data-repo="danieltoader/capistrano-teams"></div>
0 ---
1 title: "Upgrading from v2.x.x"
2 layout: default
3 ---
4
5 1.
6 Update your Gemfile: `gem 'capistrano', '~> 3.0', require: false, group: :development`
7
8
9 If you deploy Rails, you wil also need `capistrano-rails` and `capistrano-bundler` gems (Rails and Bundler integrations were moved out from Capistrano 3).
10
11 ```ruby
12 group :development do
13 gem 'capistrano-rails', '~> 1.1', require: false
14 gem 'capistrano-bundler', '~> 1.1', require: false
15 end
16 ```
17
18 You can add idiomatic support for your preferred ruby version manager: rvm, rbenv, chruby.
19
20 ```ruby
21 group :development do
22 gem 'capistrano-rvm', '~> 0.1', require: false
23 gem 'capistrano-rbenv', '~> 2.0', require: false
24 gem 'capistrano-chruby', github: 'capistrano/chruby', require: false
25 end
26 ```
27
28 2.
29 We recommend to capify the project from scratch and move definitions from old to new configs then.
30
31 ```bash
32 mkdir old_cap
33 mv Capfile old_cap
34 mv config/deploy.rb old_cap
35 mv config/deploy/ old_cap # --> only for multistage setups
36 ```
37
38 It's time to capify:
39
40 ```bash
41 cap install
42 ```
43
44 3.
45 Capistrano 3 is multistage by default, so you will have `config/deploy/production.rb` and `config/deploy/staging.rb` right after capifying.
46 If you need only one stage, remove these files and declare stage (for example `production`) and servers in `config/deploy.rb`.
47
48 4.
49 Update `config/deploy/production.rb` and `config/deploy/staging.rb` to have relevant data there. You may also want to add more stages from old configs (`old_cap/deploy/`).
50
51 5.
52 If you had a gateway server set doing `set :gateway, "www.capify.org"` you should upgrade to
53
54 ```ruby
55 require 'net/ssh/proxy/command'
56
57 set :ssh_options, proxy: Net::SSH::Proxy::Command.new('ssh mygateway.com -W %h:%p')
58 ```
59
60 Or the per-server `ssh_options` equivalent.
61
62 6.
63 Now you need to refactor your old `deploy.rb` (also `Capfile`, but in most of cases developers didn't change it in Capistrano 2.x). Move parameters (like `set :deploy_to, "/home/deploy/#{application}"` or `set :keep_releases, 4`) to `config/deploy.rb` and tasks to `Capfile`.
64
65 *Important: `repository` option was renamed to `repo_url`; `default_environment` option was renamed to `default_env`.*
66
67 Notice that some parameters are not necessary anymore: `use_sudo`, `normalize_asset_timestamps`.
68
69 7.
70 If you didn't use `deploy_to` before and deployed to `/u/apps/your_app_name`, you need one more change. Now default deploy path is `/var/www/app_name` and your config will be broken after upgrade. Just declare custom `deploy_to` option:
71
72 ```ruby
73 set :deploy_to, "/u/apps/#{fetch(:application)}"
74 ```
75
76 But in advance, `/u/apps` is not the best place to store apps and we advice you to change it later.
77
78 8.
79 Keep editing Capfile and uncomment addons you need, such as rbenv/rvm, bundler or rails.
80
81 ```ruby
82 require 'capistrano/rails'
83 require 'capistrano/bundler'
84 require 'capistrano/rbenv'
85 ```
86
87 9.
88 Yay! Try to deploy with your new config set. If you discover any missing info in this upgrade guide, you're welcome to contribute to it.
89
90 # General recommendations
91
92 #### Use DSL instead of writing ENV variables
93
94 Instead of:
95
96 ```ruby
97 run <<-CMD.compact
98 cd -- #{latest_release} &&
99 RAILS_ENV=#{rails_env.to_s.shellescape} #{asset_env} #{rake} assets:precompile
100 CMD
101 ```
102
103 It's better to use:
104
105 ```ruby
106 on roles :all do
107 within fetch(:latest_release_directory) do
108 with rails_env: fetch(:rails_env) do
109 execute :rake, 'assets:precompile'
110 end
111 end
112 end
113 ```
114
115 Note: 'within' blocks are required to be wrapped in an 'on' block for the dsl to recognize it
116
117 You may only have one 'with' block per call. If you need more than one env set, use the syntax in the 'with' block arg like this (pass it a map):
118
119 ```ruby
120 on roles :all do
121 within fetch(:latest_release_directory) do
122 with rails_env: fetch(:rails_env), rails_relative_url_root: '/home' do
123 execute :rake, 'assets:precompile', env: {rails_env: fetch(:rails_env), rails_relative_url_root: ''}
124 end
125 end
126 end
127 ```
128
129 # Notable differences between 2.x and 3
130
131 #### Cleanup
132
133 Capistrano 3 now runs the `deploy:cleanup` task as part of the standard deploy workflow and keeps 5 releases by default. Previously this was left for you to add manually, if required. To change the number of releases kept set the `keep_releases` configuration variable:
134
135 ```ruby
136 set :keep_releases, 10
137 ```
138
139 #### POSIX Shell
140
141 Capistrano 3 expects a POSIX shell like Bash or Sh. Shells like tcsh, csh, and such may work, but probably will not.
0 ---
1 layout: default
2 title: A remote server automation and deployment tool written in Ruby.
3 ---
4
5 ### A Simple Task
6
7 ```ruby
8 role :demo, %w{example.com example.org example.net}
9 task :uptime do
10 on roles(:demo), in: :parallel do |host|
11 uptime = capture(:uptime)
12 puts "#{host.hostname} reports: #{uptime}"
13 end
14 end
15 ```
16
17 Capistrano extends the *Rake* DSL with methods specific to running commands
18 `on()` servers.
19
20 ### For Any Language
21
22 Capistrano is written in Ruby, but it can easily be used to deploy any
23 language.
24
25 If your language or framework has special deployment requirements, Capistrano can easily be
26 extended to support them.
27
28 ### Source Code
29
30 <div class="github-widget" data-repo="capistrano/capistrano"></div>
00 module Capistrano
1 VERSION = "3.17.0".freeze
1 VERSION = "3.17.1".freeze
22 end
1111 def default_config
1212 <<-CONFIG
1313 set :deploy_to, '#{deploy_to}'
14 set :repo_url, 'git://github.com/capistrano/capistrano.git'
14 set :repo_url, 'https://github.com/capistrano/capistrano.git'
1515 set :branch, 'master'
1616 set :ssh_options, { keys: "\#{ENV['HOME']}/.vagrant.d/insecure_private_key", auth_methods: ['publickey'] }
1717 server 'vagrant@localhost:2220', roles: %w{web app}