groundworkcss-rails 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. data/README.md +38 -0
  2. data/Rakefile +38 -0
  3. data/app/helpers/breadcrumbs_helper.rb~ +5 -0
  4. data/app/helpers/flash_block_helper.rb +17 -0
  5. data/app/helpers/flash_block_helper.rb~ +18 -0
  6. data/app/helpers/flash_helper.rb +21 -0
  7. data/app/helpers/flash_helper.rb~ +21 -0
  8. data/app/helpers/glyph_helper.rb +12 -0
  9. data/app/helpers/groundwork_flash_helper.rb~ +21 -0
  10. data/app/helpers/modal_helper.rb~ +42 -0
  11. data/app/helpers/social_glyph_helper.rb +13 -0
  12. data/app/helpers/social_glyph_helper.rb~ +12 -0
  13. data/lib/generators/groundworkcss/install/install_generator.rb +50 -0
  14. data/lib/generators/groundworkcss/install/install_generator.rb~ +44 -0
  15. data/lib/generators/groundworkcss/install/templates/application.css.scss +9 -0
  16. data/lib/generators/groundworkcss/install/templates/application.css.scss~ +8 -0
  17. data/lib/generators/groundworkcss/install/templates/application.css~ +7 -0
  18. data/lib/generators/groundworkcss/install/templates/application.js +10 -0
  19. data/lib/generators/groundworkcss/install/templates/application.js~ +10 -0
  20. data/lib/generators/groundworkcss/install/templates/groundwork-and-overrides.scss +12 -0
  21. data/lib/generators/groundworkcss/install/templates/groundwork-and-overrides.scss~ +10 -0
  22. data/lib/generators/groundworkcss/install/templates/groundwork-overrides.scss~ +7 -0
  23. data/lib/generators/groundworkcss/install/templates/groundwork.coffee +1 -0
  24. data/lib/generators/groundworkcss/install/templates/groundwork.coffee~ +0 -0
  25. data/lib/generators/groundworkcss/install/templates/groundwork.js +1 -0
  26. data/lib/generators/groundworkcss/install/templates/groundwork.js~ +1 -0
  27. data/lib/generators/groundworkcss/layout/layout_generator.rb +21 -0
  28. data/lib/generators/groundworkcss/layout/layout_generator.rb~ +21 -0
  29. data/lib/generators/groundworkcss/layout/templates/_header.html.erb +24 -0
  30. data/lib/generators/groundworkcss/layout/templates/_header.html.erb~ +24 -0
  31. data/lib/generators/groundworkcss/layout/templates/_sidebar.html.erb +21 -0
  32. data/lib/generators/groundworkcss/layout/templates/_sidebar.html.erb~ +18 -0
  33. data/lib/generators/groundworkcss/layout/templates/layout.html.erb +44 -0
  34. data/lib/generators/groundworkcss/layout/templates/layout.html.erb~ +44 -0
  35. data/lib/groundworkcss-rails.rb +8 -0
  36. data/lib/groundworkcss/rails/bootstrap.rb~ +2 -0
  37. data/lib/groundworkcss/rails/engine.rb +27 -0
  38. data/lib/groundworkcss/rails/engine.rb~ +30 -0
  39. data/lib/groundworkcss/rails/groundworkcss.rb +2 -0
  40. data/lib/groundworkcss/rails/version.rb +5 -0
  41. data/lib/groundworkcss/rails/version.rb~ +7 -0
  42. data/lib/twitter-bootstrap-rails.rb~ +10 -0
  43. data/vendor/assets/fonts/groundworkcss/FontAwesome.otf +0 -0
  44. data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.eot +0 -0
  45. data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.svg +284 -0
  46. data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.ttf +0 -0
  47. data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.woff +0 -0
  48. data/vendor/assets/fonts/groundworkcss/fontawesome.otf +0 -0
  49. data/vendor/assets/images/groundworkcss/black_linen_v2.png +0 -0
  50. data/vendor/assets/images/groundworkcss/orbit/bullets.jpg +0 -0
  51. data/vendor/assets/images/groundworkcss/orbit/left-arrow.png +0 -0
  52. data/vendor/assets/images/groundworkcss/orbit/loading.gif +0 -0
  53. data/vendor/assets/images/groundworkcss/orbit/mask-black.png +0 -0
  54. data/vendor/assets/images/groundworkcss/orbit/pause-black.png +0 -0
  55. data/vendor/assets/images/groundworkcss/orbit/right-arrow.png +0 -0
  56. data/vendor/assets/images/groundworkcss/orbit/rotator-black.png +0 -0
  57. data/vendor/assets/images/groundworkcss/orbit/timer-black.png +0 -0
  58. data/vendor/assets/images/groundworkcss/pw_maze_white.png +0 -0
  59. data/vendor/assets/images/groundworkcss/social-icons/500px-m.png +0 -0
  60. data/vendor/assets/images/groundworkcss/social-icons/500px-s.png +0 -0
  61. data/vendor/assets/images/groundworkcss/social-icons/500px.png +0 -0
  62. data/vendor/assets/images/groundworkcss/social-icons/500px.svg +62 -0
  63. data/vendor/assets/images/groundworkcss/social-icons/aboutme-m.png +0 -0
  64. data/vendor/assets/images/groundworkcss/social-icons/aboutme-s.png +0 -0
  65. data/vendor/assets/images/groundworkcss/social-icons/aboutme.png +0 -0
  66. data/vendor/assets/images/groundworkcss/social-icons/aboutme.svg +42 -0
  67. data/vendor/assets/images/groundworkcss/social-icons/adn-m.png +0 -0
  68. data/vendor/assets/images/groundworkcss/social-icons/adn-s.png +0 -0
  69. data/vendor/assets/images/groundworkcss/social-icons/adn.png +0 -0
  70. data/vendor/assets/images/groundworkcss/social-icons/adn.svg +14 -0
  71. data/vendor/assets/images/groundworkcss/social-icons/android-m.png +0 -0
  72. data/vendor/assets/images/groundworkcss/social-icons/android-s.png +0 -0
  73. data/vendor/assets/images/groundworkcss/social-icons/android.png +0 -0
  74. data/vendor/assets/images/groundworkcss/social-icons/android.svg +30 -0
  75. data/vendor/assets/images/groundworkcss/social-icons/apple-m.png +0 -0
  76. data/vendor/assets/images/groundworkcss/social-icons/apple-s.png +0 -0
  77. data/vendor/assets/images/groundworkcss/social-icons/apple.png +0 -0
  78. data/vendor/assets/images/groundworkcss/social-icons/apple.svg +19 -0
  79. data/vendor/assets/images/groundworkcss/social-icons/behance-m.png +0 -0
  80. data/vendor/assets/images/groundworkcss/social-icons/behance-s.png +0 -0
  81. data/vendor/assets/images/groundworkcss/social-icons/behance.png +0 -0
  82. data/vendor/assets/images/groundworkcss/social-icons/behance.svg +48 -0
  83. data/vendor/assets/images/groundworkcss/social-icons/bitbucket-m.png +0 -0
  84. data/vendor/assets/images/groundworkcss/social-icons/bitbucket-s.png +0 -0
  85. data/vendor/assets/images/groundworkcss/social-icons/bitbucket.png +0 -0
  86. data/vendor/assets/images/groundworkcss/social-icons/bitbucket.svg +36 -0
  87. data/vendor/assets/images/groundworkcss/social-icons/blogger-m.png +0 -0
  88. data/vendor/assets/images/groundworkcss/social-icons/blogger-s.png +0 -0
  89. data/vendor/assets/images/groundworkcss/social-icons/blogger.png +0 -0
  90. data/vendor/assets/images/groundworkcss/social-icons/blogger.svg +22 -0
  91. data/vendor/assets/images/groundworkcss/social-icons/coderwall-m.png +0 -0
  92. data/vendor/assets/images/groundworkcss/social-icons/coderwall-s.png +0 -0
  93. data/vendor/assets/images/groundworkcss/social-icons/coderwall.png +0 -0
  94. data/vendor/assets/images/groundworkcss/social-icons/coderwall.svg +21 -0
  95. data/vendor/assets/images/groundworkcss/social-icons/creativecloud-m.png +0 -0
  96. data/vendor/assets/images/groundworkcss/social-icons/creativecloud-s.png +0 -0
  97. data/vendor/assets/images/groundworkcss/social-icons/creativecloud.png +0 -0
  98. data/vendor/assets/images/groundworkcss/social-icons/creativecloud.svg +48 -0
  99. data/vendor/assets/images/groundworkcss/social-icons/dribbble-m.png +0 -0
  100. data/vendor/assets/images/groundworkcss/social-icons/dribbble-s.png +0 -0
  101. data/vendor/assets/images/groundworkcss/social-icons/dribbble.png +0 -0
  102. data/vendor/assets/images/groundworkcss/social-icons/dribbble.svg +28 -0
  103. data/vendor/assets/images/groundworkcss/social-icons/dropbox-m.png +0 -0
  104. data/vendor/assets/images/groundworkcss/social-icons/dropbox-s.png +0 -0
  105. data/vendor/assets/images/groundworkcss/social-icons/dropbox.png +0 -0
  106. data/vendor/assets/images/groundworkcss/social-icons/dropbox.svg +73 -0
  107. data/vendor/assets/images/groundworkcss/social-icons/evernote-m.png +0 -0
  108. data/vendor/assets/images/groundworkcss/social-icons/evernote-s.png +0 -0
  109. data/vendor/assets/images/groundworkcss/social-icons/evernote.png +0 -0
  110. data/vendor/assets/images/groundworkcss/social-icons/evernote.svg +62 -0
  111. data/vendor/assets/images/groundworkcss/social-icons/facebook-m.png +0 -0
  112. data/vendor/assets/images/groundworkcss/social-icons/facebook-s.png +0 -0
  113. data/vendor/assets/images/groundworkcss/social-icons/facebook.png +0 -0
  114. data/vendor/assets/images/groundworkcss/social-icons/facebook.svg +15 -0
  115. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative-m.png +0 -0
  116. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative-s.png +0 -0
  117. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative.png +0 -0
  118. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative.svg +24 -0
  119. data/vendor/assets/images/groundworkcss/social-icons/flickr-m.png +0 -0
  120. data/vendor/assets/images/groundworkcss/social-icons/flickr-s.png +0 -0
  121. data/vendor/assets/images/groundworkcss/social-icons/flickr.png +0 -0
  122. data/vendor/assets/images/groundworkcss/social-icons/flickr.svg +14 -0
  123. data/vendor/assets/images/groundworkcss/social-icons/foursquare-m.png +0 -0
  124. data/vendor/assets/images/groundworkcss/social-icons/foursquare-s.png +0 -0
  125. data/vendor/assets/images/groundworkcss/social-icons/foursquare.png +0 -0
  126. data/vendor/assets/images/groundworkcss/social-icons/foursquare.svg +43 -0
  127. data/vendor/assets/images/groundworkcss/social-icons/git-m.png +0 -0
  128. data/vendor/assets/images/groundworkcss/social-icons/git-s.png +0 -0
  129. data/vendor/assets/images/groundworkcss/social-icons/git.png +0 -0
  130. data/vendor/assets/images/groundworkcss/social-icons/git.svg +22 -0
  131. data/vendor/assets/images/groundworkcss/social-icons/github-m.png +0 -0
  132. data/vendor/assets/images/groundworkcss/social-icons/github-s.png +0 -0
  133. data/vendor/assets/images/groundworkcss/social-icons/github.png +0 -0
  134. data/vendor/assets/images/groundworkcss/social-icons/github.svg +38 -0
  135. data/vendor/assets/images/groundworkcss/social-icons/goodreads-m.png +0 -0
  136. data/vendor/assets/images/groundworkcss/social-icons/goodreads-s.png +0 -0
  137. data/vendor/assets/images/groundworkcss/social-icons/goodreads.png +0 -0
  138. data/vendor/assets/images/groundworkcss/social-icons/goodreads.svg +38 -0
  139. data/vendor/assets/images/groundworkcss/social-icons/googleplay-m.png +0 -0
  140. data/vendor/assets/images/groundworkcss/social-icons/googleplay-s.png +0 -0
  141. data/vendor/assets/images/groundworkcss/social-icons/googleplay.png +0 -0
  142. data/vendor/assets/images/groundworkcss/social-icons/googleplay.svg +24 -0
  143. data/vendor/assets/images/groundworkcss/social-icons/googleplus-m.png +0 -0
  144. data/vendor/assets/images/groundworkcss/social-icons/googleplus-s.png +0 -0
  145. data/vendor/assets/images/groundworkcss/social-icons/googleplus.png +0 -0
  146. data/vendor/assets/images/groundworkcss/social-icons/googleplus.svg +52 -0
  147. data/vendor/assets/images/groundworkcss/social-icons/html5-m.png +0 -0
  148. data/vendor/assets/images/groundworkcss/social-icons/html5-s.png +0 -0
  149. data/vendor/assets/images/groundworkcss/social-icons/html5.png +0 -0
  150. data/vendor/assets/images/groundworkcss/social-icons/html5.svg +29 -0
  151. data/vendor/assets/images/groundworkcss/social-icons/icloud-m.png +0 -0
  152. data/vendor/assets/images/groundworkcss/social-icons/icloud-s.png +0 -0
  153. data/vendor/assets/images/groundworkcss/social-icons/icloud.png +0 -0
  154. data/vendor/assets/images/groundworkcss/social-icons/icloud.svg +26 -0
  155. data/vendor/assets/images/groundworkcss/social-icons/instagram-m.png +0 -0
  156. data/vendor/assets/images/groundworkcss/social-icons/instagram-s.png +0 -0
  157. data/vendor/assets/images/groundworkcss/social-icons/instagram.png +0 -0
  158. data/vendor/assets/images/groundworkcss/social-icons/instagram.svg +166 -0
  159. data/vendor/assets/images/groundworkcss/social-icons/lastfm-m.png +0 -0
  160. data/vendor/assets/images/groundworkcss/social-icons/lastfm-s.png +0 -0
  161. data/vendor/assets/images/groundworkcss/social-icons/lastfm.png +0 -0
  162. data/vendor/assets/images/groundworkcss/social-icons/lastfm.svg +44 -0
  163. data/vendor/assets/images/groundworkcss/social-icons/linkedin-m.png +0 -0
  164. data/vendor/assets/images/groundworkcss/social-icons/linkedin-s.png +0 -0
  165. data/vendor/assets/images/groundworkcss/social-icons/linkedin.png +0 -0
  166. data/vendor/assets/images/groundworkcss/social-icons/linkedin.svg +28 -0
  167. data/vendor/assets/images/groundworkcss/social-icons/mail-m.png +0 -0
  168. data/vendor/assets/images/groundworkcss/social-icons/mail-s.png +0 -0
  169. data/vendor/assets/images/groundworkcss/social-icons/mail.png +0 -0
  170. data/vendor/assets/images/groundworkcss/social-icons/mail.svg +27 -0
  171. data/vendor/assets/images/groundworkcss/social-icons/mercurial-m.png +0 -0
  172. data/vendor/assets/images/groundworkcss/social-icons/mercurial-s.png +0 -0
  173. data/vendor/assets/images/groundworkcss/social-icons/mercurial.png +0 -0
  174. data/vendor/assets/images/groundworkcss/social-icons/mercurial.svg +22 -0
  175. data/vendor/assets/images/groundworkcss/social-icons/mixi-m.png +0 -0
  176. data/vendor/assets/images/groundworkcss/social-icons/mixi-s.png +0 -0
  177. data/vendor/assets/images/groundworkcss/social-icons/mixi.png +0 -0
  178. data/vendor/assets/images/groundworkcss/social-icons/mixi.svg +32 -0
  179. data/vendor/assets/images/groundworkcss/social-icons/msn-m.png +0 -0
  180. data/vendor/assets/images/groundworkcss/social-icons/msn-s.png +0 -0
  181. data/vendor/assets/images/groundworkcss/social-icons/msn.png +0 -0
  182. data/vendor/assets/images/groundworkcss/social-icons/msn.svg +44 -0
  183. data/vendor/assets/images/groundworkcss/social-icons/orkut-m.png +0 -0
  184. data/vendor/assets/images/groundworkcss/social-icons/orkut-s.png +0 -0
  185. data/vendor/assets/images/groundworkcss/social-icons/orkut.png +0 -0
  186. data/vendor/assets/images/groundworkcss/social-icons/orkut.svg +23 -0
  187. data/vendor/assets/images/groundworkcss/social-icons/picasa-m.png +0 -0
  188. data/vendor/assets/images/groundworkcss/social-icons/picasa-s.png +0 -0
  189. data/vendor/assets/images/groundworkcss/social-icons/picasa.png +0 -0
  190. data/vendor/assets/images/groundworkcss/social-icons/picasa.svg +48 -0
  191. data/vendor/assets/images/groundworkcss/social-icons/pinterest-m.png +0 -0
  192. data/vendor/assets/images/groundworkcss/social-icons/pinterest-s.png +0 -0
  193. data/vendor/assets/images/groundworkcss/social-icons/pinterest.png +0 -0
  194. data/vendor/assets/images/groundworkcss/social-icons/pinterest.svg +42 -0
  195. data/vendor/assets/images/groundworkcss/social-icons/pocketapp-m.png +0 -0
  196. data/vendor/assets/images/groundworkcss/social-icons/pocketapp-s.png +0 -0
  197. data/vendor/assets/images/groundworkcss/social-icons/pocketapp.png +0 -0
  198. data/vendor/assets/images/groundworkcss/social-icons/pocketapp.svg +38 -0
  199. data/vendor/assets/images/groundworkcss/social-icons/quora-m.png +0 -0
  200. data/vendor/assets/images/groundworkcss/social-icons/quora-s.png +0 -0
  201. data/vendor/assets/images/groundworkcss/social-icons/quora.png +0 -0
  202. data/vendor/assets/images/groundworkcss/social-icons/quora.svg +20 -0
  203. data/vendor/assets/images/groundworkcss/social-icons/rdio-m.png +0 -0
  204. data/vendor/assets/images/groundworkcss/social-icons/rdio-s.png +0 -0
  205. data/vendor/assets/images/groundworkcss/social-icons/rdio.png +0 -0
  206. data/vendor/assets/images/groundworkcss/social-icons/rdio.svg +18 -0
  207. data/vendor/assets/images/groundworkcss/social-icons/renren-m.png +0 -0
  208. data/vendor/assets/images/groundworkcss/social-icons/renren-s.png +0 -0
  209. data/vendor/assets/images/groundworkcss/social-icons/renren.png +0 -0
  210. data/vendor/assets/images/groundworkcss/social-icons/renren.svg +79 -0
  211. data/vendor/assets/images/groundworkcss/social-icons/rss-m.png +0 -0
  212. data/vendor/assets/images/groundworkcss/social-icons/rss-s.png +0 -0
  213. data/vendor/assets/images/groundworkcss/social-icons/rss.png +0 -0
  214. data/vendor/assets/images/groundworkcss/social-icons/rss.svg +18 -0
  215. data/vendor/assets/images/groundworkcss/social-icons/skitch-m.png +0 -0
  216. data/vendor/assets/images/groundworkcss/social-icons/skitch-s.png +0 -0
  217. data/vendor/assets/images/groundworkcss/social-icons/skitch.png +0 -0
  218. data/vendor/assets/images/groundworkcss/social-icons/skitch.svg +24 -0
  219. data/vendor/assets/images/groundworkcss/social-icons/skype-m.png +0 -0
  220. data/vendor/assets/images/groundworkcss/social-icons/skype-s.png +0 -0
  221. data/vendor/assets/images/groundworkcss/social-icons/skype.png +0 -0
  222. data/vendor/assets/images/groundworkcss/social-icons/skype.svg +25 -0
  223. data/vendor/assets/images/groundworkcss/social-icons/soundcloud-m.png +0 -0
  224. data/vendor/assets/images/groundworkcss/social-icons/soundcloud-s.png +0 -0
  225. data/vendor/assets/images/groundworkcss/social-icons/soundcloud.png +0 -0
  226. data/vendor/assets/images/groundworkcss/social-icons/soundcloud.svg +60 -0
  227. data/vendor/assets/images/groundworkcss/social-icons/spotify-m.png +0 -0
  228. data/vendor/assets/images/groundworkcss/social-icons/spotify-s.png +0 -0
  229. data/vendor/assets/images/groundworkcss/social-icons/spotify.png +0 -0
  230. data/vendor/assets/images/groundworkcss/social-icons/spotify.svg +38 -0
  231. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow-m.png +0 -0
  232. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow-s.png +0 -0
  233. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow.png +0 -0
  234. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow.svg +32 -0
  235. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon-m.png +0 -0
  236. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon-s.png +0 -0
  237. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon.png +0 -0
  238. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon.svg +22 -0
  239. data/vendor/assets/images/groundworkcss/social-icons/svn-m.png +0 -0
  240. data/vendor/assets/images/groundworkcss/social-icons/svn-s.png +0 -0
  241. data/vendor/assets/images/groundworkcss/social-icons/svn.png +0 -0
  242. data/vendor/assets/images/groundworkcss/social-icons/svn.svg +25 -0
  243. data/vendor/assets/images/groundworkcss/social-icons/tent-m.png +0 -0
  244. data/vendor/assets/images/groundworkcss/social-icons/tent-s.png +0 -0
  245. data/vendor/assets/images/groundworkcss/social-icons/tent.png +0 -0
  246. data/vendor/assets/images/groundworkcss/social-icons/tent.svg +16 -0
  247. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor-m.png +0 -0
  248. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor-s.png +0 -0
  249. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor.png +0 -0
  250. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor.svg +30 -0
  251. data/vendor/assets/images/groundworkcss/social-icons/tumblr-m.png +0 -0
  252. data/vendor/assets/images/groundworkcss/social-icons/tumblr-s.png +0 -0
  253. data/vendor/assets/images/groundworkcss/social-icons/tumblr.png +0 -0
  254. data/vendor/assets/images/groundworkcss/social-icons/tumblr.svg +16 -0
  255. data/vendor/assets/images/groundworkcss/social-icons/twitter-m.png +0 -0
  256. data/vendor/assets/images/groundworkcss/social-icons/twitter-s.png +0 -0
  257. data/vendor/assets/images/groundworkcss/social-icons/twitter.png +0 -0
  258. data/vendor/assets/images/groundworkcss/social-icons/twitter.svg +24 -0
  259. data/vendor/assets/images/groundworkcss/social-icons/vimeo-m.png +0 -0
  260. data/vendor/assets/images/groundworkcss/social-icons/vimeo-s.png +0 -0
  261. data/vendor/assets/images/groundworkcss/social-icons/vimeo.png +0 -0
  262. data/vendor/assets/images/groundworkcss/social-icons/vimeo.svg +20 -0
  263. data/vendor/assets/images/groundworkcss/social-icons/weibo-m.png +0 -0
  264. data/vendor/assets/images/groundworkcss/social-icons/weibo-s.png +0 -0
  265. data/vendor/assets/images/groundworkcss/social-icons/weibo.png +0 -0
  266. data/vendor/assets/images/groundworkcss/social-icons/weibo.svg +54 -0
  267. data/vendor/assets/images/groundworkcss/social-icons/windows-m.png +0 -0
  268. data/vendor/assets/images/groundworkcss/social-icons/windows-s.png +0 -0
  269. data/vendor/assets/images/groundworkcss/social-icons/windows.png +0 -0
  270. data/vendor/assets/images/groundworkcss/social-icons/windows.svg +26 -0
  271. data/vendor/assets/images/groundworkcss/social-icons/wordpress-m.png +0 -0
  272. data/vendor/assets/images/groundworkcss/social-icons/wordpress-s.png +0 -0
  273. data/vendor/assets/images/groundworkcss/social-icons/wordpress.png +0 -0
  274. data/vendor/assets/images/groundworkcss/social-icons/wordpress.svg +50 -0
  275. data/vendor/assets/images/groundworkcss/social-icons/xing-m.png +0 -0
  276. data/vendor/assets/images/groundworkcss/social-icons/xing-s.png +0 -0
  277. data/vendor/assets/images/groundworkcss/social-icons/xing.png +0 -0
  278. data/vendor/assets/images/groundworkcss/social-icons/xing.svg +16 -0
  279. data/vendor/assets/images/groundworkcss/social-icons/yelp-m.png +0 -0
  280. data/vendor/assets/images/groundworkcss/social-icons/yelp-s.png +0 -0
  281. data/vendor/assets/images/groundworkcss/social-icons/yelp.png +0 -0
  282. data/vendor/assets/images/groundworkcss/social-icons/yelp.svg +54 -0
  283. data/vendor/assets/images/groundworkcss/social-icons/youtube-m.png +0 -0
  284. data/vendor/assets/images/groundworkcss/social-icons/youtube-s.png +0 -0
  285. data/vendor/assets/images/groundworkcss/social-icons/youtube.png +0 -0
  286. data/vendor/assets/images/groundworkcss/social-icons/youtube.svg +106 -0
  287. data/vendor/assets/images/groundworkcss/social-icons/youversion-m.png +0 -0
  288. data/vendor/assets/images/groundworkcss/social-icons/youversion-s.png +0 -0
  289. data/vendor/assets/images/groundworkcss/social-icons/youversion.png +0 -0
  290. data/vendor/assets/images/groundworkcss/social-icons/youversion.svg +54 -0
  291. data/vendor/assets/images/groundworkcss/social-icons/zerply-m.png +0 -0
  292. data/vendor/assets/images/groundworkcss/social-icons/zerply-s.png +0 -0
  293. data/vendor/assets/images/groundworkcss/social-icons/zerply.png +0 -0
  294. data/vendor/assets/images/groundworkcss/social-icons/zerply.svg +20 -0
  295. data/vendor/assets/javascripts/groundwork.js +3 -0
  296. data/vendor/assets/javascripts/groundwork.js~ +8 -0
  297. data/vendor/assets/javascripts/groundworkcss/coffee/groundwork.coffee +207 -0
  298. data/vendor/assets/javascripts/groundworkcss/groundwork.js +845 -0
  299. data/vendor/assets/javascripts/groundworkcss/groundwork.js~ +7 -0
  300. data/vendor/assets/javascripts/groundworkcss/libs/boxsizing.htc +501 -0
  301. data/vendor/assets/javascripts/groundworkcss/libs/html5shiv.js +299 -0
  302. data/vendor/assets/javascripts/groundworkcss/libs/html5shiv.min.js +8 -0
  303. data/vendor/assets/javascripts/groundworkcss/libs/jquery-1.8.2.min.js +2 -0
  304. data/vendor/assets/javascripts/groundworkcss/libs/modernizr-2.6.2.min.js +4 -0
  305. data/vendor/assets/javascripts/groundworkcss/libs/placeholder_polyfill.jquery.js +212 -0
  306. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.modals.coffee +161 -0
  307. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.popover.coffee +198 -0
  308. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.popover.js +10 -0
  309. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.coffee +56 -0
  310. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js +10 -0
  311. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveText.coffee +32 -0
  312. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveText.js +10 -0
  313. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.tooltip.coffee +121 -0
  314. data/vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.tooltip.js +10 -0
  315. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.modals.js +183 -0
  316. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.orbit-1.4.0.js +919 -0
  317. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.popover.js +206 -0
  318. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.responsiveTables.js +63 -0
  319. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.responsiveText.js +45 -0
  320. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.tooltip.js +118 -0
  321. data/vendor/assets/stylesheets/groundworkcss-scss/_buttons.scss +178 -0
  322. data/vendor/assets/stylesheets/groundworkcss-scss/_callouts.scss +51 -0
  323. data/vendor/assets/stylesheets/groundworkcss-scss/_font-awesome.scss +534 -0
  324. data/vendor/assets/stylesheets/groundworkcss-scss/_font-awesome.scss~ +534 -0
  325. data/vendor/assets/stylesheets/groundworkcss-scss/_forms.scss +161 -0
  326. data/vendor/assets/stylesheets/groundworkcss-scss/_global.scss +31 -0
  327. data/vendor/assets/stylesheets/groundworkcss-scss/_grid.scss +384 -0
  328. data/vendor/assets/stylesheets/groundworkcss-scss/_layout.scss +78 -0
  329. data/vendor/assets/stylesheets/groundworkcss-scss/_messages.scss +59 -0
  330. data/vendor/assets/stylesheets/groundworkcss-scss/_mixins.scss +197 -0
  331. data/vendor/assets/stylesheets/groundworkcss-scss/_mobile-reset.scss +11 -0
  332. data/vendor/assets/stylesheets/groundworkcss-scss/_modals.scss +101 -0
  333. data/vendor/assets/stylesheets/groundworkcss-scss/_navigation.scss +284 -0
  334. data/vendor/assets/stylesheets/groundworkcss-scss/_orbit.scss +239 -0
  335. data/vendor/assets/stylesheets/groundworkcss-scss/_popovers.scss +10 -0
  336. data/vendor/assets/stylesheets/groundworkcss-scss/_reset.scss +77 -0
  337. data/vendor/assets/stylesheets/groundworkcss-scss/_responsive.scss +293 -0
  338. data/vendor/assets/stylesheets/groundworkcss-scss/_social-icons.scss +92 -0
  339. data/vendor/assets/stylesheets/groundworkcss-scss/_social-icons.scss~ +92 -0
  340. data/vendor/assets/stylesheets/groundworkcss-scss/_tables.scss +80 -0
  341. data/vendor/assets/stylesheets/groundworkcss-scss/_tabs.scss +137 -0
  342. data/vendor/assets/stylesheets/groundworkcss-scss/_tooltips.scss +161 -0
  343. data/vendor/assets/stylesheets/groundworkcss-scss/_typography.scss +255 -0
  344. data/vendor/assets/stylesheets/groundworkcss-scss/_ui-elements.scss +10 -0
  345. data/vendor/assets/stylesheets/groundworkcss-scss/_variables.scss +134 -0
  346. data/vendor/assets/stylesheets/groundworkcss-scss/_webfonts.scss +19 -0
  347. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork-ie.scss +64 -0
  348. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork.scss +37 -0
  349. data/vendor/assets/stylesheets/groundworkcss-scss/no-svg.scss +69 -0
  350. metadata +460 -0
@@ -0,0 +1,10 @@
1
+ // Generated by CoffeeScript 1.4.0
2
+ /*
3
+ *
4
+ * jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText
5
+ *
6
+ * Open source under the BSD License.
7
+ *
8
+ * Copyright © 2013 Gary Hepting. All rights reserved.
9
+ *
10
+ */(function(){(function(e){var t;t=[];e.fn.responsiveText=function(n){var r;r={compressor:n.compressor||10,minSize:n.minSize||Number.NEGATIVE_INFINITY,maxSize:n.maxSize||Number.POSITIVE_INFINITY};return this.each(function(){var n;n=e(this);n.attr("data-compression",r.compressor);n.attr("data-min",r.minSize);n.attr("data-max",r.maxSize);n.css("font-size",Math.floor(Math.max(Math.min(n.width()/r.compressor,parseFloat(r.maxSize)),parseFloat(r.minSize))));return t.push(n)})};return e(window).on("resize",function(){return e(t).each(function(){var t;t=e(this);return t.css("font-size",Math.floor(Math.max(Math.min(t.width()/t.attr("data-compression"),parseFloat(t.attr("data-max"))),parseFloat(t.attr("data-min")))))})})})(jQuery)}).call(this);
@@ -0,0 +1,121 @@
1
+ ###
2
+ *
3
+ * jQuery Tooltips by Gary Hepting - https://github.com/ghepting/jquery-tooltips
4
+ *
5
+ * Open source under the BSD License.
6
+ *
7
+ * Copyright © 2013 Gary Hepting. All rights reserved.
8
+ *
9
+ ###
10
+
11
+ (($) ->
12
+ $.fn.tooltip = (options) ->
13
+ defaults =
14
+ topOffset: 0
15
+ delay: 100 # delay before showing (ms)
16
+ speed: 100 # animation speed (ms)
17
+
18
+ options = $.extend(defaults, options)
19
+
20
+ tooltip = $('#tooltip') # tooltip element
21
+ delayShow = '' # delayed open
22
+ trigger = '' # store trigger
23
+
24
+ getElementPosition = (el) -> # get element position
25
+ offset = el.offset()
26
+ win = $(window)
27
+ top: top = offset.top - win.scrollTop()
28
+ left: left = offset.left - win.scrollLeft()
29
+ bottom: bottom = win.height() - top - el.outerHeight()
30
+ right: right = win.width() - left - el.outerWidth()
31
+
32
+ setPosition = (trigger) ->
33
+ # get trigger element coordinates
34
+ coords = getElementPosition(trigger)
35
+ # tooltip dimensions
36
+ if tooltip.outerWidth() > ($(window).width() - 20)
37
+ tooltip.css('width',$(window).width() - 20)
38
+ attrs = {}
39
+ # adjust max width of tooltip
40
+ tooltip.css('max-width',
41
+ Math.min(
42
+ ($(window).width()-parseInt($('body').css('padding-left'))-parseInt($('body').css('padding-right'))),
43
+ parseInt(tooltip.css('max-width'))
44
+ )
45
+ )
46
+ width = tooltip.outerWidth()
47
+ height = tooltip.outerHeight()
48
+ # horizontal positioning
49
+ if coords.left <= coords.right # default position
50
+ tooltip.addClass('left')
51
+ attrs.left = coords.left
52
+ else # pin from right side
53
+ tooltip.addClass('right')
54
+ attrs.right = coords.right
55
+ # veritcal positioning
56
+ if (coords.top-options.topOffset) > (height+20) # top positioned tooltip
57
+ tooltip.addClass('top')
58
+ attrs.top = (trigger.offset().top - height) - 20
59
+ else # bottom positioned tooltip
60
+ tooltip.addClass('bottom')
61
+ attrs.top = trigger.offset().top + trigger.outerHeight() - 4
62
+ tooltip.css attrs
63
+
64
+ closetooltip = ->
65
+ tooltip.stop().remove() # remove tooltip
66
+ $('[role=tooltip]').removeClass('on')
67
+
68
+ showtooltip = (trigger) ->
69
+ closetooltip() # close tooltip
70
+ clearTimeout(delayShow) # cancel previous timeout
71
+ delayShow = setTimeout ->
72
+ if $('#tooltip').length != 1
73
+ # destroy any lingering tooltips
74
+ $('#tooltip').remove()
75
+ # create tooltip DOM element
76
+ tooltip = $("<div id=\"tooltip\"></div>")
77
+ # add tooltip element to DOM
78
+ tooltip.appendTo("body")
79
+ # set tooltip text
80
+ tooltip.css("opacity", 0).text(trigger.attr('data-title'))
81
+ # initialize tooltip
82
+ setPosition(trigger)
83
+ trigger.addClass('on')
84
+ tooltip.animate
85
+ top: "+=10"
86
+ opacity: 1
87
+ , options.speed
88
+ , options.delay
89
+
90
+ @each ->
91
+ $this = $(this)
92
+ $this.attr('role','tooltip').attr('data-title',$this.attr('title'))
93
+ $this.removeAttr "title" # remove title attribute (disable browser tooltips)
94
+
95
+
96
+ # focus behavior
97
+ $('body').on(
98
+ 'focus', '[role=tooltip]', ->
99
+ showtooltip($(this))
100
+ ).on(
101
+ 'blur', '[role=tooltip]', ->
102
+ clearTimeout(delayShow)
103
+ closetooltip()
104
+ ).on(
105
+ 'mouseenter', '[role=tooltip]:not(input,select,textarea)', ->
106
+ showtooltip($(this))
107
+ ).on(
108
+ 'mouseleave', '[role=tooltip]:not(input,select,textarea)', ->
109
+ clearTimeout(delayShow)
110
+ closetooltip()
111
+ )
112
+
113
+ $(window).on
114
+ scroll: ->
115
+ trigger = $('[role=tooltip].on')
116
+ if trigger.length
117
+ setPosition(trigger)
118
+ $('#tooltip').css
119
+ top: "+=10"
120
+
121
+ ) jQuery
@@ -0,0 +1,10 @@
1
+ // Generated by CoffeeScript 1.4.0
2
+ /*
3
+ *
4
+ * jQuery Tooltips by Gary Hepting - https://github.com/ghepting/jquery-tooltips
5
+ *
6
+ * Open source under the BSD License.
7
+ *
8
+ * Copyright © 2013 Gary Hepting. All rights reserved.
9
+ *
10
+ */(function(){(function(e){return e.fn.tooltip=function(t){var n,r,i,s,o,u,a,f;r={topOffset:0,delay:100,speed:100};t=e.extend(r,t);a=e("#tooltip");i="";f="";s=function(t){var n,r,i,s,o,u;i=t.offset();u=e(window);return{top:o=i.top-u.scrollTop(),left:r=i.left-u.scrollLeft(),bottom:n=u.height()-o-t.outerHeight(),right:s=u.width()-r-t.outerWidth()}};o=function(n){var r,i,o,u;i=s(n);a.outerWidth()>e(window).width()-20&&a.css("width",e(window).width()-20);r={};a.css("max-width",Math.min(e(window).width()-parseInt(e("body").css("padding-left"))-parseInt(e("body").css("padding-right")),parseInt(a.css("max-width"))));u=a.outerWidth();o=a.outerHeight();if(i.left<=i.right){a.addClass("left");r.left=i.left}else{a.addClass("right");r.right=i.right}if(i.top-t.topOffset>o+20){a.addClass("top");r.top=n.offset().top-o-20}else{a.addClass("bottom");r.top=n.offset().top+n.outerHeight()-4}return a.css(r)};n=function(){a.stop().remove();return e("[role=tooltip]").removeClass("on")};u=function(r){n();clearTimeout(i);return i=setTimeout(function(){if(e("#tooltip").length!==1){e("#tooltip").remove();a=e('<div id="tooltip"></div>');a.appendTo("body")}a.css("opacity",0).text(r.attr("data-title"));o(r);r.addClass("on");return a.animate({top:"+=10",opacity:1},t.speed)},t.delay)};this.each(function(){var t;t=e(this);t.attr("role","tooltip").attr("data-title",t.attr("title"));return t.removeAttr("title")});e("body").on("focus","[role=tooltip]",function(){return u(e(this))}).on("blur","[role=tooltip]",function(){clearTimeout(i);return n()}).on("mouseenter","[role=tooltip]:not(input,select,textarea)",function(){return u(e(this))}).on("mouseleave","[role=tooltip]:not(input,select,textarea)",function(){clearTimeout(i);return n()});return e(window).on({scroll:function(){f=e("[role=tooltip].on");if(f.length){o(f);return e("#tooltip").css({top:"+=10"})}}})}})(jQuery)}).call(this);
@@ -0,0 +1,183 @@
1
+ // Generated by CoffeeScript 1.4.0
2
+
3
+ /*
4
+ *
5
+ * jQuery Modals by Gary Hepting
6
+ * https://github.com/ghepting/modal
7
+ *
8
+ * Based on Avgrund by Hakim El Hattab <3
9
+ *
10
+ */
11
+
12
+
13
+ (function() {
14
+
15
+ (function($) {
16
+ var elems, modals;
17
+ if ($('div#iframeModal').length < 1) {
18
+ $('body').append('<div class="iframe modal" id="iframeModal"><iframe marginheight="0" marginwidth="0" frameborder="0"></iframe></div>');
19
+ $('div#iframeModal').prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>');
20
+ }
21
+ $('a.modal').each(function() {
22
+ $(this).attr('data-url', $(this).attr('href'));
23
+ return $(this).attr('href', '#iframeModal');
24
+ });
25
+ $('a.modal').on("click", function(e) {
26
+ $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" src="' + $(this).attr('data-url') + '"></iframe>');
27
+ e.preventDefault();
28
+ return false;
29
+ });
30
+ elems = [];
31
+ $.fn.modal = function() {
32
+ this.each(function() {
33
+ $(this).not('#iframeModal').wrapInner('<div class="modal-content"></div>');
34
+ $(this).prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>').appendTo('body');
35
+ return $('[href=#' + $(this).attr('id') + ']').on("click", function(e) {
36
+ modals.open($(this).attr('href'));
37
+ e.preventDefault();
38
+ return false;
39
+ });
40
+ });
41
+ $('div.modal .close').on("click", function() {
42
+ return modals.close();
43
+ });
44
+ return $('div.modal .fullscreen').on("click", function() {
45
+ return modals.fullscreen($(this).parent('div.modal'));
46
+ });
47
+ };
48
+ modals = (function() {
49
+ var close, fullscreen, open;
50
+ $('html').addClass('modal-ready');
51
+ if ($("#overlay").length < 1) {
52
+ $('body').append('<div id="overlay"></div>');
53
+ }
54
+ $('#overlay, div.modal .close').bind("click", function(e) {
55
+ return close();
56
+ });
57
+ open = function(elem) {
58
+ $(window).bind("keydown", function(e) {
59
+ var keyCode;
60
+ keyCode = (e.which ? e.which : e.keyCode);
61
+ if (keyCode === 27) {
62
+ return close();
63
+ }
64
+ });
65
+ $(elem).addClass("active");
66
+ if (!$(elem).hasClass('iframe')) {
67
+ $(elem).css({
68
+ width: 'auto',
69
+ height: 'auto'
70
+ });
71
+ $(elem).css({
72
+ height: $(elem).outerHeight()
73
+ });
74
+ }
75
+ $(elem).css({
76
+ top: '50%',
77
+ left: '50%',
78
+ 'margin-top': ($(elem).outerHeight() / -2) + 'px',
79
+ 'margin-left': ($(elem).outerWidth() / -2) + 'px'
80
+ });
81
+ setTimeout(function() {
82
+ return $('html').addClass("modal-active");
83
+ }, 0);
84
+ setTimeout(function() {
85
+ return $('html').removeClass('modal-ready');
86
+ }, 400);
87
+ };
88
+ close = function() {
89
+ var modal;
90
+ modal = $('div.modal.active');
91
+ $(window).unbind("keydown");
92
+ $('html').removeClass("modal-active").addClass('modal-ready');
93
+ if (modal.hasClass('iframe')) {
94
+ $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0"></iframe>');
95
+ modal.css({
96
+ width: '80%',
97
+ height: '80%'
98
+ });
99
+ } else {
100
+ modal.css({
101
+ width: 'auto',
102
+ height: 'auto'
103
+ });
104
+ }
105
+ modal.css({
106
+ top: '10%',
107
+ left: '10%',
108
+ 'max-width': '80%',
109
+ 'max-height': '80%',
110
+ 'margin-top': 0,
111
+ 'margin-left': 0
112
+ });
113
+ modal.removeClass("active").removeClass("fullscreen");
114
+ $('i.fullscreen', modal).removeClass('icon-resize-small').addClass('icon-resize-full');
115
+ };
116
+ fullscreen = function(elem) {
117
+ if ($('div.modal.active').hasClass('fullscreen')) {
118
+ $('div.modal i.fullscreen').removeClass('icon-resize-small').addClass('icon-resize-full');
119
+ if ($('div.modal.active').hasClass('iframe')) {
120
+ $('div.modal.active').css({
121
+ width: '80%',
122
+ height: '80%'
123
+ });
124
+ } else {
125
+ $('div.modal.active').css({
126
+ width: 'auto',
127
+ height: 'auto'
128
+ });
129
+ $('div.modal.active').css({
130
+ height: $('div.modal.active').outerHeight()
131
+ });
132
+ }
133
+ $('div.modal.active').removeClass('fullscreen').css({
134
+ 'max-width': '80%',
135
+ 'max-height': '80%'
136
+ });
137
+ $('div.modal.active').delay(100).css({
138
+ top: '50%',
139
+ left: '50%',
140
+ 'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
141
+ 'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
142
+ });
143
+ } else {
144
+ $('div.modal i.fullscreen').addClass('icon-resize-small').removeClass('icon-resize-full');
145
+ $('div.modal.active').addClass('fullscreen').css({
146
+ top: 0,
147
+ left: 0,
148
+ 'margin-top': 0,
149
+ 'margin-left': 0,
150
+ width: '100%',
151
+ height: '100%',
152
+ 'max-width': '100%',
153
+ 'max-height': '100%'
154
+ });
155
+ }
156
+ };
157
+ return {
158
+ open: open,
159
+ close: close,
160
+ fullscreen: fullscreen
161
+ };
162
+ })();
163
+ return $(window).resize(function() {
164
+ return $('div.modal.active').each(function() {
165
+ $(this).removeClass('active').css({
166
+ top: '50%',
167
+ left: '50%',
168
+ 'margin-top': ($(this).outerHeight() / -2) + 'px',
169
+ 'margin-left': ($(this).outerWidth() / -2) + 'px'
170
+ }).addClass('active');
171
+ if (!$(this).hasClass('iframe')) {
172
+ $(this).css({
173
+ height: 'auto'
174
+ });
175
+ return $(this).css({
176
+ height: $(this).outerHeight()
177
+ });
178
+ }
179
+ });
180
+ });
181
+ })(jQuery);
182
+
183
+ }).call(this);
@@ -0,0 +1,919 @@
1
+ /*
2
+ * jQuery Orbit Plugin 1.4.0
3
+ * www.ZURB.com/playground
4
+ * Copyright 2010, ZURB
5
+ * Free to use under the MIT license.
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ */
8
+
9
+
10
+ (function ($) {
11
+ 'use strict';
12
+
13
+ $.fn.findFirstImage = function () {
14
+ return this.first()
15
+ .find('img')
16
+ .andSelf().filter('img')
17
+ .first();
18
+ };
19
+
20
+ var ORBIT = {
21
+
22
+ defaults: {
23
+ animation: 'horizontal-push', // fade, horizontal-slide, vertical-slide, horizontal-push, vertical-push
24
+ animationSpeed: 600, // how fast animations are
25
+ timer: true, // display timer?
26
+ advanceSpeed: 4000, // if timer is enabled, time between transitions
27
+ pauseOnHover: false, // if you hover pauses the slider
28
+ startClockOnMouseOut: false, // if clock should start on MouseOut
29
+ startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
30
+ directionalNav: true, // manual advancing directional navs
31
+ directionalNavRightText: 'Right', // text of right directional element for accessibility
32
+ directionalNavLeftText: 'Left', // text of left directional element for accessibility
33
+ captions: true, // do you want captions?
34
+ captionAnimation: 'fade', // fade, slideOpen, none
35
+ captionAnimationSpeed: 600, // if so how quickly should they animate in
36
+ resetTimerOnClick: false, // true resets the timer instead of pausing slideshow progress on manual navigation
37
+ bullets: false, // true or false to activate the bullet navigation
38
+ bulletThumbs: false, // thumbnails for the bullets
39
+ bulletThumbLocation: '', // relative path to thumbnails from this file
40
+ bulletThumbsHideOnSmall: true, // hide thumbs on small devices
41
+ afterSlideChange: $.noop, // callback to execute after slide changes
42
+ afterLoadComplete: $.noop, // callback to execute after everything has been loaded
43
+ fluid: true,
44
+ centerBullets: true, // center bullet nav with js, turn this off if you want to position the bullet nav manually
45
+ singleCycle: false, // cycles through orbit slides only once
46
+ slideNumber: false, // display slide numbers?
47
+ stackOnSmall: false // stack slides on small devices (i.e. phones)
48
+ },
49
+
50
+ activeSlide: 0,
51
+ numberSlides: 0,
52
+ orbitWidth: null,
53
+ orbitHeight: null,
54
+ locked: null,
55
+ timerRunning: null,
56
+ degrees: 0,
57
+ wrapperHTML: '<div class="orbit-wrapper" />',
58
+ timerHTML: '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',
59
+ captionHTML: '<div class="orbit-caption"></div>',
60
+ directionalNavHTML: '<div class="slider-nav hide-for-small"><span class="right"></span><span class="left"></span></div>',
61
+ bulletHTML: '<ul class="orbit-bullets"></ul>',
62
+ slideNumberHTML: '<span class="orbit-slide-counter"></span>',
63
+
64
+ init: function (element, options) {
65
+ var $imageSlides,
66
+ imagesLoadedCount = 0,
67
+ self = this;
68
+
69
+ // Bind functions to correct context
70
+ this.clickTimer = $.proxy(this.clickTimer, this);
71
+ this.addBullet = $.proxy(this.addBullet, this);
72
+ this.resetAndUnlock = $.proxy(this.resetAndUnlock, this);
73
+ this.stopClock = $.proxy(this.stopClock, this);
74
+ this.startTimerAfterMouseLeave = $.proxy(this.startTimerAfterMouseLeave, this);
75
+ this.clearClockMouseLeaveTimer = $.proxy(this.clearClockMouseLeaveTimer, this);
76
+ this.rotateTimer = $.proxy(this.rotateTimer, this);
77
+
78
+ this.options = $.extend({}, this.defaults, options);
79
+ if (this.options.timer === 'false') this.options.timer = false;
80
+ if (this.options.captions === 'false') this.options.captions = false;
81
+ if (this.options.directionalNav === 'false') this.options.directionalNav = false;
82
+
83
+ this.$element = $(element);
84
+ this.$wrapper = this.$element.wrap(this.wrapperHTML).parent();
85
+ this.$slides = this.$element.children('img, a, div, figure, li');
86
+
87
+ this.$element.on('movestart', function(e) {
88
+ // If the movestart is heading off in an upwards or downwards
89
+ // direction, prevent it so that the browser scrolls normally.
90
+ if ((e.distX > e.distY && e.distX < -e.distY) ||
91
+ (e.distX < e.distY && e.distX > -e.distY)) {
92
+ e.preventDefault();
93
+ }
94
+ });
95
+
96
+ this.$element.bind('orbit.next', function () {
97
+ self.shift('next');
98
+ });
99
+
100
+ this.$element.bind('orbit.prev', function () {
101
+ self.shift('prev');
102
+ });
103
+
104
+ this.$element.bind('swipeleft', function () {
105
+ $(this).trigger('orbit.next');
106
+ });
107
+
108
+ this.$element.bind('swiperight', function () {
109
+ $(this).trigger('orbit.prev');
110
+ });
111
+
112
+ this.$element.bind('orbit.goto', function (event, index) {
113
+ self.shift(index);
114
+ });
115
+
116
+ this.$element.bind('orbit.start', function (event, index) {
117
+ self.startClock();
118
+ });
119
+
120
+ this.$element.bind('orbit.stop', function (event, index) {
121
+ self.stopClock();
122
+ });
123
+
124
+ $imageSlides = this.$slides.filter('img');
125
+
126
+ if ($imageSlides.length === 0) {
127
+ this.loaded();
128
+ } else {
129
+ $imageSlides.bind('imageready', function () {
130
+ imagesLoadedCount += 1;
131
+ if (imagesLoadedCount === $imageSlides.length) {
132
+ self.loaded();
133
+ }
134
+ });
135
+ }
136
+ },
137
+
138
+ loaded: function () {
139
+ this.$element
140
+ .addClass('orbit')
141
+ .css({width: '1px', height: '1px'});
142
+
143
+ if (this.options.stackOnSmall) {
144
+ this.$element.addClass('orbit-stack-on-small');
145
+ }
146
+
147
+ this.$slides.addClass('orbit-slide').css({"opacity" : 0});
148
+
149
+ this.setDimentionsFromLargestSlide();
150
+ this.updateOptionsIfOnlyOneSlide();
151
+ this.setupFirstSlide();
152
+ this.notifySlideChange();
153
+
154
+ if (this.options.timer) {
155
+ this.setupTimer();
156
+ this.startClock();
157
+ }
158
+
159
+ if (this.options.captions) {
160
+ this.setupCaptions();
161
+ }
162
+
163
+ if (this.options.directionalNav) {
164
+ this.setupDirectionalNav();
165
+ }
166
+
167
+ if (this.options.bullets) {
168
+ this.setupBulletNav();
169
+ this.setActiveBullet();
170
+ }
171
+
172
+ this.options.afterLoadComplete.call(this);
173
+ Holder.run();
174
+ },
175
+
176
+ currentSlide: function () {
177
+ return this.$slides.eq(this.activeSlide);
178
+ },
179
+
180
+ notifySlideChange: function() {
181
+ if (this.options.slideNumber) {
182
+ var txt = (this.activeSlide+1) + ' of ' + this.$slides.length;
183
+ this.$element.trigger("orbit.change", {slideIndex: this.activeSlide, slideCount: this.$slides.length});
184
+ if (this.$counter === undefined) {
185
+ var $counter = $(this.slideNumberHTML).html(txt);
186
+ this.$counter = $counter;
187
+ this.$wrapper.append(this.$counter);
188
+ } else {
189
+ this.$counter.html(txt);
190
+ }
191
+ }
192
+ },
193
+
194
+ setDimentionsFromLargestSlide: function () {
195
+ //Collect all slides and set slider size of largest image
196
+ var self = this,
197
+ $fluidPlaceholder;
198
+
199
+ self.$element.add(self.$wrapper).width(this.$slides.first().outerWidth());
200
+ self.$element.add(self.$wrapper).height(this.$slides.first().height());
201
+ self.orbitWidth = this.$slides.first().outerWidth();
202
+ self.orbitHeight = this.$slides.first().height();
203
+ $fluidPlaceholder = this.$slides.first().findFirstImage().clone();
204
+
205
+
206
+ this.$slides.each(function () {
207
+ var slide = $(this),
208
+ slideWidth = slide.outerWidth(),
209
+ slideHeight = slide.height();
210
+
211
+ if (slideWidth > self.$element.outerWidth()) {
212
+ self.$element.add(self.$wrapper).width(slideWidth);
213
+ self.orbitWidth = self.$element.outerWidth();
214
+ }
215
+ if (slideHeight > self.$element.height()) {
216
+ self.$element.add(self.$wrapper).height(slideHeight);
217
+ self.orbitHeight = self.$element.height();
218
+ $fluidPlaceholder = $(this).findFirstImage().clone();
219
+ }
220
+ self.numberSlides += 1;
221
+ });
222
+
223
+ if (this.options.fluid) {
224
+ if (typeof this.options.fluid === "string") {
225
+ // $fluidPlaceholder = $("<img>").attr("src", "http://placehold.it/" + this.options.fluid);
226
+ $fluidPlaceholder = $("<img>").attr("data-src", "holder.js/" + this.options.fluid);
227
+ //var inner = $("<div/>").css({"display":"inline-block", "width":"2px", "height":"2px"});
228
+ //$fluidPlaceholder = $("<div/>").css({"float":"left"});
229
+ //$fluidPlaceholder.wrapInner(inner);
230
+
231
+ //$fluidPlaceholder = $("<div/>").css({"height":"1px", "width":"2px"});
232
+ //$fluidPlaceholder = $("<div style='display:inline-block;width:2px;height:1px;'></div>");
233
+ }
234
+
235
+ self.$element.prepend($fluidPlaceholder);
236
+ $fluidPlaceholder.addClass('fluid-placeholder');
237
+ self.$element.add(self.$wrapper).css({width: 'inherit'});
238
+ self.$element.add(self.$wrapper).css({height: 'inherit'});
239
+
240
+ $(window).bind('resize', function () {
241
+ self.orbitWidth = self.$element.outerWidth();
242
+ self.orbitHeight = self.$element.height();
243
+ });
244
+ }
245
+ },
246
+
247
+ //Animation locking functions
248
+ lock: function () {
249
+ this.locked = true;
250
+ },
251
+
252
+ unlock: function () {
253
+ this.locked = false;
254
+ },
255
+
256
+ updateOptionsIfOnlyOneSlide: function () {
257
+ if(this.$slides.length === 1) {
258
+ this.options.directionalNav = false;
259
+ this.options.timer = false;
260
+ this.options.bullets = false;
261
+ }
262
+ },
263
+
264
+ setupFirstSlide: function () {
265
+ //Set initial front photo z-index and fades it in
266
+ var self = this;
267
+ this.$slides.first()
268
+ .css({"z-index" : 3, "opacity" : 1})
269
+ .fadeIn(function() {
270
+ //brings in all other slides IF css declares a display: none
271
+ self.$slides.css({"display":"block"})
272
+ });
273
+ },
274
+
275
+ startClock: function () {
276
+ var self = this;
277
+
278
+ if(!this.options.timer) {
279
+ return false;
280
+ }
281
+
282
+ if (this.$timer.is(':hidden')) {
283
+ this.clock = setInterval(function () {
284
+ self.$element.trigger('orbit.next');
285
+ }, this.options.advanceSpeed);
286
+ } else {
287
+ this.timerRunning = true;
288
+ this.$pause.removeClass('active');
289
+ this.clock = setInterval(this.rotateTimer, this.options.advanceSpeed / 180, false);
290
+ }
291
+ },
292
+
293
+ rotateTimer: function (reset) {
294
+ var degreeCSS = "rotate(" + this.degrees + "deg)";
295
+ this.degrees += 2;
296
+ this.$rotator.css({
297
+ "-webkit-transform": degreeCSS,
298
+ "-moz-transform": degreeCSS,
299
+ "-o-transform": degreeCSS,
300
+ "-ms-transform": degreeCSS
301
+ });
302
+ if (reset) {
303
+ this.degrees = 0;
304
+ this.$rotator.removeClass('move');
305
+ this.$mask.removeClass('move');
306
+ }
307
+ if(this.degrees > 180) {
308
+ this.$rotator.addClass('move');
309
+ this.$mask.addClass('move');
310
+ }
311
+ if(this.degrees > 360) {
312
+ this.$rotator.removeClass('move');
313
+ this.$mask.removeClass('move');
314
+ this.degrees = 0;
315
+ this.$element.trigger('orbit.next');
316
+ }
317
+ },
318
+
319
+ stopClock: function () {
320
+ if (!this.options.timer) {
321
+ return false;
322
+ } else {
323
+ this.timerRunning = false;
324
+ clearInterval(this.clock);
325
+ this.$pause.addClass('active');
326
+ }
327
+ },
328
+
329
+ setupTimer: function () {
330
+ this.$timer = $(this.timerHTML);
331
+ this.$wrapper.append(this.$timer);
332
+
333
+ this.$rotator = this.$timer.find('.rotator');
334
+ this.$mask = this.$timer.find('.mask');
335
+ this.$pause = this.$timer.find('.pause');
336
+
337
+ this.$timer.click(this.clickTimer);
338
+
339
+ if (this.options.startClockOnMouseOut) {
340
+ this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);
341
+ this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer);
342
+ }
343
+
344
+ if (this.options.pauseOnHover) {
345
+ this.$wrapper.mouseenter(this.stopClock);
346
+ }
347
+ },
348
+
349
+ startTimerAfterMouseLeave: function () {
350
+ var self = this;
351
+
352
+ this.outTimer = setTimeout(function() {
353
+ if(!self.timerRunning){
354
+ self.startClock();
355
+ }
356
+ }, this.options.startClockOnMouseOutAfter)
357
+ },
358
+
359
+ clearClockMouseLeaveTimer: function () {
360
+ clearTimeout(this.outTimer);
361
+ },
362
+
363
+ clickTimer: function () {
364
+ if(!this.timerRunning) {
365
+ this.startClock();
366
+ } else {
367
+ this.stopClock();
368
+ }
369
+ },
370
+
371
+ setupCaptions: function () {
372
+ this.$caption = $(this.captionHTML);
373
+ this.$wrapper.append(this.$caption);
374
+ this.setCaption();
375
+ },
376
+
377
+ setCaption: function () {
378
+ var captionLocation = this.currentSlide().attr('data-caption'),
379
+ captionHTML;
380
+
381
+ if (!this.options.captions) {
382
+ return false;
383
+ }
384
+
385
+ //Set HTML for the caption if it exists
386
+ if (captionLocation) {
387
+ //if caption text is blank, don't show captions
388
+ if ($.trim($(captionLocation).text()).length < 1){
389
+ return false;
390
+ }
391
+
392
+ // if location selector starts with '#', remove it so we don't see id="#selector"
393
+ if (captionLocation.charAt(0) == '#') {
394
+ captionLocation = captionLocation.substring(1, captionLocation.length);
395
+ }
396
+ captionHTML = $('#' + captionLocation).html(); //get HTML from the matching HTML entity
397
+ this.$caption
398
+ .attr('id', captionLocation) // Add ID caption TODO why is the id being set?
399
+ .html(captionHTML); // Change HTML in Caption
400
+ //Animations for Caption entrances
401
+ switch (this.options.captionAnimation) {
402
+ case 'none':
403
+ this.$caption.show();
404
+ break;
405
+ case 'fade':
406
+ this.$caption.fadeIn(this.options.captionAnimationSpeed);
407
+ break;
408
+ case 'slideOpen':
409
+ this.$caption.slideDown(this.options.captionAnimationSpeed);
410
+ break;
411
+ }
412
+ } else {
413
+ //Animations for Caption exits
414
+ switch (this.options.captionAnimation) {
415
+ case 'none':
416
+ this.$caption.hide();
417
+ break;
418
+ case 'fade':
419
+ this.$caption.fadeOut(this.options.captionAnimationSpeed);
420
+ break;
421
+ case 'slideOpen':
422
+ this.$caption.slideUp(this.options.captionAnimationSpeed);
423
+ break;
424
+ }
425
+ }
426
+ },
427
+
428
+ setupDirectionalNav: function () {
429
+ var self = this,
430
+ $directionalNav = $(this.directionalNavHTML);
431
+
432
+ $directionalNav.find('.right').html(this.options.directionalNavRightText);
433
+ $directionalNav.find('.left').html(this.options.directionalNavLeftText);
434
+
435
+ this.$wrapper.append($directionalNav);
436
+
437
+ this.$wrapper.find('.left').click(function () {
438
+ self.stopClock();
439
+ if (self.options.resetTimerOnClick) {
440
+ self.rotateTimer(true);
441
+ self.startClock();
442
+ }
443
+ self.$element.trigger('orbit.prev');
444
+ });
445
+
446
+ this.$wrapper.find('.right').click(function () {
447
+ self.stopClock();
448
+ if (self.options.resetTimerOnClick) {
449
+ self.rotateTimer(true);
450
+ self.startClock();
451
+ }
452
+ self.$element.trigger('orbit.next');
453
+ });
454
+ },
455
+
456
+ setupBulletNav: function () {
457
+ this.$bullets = $(this.bulletHTML);
458
+ this.$wrapper.append(this.$bullets);
459
+ this.$slides.each(this.addBullet);
460
+ this.$element.addClass('with-bullets');
461
+ if (this.options.centerBullets) this.$bullets.css('margin-left', -this.$bullets.outerWidth() / 2);
462
+ if (this.options.bulletThumbsHideOnSmall) this.$bullets.addClass('hide-for-small');
463
+ },
464
+
465
+ addBullet: function (index, slide) {
466
+ var position = index + 1,
467
+ $li = $('<li>' + (position) + '</li>'),
468
+ thumbName,
469
+ self = this;
470
+
471
+ if (this.options.bulletThumbs) {
472
+ thumbName = $(slide).attr('data-thumb');
473
+ if (thumbName) {
474
+ $li
475
+ .addClass('has-thumb')
476
+ .css({background: "url(" + this.options.bulletThumbLocation + thumbName + ") no-repeat"});;
477
+ }
478
+ }
479
+ this.$bullets.append($li);
480
+ $li.data('index', index);
481
+ $li.click(function () {
482
+ self.stopClock();
483
+ if (self.options.resetTimerOnClick) {
484
+ self.rotateTimer(true);
485
+ self.startClock();
486
+ }
487
+ self.$element.trigger('orbit.goto', [$li.data('index')])
488
+ });
489
+ },
490
+
491
+ setActiveBullet: function () {
492
+ if(!this.options.bullets) { return false; } else {
493
+ this.$bullets.find('li')
494
+ .removeClass('active')
495
+ .eq(this.activeSlide)
496
+ .addClass('active');
497
+ }
498
+ },
499
+
500
+ resetAndUnlock: function () {
501
+ this.$slides
502
+ .eq(this.prevActiveSlide)
503
+ .css({"z-index" : 1});
504
+ this.unlock();
505
+ this.options.afterSlideChange.call(this, this.$slides.eq(this.prevActiveSlide), this.$slides.eq(this.activeSlide));
506
+ },
507
+
508
+ shift: function (direction) {
509
+ var slideDirection = direction;
510
+
511
+ //remember previous activeSlide
512
+ this.prevActiveSlide = this.activeSlide;
513
+
514
+ //exit function if bullet clicked is same as the current image
515
+ if (this.prevActiveSlide == slideDirection) { return false; }
516
+
517
+ if (this.$slides.length == "1") { return false; }
518
+ if (!this.locked) {
519
+ this.lock();
520
+ //deduce the proper activeImage
521
+ if (direction == "next") {
522
+ this.activeSlide++;
523
+ if (this.activeSlide == this.numberSlides) {
524
+ this.activeSlide = 0;
525
+ }
526
+ } else if (direction == "prev") {
527
+ this.activeSlide--
528
+ if (this.activeSlide < 0) {
529
+ this.activeSlide = this.numberSlides - 1;
530
+ }
531
+ } else {
532
+ this.activeSlide = direction;
533
+ if (this.prevActiveSlide < this.activeSlide) {
534
+ slideDirection = "next";
535
+ } else if (this.prevActiveSlide > this.activeSlide) {
536
+ slideDirection = "prev"
537
+ }
538
+ }
539
+
540
+ //set to correct bullet
541
+ this.setActiveBullet();
542
+ this.notifySlideChange();
543
+
544
+ //set previous slide z-index to one below what new activeSlide will be
545
+ this.$slides
546
+ .eq(this.prevActiveSlide)
547
+ .css({"z-index" : 2});
548
+
549
+ //fade
550
+ if (this.options.animation == "fade") {
551
+ this.$slides
552
+ .eq(this.activeSlide)
553
+ .css({"opacity" : 0, "z-index" : 3})
554
+ .animate({"opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
555
+ this.$slides
556
+ .eq(this.prevActiveSlide)
557
+ .animate({"opacity":0}, this.options.animationSpeed);
558
+ }
559
+
560
+ //horizontal-slide
561
+ if (this.options.animation == "horizontal-slide") {
562
+ if (slideDirection == "next") {
563
+ this.$slides
564
+ .eq(this.activeSlide)
565
+ .css({"left": this.orbitWidth, "z-index" : 3})
566
+ .css("opacity", 1)
567
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
568
+ }
569
+ if (slideDirection == "prev") {
570
+ this.$slides
571
+ .eq(this.activeSlide)
572
+ .css({"left": -this.orbitWidth, "z-index" : 3})
573
+ .css("opacity", 1)
574
+ .animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
575
+ }
576
+ this.$slides
577
+ .eq(this.prevActiveSlide)
578
+ .css("opacity", 0);
579
+ }
580
+
581
+ //vertical-slide
582
+ if (this.options.animation == "vertical-slide") {
583
+ if (slideDirection == "prev") {
584
+ this.$slides
585
+ .eq(this.activeSlide)
586
+ .css({"top": this.orbitHeight, "z-index" : 3})
587
+ .css("opacity", 1)
588
+ .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
589
+ this.$slides
590
+ .eq(this.prevActiveSlide)
591
+ .css("opacity", 0);
592
+ }
593
+ if (slideDirection == "next") {
594
+ this.$slides
595
+ .eq(this.activeSlide)
596
+ .css({"top": -this.orbitHeight, "z-index" : 3})
597
+ .css("opacity", 1)
598
+ .animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
599
+ }
600
+ this.$slides
601
+ .eq(this.prevActiveSlide)
602
+ .css("opacity", 0);
603
+ }
604
+
605
+ //horizontal-push
606
+ if (this.options.animation == "horizontal-push") {
607
+ if (slideDirection == "next") {
608
+ this.$slides
609
+ .eq(this.activeSlide)
610
+ .css({"left": this.orbitWidth, "z-index" : 3})
611
+ .animate({"left" : 0, "opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
612
+ this.$slides
613
+ .eq(this.prevActiveSlide)
614
+ .animate({"left" : -this.orbitWidth}, this.options.animationSpeed, "", function(){
615
+ $(this).css({"opacity" : 0});
616
+ });
617
+ }
618
+ if (slideDirection == "prev") {
619
+ this.$slides
620
+ .eq(this.activeSlide)
621
+ .css({"left": -this.orbitWidth, "z-index" : 3})
622
+ .animate({"left" : 0, "opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
623
+ this.$slides
624
+ .eq(this.prevActiveSlide)
625
+ .animate({"left" : this.orbitWidth}, this.options.animationSpeed, "", function(){
626
+ $(this).css({"opacity" : 0});
627
+ });
628
+ }
629
+ }
630
+
631
+ //vertical-push
632
+ if (this.options.animation == "vertical-push") {
633
+ if (slideDirection == "next") {
634
+ this.$slides
635
+ .eq(this.activeSlide)
636
+ .css({top: -this.orbitHeight, "z-index" : 3})
637
+ .css("opacity", 1)
638
+ .animate({top : 0, "opacity":1}, this.options.animationSpeed, this.resetAndUnlock);
639
+ this.$slides
640
+ .eq(this.prevActiveSlide)
641
+ .css("opacity", 0)
642
+ .animate({top : this.orbitHeight}, this.options.animationSpeed, "");
643
+ }
644
+ if (slideDirection == "prev") {
645
+ this.$slides
646
+ .eq(this.activeSlide)
647
+ .css({top: this.orbitHeight, "z-index" : 3})
648
+ .css("opacity", 1)
649
+ .animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
650
+ this.$slides
651
+ .eq(this.prevActiveSlide)
652
+ .css("opacity", 0)
653
+ .animate({top : -this.orbitHeight}, this.options.animationSpeed);
654
+ }
655
+ }
656
+
657
+ this.setCaption();
658
+ }
659
+
660
+ // if on last slide and singleCycle is true, don't loop through slides again
661
+ // .length is zero based so must minus 1 to match activeSlide index
662
+ if (this.activeSlide === this.$slides.length-1 && this.options.singleCycle) {
663
+ this.stopClock();
664
+ }
665
+ }
666
+ };
667
+
668
+ $.fn.orbit = function (options) {
669
+ return this.each(function () {
670
+ var orbit = $.extend({}, ORBIT);
671
+ orbit.init(this, options);
672
+ });
673
+ };
674
+
675
+ })(jQuery);
676
+
677
+ /*!
678
+ * jQuery imageready Plugin
679
+ * http://www.zurb.com/playground/
680
+ *
681
+ * Copyright 2011, ZURB
682
+ * Released under the MIT License
683
+ */
684
+ (function ($) {
685
+
686
+ var options = {};
687
+
688
+ $.event.special.imageready = {
689
+
690
+ setup: function (data, namespaces, eventHandle) {
691
+ options = data || options;
692
+ },
693
+
694
+ add: function (handleObj) {
695
+ var $this = $(this),
696
+ src;
697
+
698
+ if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
699
+ if (options.forceLoad) {
700
+ src = $this.attr('src');
701
+ $this.attr('src', '');
702
+ bindToLoad(this, handleObj.handler);
703
+ $this.attr('src', src);
704
+ } else if ( this.complete || this.readyState === 4 ) {
705
+ handleObj.handler.apply(this, arguments);
706
+ } else {
707
+ bindToLoad(this, handleObj.handler);
708
+ }
709
+ }
710
+ },
711
+
712
+ teardown: function (namespaces) {
713
+ $(this).unbind('.imageready');
714
+ }
715
+ };
716
+
717
+ function bindToLoad(element, callback) {
718
+ var $this = $(element);
719
+
720
+ $this.bind('load.imageready', function () {
721
+ callback.apply(element, arguments);
722
+ $this.unbind('load.imageready');
723
+ });
724
+ }
725
+
726
+ }(jQuery));
727
+
728
+ /*
729
+
730
+ Holder - 1.3 - client side image placeholders
731
+ (c) 2012 Ivan Malopinsky / http://imsky.co
732
+
733
+ Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
734
+ Commercial use requires attribution.
735
+
736
+ */
737
+
738
+ var Holder = Holder || {};
739
+ (function (app, win) {
740
+
741
+ var preempted = false,
742
+ fallback = false,
743
+ canvas = document.createElement('canvas');
744
+
745
+ //http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
746
+ function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}};
747
+
748
+ //https://gist.github.com/991057 by Jed Schmidt with modifications
749
+ function selector(a){
750
+ a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
751
+ var ret=[]; b!=null&&(b.length?ret=b:b.length==0?ret=b:ret=[b]); return ret;
752
+ }
753
+
754
+ //shallow object property extend
755
+ function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
756
+
757
+ function draw(ctx, dimensions, template) {
758
+ var dimension_arr = [dimensions.height, dimensions.width].sort();
759
+ var maxFactor = Math.round(dimension_arr[1] / 16),
760
+ minFactor = Math.round(dimension_arr[0] / 16);
761
+ var text_height = Math.max(template.size, maxFactor);
762
+ canvas.width = dimensions.width;
763
+ canvas.height = dimensions.height;
764
+ ctx.textAlign = "center";
765
+ ctx.textBaseline = "middle";
766
+ ctx.fillStyle = template.background;
767
+ ctx.fillRect(0, 0, dimensions.width, dimensions.height);
768
+ ctx.fillStyle = template.foreground;
769
+ ctx.font = "bold " + text_height + "px sans-serif";
770
+ var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height);
771
+ if (Math.round(ctx.measureText(text).width) / dimensions.width > 1) {
772
+ text_height = Math.max(minFactor, template.size);
773
+ }
774
+ ctx.font = "bold " + text_height + "px sans-serif";
775
+ ctx.fillText(text, (dimensions.width / 2), (dimensions.height / 2), dimensions.width);
776
+ return canvas.toDataURL("image/png");
777
+ }
778
+
779
+ if (!canvas.getContext) {
780
+ fallback = true;
781
+ } else {
782
+ if (canvas.toDataURL("image/png").indexOf("data:image/png") < 0) {
783
+ //Android doesn't support data URI
784
+ fallback = true;
785
+ } else {
786
+ var ctx = canvas.getContext("2d");
787
+ }
788
+ }
789
+
790
+ var settings = {
791
+ domain: "holder.js",
792
+ images: "img",
793
+ themes: {
794
+ "gray": {
795
+ background: "#eee",
796
+ foreground: "#aaa",
797
+ size: 12
798
+ },
799
+ "social": {
800
+ background: "#3a5a97",
801
+ foreground: "#fff",
802
+ size: 12
803
+ },
804
+ "industrial": {
805
+ background: "#434A52",
806
+ foreground: "#C2F200",
807
+ size: 12
808
+ }
809
+ }
810
+ };
811
+
812
+
813
+
814
+ app.flags = {
815
+ dimensions: {
816
+ regex: /([0-9]+)x([0-9]+)/,
817
+ output: function(val){
818
+ var exec = this.regex.exec(val);
819
+ return {
820
+ width: +exec[1],
821
+ height: +exec[2]
822
+ }
823
+ }
824
+ },
825
+ colors: {
826
+ regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
827
+ output: function(val){
828
+ var exec = this.regex.exec(val);
829
+ return {
830
+ size: settings.themes.gray.size,
831
+ foreground: "#" + exec[2],
832
+ background: "#" + exec[1]
833
+ }
834
+ }
835
+ },
836
+ text: {
837
+ regex: /text\:(.*)/,
838
+ output: function(val){
839
+ return this.regex.exec(val)[1];
840
+ }
841
+ }
842
+ }
843
+
844
+ for(var flag in app.flags){
845
+ app.flags[flag].match = function (val){
846
+ return val.match(this.regex)
847
+ }
848
+ }
849
+
850
+ app.add_theme = function (name, theme) {
851
+ name != null && theme != null && (settings.themes[name] = theme);
852
+ return app;
853
+ };
854
+
855
+ app.add_image = function (src, el) {
856
+ var node = selector(el);
857
+ if (node.length) {
858
+ for (var i = 0, l = node.length; i < l; i++) {
859
+ var img = document.createElement("img")
860
+ img.setAttribute("data-src", src);
861
+ node[i].appendChild(img);
862
+ }
863
+ }
864
+ return app;
865
+ };
866
+
867
+ app.run = function (o) {
868
+ var options = extend(settings, o),
869
+ images = selector(options.images),
870
+ preempted = true;
871
+
872
+ for (var l = images.length, i = 0; i < l; i++) {
873
+ var theme = settings.themes.gray;
874
+ var src = images[i].getAttribute("data-src") || images[i].getAttribute("src");
875
+ if (src && !! ~src.indexOf(options.domain)) {
876
+ var render = false,
877
+ dimensions = null,
878
+ text = null;
879
+ var flags = src.substr(src.indexOf(options.domain) + options.domain.length + 1).split("/");
880
+ for (sl = flags.length, j = 0; j < sl; j++) {
881
+ if (app.flags.dimensions.match(flags[j])) {
882
+ render = true;
883
+ dimensions = app.flags.dimensions.output(flags[j]);
884
+ } else if (app.flags.colors.match(flags[j])) {
885
+ theme = app.flags.colors.output(flags[j]);
886
+ } else if (options.themes[flags[j]]) {
887
+ //If a theme is specified, it will override custom colors
888
+ theme = options.themes[flags[j]];
889
+ } else if (app.flags.text.match(flags[j])) {
890
+ text = app.flags.text.output(flags[j]);
891
+ }
892
+ }
893
+ if (render) {
894
+ images[i].setAttribute("data-src", src);
895
+ var dimensions_caption = dimensions.width + "x" + dimensions.height;
896
+ images[i].setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
897
+
898
+ // Fallback
899
+ // images[i].style.width = dimensions.width + "px";
900
+ // images[i].style.height = dimensions.height + "px";
901
+ images[i].style.backgroundColor = theme.background;
902
+
903
+ var theme = (text ? extend(theme, {
904
+ text: text
905
+ }) : theme);
906
+
907
+ if (!fallback) {
908
+ images[i].setAttribute("src", draw(ctx, dimensions, theme));
909
+ }
910
+ }
911
+ }
912
+ }
913
+ return app;
914
+ };
915
+ contentLoaded(win, function () {
916
+ preempted || app.run()
917
+ })
918
+
919
+ })(Holder, window);