Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add sass.

  • Loading branch information...
commit 6129f3aaa07aa491260020e14053833683fb9bb9 1 parent 1e3adc7
@mrsweaters mrsweaters authored
Showing with 16,451 additions and 0 deletions.
  1. BIN  .DS_Store
  2. +1 −0  .rbenv-version
  3. BIN  .sass-cache/02125f08be6ba81145149bfcb0e76bbc1b2aa272/_settings.scssc
  4. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_appearance.scssc
  5. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_background-clip.scssc
  6. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_background-origin.scssc
  7. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_background-size.scssc
  8. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_border-radius.scssc
  9. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_box-shadow.scssc
  10. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_box-sizing.scssc
  11. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_box.scssc
  12. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_columns.scssc
  13. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_filter.scssc
  14. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_font-face.scssc
  15. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_hyphenation.scssc
  16. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_images.scssc
  17. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_inline-block.scssc
  18. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_opacity.scssc
  19. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_regions.scssc
  20. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_shared.scssc
  21. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_text-shadow.scssc
  22. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_transform.scssc
  23. BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_transition.scssc
  24. BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_base.scssc
  25. BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_forms.scssc
  26. BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_globals.scssc
  27. BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_typography.scssc
  28. BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_all.scssc
  29. BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_clearfix.scssc
  30. BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_css-triangle.scssc
  31. BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_font-size.scssc
  32. BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_respond-to.scssc
  33. BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_semantic-grid.scssc
  34. BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_all.scssc
  35. BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_convert-number-to-word.scssc
  36. BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_grid-calc.scssc
  37. BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_modular-scale.sassc
  38. BIN  .sass-cache/5b5f32cc482ff080d5c7f5171d4a65909506756f/_grid.scssc
  39. BIN  .sass-cache/6a1bc3c1fd463c7174d47dc6c3e705b9a44bb7b0/_settings.scssc
  40. BIN  .sass-cache/6a1bc3c1fd463c7174d47dc6c3e705b9a44bb7b0/app.scssc
  41. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_all.scssc
  42. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_buttons.scssc
  43. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_navbar.scssc
  44. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_offcanvas.scssc
  45. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_orbit.scssc
  46. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_reveal.scssc
  47. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_tabs.scssc
  48. BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_ui.scssc
  49. BIN  .sass-cache/9bc513e987b17f896efb1034e93f2b840e76bd71/_hacks.scssc
  50. BIN  .sass-cache/a52d889acad034ce7675236bbcee5e403558de75/_css3.scssc
  51. BIN  .sass-cache/a52d889acad034ce7675236bbcee5e403558de75/_support.scssc
  52. BIN  .sass-cache/b449778ed0250329fec0569473b9f45cae7bd562/foundation.scssc
  53. +20 −0 MIT-LICENSE.txt
  54. +26 −0 config.rb
  55. +8 −0 humans.txt
  56. BIN  images/foundation/orbit/bullets.jpg
  57. BIN  images/foundation/orbit/left-arrow-small.png
  58. BIN  images/foundation/orbit/left-arrow.png
  59. BIN  images/foundation/orbit/loading.gif
  60. BIN  images/foundation/orbit/mask-black.png
  61. BIN  images/foundation/orbit/pause-black.png
  62. BIN  images/foundation/orbit/right-arrow-small.png
  63. BIN  images/foundation/orbit/right-arrow.png
  64. BIN  images/foundation/orbit/rotator-black.png
  65. BIN  images/foundation/orbit/timer-black.png
  66. +147 −0 index.html
  67. +21 −0 javascripts/app.js
  68. +11 −0 javascripts/foundation.min.js
  69. +15 −0 javascripts/foundation/jquery.foundation.accordion.js
  70. +19 −0 javascripts/foundation/jquery.foundation.alerts.js
  71. +45 −0 javascripts/foundation/jquery.foundation.buttons.js
  72. +485 −0 javascripts/foundation/jquery.foundation.forms.js
  73. +30 −0 javascripts/foundation/jquery.foundation.navigation.js
  74. +633 −0 javascripts/foundation/jquery.foundation.orbit.js
  75. +773 −0 javascripts/foundation/jquery.foundation.reveal.js
  76. +36 −0 javascripts/foundation/jquery.foundation.tabs.js
  77. +183 −0 javascripts/foundation/jquery.foundation.tooltips.js
  78. +157 −0 javascripts/foundation/jquery.placeholder.js
  79. +4 −0 javascripts/foundation/modernizr.foundation.js
  80. +9,404 −0 javascripts/jquery.js
  81. +23 −0 javascripts/jquery.min.js
  82. +4 −0 robots.txt
  83. +58 −0 sass/_settings.scss
  84. +46 −0 sass/app.scss
  85. +4,302 −0 stylesheets/app.css
View
BIN  .DS_Store
Binary file not shown
View
1  .rbenv-version
@@ -0,0 +1 @@
+1.9.3-p194
View
BIN  .sass-cache/02125f08be6ba81145149bfcb0e76bbc1b2aa272/_settings.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_appearance.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_background-clip.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_background-origin.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_background-size.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_border-radius.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_box-shadow.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_box-sizing.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_box.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_columns.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_filter.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_font-face.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_hyphenation.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_images.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_inline-block.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_opacity.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_regions.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_shared.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_text-shadow.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_transform.scssc
Binary file not shown
View
BIN  .sass-cache/048e714fec37d8987395c74882dd599687325b9d/_transition.scssc
Binary file not shown
View
BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_base.scssc
Binary file not shown
View
BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_forms.scssc
Binary file not shown
View
BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_globals.scssc
Binary file not shown
View
BIN  .sass-cache/06b113169d11a20b1dcdf8cc635256b2dab62d00/_typography.scssc
Binary file not shown
View
BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_all.scssc
Binary file not shown
View
BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_clearfix.scssc
Binary file not shown
View
BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_css-triangle.scssc
Binary file not shown
View
BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_font-size.scssc
Binary file not shown
View
BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_respond-to.scssc
Binary file not shown
View
BIN  .sass-cache/129abcf3aa58491c0024c8710463757aae8c987b/_semantic-grid.scssc
Binary file not shown
View
BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_all.scssc
Binary file not shown
View
BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_convert-number-to-word.scssc
Binary file not shown
View
BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_grid-calc.scssc
Binary file not shown
View
BIN  .sass-cache/176af598560dba1aa728c81cf33a892ee924f98e/_modular-scale.sassc
Binary file not shown
View
BIN  .sass-cache/5b5f32cc482ff080d5c7f5171d4a65909506756f/_grid.scssc
Binary file not shown
View
BIN  .sass-cache/6a1bc3c1fd463c7174d47dc6c3e705b9a44bb7b0/_settings.scssc
Binary file not shown
View
BIN  .sass-cache/6a1bc3c1fd463c7174d47dc6c3e705b9a44bb7b0/app.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_all.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_buttons.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_navbar.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_offcanvas.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_orbit.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_reveal.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_tabs.scssc
Binary file not shown
View
BIN  .sass-cache/789bebb8d305aef7c4ed83bccf9857e0d25b1cc5/_ui.scssc
Binary file not shown
View
BIN  .sass-cache/9bc513e987b17f896efb1034e93f2b840e76bd71/_hacks.scssc
Binary file not shown
View
BIN  .sass-cache/a52d889acad034ce7675236bbcee5e403558de75/_css3.scssc
Binary file not shown
View
BIN  .sass-cache/a52d889acad034ce7675236bbcee5e403558de75/_support.scssc
Binary file not shown
View
BIN  .sass-cache/b449778ed0250329fec0569473b9f45cae7bd562/foundation.scssc
Binary file not shown
View
20 MIT-LICENSE.txt
@@ -0,0 +1,20 @@
+Copyright (c) 2011 ZURB, http://www.zurb.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
26 config.rb
@@ -0,0 +1,26 @@
+require 'zurb-foundation'
+# Require any additional compass plugins here.
+
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = "stylesheets"
+sass_dir = "sass"
+images_dir = "images"
+javascripts_dir = "javascripts"
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+# line_comments = false
+
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
View
8 humans.txt
@@ -0,0 +1,8 @@
+/* Foundation was made by ZURB, an interaction design and design strategy firm in Campbell, CA */
+/* zurb.com */
+/* humanstxt.org */
+
+/* SITE */
+ Standards: HTML5, CSS3
+ Components: jQuery, Orbit, Reveal
+ Software: Coda, Textmate, Git
View
BIN  images/foundation/orbit/bullets.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/left-arrow-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/left-arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/loading.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/mask-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/pause-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/right-arrow-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/right-arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/rotator-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/foundation/orbit/timer-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
147 index.html
@@ -0,0 +1,147 @@
+<!DOCTYPE html>
+
+<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
+<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
+<head>
+ <meta charset="utf-8" />
+
+ <!-- Set the viewport width to device width for mobile -->
+ <meta name="viewport" content="width=device-width" />
+
+ <title>Welcome to Foundation</title>
+
+ <!-- Included CSS Files -->
+ <link rel="stylesheet" href="stylesheets/app.css">
+
+ <script src="javascripts/foundation/modernizr.foundation.js"></script>
+
+ <!-- IE Fix for HTML5 Tags -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+</head>
+<body>
+
+ <div class="row">
+ <div class="twelve columns">
+ <h2>Welcome to Foundation</h2>
+ <p>This is version 3.0.6 released on July 20, 2012</p>
+ <hr />
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="eight columns">
+ <h3>The Grid</h3>
+
+ <!-- Grid Example -->
+ <div class="row">
+ <div class="twelve columns">
+ <div class="panel">
+ <p>This is a twelve column section in a row. Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.</p>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="six columns">
+ <div class="panel">
+ <p>Six columns</p>
+ </div>
+ </div>
+ <div class="six columns">
+ <div class="panel">
+ <p>Six columns</p>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="four columns">
+ <div class="panel">
+ <p>Four columns</p>
+ </div>
+ </div>
+ <div class="four columns">
+ <div class="panel">
+ <p>Four columns</p>
+ </div>
+ </div>
+ <div class="four columns">
+ <div class="panel">
+ <p>Four columns</p>
+ </div>
+ </div>
+ </div>
+
+ <h3>Tabs</h3>
+ <dl class="tabs">
+ <dd class="active"><a href="#simple1">Simple Tab 1</a></dd>
+ <dd><a href="#simple2">Simple Tab 2</a></dd>
+ <dd><a href="#simple3">Simple Tab 3</a></dd>
+ </dl>
+
+ <ul class="tabs-content">
+ <li class="active" id="simple1Tab">This is simple tab 1's content. Pretty neat, huh?</li>
+ <li id="simple2Tab">This is simple tab 2's content. Now you see it!</li>
+ <li id="simple3Tab">This is simple tab 3's content. It's, you know...okay.</li>
+ </ul>
+
+ <h3>Buttons</h3>
+
+ <div class="row">
+ <div class="six columns">
+ <p><a href="#" class="small button">Small Button</a></p>
+ <p><a href="#" class="button">Medium Button</a></p>
+ <p><a href="#" class="large button">Large Button</a></p>
+ </div>
+ <div class="six columns">
+ <p><a href="#" class="small alert button">Small Alert Button</a></p>
+ <p><a href="#" class="success button">Medium Success Button</a></p>
+ <p><a href="#" class="large secondary button">Large Secondary Button</a></p>
+ </div>
+ </div>
+ </div>
+
+ <div class="four columns">
+ <h4>Getting Started</h4>
+ <p>We're stoked you want to try Foundation! To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.</p>
+
+ <h4>Other Resources</h4>
+ <p>Once you've exhausted the fun in this document, you should check out:</p>
+ <ul class="disc">
+ <li><a href="http://foundation.zurb.com/docs">Foundation Documentation</a><br />Everything you need to know about using the framework.</li>
+ <li><a href="http://github.com/zurb/foundation">Foundation on Github</a><br />Latest code, issue reports, feature requests and more.</li>
+ <li><a href="http://twitter.com/foundationzurb">@foundationzurb</a><br />Ping us on Twitter if you have questions. If you build something with this we'd love to see it (and send you a totally boss sticker).</li>
+ </ul>
+ </div>
+ </div>
+
+ <!-- Included JS Files (Uncompressed) -->
+ <!--
+ <script src="jquery.js"></script>
+ <script src="javascripts/foundation/modernizr.foundation.js"></script>
+ <script src="javascripts/foundation/jquery.placeholder.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.alerts.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.accordion.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.buttons.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.tooltips.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.forms.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.tabs.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.navigation.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.reveal.js"></script>
+ <script src="javascripts/foundation/jquery.foundation.orbit.js"></script>
+ -->
+
+ <!-- Included JS Files (Compressed) -->
+ <script src="javascripts/jquery.min.js"></script>
+ <script src="javascripts/foundation.min.js"></script>
+
+ <!-- Application Javascript, safe to override -->
+ <script src="javascripts/app.js"></script>
+
+
+</body>
+</html>
View
21 javascripts/app.js
@@ -0,0 +1,21 @@
+(function ($) {
+
+ $(function(){
+ $(document).foundationAlerts();
+ $(document).foundationButtons();
+ $(document).foundationAccordion();
+ $(document).foundationNavigation();
+ $(document).foundationCustomForms();
+ $(document).foundationTabs({callback:$.foundation.customForms.appendCustomMarkup});
+
+ $(document).tooltips();
+ $('input, textarea').placeholder();
+
+ // UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids
+ // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
+ // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
+ // $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
+ // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
+ });
+
+})(jQuery);
View
11 javascripts/foundation.min.js
@@ -0,0 +1,11 @@
+window.Modernizr=function(af,ae,ad){function F(b){W.cssText=b}function E(d,c){return F(T.join(d+";")+(c||""))}function D(d,c){return typeof d===c}function Q(d,c){return !!~(""+d).indexOf(c)}function O(g,c,j){for(var i in g){var h=c[g[i]];if(h!==ad){return j===!1?g[i]:D(h,"function")?h.bind(j||c):h}}return !1}var ac="2.6.0",ab={},aa=!0,Z=ae.documentElement,Y="modernizr",X=ae.createElement(Y),W=X.style,V,U={}.toString,T=" -webkit- -moz- -o- -ms- ".split(" "),S={svg:"http://www.w3.org/2000/svg"},R={},P={},N={},M=[],K=M.slice,J,I=function(t,s,r,q){var p,o,n,h=ae.createElement("div"),g=ae.body,b=g?g:ae.createElement("body");if(parseInt(r,10)){while(r--){n=ae.createElement("div"),n.id=q?q[r]:Y+(r+1),h.appendChild(n)}}return p=["&#173;",'<style id="s',Y,'">',t,"</style>"].join(""),h.id=Y,(g?h:b).innerHTML+=p,b.appendChild(h),g||(b.style.background="",Z.appendChild(b)),o=s(h,t),g?h.parentNode.removeChild(h):b.parentNode.removeChild(b),!!o},H={}.hasOwnProperty,G;!D(H,"undefined")&&!D(H.call,"undefined")?G=function(d,c){return H.call(d,c)}:G=function(d,c){return c in d&&D(d.constructor.prototype[c],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var h=this;if(typeof h!="function"){throw new TypeError}var g=K.call(arguments,1),f=function(){if(this instanceof f){var b=function(){};b.prototype=h.prototype;var d=new b,c=h.apply(d,g.concat(K.call(arguments)));return Object(c)===c?c:d}return h.apply(a,g.concat(K.call(arguments)))};return f}),R.touch=function(){var a;return"ontouchstart" in af||af.DocumentTouch&&ae instanceof DocumentTouch?a=!0:I(["@media (",T.join("touch-enabled),("),Y,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(b){a=b.offsetTop===9}),a},R.svg=function(){return !!ae.createElementNS&&!!ae.createElementNS(S.svg,"svg").createSVGRect},R.inlinesvg=function(){var b=ae.createElement("div");return b.innerHTML="<svg/>",(b.firstChild&&b.firstChild.namespaceURI)==S.svg},R.svgclippaths=function(){return !!ae.createElementNS&&/SVGClipPath/.test(U.call(ae.createElementNS(S.svg,"clipPath")))};for(var L in R){G(R,L)&&(J=L.toLowerCase(),ab[J]=R[L](),M.push((ab[J]?"":"no-")+J))}return ab.addTest=function(e,c){if(typeof e=="object"){for(var f in e){G(e,f)&&ab.addTest(f,e[f])}}else{e=e.toLowerCase();if(ab[e]!==ad){return ab}c=typeof c=="function"?c():c,aa&&(Z.className+=" "+(c?"":"no-")+e),ab[e]=c}return ab},F(""),X=V=null,function(am,al){function z(f,e){var h=f.createElement("p"),g=f.getElementsByTagName("head")[0]||f.documentElement;return h.innerHTML="x<style>"+e+"</style>",g.insertBefore(h.lastChild,g.firstChild)}function y(){var b=s.elements;return typeof b=="string"?b.split(" "):b}function x(d){var c=B[d[ag]];return c||(c={},C++,d[ag]=C,B[C]=c),c}function w(b,h,e){h||(h=al);if(A){return h.createElement(b)}e||(e=x(h));var d;return e.cache[b]?d=e.cache[b].cloneNode():ai.test(b)?d=(e.cache[b]=e.createElem(b)).cloneNode():d=e.createElem(b),d.canHaveChildren&&!aj.test(b)?e.frag.appendChild(d):d}function v(b,l){b||(b=al);if(A){return b.createDocumentFragment()}l=l||x(b);var k=l.frag.cloneNode(),j=0,i=y(),h=i.length;for(;j<h;j++){k.createElement(i[j])}return k}function u(d,c){c.cache||(c.cache={},c.createElem=d.createElement,c.createFrag=d.createDocumentFragment,c.frag=c.createFrag()),d.createElement=function(a){return s.shivMethods?w(a,d,c):c.createElem(a)},d.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+y().join().replace(/\w+/g,function(b){return c.createElem(b),c.frag.createElement(b),'c("'+b+'")'})+");return n}")(s,c.frag)}function t(b){b||(b=al);var d=x(b);return s.shivCSS&&!ah&&!d.hasCSS&&(d.hasCSS=!!z(b,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),A||u(b,d),b}var ak=am.html5||{},aj=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,ai=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,ah,ag="_html5shiv",C=0,B={},A;(function(){try{var b=al.createElement("a");b.innerHTML="<xyz></xyz>",ah="hidden" in b,A=b.childNodes.length==1||function(){al.createElement("a");var c=al.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()}catch(d){ah=!0,A=!0}})();var s={elements:ak.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:ak.shivCSS!==!1,supportsUnknownElements:A,shivMethods:ak.shivMethods!==!1,type:"default",shivDocument:t,createElement:w,createDocumentFragment:v};am.html5=s,t(al)}(this,ae),ab._version=ac,ab._prefixes=T,ab.testStyles=I,Z.className=Z.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(aa?" js "+M.join(" "):""),ab}(this,this.document),function(ad,ac,ab){function aa(b){return P.call(b)=="[object Function]"}function Z(b){return typeof b=="string"}function Y(){}function X(b){return !b||b=="loaded"||b=="complete"||b=="uninitialized"}function W(){var b=O.shift();M=1,b?b.t?R(function(){(b.t=="c"?L.injectCss:L.injectJs)(b.s,0,b.a,b.x,b.e,1)},0):(b(),W()):M=0}function V(w,v,t,s,q,p,n){function m(a){if(!g&&X(h.readyState)&&(x.r=g=1,!M&&W(),h.onload=h.onreadystatechange=null,a)){w!="img"&&R(function(){I.removeChild(h)},50);for(var c in D[v]){D[v].hasOwnProperty(c)&&D[v][c].onload()}}}var n=n||L.errorTimeout,h={},g=0,b=0,x={t:t,s:v,e:q,a:p,x:n};D[v]===1&&(b=1,D[v]=[],h=ac.createElement(w)),w=="object"?h.data=v:(h.src=v,h.type=w),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){m.call(this,b)},O.splice(s,0,x),w!="img"&&(b||D[v]===2?(I.insertBefore(h,J?null:Q),R(m,n)):D[v].push(h))}function U(g,e,j,i,h){return M=0,e=e||"j",Z(g)?V(e=="c"?G:H,g,e,this.i++,j,i,h):(O.splice(this.i++,0,g),O.length==1&&W()),this}function T(){var b=L;return b.loader={load:U,i:0},b}var S=ac.documentElement,R=ad.setTimeout,Q=ac.getElementsByTagName("script")[0],P={}.toString,O=[],M=0,K="MozAppearance" in S.style,J=K&&!!ac.createRange().compareNode,I=J?S:Q.parentNode,S=ad.opera&&P.call(ad.opera)=="[object Opera]",S=!!ac.attachEvent&&!S,H=K?"object":S?"script":"img",G=S?"script":H,F=Array.isArray||function(b){return P.call(b)=="[object Array]"},E=[],D={},C={timeout:function(d,c){return c.length&&(d.timeout=c[0]),d}},N,L;L=function(f){function d(j){var j=j.split("!"),i=E.length,q=j.pop(),p=j.length,q={url:q,origUrl:q,prefixes:j},o,m,l;for(m=0;m<p;m++){l=j[m].split("="),(o=C[l.shift()])&&(q=o(q,l))}for(m=0;m<i;m++){q=E[m](q)}return q}function n(m,s,r,q,p){var o=d(m),b=o.autoCallback;o.url.split(".").pop().split("?").shift(),o.bypass||(s&&(s=aa(s)?s:s[m]||s[q]||s[m.split("/").pop().split("?")[0]]||W),o.instead?o.instead(m,s,r,q,p):(D[o.url]?o.noexec=!0:D[o.url]=1,r.load(o.url,o.forceCSS||!o.forceJS&&"css"==o.url.split(".").pop().split("?").shift()?"c":ab,o.noexec,o.attrs,o.timeout),(aa(s)||aa(b))&&r.load(function(){T(),s&&s(o.origUrl,p,q),b&&b(o.origUrl,p,q),D[o.url]=2})))}function k(w,v){function u(b,i){if(b){if(Z(b)){i||(r=function(){var j=[].slice.call(arguments);q.apply(this,j),p()}),n(b,r,v,0,t)}else{if(Object(b)===b){for(g in o=function(){var a=0,j;for(j in b){b.hasOwnProperty(j)&&a++}return a}(),b){b.hasOwnProperty(g)&&(!i&&!--o&&(aa(r)?r=function(){var j=[].slice.call(arguments);q.apply(this,j),p()}:r[g]=function(j){return function(){var a=[].slice.call(arguments);j&&j.apply(this,a),p()}}(q[g])),n(b[g],r,v,g,t))}}}}else{!i&&p()}}var t=!!w.test,s=w.load||w.both,r=w.callback||Y,q=r,p=w.complete||Y,o,g;u(t?w.yep:w.nope,!!s),s&&u(s)}var h,e,c=this.yepnope.loader;if(Z(f)){n(f,0,c,0)}else{if(F(f)){for(h=0;h<f.length;h++){e=f[h],Z(e)?n(e,0,c,0):F(e)?L(e):Object(e)===e&&k(e,c)}}else{Object(f)===f&&k(f,c)}}},L.addPrefix=function(d,c){C[d]=c},L.addFilter=function(b){E.push(b)},L.errorTimeout=10000,ac.readyState==null&&ac.addEventListener&&(ac.readyState="loading",ac.addEventListener("DOMContentLoaded",N=function(){ac.removeEventListener("DOMContentLoaded",N,0),ac.readyState="complete"},0)),ad.yepnope=T(),ad.yepnope.executeStack=W,ad.yepnope.injectJs=function(r,q,p,n,m,h){var g=ac.createElement("script"),f,b,n=n||L.errorTimeout;g.src=r;for(b in p){g.setAttribute(b,p[b])}q=h?W:q||Y,g.onreadystatechange=g.onload=function(){!f&&X(g.readyState)&&(f=1,q(),g.onload=g.onreadystatechange=null)},R(function(){f||(f=1,q(1))},n),m?g.onload():Q.parentNode.insertBefore(g,Q)},ad.yepnope.injectCss=function(b,n,m,l,k,h){var l=ac.createElement("link"),f,n=h?W:n||Y;l.href=b,l.rel="stylesheet",l.type="text/css";for(f in m){l.setAttribute(f,m[f])}k||(Q.parentNode.insertBefore(l,Q),R(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return !window.addEventListener&&document.documentMode&&document.documentMode===7});
+/*! http://mths.be/placeholder v2.0.7 by @mathias */
+(function(g,i,d){var a="placeholder" in i.createElement("input"),e="placeholder" in i.createElement("textarea"),j=d.fn,c=d.valHooks,l,k;if(a&&e){k=j.placeholder=function(){return this};k.input=k.textarea=true}else{k=j.placeholder=function(){var m=this;m.filter((a?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":b,"blur.placeholder":f}).data("placeholder-enabled",true).trigger("blur.placeholder");return m};k.input=a;k.textarea=e;l={get:function(n){var m=d(n);return m.data("placeholder-enabled")&&m.hasClass("placeholder")?"":n.value},set:function(n,o){var m=d(n);if(!m.data("placeholder-enabled")){return n.value=o}if(o==""){n.value=o;if(n!=i.activeElement){f.call(n)}}else{if(m.hasClass("placeholder")){b.call(n,true,o)||(n.value=o)}else{n.value=o}}return m}};a||(c.input=l);e||(c.textarea=l);d(function(){d(i).delegate("form","submit.placeholder",function(){var m=d(".placeholder",this).each(b);setTimeout(function(){m.each(f)},10)})});d(g).bind("beforeunload.placeholder",function(){d(".placeholder").each(function(){this.value=""})})}function h(n){var m={},o=/^jQuery\d+$/;d.each(n.attributes,function(q,p){if(p.specified&&!o.test(p.name)){m[p.name]=p.value}});return m}function b(n,o){var m=this,p=d(m);if(m.value==p.attr("placeholder")&&p.hasClass("placeholder")){if(p.data("placeholder-password")){p=p.hide().next().show().attr("id",p.removeAttr("id").data("placeholder-id"));if(n===true){return p[0].value=o}p.focus()}else{m.value="";p.removeClass("placeholder");m==i.activeElement&&m.select()}}}function f(){var r,m=this,q=d(m),n=q,p=this.id;if(m.value==""){if(m.type=="password"){if(!q.data("placeholder-textinput")){try{r=q.clone().attr({type:"text"})}catch(o){r=d("<input>").attr(d.extend(h(this),{type:"text"}))}r.removeAttr("name").data({"placeholder-password":true,"placeholder-id":p}).bind("focus.placeholder",b);q.data({"placeholder-textinput":r,"placeholder-id":p}).before(r)}q=q.removeAttr("id").hide().prev().attr("id",p).show()}q.addClass("placeholder");q[0].value=q.attr("placeholder")}else{q.removeClass("placeholder")}}}(this,document,jQuery));(function(a){a.fn.foundationAlerts=function(b){var c=a.extend({callback:a.noop},b);a(".alert-box",this).delegate("a.close","click",function(d){d.preventDefault();a(this).closest(".alert-box").fadeOut(function(e){a(this).remove();c.callback()})})}})(jQuery);(function(a){a.fn.foundationAccordion=function(b){a(".accordion li",this).on("click.fndtn",function(){var c=a(this).children(".content").first();a(".accordion .content").not(c).hide().parent("li").removeClass("active");c.show(0,function(){c.parent("li").addClass("active")})})}})(jQuery);(function(a){a.fn.foundationButtons=function(d){a(".button.disabled",this).on("click.fndtn",function(g){g.preventDefault()});a(".button.dropdown > ul",this).addClass("no-hover");a(".button.dropdown",this).on("click.fndtn",function(g){g.stopPropagation()});a(".button.dropdown.split span",this).on("click.fndtn",function(g){g.preventDefault();a(".button.dropdown",this).not(a(this).parent()).children("ul").removeClass("show-dropdown");a(this).siblings("ul").toggleClass("show-dropdown")});a(".button.dropdown",this).not(".split").on("click.fndtn",function(g){a(".button.dropdown",this).not(this).children("ul").removeClass("show-dropdown");a(this).children("ul").toggleClass("show-dropdown")});a("body, html").on("click.fndtn",function(){a(".button.dropdown ul").removeClass("show-dropdown")});var b=a(".button.dropdown:not(.large):not(.small):not(.tiny)",this).outerHeight()-1,f=a(".button.large.dropdown",this).outerHeight()-1,e=a(".button.small.dropdown",this).outerHeight()-1,c=a(".button.tiny.dropdown",this).outerHeight()-1;a(".button.dropdown:not(.large):not(.small):not(.tiny) > ul",this).css("top",b);a(".button.dropdown.large > ul",this).css("top",f);a(".button.dropdown.small > ul",this).css("top",e);a(".button.dropdown.tiny > ul",this).css("top",c);a(".button.dropdown.up:not(.large):not(.small):not(.tiny) > ul",this).css("top","auto").css("bottom",b-2);a(".button.dropdown.up.large > ul",this).css("top","auto").css("bottom",f-2);a(".button.dropdown.up.small > ul",this).css("top","auto").css("bottom",e-2);a(".button.dropdown.up.tiny > ul",this).css("top","auto").css("bottom",c-2)}})(jQuery);(function(c){var b={bodyHeight:0,targetClass:".has-tip",tooltipClass:".tooltip",tipTemplate:function(d,e){return'<span data-selector="'+d+'" class="'+b.tooltipClass.substring(1)+'">'+e+'<span class="nub"></span></span>'}},a={init:function(d){return this.each(function(){var e=c("body");if(Modernizr.touch){e.on("click.tooltip touchstart.tooltip touchend.tooltip",b.targetClass,function(f){f.preventDefault();c(b.tooltipClass).hide();a.showOrCreateTip(c(this))});e.on("click.tooltip touchstart.tooltip touchend.tooltip",b.tooltipClass,function(f){f.preventDefault();c(this).fadeOut(150)})}else{e.on("mouseover.tooltip mouseout.tooltip",b.targetClass,function(g){var f=c(this);if(g.type==="mouseover"){a.showOrCreateTip(f)}else{if(g.type==="mouseout"){a.hide(f)}}})}})},showOrCreateTip:function(d){var e=a.getTip(d);if(e&&e.length>0){a.show(d)}else{a.create(d)}},getTip:function(e){var d=a.selector(e),f=null;if(d){f=c("span[data-selector="+d+"]"+b.tooltipClass)}return(f.length>0)?f:false},selector:function(d){var f=d.attr("id"),e=d.data("selector");if(f===undefined&&e===undefined){e="tooltip"+Math.random().toString(36).substring(7);d.attr("data-selector",e)}return(f)?f:e},create:function(d){var f=c(b.tipTemplate(a.selector(d),c("<div>").text(d.attr("title")).html())),e=a.inheritable_classes(d);f.addClass(e).appendTo("body");if(Modernizr.touch){f.append('<span class="tap-to-close">tap to close </span>')}d.removeAttr("title");a.show(d)},reposition:function(h,k,f){var d,l,j,g,e,i;k.css("visibility","hidden").show();d=h.data("width");l=k.children(".nub");j=l.outerHeight();g=l.outerWidth();i=function(r,q,n,m,p,o){return r.css({top:q,bottom:m,left:p,right:n,width:(o)?o:"auto"}).end()};i(k,(h.offset().top+h.outerHeight()+10),"auto","auto",h.offset().left,d);i(l,-j,"auto","auto",10);if(c(window).width()<767){e=h.closest(".columns");if(e.length<0){e=c("body")}k.width(e.outerWidth()-25).css("left",15).addClass("tip-override");i(l,-j,"auto","auto",h.offset().left)}else{if(f.indexOf("tip-top")>-1){i(k,(h.offset().top-k.outerHeight()-j),"auto","auto",h.offset().left,d).removeClass("tip-override");i(l,"auto","auto",-j,"auto")}else{if(f.indexOf("tip-left")>-1){i(k,(h.offset().top+(h.outerHeight()/2)-j),"auto","auto",(h.offset().left-k.outerWidth()-10),d).removeClass("tip-override");i(l,(k.outerHeight()/2)-(j/2),-j,"auto","auto")}else{if(f.indexOf("tip-right")>-1){i(k,(h.offset().top+(h.outerHeight()/2)-j),"auto","auto",(h.offset().left+h.outerWidth()+10),d).removeClass("tip-override");i(l,(k.outerHeight()/2)-(j/2),"auto","auto",-j)}}}}k.css("visibility","visible").hide()},inheritable_classes:function(f){var e=["tip-top","tip-left","tip-bottom","tip-right","noradius"],d=f.attr("class").split(" ").map(function(h,g){if(c.inArray(h,e)!==-1){return h}}).join(" ");return c.trim(d)},show:function(d){var e=a.getTip(d);a.reposition(d,e,d.attr("class"));e.fadeIn(150)},hide:function(d){var e=a.getTip(d);e.fadeOut(150)},reload:function(){var d=c(this);return(d.data("tooltips"))?d.tooltips("destroy").tooltips("init"):d.tooltips("init")},destroy:function(){return this.each(function(){c(window).off(".tooltip");c(b.targetClass).off(".tooltip");c(b.tooltipClass).each(function(d){c(c(b.targetClass).get(d)).attr("title",c(this).text())}).remove()})}};c.fn.tooltips=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{c.error("Method "+d+" does not exist on jQuery.tooltips")}}}}(jQuery));(function(d){var c=function(){var f=[],g=null;return{adjust:function(i){var h=this;h.hidden=i.parents().andSelf().filter(":hidden");h.hidden.each(function(){var j=d(this);h.tmp.push(j.attr("style"));j.css({visibility:"hidden",display:"block"})})},reset:function(){var h=this;h.hidden.each(function(k){var j=d(this),l=h.tmp[k];if(l===undefined){j.removeAttr("style")}else{j.attr("style",l)}});h.tmp=[];h.hidden=null}}};jQuery.foundation=jQuery.foundation||{};jQuery.foundation.customForms=jQuery.foundation.customForms||{};d.foundation.customForms.appendCustomMarkup=function(h){var i={disable_class:"js-disable-custom"};h=d.extend(i,h);function g(j,m){var n=d(m).hide(),l=n.attr("type"),k=n.next("span.custom."+l);if(k.length===0){k=d('<span class="custom '+l+'"></span>').insertAfter(n)}k.toggleClass("checked",n.is(":checked"));k.toggleClass("disabled",n.is(":disabled"))}function f(u,l){var x=c();var q=d(l),p=q.next("div.custom.dropdown"),r=p.find("ul"),s=p.find(".current"),w=p.find(".selector"),o=q.find("option"),m=o.filter(":selected"),v=0,t="",k;var j=false;if(q.hasClass("no-custom")){return}if(p.length===0){var n=q.hasClass("small")?"small":q.hasClass("medium")?"medium":q.hasClass("large")?"large":q.hasClass("expand")?"expand":"";p=d('<div class="'+["custom","dropdown",n].join(" ")+'"><a href="#" class="selector"></a><ul /></div>"');w=p.find(".selector");r=p.find("ul");t=d.map(o,function(y){return"<li>"+y.value+"</li>"}).join("");r.append(t);j=p.prepend('<a href="#" class="current">'+m.html()+"</a>").find(".current");q.after(p).hide()}else{t=d.map(o,function(y){return"<li>"+y.value+"</li>"}).join("");r.html("").append(t)}p.toggleClass("disabled",q.is(":disabled"));k=r.find("li");o.each(function(y){if(this.selected){k.eq(y).addClass("selected");if(j){j.html(this.value)}}});r.css("width","inherit");p.css("width","inherit");if(!p.is(".small, .medium, .large, .expand")){p.addClass("open");x.adjust(r);v=(k.outerWidth()>v)?k.outerWidth():v;x.reset();p.removeClass("open");p.width(v+18);r.width(v+16)}}d("form.custom input:radio[data-customforms!=disabled]").each(g);d("form.custom input:checkbox[data-customforms!=disabled]").each(g);d("form.custom select[data-customforms!=disabled]").each(f)};var b=function(f){var g=0,h=f.next();$options=f.find("option");h.find("ul").html("");$options.each(function(){$li=d("<li>"+d(this).html()+"</li>");h.find("ul").append($li)});$options.each(function(i){if(this.selected){h.find("li").eq(i).addClass("selected");h.find(".current").html(d(this).html())}});h.removeAttr("style").find("ul").removeAttr("style");h.find("li").each(function(){h.addClass("open");if(d(this).outerWidth()>g){g=d(this).outerWidth()}h.removeClass("open")});h.css("width",g+18+"px");h.find("ul").css("width",g+16+"px")};var a=function(f){var h=f.prev(),g=h[0];if(false==h.is(":disabled")){g.checked=((g.checked)?false:true);f.toggleClass("checked");h.trigger("change")}};var e=function(f){var h=f.prev(),g=h[0];if(false==h.is(":disabled")){d('input:radio[name="'+h.attr("name")+'"]').each(function(){d(this).next().removeClass("checked")});g.checked=((g.checked)?false:true);f.toggleClass("checked");h.trigger("change")}};d("form.custom span.custom.checkbox").on("click",function(f){f.preventDefault();f.stopPropagation();a(d(this))});d("form.custom span.custom.radio").on("click",function(f){f.preventDefault();f.stopPropagation();e(d(this))});d("form.custom select").on("change",function(f){b(d(this))});d("form.custom label").on("click",function(g){var f=d("#"+d(this).attr("for")),i,h;if(f.length!==0){if(f.attr("type")==="checkbox"){g.preventDefault();i=d(this).find("span.custom.checkbox");a(i)}else{if(f.attr("type")==="radio"){g.preventDefault();h=d(this).find("span.custom.radio");e(h)}}}});d("form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector").live("click",function(g){var i=d(this),h=i.closest("div.custom.dropdown"),f=h.prev();g.preventDefault();d("div.dropdown").removeClass("open");if(false==f.is(":disabled")){h.toggleClass("open");if(h.hasClass("open")){d(document).bind("click.customdropdown",function(j){h.removeClass("open");d(document).unbind(".customdropdown")})}else{d(document).unbind(".customdropdown")}return false}});d("form.custom div.custom.dropdown li").live("click",function(i){var j=d(this),g=j.closest("div.custom.dropdown"),h=g.prev(),f=0;i.preventDefault();i.stopPropagation();d("div.dropdown").removeClass("open");j.closest("ul").find("li").removeClass("selected");j.addClass("selected");g.removeClass("open").find("a.current").html(j.html());j.closest("ul").find("li").each(function(k){if(j[0]==this){f=k}});h[0].selectedIndex=f;h.trigger("change")});d.fn.foundationCustomForms=d.foundation.customForms.appendCustomMarkup})(jQuery);(function(a){a.fn.foundationTabs=function(b){var d=a.extend({callback:a.noop},b);var c=function(g){var f=g.closest("dl").find("dd.active"),e=g.children("a").attr("href")+"Tab";e=e.replace(/^.+#/,"#");f.removeClass("active");g.addClass("active");a(e).closest(".tabs-content").children("li").removeClass("active").hide();a(e).css("display","block").addClass("active")};a("dl.tabs dd a",this).on("click.fndtn",function(e){c(a(this).parent("dd"))});if(window.location.hash){c(a('a[href="'+window.location.hash+'"]').parent("dd"));d.callback()}}})(jQuery);(function(a){a.fn.foundationNavigation=function(c){var b=false;if(Modernizr.touch||navigator.userAgent.match(/Windows Phone/i)){a(".nav-bar a.flyout-toggle",this).on("click.fndtn touchstart.fndtn",function(f){f.preventDefault();var d=a(this).siblings(".flyout").first();if(b===false){a(".nav-bar .flyout").not(d).slideUp(500);d.slideToggle(500,function(){b=false})}b=true});a(".nav-bar>li.has-flyout",this).addClass("is-touch")}else{a(".nav-bar>li.has-flyout",this).hover(function(){a(this).children(".flyout").show()},function(){a(this).children(".flyout").hide()})}}})(jQuery);(function(b){var a=false;b("a[data-reveal-id]").live("click",function(d){d.preventDefault();var c=b(this).attr("data-reveal-id");b("#"+c).reveal(b(this).data())});b.fn.reveal=function(c){var e=b(document),d={animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:true,dismissModalClass:"close-reveal-modal",open:b.noop,opened:b.noop,close:b.noop,closed:b.noop};c=b.extend({},d,c);return this.each(function(){var q=b(this),i=parseInt(q.css("top"),10),l=q.height()+i,k=false,g=b(".reveal-modal-bg"),j={open:{top:0,opacity:0,visibility:"visible",display:"block"},close:{top:i,opacity:1,visibility:"hidden",display:"none"}},f;if(g.length===0){g=b("<div />",{"class":"reveal-modal-bg"}).insertAfter(q);g.fadeTo("fast",0.8)}function m(){k=false}function r(){k=true}function o(){var s=b(".reveal-modal.open");if(s.length===1){a=true;s.trigger("reveal:close")}}function n(){if(!k){r();o();q.addClass("open");if(c.animation==="fadeAndPop"){j.open.top=e.scrollTop()-l;j.open.opacity=0;q.css(j.open);g.fadeIn(c.animationSpeed/2);q.delay(c.animationSpeed/2).animate({top:e.scrollTop()+i+"px",opacity:1},c.animationSpeed,function(){q.trigger("reveal:opened")})}if(c.animation==="fade"){j.open.top=e.scrollTop()+i;j.open.opacity=0;q.css(j.open);g.fadeIn(c.animationSpeed/2);q.delay(c.animationSpeed/2).animate({opacity:1},c.animationSpeed,function(){q.trigger("reveal:opened")})}if(c.animation==="none"){j.open.top=e.scrollTop()+i;j.open.opacity=1;q.css(j.open);g.css({display:"block"});q.trigger("reveal:opened")}}}q.bind("reveal:open.reveal",n);function h(){if(!k){r();q.removeClass("open");if(c.animation==="fadeAndPop"){q.animate({top:e.scrollTop()-l+"px",opacity:0},c.animationSpeed/2,function(){q.css(j.close)});if(!a){g.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){q.trigger("reveal:closed")})}else{q.trigger("reveal:closed")}a=false}if(c.animation==="fade"){q.animate({opacity:0},c.animationSpeed,function(){q.css(j.close)});if(!a){g.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){q.trigger("reveal:closed")})}else{q.trigger("reveal:closed")}}if(c.animation==="none"){q.css(j.close);if(!a){g.css({display:"none"})}q.trigger("reveal:closed")}}}function p(){q.unbind(".reveal");g.unbind(".reveal");f.unbind(".reveal");b("body").unbind(".reveal")}q.bind("reveal:close.reveal",h);q.bind("reveal:opened.reveal reveal:closed.reveal",m);q.bind("reveal:closed.reveal",p);q.bind("reveal:open.reveal",c.open);q.bind("reveal:opened.reveal",c.opened);q.bind("reveal:close.reveal",c.close);q.bind("reveal:closed.reveal",c.closed);q.trigger("reveal:open");f=b("."+c.dismissModalClass).bind("click.reveal",function(){q.trigger("reveal:close")});if(c.closeOnBackgroundClick){g.css({cursor:"pointer"});g.bind("click.reveal",function(){q.trigger("reveal:close")})}b("body").bind("keyup.reveal",function(s){if(s.which===27){q.trigger("reveal:close")}})})}}(jQuery));(function(b){b.fn.findFirstImage=function(){return this.first().find("img").andSelf().filter("img").first()};var a={defaults:{animation:"horizontal-push",animationSpeed:600,timer:true,advanceSpeed:4000,pauseOnHover:false,startClockOnMouseOut:false,startClockOnMouseOutAfter:1000,directionalNav:true,directionalNavRightText:"Right",directionalNavLeftText:"Left",captions:true,captionAnimation:"fade",captionAnimationSpeed:600,resetTimerOnClick:false,bullets:false,bulletThumbs:false,bulletThumbLocation:"",afterSlideChange:b.noop,afterLoadComplete:b.noop,fluid:true,centerBullets:true},activeSlide:0,numberSlides:0,orbitWidth:null,orbitHeight:null,locked:null,timerRunning:null,degrees:0,wrapperHTML:'<div class="orbit-wrapper" />',timerHTML:'<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',captionHTML:'<div class="orbit-caption"></div>',directionalNavHTML:'<div class="slider-nav"><span class="right"></span><span class="left"></span></div>',bulletHTML:'<ul class="orbit-bullets"></ul>',init:function(f,e){var c,g=0,d=this;this.clickTimer=b.proxy(this.clickTimer,this);this.addBullet=b.proxy(this.addBullet,this);this.resetAndUnlock=b.proxy(this.resetAndUnlock,this);this.stopClock=b.proxy(this.stopClock,this);this.startTimerAfterMouseLeave=b.proxy(this.startTimerAfterMouseLeave,this);this.clearClockMouseLeaveTimer=b.proxy(this.clearClockMouseLeaveTimer,this);this.rotateTimer=b.proxy(this.rotateTimer,this);this.options=b.extend({},this.defaults,e);if(this.options.timer==="false"){this.options.timer=false}if(this.options.captions==="false"){this.options.captions=false}if(this.options.directionalNav==="false"){this.options.directionalNav=false}this.$element=b(f);this.$wrapper=this.$element.wrap(this.wrapperHTML).parent();this.$slides=this.$element.children("img, a, div");this.$element.bind("orbit.next",function(){d.shift("next")});this.$element.bind("orbit.prev",function(){d.shift("prev")});this.$element.bind("orbit.goto",function(i,h){d.shift(h)});this.$element.bind("orbit.start",function(i,h){d.startClock()});this.$element.bind("orbit.stop",function(i,h){d.stopClock()});c=this.$slides.filter("img");if(c.length===0){this.loaded()}else{c.bind("imageready",function(){g+=1;if(g===c.length){d.loaded()}})}},loaded:function(){this.$element.addClass("orbit").css({width:"1px",height:"1px"});this.$slides.addClass("orbit-slide");this.setDimentionsFromLargestSlide();this.updateOptionsIfOnlyOneSlide();this.setupFirstSlide();if(this.options.timer){this.setupTimer();this.startClock()}if(this.options.captions){this.setupCaptions()}if(this.options.directionalNav){this.setupDirectionalNav()}if(this.options.bullets){this.setupBulletNav();this.setActiveBullet()}this.options.afterLoadComplete.call(this)},currentSlide:function(){return this.$slides.eq(this.activeSlide)},setDimentionsFromLargestSlide:function(){var d=this,c;d.$element.add(d.$wrapper).width(this.$slides.first().outerWidth());d.$element.add(d.$wrapper).height(this.$slides.first().height());d.orbitWidth=this.$slides.first().outerWidth();d.orbitHeight=this.$slides.first().height();c=this.$slides.first().findFirstImage().clone();this.$slides.each(function(){var e=b(this),g=e.outerWidth(),f=e.height();if(g>d.$element.outerWidth()){d.$element.add(d.$wrapper).width(g);d.orbitWidth=d.$element.outerWidth()}if(f>d.$element.height()){d.$element.add(d.$wrapper).height(f);d.orbitHeight=d.$element.height();c=b(this).findFirstImage().clone()}d.numberSlides+=1});if(this.options.fluid){if(typeof this.options.fluid==="string"){c=b('<img src="http://placehold.it/'+this.options.fluid+'" />')}d.$element.prepend(c);c.addClass("fluid-placeholder");d.$element.add(d.$wrapper).css({width:"inherit"});d.$element.add(d.$wrapper).css({height:"inherit"});b(window).bind("resize",function(){d.orbitWidth=d.$element.outerWidth();d.orbitHeight=d.$element.height()})}},lock:function(){this.locked=true},unlock:function(){this.locked=false},updateOptionsIfOnlyOneSlide:function(){if(this.$slides.length===1){this.options.directionalNav=false;this.options.timer=false;this.options.bullets=false}},setupFirstSlide:function(){var c=this;this.$slides.first().css({"z-index":3}).fadeIn(function(){c.$slides.css({display:"block"})})},startClock:function(){var c=this;if(!this.options.timer){return false}if(this.$timer.is(":hidden")){this.clock=setInterval(function(){c.$element.trigger("orbit.next")},this.options.advanceSpeed)}else{this.timerRunning=true;this.$pause.removeClass("active");this.clock=setInterval(this.rotateTimer,this.options.advanceSpeed/180,false)}},rotateTimer:function(d){var c="rotate("+this.degrees+"deg)";this.degrees+=2;this.$rotator.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c});if(this.degrees>180){this.$rotator.addClass("move");this.$mask.addClass("move")}if(this.degrees>360||d){this.$rotator.removeClass("move");this.$mask.removeClass("move");this.degrees=0;this.$element.trigger("orbit.next")}},stopClock:function(){if(!this.options.timer){return false}else{this.timerRunning=false;clearInterval(this.clock);this.$pause.addClass("active")}},setupTimer:function(){this.$timer=b(this.timerHTML);this.$wrapper.append(this.$timer);this.$rotator=this.$timer.find(".rotator");this.$mask=this.$timer.find(".mask");this.$pause=this.$timer.find(".pause");this.$timer.click(this.clickTimer);if(this.options.startClockOnMouseOut){this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer)}if(this.options.pauseOnHover){this.$wrapper.mouseenter(this.stopClock)}},startTimerAfterMouseLeave:function(){var c=this;this.outTimer=setTimeout(function(){if(!c.timerRunning){c.startClock()}},this.options.startClockOnMouseOutAfter)},clearClockMouseLeaveTimer:function(){clearTimeout(this.outTimer)},clickTimer:function(){if(!this.timerRunning){this.startClock()}else{this.stopClock()}},setupCaptions:function(){this.$caption=b(this.captionHTML);this.$wrapper.append(this.$caption);this.setCaption()},setCaption:function(){var d=this.currentSlide().attr("data-caption"),c;if(!this.options.captions){return false}if(d){if(b.trim(b(d).text()).length<1){return false}c=b(d).html();this.$caption.attr("id",d).html(c);switch(this.options.captionAnimation){case"none":this.$caption.show();break;case"fade":this.$caption.fadeIn(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideDown(this.options.captionAnimationSpeed);break}}else{switch(this.options.captionAnimation){case"none":this.$caption.hide();break;case"fade":this.$caption.fadeOut(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideUp(this.options.captionAnimationSpeed);break}}},setupDirectionalNav:function(){var c=this,d=b(this.directionalNavHTML);d.find(".right").html(this.options.directionalNavRightText);d.find(".left").html(this.options.directionalNavLeftText);this.$wrapper.append(d);this.$wrapper.find(".left").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.prev")});this.$wrapper.find(".right").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.next")})},setupBulletNav:function(){this.$bullets=b(this.bulletHTML);this.$wrapper.append(this.$bullets);this.$slides.each(this.addBullet);this.$element.addClass("with-bullets");if(this.options.centerBullets){this.$bullets.css("margin-left",-this.$bullets.outerWidth()/2)}},addBullet:function(g,e){var d=g+1,h=b("<li>"+(d)+"</li>"),c,f=this;if(this.options.bulletThumbs){c=b(e).attr("data-thumb");if(c){h.addClass("has-thumb").css({background:"url("+this.options.bulletThumbLocation+c+") no-repeat"})}}this.$bullets.append(h);h.data("index",g);h.click(function(){f.stopClock();if(f.options.resetTimerOnClick){f.rotateTimer(true);f.startClock()}f.$element.trigger("orbit.goto",[h.data("index")])})},setActiveBullet:function(){if(!this.options.bullets){return false}else{this.$bullets.find("li").removeClass("active").eq(this.activeSlide).addClass("active")}},resetAndUnlock:function(){this.$slides.eq(this.prevActiveSlide).css({"z-index":1});this.unlock();this.options.afterSlideChange.call(this,this.$slides.eq(this.prevActiveSlide),this.$slides.eq(this.activeSlide))},shift:function(d){var c=d;this.prevActiveSlide=this.activeSlide;if(this.prevActiveSlide==c){return false}if(this.$slides.length=="1"){return false}if(!this.locked){this.lock();if(d=="next"){this.activeSlide++;if(this.activeSlide==this.numberSlides){this.activeSlide=0}}else{if(d=="prev"){this.activeSlide--;if(this.activeSlide<0){this.activeSlide=this.numberSlides-1}}else{this.activeSlide=d;if(this.prevActiveSlide<this.activeSlide){c="next"}else{if(this.prevActiveSlide>this.activeSlide){c="prev"}}}}this.setActiveBullet();this.$slides.eq(this.prevActiveSlide).css({"z-index":2});if(this.options.animation=="fade"){this.$slides.eq(this.activeSlide).css({opacity:0,"z-index":3}).animate({opacity:1},this.options.animationSpeed,this.resetAndUnlock)}if(this.options.animation=="horizontal-slide"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}}if(this.options.animation=="vertical-slide"){if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}}if(this.options.animation=="horizontal-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:-this.orbitWidth},this.options.animationSpeed)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:this.orbitWidth},this.options.animationSpeed)}}if(this.options.animation=="vertical-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:this.orbitHeight},this.options.animationSpeed)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({top:-this.orbitHeight},this.options.animationSpeed)}}this.setCaption()}}};b.fn.orbit=function(c){return this.each(function(){var d=b.extend({},a);d.init(this,c)})}})(jQuery);
+/*!
+ * jQuery imageready Plugin
+ * http://www.zurb.com/playground/
+ *
+ * Copyright 2011, ZURB
+ * Released under the MIT License
+ */
+(function(c){var b={};c.event.special.imageready={setup:function(f,e,d){b=f||b},add:function(d){var e=c(this),f;if(this.nodeType===1&&this.tagName.toLowerCase()==="img"&&this.src!==""){if(b.forceLoad){f=e.attr("src");e.attr("src","");a(this,d.handler);e.attr("src",f)}else{if(this.complete||this.readyState===4){d.handler.apply(this,arguments)}else{a(this,d.handler)}}}},teardown:function(d){c(this).unbind(".imageready")}};function a(d,f){var e=c(d);e.bind("load.imageready",function(){f.apply(d,arguments);e.unbind("load.imageready")})}}(jQuery));
View
15 javascripts/foundation/jquery.foundation.accordion.js
@@ -0,0 +1,15 @@
+(function ($){
+
+ $.fn.foundationAccordion = function (options) {
+
+ $('.accordion li', this).on('click.fndtn', function () {
+ var flyout = $(this).children('.content').first();
+ $('.accordion .content').not(flyout).hide().parent('li').removeClass('active');
+ flyout.show(0, function () {
+ flyout.parent('li').addClass('active');
+ });
+ });
+
+ };
+
+})( jQuery );
View
19 javascripts/foundation/jquery.foundation.alerts.js
@@ -0,0 +1,19 @@
+(function ($) {
+
+ $.fn.foundationAlerts = function (options) {
+ var settings = $.extend({
+ callback: $.noop
+ }, options);
+
+ $(document).on("click", ".alert-box a.close", function (event) {
+ event.preventDefault();
+ $(this).closest(".alert-box").fadeOut(function (event) {
+ $(this).remove();
+ // Do something else after the alert closes
+ settings.callback();
+ });
+ });
+
+ };
+
+})(jQuery);
View
45 javascripts/foundation/jquery.foundation.buttons.js
@@ -0,0 +1,45 @@
+(function ($) {
+
+ $.fn.foundationButtons = function(options) {
+ // Prevent event propagation on disabled buttons
+ $('.button.disabled', this).on('click.fndtn', function (event) {
+ event.preventDefault();
+ });
+
+ $('.button.dropdown > ul', this).addClass('no-hover');
+
+ $('.button.dropdown', this).on('click.fndtn', function (e) {
+ e.stopPropagation();
+ });
+ $('.button.dropdown.split span', this).on('click.fndtn', function (e) {
+ e.preventDefault();
+ $('.button.dropdown', this).not($(this).parent()).children('ul').removeClass('show-dropdown');
+ $(this).siblings('ul').toggleClass('show-dropdown');
+ });
+ $('.button.dropdown', this).not('.split').on('click.fndtn', function (e) {
+ $('.button.dropdown', this).not(this).children('ul').removeClass('show-dropdown');
+ $(this).children('ul').toggleClass('show-dropdown');
+ });
+ $('body, html').on('click.fndtn', function () {
+ $('.button.dropdown ul').removeClass('show-dropdown');
+ });
+
+ // Positioning the Flyout List
+ var normalButtonHeight = $('.button.dropdown:not(.large):not(.small):not(.tiny)', this).outerHeight() - 1,
+ largeButtonHeight = $('.button.large.dropdown', this).outerHeight() - 1,
+ smallButtonHeight = $('.button.small.dropdown', this).outerHeight() - 1,
+ tinyButtonHeight = $('.button.tiny.dropdown', this).outerHeight() - 1;
+
+ $('.button.dropdown:not(.large):not(.small):not(.tiny) > ul', this).css('top', normalButtonHeight);
+ $('.button.dropdown.large > ul', this).css('top', largeButtonHeight);
+ $('.button.dropdown.small > ul', this).css('top', smallButtonHeight);
+ $('.button.dropdown.tiny > ul', this).css('top', tinyButtonHeight);
+
+ $('.button.dropdown.up:not(.large):not(.small):not(.tiny) > ul', this).css('top', 'auto').css('bottom', normalButtonHeight - 2);
+ $('.button.dropdown.up.large > ul', this).css('top', 'auto').css('bottom', largeButtonHeight - 2);
+ $('.button.dropdown.up.small > ul', this).css('top', 'auto').css('bottom', smallButtonHeight - 2);
+ $('.button.dropdown.up.tiny > ul', this).css('top', 'auto').css('bottom', tinyButtonHeight - 2);
+
+ };
+
+})( jQuery );
View
485 javascripts/foundation/jquery.foundation.forms.js
@@ -0,0 +1,485 @@
+/*
+ * jQuery Custom Forms Plugin 1.0
+ * www.ZURB.com
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+(function( $ ){
+
+ /**
+ * Helper object used to quickly adjust all hidden parent element's, display and visibility properties.
+ * This is currently used for the custom drop downs. When the dropdowns are contained within a reveal modal
+ * we cannot accurately determine the list-item elements width property, since the modal's display property is set
+ * to 'none'.
+ *
+ * This object will help us work around that problem.
+ *
+ * NOTE: This could also be plugin.
+ *
+ * @function hiddenFix
+ */
+ var hiddenFix = function() {
+
+ return {
+ /**
+ * Sets all hidden parent elements and self to visibile.
+ *
+ * @method adjust
+ * @param {jQuery Object} $child
+ */
+
+ // We'll use this to temporarily store style properties.
+ tmp : [],
+
+ // We'll use this to set hidden parent elements.
+ hidden : null,
+
+ adjust : function( $child ) {
+ // Internal reference.
+ var _self = this;
+
+ // Set all hidden parent elements, including this element.
+ _self.hidden = $child.parents().andSelf().filter( ":hidden" );
+
+ // Loop through all hidden elements.
+ _self.hidden.each( function() {
+
+ // Cache the element.
+ var $elem = $( this );
+
+ // Store the style attribute.
+ // Undefined if element doesn't have a style attribute.
+ _self.tmp.push( $elem.attr( 'style' ) );
+
+ // Set the element's display property to block,
+ // but ensure it's visibility is hidden.
+ $elem.css( { 'visibility' : 'hidden', 'display' : 'block' } );
+ });
+
+ }, // end adjust
+
+ /**
+ * Resets the elements previous state.
+ *
+ * @method reset
+ */
+ reset : function() {
+ // Internal reference.
+ var _self = this;
+ // Loop through our hidden element collection.
+ _self.hidden.each( function( i ) {
+ // Cache this element.
+ var $elem = $( this ),
+ _tmp = _self.tmp[ i ]; // Get the stored 'style' value for this element.
+
+ // If the stored value is undefined.
+ if( _tmp === undefined )
+ // Remove the style attribute.
+ $elem.removeAttr( 'style' );
+ else
+ // Otherwise, reset the element style attribute.
+ $elem.attr( 'style', _tmp );
+
+ });
+ // Reset the tmp array.
+ _self.tmp = [];
+ // Reset the hidden elements variable.
+ _self.hidden = null;
+
+ } // end reset
+
+ }; // end return
+
+ };
+
+ jQuery.foundation = jQuery.foundation || {};
+ jQuery.foundation.customForms = jQuery.foundation.customForms || {};
+
+ $.foundation.customForms.appendCustomMarkup = function ( options ) {
+
+ var defaults = {
+ disable_class: "js-disable-custom"
+ };
+
+ options = $.extend( defaults, options );
+
+ function appendCustomMarkup(idx, sel) {
+ var $this = $(sel).hide(),
+ type = $this.attr('type'),
+ $span = $this.next('span.custom.' + type);
+
+ if ($span.length === 0) {
+ $span = $('<span class="custom ' + type + '"></span>').insertAfter($this);
+ }
+
+ $span.toggleClass('checked', $this.is(':checked'));
+ $span.toggleClass('disabled', $this.is(':disabled'));
+ }
+
+ function appendCustomSelect(idx, sel) {
+ var hiddenFixObj = hiddenFix();
+ //
+ // jQueryify the <select> element and cache it.
+ //
+ var $this = $( sel ),
+ //
+ // Find the custom drop down element.
+ //
+ $customSelect = $this.next( 'div.custom.dropdown' ),
+ //
+ // Find the custom select element within the custom drop down.
+ //
+ $customList = $customSelect.find( 'ul' ),
+ //
+ // Find the custom a.current element.
+ //
+ $selectCurrent = $customSelect.find( ".current" ),
+ //
+ // Find the custom a.selector element (the drop-down icon).
+ //
+ $selector = $customSelect.find( ".selector" ),
+ //
+ // Get the <options> from the <select> element.
+ //
+ $options = $this.find( 'option' ),
+ //
+ // Filter down the selected options
+ //
+ $selectedOption = $options.filter( ':selected' ),
+ //
+ // Initial max width.
+ //
+ maxWidth = 0,
+ //
+ // We'll use this variable to create the <li> elements for our custom select.
+ //
+ liHtml = '',
+ //
+ // We'll use this to cache the created <li> elements within our custom select.
+ //
+ $listItems
+ ;
+ var $currentSelect = false;
+ //
+ // Should we not create a custom list?
+ //
+ if ( $this.hasClass( 'no-custom' ) ) return;
+
+ //
+ // Did we not create a custom select element yet?
+ //
+ if ( $customSelect.length === 0 ) {
+ //
+ // Let's create our custom select element!
+ //
+
+ //
+ // Determine what select size to use.
+ //
+ var customSelectSize = $this.hasClass( 'small' ) ? 'small' :
+ $this.hasClass( 'medium' ) ? 'medium' :
+ $this.hasClass( 'large' ) ? 'large' :
+ $this.hasClass( 'expand' ) ? 'expand' : ''
+ ;
+ //
+ // Build our custom list.
+ //
+ $customSelect = $('<div class="' + ['custom', 'dropdown', customSelectSize ].join( ' ' ) + '"><a href="#" class="selector"></a><ul /></div>"');
+ //
+ // Grab the selector element
+ //
+ $selector = $customSelect.find( ".selector" );
+ //
+ // Grab the unordered list element from the custom list.
+ //
+ $customList = $customSelect.find( "ul" );
+ //
+ // Build our <li> elements.
+ //
+ liHtml = $options.map( function() { return "<li>" + $( this ).html() + "</li>"; } ).get().join( '' );
+ //
+ // Append our <li> elements to the custom list (<ul>).
+ //
+ $customList.append( liHtml );
+ //
+ // Insert the the currently selected list item before all other elements.
+ // Then, find the element and assign it to $currentSelect.
+ //
+
+ $currentSelect = $customSelect.prepend( '<a href="#" class="current">' + $selectedOption.html() + '</a>' ).find( ".current" );
+ //
+ // Add the custom select element after the <select> element.
+ //
+ $this.after( $customSelect )
+ //
+ //then hide the <select> element.
+ //
+ .hide();
+
+ } else {
+ //
+ // Create our list item <li> elements.
+ //
+ liHtml = $options.map( function() { return "<li>" + $( this ).html() + "</li>"; } ).get().join( '' );
+ //
+ // Refresh the ul with options from the select in case the supplied markup doesn't match.
+ // Clear what's currently in the <ul> element.
+ //
+ $customList.html( '' )
+ //
+ // Populate the list item <li> elements.
+ //
+ .append( liHtml );
+
+ } // endif $customSelect.length === 0
+
+ //
+ // Determine whether or not the custom select element should be disabled.
+ //
+ $customSelect.toggleClass( 'disabled', $this.is( ':disabled' ) );
+ //
+ // Cache our List item elements.
+ //
+ $listItems = $customList.find( 'li' );
+
+ //
+ // Determine which elements to select in our custom list.
+ //
+ $options.each( function ( index ) {
+
+ if ( this.selected ) {
+ //
+ // Add the selected class to the current li element
+ //
+ $listItems.eq( index ).addClass( 'selected' );
+ //
+ // Update the current element with the option value.
+ //
+ if ($currentSelect) {
+ $currentSelect.html( this.value );
+ }
+
+ }
+
+ });
+
+ //
+ // Update the custom <ul> list width property.
+ //
+ $customList.css( 'width', 'inherit' );
+ //
+ // Set the custom select width property.
+ //
+ $customSelect.css( 'width', 'inherit' );
+
+ //
+ // If we're not specifying a predetermined form size.
+ //
+ if ( !$customSelect.is( '.small, .medium, .large, .expand' ) ) {
+
+ // ------------------------------------------------------------------------------------
+ // This is a work-around for when elements are contained within hidden parents.
+ // For example, when custom-form elements are inside of a hidden reveal modal.
+ //
+ // We need to display the current custom list element as well as hidden parent elements
+ // in order to properly calculate the list item element's width property.
+ // -------------------------------------------------------------------------------------
+
+ //
+ // Show the drop down.
+ // This should ensure that the list item's width values are properly calculated.
+ //
+ $customSelect.addClass( 'open' );
+ //
+ // Quickly, display all parent elements.
+ // This should help us calcualate the width of the list item's within the drop down.
+ //
+ hiddenFixObj.adjust( $customList );
+ //
+ // Grab the largest list item width.
+ //
+ maxWidth = ( $listItems.outerWidth() > maxWidth ) ? $listItems.outerWidth() : maxWidth;
+ //
+ // Okay, now reset the parent elements.
+ // This will hide them again.
+ //
+ hiddenFixObj.reset();
+ //
+ // Finally, hide the drop down.
+ //
+ $customSelect.removeClass( 'open' );
+ //
+ // Set the custom list width.
+ //
+ $customSelect.width( maxWidth + 18);
+ //
+ // Set the custom list element (<ul />) width.
+ //
+ $customList.width( maxWidth + 16 );
+
+ } // endif
+
+ }
+
+ $('form.custom input:radio[data-customforms!=disabled]').each(appendCustomMarkup);
+ $('form.custom input:checkbox[data-customforms!=disabled]').each(appendCustomMarkup);
+ $('form.custom select[data-customforms!=disabled]').each(appendCustomSelect);
+ };
+
+ var refreshCustomSelect = function($select) {
+ var maxWidth = 0,
+ $customSelect = $select.next();
+ $options = $select.find('option');
+ $customSelect.find('ul').html('');
+
+ $options.each(function () {
+ $li = $('<li>' + $(this).html() + '</li>');
+ $customSelect.find('ul').append($li);
+ });
+
+ // re-populate
+ $options.each(function (index) {
+ if (this.selected) {
+ $customSelect.find('li').eq(index).addClass('selected');
+ $customSelect.find('.current').html($(this).html());
+ }
+ });
+
+ // fix width
+ $customSelect.removeAttr('style')
+ .find('ul').removeAttr('style');
+ $customSelect.find('li').each(function () {
+ $customSelect.addClass('open');
+ if ($(this).outerWidth() > maxWidth) {
+ maxWidth = $(this).outerWidth();
+ }
+ $customSelect.removeClass('open');
+ });
+ $customSelect.css('width', maxWidth + 18 + 'px');
+ $customSelect.find('ul').css('width', maxWidth + 16 + 'px');
+
+ };
+
+ var toggleCheckbox = function($element) {
+ var $input = $element.prev(),
+ input = $input[0];
+
+ if (false == $input.is(':disabled')) {
+ input.checked = ((input.checked) ? false : true);
+ $element.toggleClass('checked');
+
+ $input.trigger('change');
+ }
+ };
+
+ var toggleRadio = function($element) {
+ var $input = $element.prev(),
+ input = $input[0];
+
+ if (false == $input.is(':disabled')) {
+ $('input:radio[name="' + $input.attr('name') + '"]').each(function () {
+ $(this).next().removeClass('checked');
+ });
+ input.checked = ((input.checked) ? false : true);
+ $element.toggleClass('checked');
+
+ $input.trigger('change');
+ }
+ };
+
+ $('form.custom span.custom.checkbox').on('click', function (event) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ toggleCheckbox($(this));
+ });
+
+ $('form.custom span.custom.radio').on('click', function (event) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ toggleRadio($(this));
+ });
+
+ $('form.custom select').on('change', function (event) {
+ refreshCustomSelect($(this));
+ });
+
+ $('form.custom label').on('click', function (event) {
+ var $associatedElement = $('#' + $(this).attr('for')),
+ $customCheckbox,
+ $customRadio;
+ if ($associatedElement.length !== 0) {
+ if ($associatedElement.attr('type') === 'checkbox') {
+ event.preventDefault();
+ $customCheckbox = $(this).find('span.custom.checkbox');
+ toggleCheckbox($customCheckbox);
+ } else if ($associatedElement.attr('type') === 'radio') {
+ event.preventDefault();
+ $customRadio = $(this).find('span.custom.radio');
+ toggleRadio($customRadio);
+ }
+ }
+ });
+
+ $('form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector').live('click', function (event) {
+ var $this = $(this),
+ $dropdown = $this.closest('div.custom.dropdown'),
+ $select = $dropdown.prev();
+
+ event.preventDefault();
+ $('div.dropdown').removeClass('open');
+
+ if (false == $select.is(':disabled')) {
+ $dropdown.toggleClass('open');
+
+ if ($dropdown.hasClass('open')) {
+ $(document).bind('click.customdropdown', function (event) {
+ $dropdown.removeClass('open');
+ $(document).unbind('.customdropdown');
+ });
+ } else {
+ $(document).unbind('.customdropdown');
+ }
+ return false;
+ }
+ });
+
+ $('form.custom div.custom.dropdown li').live('click', function (event) {
+ var $this = $(this),
+ $customDropdown = $this.closest('div.custom.dropdown'),
+ $select = $customDropdown.prev(),
+ selectedIndex = 0;
+
+ event.preventDefault();
+ event.stopPropagation();
+ $('div.dropdown').removeClass('open');
+
+ $this
+ .closest('ul')
+ .find('li')
+ .removeClass('selected');
+ $this.addClass('selected');
+
+ $customDropdown
+ .removeClass('open')
+ .find('a.current')
+ .html($this.html());
+
+ $this.closest('ul').find('li').each(function (index) {
+ if ($this[0] == this) {
+ selectedIndex = index;
+ }
+
+ });
+ $select[0].selectedIndex = selectedIndex;
+
+ $select.trigger('change');
+ });
+
+
+ $.fn.foundationCustomForms = $.foundation.customForms.appendCustomMarkup;
+
+})( jQuery );
View
30 javascripts/foundation/jquery.foundation.navigation.js
@@ -0,0 +1,30 @@
+(function ($){
+
+ $.fn.foundationNavigation = function (options) {
+
+ var lockNavBar = false;
+ // Windows Phone, sadly, does not register touch events :(
+ if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) {
+ $('.nav-bar a.flyout-toggle', this).on('click.fndtn touchstart.fndtn', function (e) {
+ e.preventDefault();
+ var flyout = $(this).siblings('.flyout').first();
+ if (lockNavBar === false) {
+ $('.nav-bar .flyout').not(flyout).slideUp(500);
+ flyout.slideToggle(500, function () {
+ lockNavBar = false;
+ });
+ }
+ lockNavBar = true;
+ });
+ $('.nav-bar>li.has-flyout', this).addClass('is-touch');
+ } else {
+ $('.nav-bar>li.has-flyout', this).hover(function () {
+ $(this).children('.flyout').show();
+ }, function () {
+ $(this).children('.flyout').hide();
+ });
+ }
+
+ };
+
+})( jQuery );
View
633 javascripts/foundation/jquery.foundation.orbit.js
@@ -0,0 +1,633 @@
+/*
+ * jQuery Orbit Plugin 1.4.0
+ * www.ZURB.com/playground
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+
+
+(function ($) {
+ 'use strict';
+ $.fn.findFirstImage = function () {
+ return this.first()
+ .find('img')
+ .andSelf().filter('img')
+ .first();
+ };
+
+ var ORBIT = {
+
+ defaults: {
+ animation: 'horizontal-push', // fade, horizontal-slide, vertical-slide, horizontal-push, vertical-push
+ animationSpeed: 600, // how fast animtions are
+ timer: true, // true or false to have the timer
+ advanceSpeed: 4000, // if timer is enabled, time between transitions
+ pauseOnHover: false, // if you hover pauses the slider
+ startClockOnMouseOut: false, // if clock should start on MouseOut
+ startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
+ directionalNav: true, // manual advancing directional navs
+ directionalNavRightText: 'Right', // text of right directional element for accessibility
+ directionalNavLeftText: 'Left', // text of left directional element for accessibility
+ captions: true, // do you want captions?
+ captionAnimation: 'fade', // fade, slideOpen, none
+ captionAnimationSpeed: 600, // if so how quickly should they animate in
+ resetTimerOnClick: false, // true resets the timer instead of pausing slideshow progress on manual navigation
+ bullets: false, // true or false to activate the bullet navigation
+ bulletThumbs: false, // thumbnails for the bullets
+ bulletThumbLocation: '', // location from this file where thumbs will be
+ afterSlideChange: $.noop, // empty function
+ afterLoadComplete: $.noop, //callback to execute after everything has been loaded
+ fluid: true,
+ centerBullets: true // center bullet nav with js, turn this off if you want to position the bullet nav manually
+ },
+
+ activeSlide: 0,
+ numberSlides: 0,
+ orbitWidth: null,
+ orbitHeight: null,
+ locked: null,
+ timerRunning: null,
+ degrees: 0,
+ wrapperHTML: '<div class="orbit-wrapper" />',
+ timerHTML: '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',
+ captionHTML: '<div class="orbit-caption"></div>',
+ directionalNavHTML: '<div class="slider-nav"><span class="right"></span><span class="left"></span></div>',
+ bulletHTML: '<ul class="orbit-bullets"></ul>',
+
+ init: function (element, options) {
+ var $imageSlides,
+ imagesLoadedCount = 0,
+ self = this;
+
+ // Bind functions to correct context
+ this.clickTimer = $.proxy(this.clickTimer, this);
+ this.addBullet = $.proxy(this.addBullet, this);
+ this.resetAndUnlock = $.proxy(this.resetAndUnlock, this);
+ this.stopClock = $.proxy(this.stopClock, this);
+ this.startTimerAfterMouseLeave = $.proxy(this.startTimerAfterMouseLeave, this);
+ this.clearClockMouseLeaveTimer = $.proxy(this.clearClockMouseLeaveTimer, this);
+ this.rotateTimer = $.proxy(this.rotateTimer, this);
+
+ this.options = $.extend({}, this.defaults, options);
+ if (this.options.timer === 'false') this.options.timer = false;
+ if (this.options.captions === 'false') this.options.captions = false;
+ if (this.options.directionalNav === 'false') this.options.directionalNav = false;
+
+ this.$element = $(element);
+ this.$wrapper = this.$element.wrap(this.wrapperHTML).parent();
+ this.$slides = this.$element.children('img, a, div');
+
+ this.$element.bind('orbit.next', function () {
+ self.shift('next');
+ });
+
+ this.$element.bind('orbit.prev', function () {
+ self.shift('prev');
+ });
+
+ this.$element.bind('orbit.goto', function (event, index) {
+ self.shift(index);
+ });
+
+ this.$element.bind('orbit.start', function (event, index) {
+ self.startClock();
+ });
+
+ this.$element.bind('orbit.stop', function (event, index) {
+ self.stopClock();
+ });
+
+ $imageSlides = this.$slides.filter('img');
+
+ if ($imageSlides.length === 0) {
+ this.loaded();
+ } else {
+ $imageSlides.bind('imageready', function () {
+ imagesLoadedCount += 1;
+ if (imagesLoadedCount === $imageSlides.length) {
+ self.loaded();
+ }
+ });
+ }
+ },
+
+ loaded: function () {
+ this.$element
+ .addClass('orbit')
+ .css({width: '1px', height: '1px'});
+
+ this.$slides.addClass('orbit-slide');
+
+ this.setDimentionsFromLargestSlide();
+ this.updateOptionsIfOnlyOneSlide();
+ this.setupFirstSlide();
+
+ if (this.options.timer) {
+ this.setupTimer();
+ this.startClock();
+ }
+
+ if (this.options.captions) {
+ this.setupCaptions();
+ }
+
+ if (this.options.directionalNav) {
+ this.setupDirectionalNav();
+ }
+
+ if (this.options.bullets) {
+ this.setupBulletNav();
+ this.setActiveBullet();
+ }
+
+ this.options.afterLoadComplete.call(this);
+ },
+
+ currentSlide: function () {
+ return this.$slides.eq(this.activeSlide);
+ },
+
+ setDimentionsFromLargestSlide: function () {
+ //Collect all slides and set slider size of largest image
+ var self = this,
+ $fluidPlaceholder;
+
+ self.$element.add(self.$wrapper).width(this.$slides.first().outerWidth());
+ self.$element.add(self.$wrapper).height(this.$slides.first().height());
+ self.orbitWidth = this.$slides.first().outerWidth();
+ self.orbitHeight = this.$slides.first().height();
+ $fluidPlaceholder = this.$slides.first().findFirstImage().clone();
+
+
+ this.$slides.each(function () {
+ var slide = $(this),
+ slideWidth = slide.outerWidth(),
+ slideHeight = slide.height();
+
+ if (slideWidth > self.$element.outerWidth()) {
+ self.$element.add(self.$wrapper).width(slideWidth);
+ self.orbitWidth = self.$element.outerWidth();
+ }
+ if (slideHeight > self.$element.height()) {
+ self.$element.add(self.$wrapper).height(slideHeight);
+ self.orbitHeight = self.$element.height();
+ $fluidPlaceholder = $(this).findFirstImage().clone();
+ }
+ self.numberSlides += 1;
+ });
+
+ if (this.options.fluid) {
+ if (typeof this.options.fluid === "string") {
+ $fluidPlaceholder = $('<img src="http://placehold.it/' + this.options.fluid + '" />')
+ }
+
+ self.$element.prepend($fluidPlaceholder);
+ $fluidPlaceholder.addClass('fluid-placeholder');
+ self.$element.add(self.$wrapper).css({width: 'inherit'});
+ self.$element.add(self.$wrapper).css({height: 'inherit'});
+
+ $(window).bind('resize', function () {
+ self.orbitWidth = self.$element.outerWidth();
+ self.orbitHeight = self.$element.height();
+ });
+ }
+ },
+
+ //Animation locking functions
+ lock: function () {
+ this.locked = true;
+ },
+
+ unlock: function () {
+ this.locked = false;
+ },
+
+ updateOptionsIfOnlyOneSlide: function () {
+ if(this.$slides.length === 1) {
+ this.options.directionalNav = false;
+ this.options.timer = false;
+ this.options.bullets = false;
+ }
+ },
+
+ setupFirstSlide: function () {
+ //Set initial front photo z-index and fades it in
+ var self = this;
+ this.$slides.first()
+ .css({"z-index" : 3})
+ .fadeIn(function() {
+ //brings in all other slides IF css declares a display: none
+ self.$slides.css({"display":"block"})
+ });
+ },
+
+ startClock: function () {
+ var self = this;
+
+ if(!this.options.timer) {
+ return false;
+ }
+
+ if (this.$timer.is(':hidden')) {
+ this.clock = setInterval(function () {
+ self.$element.trigger('orbit.next');
+ }, this.options.advanceSpeed);
+ } else {
+ this.timerRunning = true;
+ this.$pause.removeClass('active');
+ this.clock = setInterval(this.rotateTimer, this.options.advanceSpeed / 180, false);
+ }
+ },
+
+ rotateTimer: function (reset) {
+ var degreeCSS = "rotate(" + this.degrees + "deg)";
+ this.degrees += 2;
+ this.$rotator.css({
+ "-webkit-transform": degreeCSS,
+ "-moz-transform": degreeCSS,
+ "-o-transform": degreeCSS
+ });
+ if(this.degrees > 180) {
+ this.$rotator.addClass('move');
+ this.$mask.addClass('move');
+ }
+ if(this.degrees > 360 || reset) {
+ this.$rotator.removeClass('move');
+ this.$mask.removeClass('move');
+ this.degrees = 0;
+ this.$element.trigger('orbit.next');
+ }
+ },
+
+ stopClock: function () {
+ if (!this.options.timer) {
+ return false;
+ } else {
+ this.timerRunning = false;
+ clearInterval(this.clock);
+ this.$pause.addClass('active');
+ }
+ },
+
+ setupTimer: function () {
+ this.$timer = $(this.timerHTML);
+ this.$wrapper.append(this.$timer);
+
+ this.$rotator = this.$timer.find('.rotator');
+ this.$mask = this.$timer.find('.mask');
+ this.$pause = this.$timer.find('.pause');
+
+ this.$timer.click(this.clickTimer);
+
+ if (this.options.startClockOnMouseOut) {
+ this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);
+ this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer);
+ }
+
+ if (this.options.pauseOnHover) {
+ this.$wrapper.mouseenter(this.stopClock);
+ }
+ },
+
+ startTimerAfterMouseLeave: function () {
+ var self = this;
+
+ this.outTimer = setTimeout(function() {
+ if(!self.timerRunning){
+ self.startClock();
+ }
+ }, this.options.startClockOnMouseOutAfter)
+ },
+
+ clearClockMouseLeaveTimer: function () {
+ clearTimeout(this.outTimer);
+ },
+
+ clickTimer: function () {
+ if(!this.timerRunning) {
+ this.startClock();
+ } else {
+ this.stopClock();
+ }
+ },
+
+ setupCaptions: function () {
+ this.$caption = $(this.captionHTML);
+ this.$wrapper.append(this.$caption);
+ this.setCaption();
+ },
+
+ setCaption: function () {
+ var captionLocation = this.currentSlide().attr('data-caption'),
+ captionHTML;
+
+ if (!this.options.captions) {
+ return false;
+ }
+
+ //Set HTML for the caption if it exists
+ if (captionLocation) {
+ //if caption text is blank, don't show captions
+ if ($.trim($(captionLocation).text()).length < 1){
+ return false;
+ }
+ captionHTML = $(captionLocation).html(); //get HTML from the matching HTML entity
+ this.$caption
+ .attr('id', captionLocation) // Add ID caption TODO why is the id being set?
+ .html(captionHTML); // Change HTML in Caption
+ //Animations for Caption entrances
+ switch (this.options.captionAnimation) {
+ case 'none':
+ this.$caption.show();
+ break;
+ case 'fade':
+ this.$caption.fadeIn(this.options.captionAnimationSpeed);
+ break;
+ case 'slideOpen':
+ this.$caption.slideDown(this.options.captionAnimationSpeed);
+ break;
+ }
+ } else {
+ //Animations for Caption exits
+ switch (this.options.captionAnimation) {
+ case 'none':
+ this.$caption.hide();
+ break;
+ case 'fade':
+ this.$caption.fadeOut(this.options.captionAnimationSpeed);
+ break;
+ case 'slideOpen':
+ this.$caption.slideUp(this.options.captionAnimationSpeed);
+ break;
+ }
+ }
+ },
+
+ setupDirectionalNav: function () {
+ var self = this,
+ $directionalNav = $(this.directionalNavHTML);
+
+ $directionalNav.find('.right').html(this.options.directionalNavRightText);
+ $directionalNav.find('.left').html(this.options.directionalNavLeftText);
+
+ this.$wrapper.append($directionalNav);
+
+ this.$wrapper.find('.left').click(function () {
+ self.stopClock();
+ if (self.options.resetTimerOnClick) {
+ self.rotateTimer(true);
+ self.startClock();
+ }
+ self.$element.trigger('orbit.prev');
+ });
+
+ this.$wrapper.find('.right').click(function () {
+ self.stopClock();
+ if (self.options.resetTimerOnClick) {
+ self.rotateTimer(true);
+ self.startClock();
+ }
+ self.$element.trigger('orbit.next');
+ });
+ },
+
+ setupBulletNav: function () {
+ this.$bullets = $(this.bulletHTML);
+ this.$wrapper.append(this.$bullets);
+ this.$slides.each(this.addBullet);
+ this.$element.addClass('with-bullets');
+ if (this.options.centerBullets) this.$bullets.css('margin-left', -this.$bullets.outerWidth() / 2);
+ },
+
+ addBullet: function (index, slide) {
+ var position = index + 1,
+ $li = $('<li>' + (position) + '</li>'),
+ thumbName,
+ self = this;
+
+ if (this.options.bulletThumbs) {
+ thumbName = $(slide).attr('data-thumb');
+ if (thumbName) {
+ $li
+ .addClass('has-thumb')
+ .css({background: "url(" + this.options.bulletThumbLocation + thumbName + ") no-repeat"});;
+ }
+ }
+ this.$bullets.append($li);
+ $li.data('index', index);
+ $li.click(function () {
+ self.stopClock();
+ if (self.options.resetTimerOnClick) {
+ self.rotateTimer(true);
+ self.startClock();
+ }
+ self.$element.trigger('orbit.goto', [$li.data('index')])
+ });
+ },
+
+ setActiveBullet: function () {
+ if(!this.options.bullets) { return false; } else {
+ this.$bullets.find('li')
+ .removeClass('active')
+ .eq(this.activeSlide)
+ .addClass('active');
+ }
+ },
+
+ resetAndUnlock: function () {
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .css({"z-index" : 1});
+ this.unlock();
+ this.options.afterSlideChange.call(this, this.$slides.eq(this.prevActiveSlide), this.$slides.eq(this.activeSlide));
+ },
+
+ shift: function (direction) {
+ var slideDirection = direction;
+
+ //remember previous activeSlide
+ this.prevActiveSlide = this.activeSlide;
+
+ //exit function if bullet clicked is same as the current image
+ if (this.prevActiveSlide == slideDirection) { return false; }
+
+ if (this.$slides.length == "1") { return false; }
+ if (!this.locked) {
+ this.lock();
+ //deduce the proper activeImage
+ if (direction == "next") {
+ this.activeSlide++;
+ if (this.activeSlide == this.numberSlides) {
+ this.activeSlide = 0;
+ }
+ } else if (direction == "prev") {
+ this.activeSlide--
+ if (this.activeSlide < 0) {
+ this.activeSlide = this.numberSlides - 1;
+ }
+ } else {
+ this.activeSlide = direction;
+ if (this.prevActiveSlide < this.activeSlide) {
+ slideDirection = "next";
+ } else if (this.prevActiveSlide > this.activeSlide) {
+ slideDirection = "prev"
+ }
+ }
+
+ //set to correct bullet
+ this.setActiveBullet();
+
+ //set previous slide z-index to one below what new activeSlide will be
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .css({"z-index" : 2});
+
+ //fade
+ if (this.options.animation == "fade") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"opacity" : 0, "z-index" : 3})
+ .animate({"opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+
+ //horizontal-slide
+ if (this.options.animation == "horizontal-slide") {
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": -this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ }
+
+ //vertical-slide
+ if (this.options.animation == "vertical-slide") {
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"top": this.orbitHeight, "z-index" : 3})
+ .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"top": -this.orbitHeight, "z-index" : 3})
+ .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ }
+ }
+
+ //horizontal-push
+ if (this.options.animation == "horizontal-push") {
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({"left" : -this.orbitWidth}, this.options.animationSpeed);
+ }
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({"left": -this.orbitWidth, "z-index" : 3})
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({"left" : this.orbitWidth}, this.options.animationSpeed);
+ }
+ }
+
+ //vertical-push
+ if (this.options.animation == "vertical-push") {
+ if (slideDirection == "next") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({top: -this.orbitHeight, "z-index" : 3})
+ .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({top : this.orbitHeight}, this.options.animationSpeed);
+ }
+ if (slideDirection == "prev") {
+ this.$slides
+ .eq(this.activeSlide)
+ .css({top: this.orbitHeight, "z-index" : 3})
+ .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
+ this.$slides
+ .eq(this.prevActiveSlide)
+ .animate({top : -this.orbitHeight}, this.options.animationSpeed);
+ }
+ }
+
+ this.setCaption();
+ }
+ }
+ };
+
+ $.fn.orbit = function (options) {
+ return this.each(function () {
+ var orbit = $.extend({}, ORBIT);
+ orbit.init(this, options);
+ });
+ };
+
+})(jQuery);
+
+/*!
+ * jQuery imageready Plugin
+ * http://www.zurb.com/playground/
+ *
+ * Copyright 2011, ZURB
+ * Released under the MIT License
+ */
+(function ($) {
+
+ var options = {};
+
+ $.event.special.imageready = {
+
+ setup: function (data, namespaces, eventHandle) {
+ options = data || options;
+ },
+
+ add: function (handleObj) {
+ var $this = $(this),
+ src;
+
+ if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
+ if (options.forceLoad) {
+ src = $this.attr('src');
+ $this.attr('src', '');
+ bindToLoad(this, handleObj.handler);
+ $this.attr('src', src);
+ } else if ( this.complete || this.readyState === 4 ) {
+ handleObj.handler.apply(this, arguments);
+ } else {
+ bindToLoad(this, handleObj.handler);
+ }
+ }
+ },
+
+ teardown: function (namespaces) {
+ $(this).unbind('.imageready');
+ }
+ };
+
+ function bindToLoad(element, callback) {
+ var $this = $(element);
+
+ $this.bind('load.imageready', function () {
+ callback.apply(element, arguments);
+ $this.unbind('load.imageready');
+ });
+ }
+
+}(jQuery));
View
773 javascripts/foundation/jquery.foundation.reveal.js
@@ -0,0 +1,773 @@
+/*
+ * jQuery Reveal Plugin 1.1
+ * www.ZURB.com
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*globals jQuery */
+
+(function ($) {
+ 'use strict';
+ //
+ // Global variable.
+ // Helps us determine if the current modal is being queued for display.
+ //
+ var modalQueued = false;
+
+ //
+ // Bind the live 'click' event to all anchor elemnets with the data-reveal-id attribute.
+ //
+ $( 'a[data-reveal-id]' ).live( 'click', function ( event ) {
+ //
+ // Prevent default action of the event.
+ //
+ event.preventDefault();
+ //
+ // Get the clicked anchor data-reveal-id attribute value.
+ //
+ var modalLocation = $( this ).attr( 'data-reveal-id' );
+ //
+ // Find the element with that modalLocation id and call the reveal plugin.
+ //
+ $( '#' + modalLocation ).reveal( $( this ).data() );
+
+ });
+
+ /**
+ * @module reveal
+ * @property {Object} [options] Reveal options
+ */
+ $.fn.reveal = function ( options ) {
+ /*
+ * Cache the document object.
+ */
+ var $doc = $( document ),
+ /*
+ * Default property values.
+ */
+ defaults = {
+ /**
+ * Possible options: fade, fadeAndPop, none
+ *
+ * @property animation
+ * @type {String}
+ * @default fadeAndPop
+ */
+ animation: 'fadeAndPop',
+ /**
+ * Speed at which the reveal should show. How fast animtions are.
+ *
+ * @property animationSpeed
+ * @type {Integer}
+ * @default 300
+ */
+ animationSpeed: 300,
+ /**
+ * Should the modal close when the background is clicked?
+ *
+ * @property closeOnBackgroundClick
+ * @type {Boolean}
+ * @default true
+ */
+ closeOnBackgroundClick: true,
+ /**
+ * Specify a class name for the 'close modal' element.
+ * This element will close an open modal.
+ *
+ @example
+ <a href='#close' class='close-reveal-modal'>Close Me</a>
+ *
+ * @property dismissModalClass
+ * @type {String}
+ * @default close-reveal-modal
+ */
+ dismissModalClass: 'close-reveal-modal',
+ /**
+ * Specify a callback function that triggers 'before' the modal opens.
+ *
+ * @property open
+ * @type {Function}
+ * @default function(){}
+ */
+ open: $.noop,
+ /**
+ * Specify a callback function that triggers 'after' the modal is opened.
+ *
+ * @property opened
+ * @type {Function}
+ * @default function(){}
+ */
+ opened: $.noop,
+ /**
+ * Specify a callback function that triggers 'before' the modal prepares to close.
+ *
+ * @property close
+ * @type {Function}
+ * @default function(){}
+ */
+ close: $.noop,
+ /**
+ * Specify a callback function that triggers 'after' the modal is closed.
+ *
+ * @property closed
+ * @type {Function}
+ * @default function(){}
+ */
+ closed: $.noop
+ }
+ ;
+ //
+ // Extend the default options.
+ // This replaces the passed in option (options) values with default values.
+ //
+ options = $.extend( {}, defaults, options );
+
+ //
+ // Apply the plugin functionality to each element in the jQuery collection.
+ //
+ return this.each( function () {
+ //
+ // Cache the modal element
+ //
+ var modal = $( this ),
+ //
+ // Get the current css 'top' property value in decimal format.
+ //
+ topMeasure = parseInt( modal.css( 'top' ), 10 ),
+ //
+ // Calculate the top offset.
+ //
+ topOffset = modal.height() + topMeasure,
+ //
+ // Helps determine if the modal is locked.
+ // This way we keep the modal from triggering while it's in the middle of animating.
+ //
+ locked = false,
+ //
+ // Get the modal background element.
+ //
+ modalBg = $( '.reveal-modal-bg' ),
+ //
+ // Show modal properties
+ //
+ cssOpts = {
+ //
+ // Used, when we show the modal.
+ //
+ open : {
+ //
+ // Set the 'top' property to the document scroll minus the calculated top offset.
+ //
+ 'top': 0,
+ //
+ // Opacity gets set to 0.
+ //
+ 'opacity': 0,
+ //
+ // Show the modal
+ //
+ 'visibility': 'visible',
+ //
+ // Ensure it's displayed as a block element.
+ //
+ 'display': 'block'
+ },
+ //
+ // Used, when we hide the modal.
+ //
+ close : {
+ //
+ // Set the default 'top' property value.
+ //
+ 'top': topMeasure,
+ //
+ // Has full opacity.
+ //
+ 'opacity': 1,
+ //
+ // Hide the modal
+ //
+ 'visibility': 'hidden',
+ //
+ // Ensure the elment is hidden.
+ //
+ 'display': 'none'
+ }
+
+ },
+ //
+ // Initial closeButton variable.
+ //
+ $closeButton
+ ;
+
+ //
+ // Do we have a modal background element?
+ //
+ if ( modalBg.length === 0 ) {
+ //
+ // No we don't. So, let's create one.
+ //
+ modalBg = $( '<div />', { 'class' : 'reveal-modal-bg' } )
+ //
+ // Then insert it after the modal element.
+ //
+ .insertAfter( modal );
+ //
+ // Now, fade it out a bit.
+ //
+ modalBg.fadeTo( 'fast', 0.8 );
+ }
+
+ //
+ // Helper Methods
+ //
+
+ /**
+ * Unlock the modal for animation.
+ *
+ * @method unlockModal
+ */
+ function unlockModal() {
+ locked = false;
+ }
+
+ /**
+ * Lock the modal to prevent further animation.
+ *
+ * @method lockModal
+ */
+ function lockModal() {
+ locked = true;
+ }
+
+ /**
+ * Closes all open modals.
+ *
+ * @method closeOpenModal
+ */
+ function closeOpenModals() {
+ //
+ // Get all reveal-modal elements with the .open class.
+ //
+ var $openModals = $( ".reveal-modal.open" );
+ //
+ // Do we have modals to close?
+ //
+ if ( $openModals.length === 1 ) {
+ //
+ // Set the modals for animation queuing.
+ //
+ modalQueued = true;
+ //
+ // Trigger the modal close event.
+ //
+ $openModals.trigger( "reveal:close" );
+ }
+
+ }
+ /**
+ * Animates the modal opening.
+ * Handles the modal 'open' event.
+ *
+ * @method openAnimation
+ */
+ function openAnimation() {
+ //
+ // First, determine if we're in the middle of animation.
+ //
+ if ( !locked ) {
+ //
+ // We're not animating, let's lock the modal for animation.
+ //
+ lockModal();
+ //
+ // Close any opened modals.
+ //
+ closeOpenModals();
+ //
+ // Now, add the open class to this modal.
+ //
+ modal.addClass( "open" );
+
+ //
+ // Are we executing the 'fadeAndPop' animation?
+ //
+ if ( options.animation === "fadeAndPop" ) {
+ //
+ // Yes, we're doing the 'fadeAndPop' animation.
+ // Okay, set the modal css properties.
+ //
+ //
+ // Set the 'top' property to the document scroll minus the calculated top offset.
+ //
+ cssOpts.open.top = $doc.scrollTop() - topOffset;
+ //
+ // Flip the opacity to 0.
+ //
+ cssOpts.open.opacity = 0;
+ //
+ // Set the css options.
+ //
+ modal.css( cssOpts.open );
+ //
+ // Fade in the background element, at half the speed of the modal element.
+ // So, faster than the modal element.
+ //
+ modalBg.fadeIn( options.animationSpeed / 2 );
+
+ //
+ // Let's delay the next animation queue.
+ // We'll wait until the background element is faded in.
+ //
+ modal.delay( options.animationSpeed / 2 )
+ //
+ // Animate the following css properties.
+ //
+ .animate( {
+ //
+ // Set the 'top' property to the document scroll plus the calculated top measure.
+ //
+ "top": $doc.scrollTop() + topMeasure + 'px',
+ //
+ // Set it to full opacity.
+ //
+ "opacity": 1
+
+ },
+ /*
+ * Fade speed.
+ */
+ options.animationSpeed,
+ /*
+ * End of animation callback.
+ */
+ function () {
+ //
+ // Trigger the modal reveal:opened event.
+ // This should trigger the functions set in the options.opened property.
+ //
+ modal.trigger( 'reveal:opened' );
+
+ }); // end of animate.
+
+ } // end if 'fadeAndPop'
+
+ //
+ // Are executing the 'fade' animation?
+ //
+ if ( options.animation === "fade" ) {
+ //
+ // Yes, were executing 'fade'.
+ // Okay, let's set the modal properties.
+ //
+ cssOpts.open.top = $doc.scrollTop() + topMeasure;
+ //
+ // Flip the opacity to 0.
+ //
+ cssOpts.open.opacity = 0;
+ //
+ // Set the css options.
+ //
+ modal.css( cssOpts.open );
+ //
+ // Fade in the modal background at half the speed of the modal.
+ // So, faster than modal.
+ //
+ modalBg.fadeIn( options.animationSpeed / 2 );
+
+ //
+ // Delay the modal animation.
+ // Wait till the modal background is done animating.
+ //
+ modal.delay( options.animationSpeed / 2 )
+ //
+ // Now animate the modal.
+ //
+ .animate( {
+ //
+ // Set to full opacity.
+ //
+ "opacity": 1
+ },
+
+ /*
+ * Animation speed.
+ */
+ options.animationSpeed,
+
+ /*
+ * End of animation callback.
+ */
+ function () {
+ //
+ // Trigger the modal reveal:opened event.
+ // This should trigger the functions set in the options.opened property.
+ //
+ modal.trigger( 'reveal:opened' );
+
+ });
+
+ } // end if 'fade'
+
+ //
+ // Are we not animating?
+ //
+ if ( options.animation === "none" ) {
+ //
+ // We're not animating.
+ // Okay, let's set the modal css properties.
+ //
+ //
+ // Set the top property.
+ //
+ cssOpts.open.top = $doc.scrollTop() + topMeasure;
+ //
+ // Set the opacity property to full opacity, since we're not fading (animating).
+ //
+ cssOpts.open.opacity = 1;
+ //
+ // Set the css property.
+ //
+ modal.css( cssOpts.open );
+ //
+ // Show the modal Background.
+ //
+ modalBg.css( { "display": "block" } );
+ //
+ // Trigger the modal opened event.
+ //
+ modal.trigger( 'reveal:opened' );
+
+ } // end if animating 'none'
+
+ }// end if !