groundworkcss 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/README.md +165 -0
- data/Rakefile +1 -0
- data/groundworkcss.gemspec +27 -0
- data/lib/groundworkcss.rb +7 -0
- data/lib/groundworkcss/engine.rb +4 -0
- data/lib/groundworkcss/generators/install_generator.rb +27 -0
- data/lib/groundworkcss/railties.rb +8 -0
- data/lib/groundworkcss/version.rb +3 -0
- data/vendor/assets/fonts/groundworkcss/americantypewriterstd-bold.eot +0 -0
- data/vendor/assets/fonts/groundworkcss/americantypewriterstd-bold.svg +128 -0
- data/vendor/assets/fonts/groundworkcss/americantypewriterstd-bold.ttf +0 -0
- data/vendor/assets/fonts/groundworkcss/americantypewriterstd-bold.woff +0 -0
- data/vendor/assets/fonts/groundworkcss/average-sans-webfont.eot +0 -0
- data/vendor/assets/fonts/groundworkcss/average-sans-webfont.ttf +0 -0
- data/vendor/assets/fonts/groundworkcss/average-sans-webfont.woff +0 -0
- data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.svg +284 -0
- data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/groundworkcss/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/500px-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/500px-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/500px.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/500px.svg +62 -0
- data/vendor/assets/images/groundworkcss/social-icons/aboutme-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/aboutme-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/aboutme.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/aboutme.svg +42 -0
- data/vendor/assets/images/groundworkcss/social-icons/adn-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/adn-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/adn.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/adn.svg +14 -0
- data/vendor/assets/images/groundworkcss/social-icons/android-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/android-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/android.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/android.svg +30 -0
- data/vendor/assets/images/groundworkcss/social-icons/apple-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/apple-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/apple.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/apple.svg +19 -0
- data/vendor/assets/images/groundworkcss/social-icons/behance-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/behance-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/behance.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/behance.svg +48 -0
- data/vendor/assets/images/groundworkcss/social-icons/bitbucket-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/bitbucket-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/bitbucket.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/bitbucket.svg +36 -0
- data/vendor/assets/images/groundworkcss/social-icons/blogger-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/blogger-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/blogger.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/blogger.svg +22 -0
- data/vendor/assets/images/groundworkcss/social-icons/coderwall-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/coderwall-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/coderwall.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/coderwall.svg +21 -0
- data/vendor/assets/images/groundworkcss/social-icons/creativecloud-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/creativecloud-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/creativecloud.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/creativecloud.svg +48 -0
- data/vendor/assets/images/groundworkcss/social-icons/dribbble-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/dribbble-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/dribbble.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/dribbble.svg +28 -0
- data/vendor/assets/images/groundworkcss/social-icons/dropbox-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/dropbox-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/dropbox.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/dropbox.svg +73 -0
- data/vendor/assets/images/groundworkcss/social-icons/evernote-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/evernote-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/evernote.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/evernote.svg +62 -0
- data/vendor/assets/images/groundworkcss/social-icons/facebook-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/facebook-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/facebook.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/facebook.svg +15 -0
- data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative.svg +24 -0
- data/vendor/assets/images/groundworkcss/social-icons/flickr-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/flickr-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/flickr.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/flickr.svg +14 -0
- data/vendor/assets/images/groundworkcss/social-icons/foursquare-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/foursquare-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/foursquare.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/foursquare.svg +43 -0
- data/vendor/assets/images/groundworkcss/social-icons/git-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/git-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/git.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/git.svg +22 -0
- data/vendor/assets/images/groundworkcss/social-icons/github-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/github-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/github.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/github.svg +38 -0
- data/vendor/assets/images/groundworkcss/social-icons/goodreads-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/goodreads-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/goodreads.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/goodreads.svg +38 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplay-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplay-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplay.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplay.svg +24 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplus-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplus-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplus.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/googleplus.svg +52 -0
- data/vendor/assets/images/groundworkcss/social-icons/html5-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/html5-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/html5.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/html5.svg +29 -0
- data/vendor/assets/images/groundworkcss/social-icons/icloud-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/icloud-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/icloud.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/icloud.svg +26 -0
- data/vendor/assets/images/groundworkcss/social-icons/instagram-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/instagram-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/instagram.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/instagram.svg +166 -0
- data/vendor/assets/images/groundworkcss/social-icons/lastfm-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/lastfm-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/lastfm.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/lastfm.svg +44 -0
- data/vendor/assets/images/groundworkcss/social-icons/linkedin-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/linkedin-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/linkedin.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/linkedin.svg +28 -0
- data/vendor/assets/images/groundworkcss/social-icons/mail-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mail-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mail.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mail.svg +27 -0
- data/vendor/assets/images/groundworkcss/social-icons/mercurial-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mercurial-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mercurial.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mercurial.svg +22 -0
- data/vendor/assets/images/groundworkcss/social-icons/mixi-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mixi-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mixi.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/mixi.svg +32 -0
- data/vendor/assets/images/groundworkcss/social-icons/msn-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/msn-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/msn.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/msn.svg +44 -0
- data/vendor/assets/images/groundworkcss/social-icons/orkut-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/orkut-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/orkut.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/orkut.svg +23 -0
- data/vendor/assets/images/groundworkcss/social-icons/picasa-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/picasa-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/picasa.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/picasa.svg +48 -0
- data/vendor/assets/images/groundworkcss/social-icons/pinterest-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/pinterest-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/pinterest.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/pinterest.svg +42 -0
- data/vendor/assets/images/groundworkcss/social-icons/pocketapp-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/pocketapp-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/pocketapp.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/pocketapp.svg +38 -0
- data/vendor/assets/images/groundworkcss/social-icons/quora-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/quora-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/quora.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/quora.svg +20 -0
- data/vendor/assets/images/groundworkcss/social-icons/rdio-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/rdio-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/rdio.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/rdio.svg +18 -0
- data/vendor/assets/images/groundworkcss/social-icons/renren-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/renren-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/renren.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/renren.svg +79 -0
- data/vendor/assets/images/groundworkcss/social-icons/rss-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/rss-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/rss.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/rss.svg +18 -0
- data/vendor/assets/images/groundworkcss/social-icons/skitch-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/skitch-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/skitch.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/skitch.svg +24 -0
- data/vendor/assets/images/groundworkcss/social-icons/skype-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/skype-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/skype.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/skype.svg +25 -0
- data/vendor/assets/images/groundworkcss/social-icons/soundcloud-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/soundcloud-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/soundcloud.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/soundcloud.svg +60 -0
- data/vendor/assets/images/groundworkcss/social-icons/spotify-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/spotify-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/spotify.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/spotify.svg +38 -0
- data/vendor/assets/images/groundworkcss/social-icons/stackoverflow-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/stackoverflow-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/stackoverflow.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/stackoverflow.svg +32 -0
- data/vendor/assets/images/groundworkcss/social-icons/stumbleupon-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/stumbleupon-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/stumbleupon.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/stumbleupon.svg +22 -0
- data/vendor/assets/images/groundworkcss/social-icons/svn-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/svn-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/svn.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/svn.svg +25 -0
- data/vendor/assets/images/groundworkcss/social-icons/tent-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tent-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tent.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tent.svg +16 -0
- data/vendor/assets/images/groundworkcss/social-icons/tripadvisor-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tripadvisor-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tripadvisor.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tripadvisor.svg +30 -0
- data/vendor/assets/images/groundworkcss/social-icons/tumblr-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tumblr-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tumblr.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/tumblr.svg +16 -0
- data/vendor/assets/images/groundworkcss/social-icons/twitter-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/twitter-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/twitter.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/twitter.svg +24 -0
- data/vendor/assets/images/groundworkcss/social-icons/vimeo-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/vimeo-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/vimeo.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/vimeo.svg +20 -0
- data/vendor/assets/images/groundworkcss/social-icons/weibo-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/weibo-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/weibo.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/weibo.svg +54 -0
- data/vendor/assets/images/groundworkcss/social-icons/windows-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/windows-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/windows.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/windows.svg +26 -0
- data/vendor/assets/images/groundworkcss/social-icons/wordpress-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/wordpress-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/wordpress.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/wordpress.svg +50 -0
- data/vendor/assets/images/groundworkcss/social-icons/xing-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/xing-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/xing.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/xing.svg +16 -0
- data/vendor/assets/images/groundworkcss/social-icons/yelp-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/yelp-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/yelp.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/yelp.svg +54 -0
- data/vendor/assets/images/groundworkcss/social-icons/youtube-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/youtube-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/youtube.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/youtube.svg +106 -0
- data/vendor/assets/images/groundworkcss/social-icons/youversion-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/youversion-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/youversion.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/youversion.svg +54 -0
- data/vendor/assets/images/groundworkcss/social-icons/zerply-m.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/zerply-s.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/zerply.png +0 -0
- data/vendor/assets/images/groundworkcss/social-icons/zerply.svg +20 -0
- data/vendor/assets/javascripts/groundworkcss/components/disabled.coffee +18 -0
- data/vendor/assets/javascripts/groundworkcss/components/dismissible.coffee +4 -0
- data/vendor/assets/javascripts/groundworkcss/components/equalizeColumns.coffee +22 -0
- data/vendor/assets/javascripts/groundworkcss/components/forms.coffee +36 -0
- data/vendor/assets/javascripts/groundworkcss/components/menus.coffee +174 -0
- data/vendor/assets/javascripts/groundworkcss/components/modals.coffee +46 -0
- data/vendor/assets/javascripts/groundworkcss/components/pagination.coffee +128 -0
- data/vendor/assets/javascripts/groundworkcss/components/responsiveTables.coffee +24 -0
- data/vendor/assets/javascripts/groundworkcss/components/responsiveText.coffee +38 -0
- data/vendor/assets/javascripts/groundworkcss/components/tabs.coffee +20 -0
- data/vendor/assets/javascripts/groundworkcss/components/tiles.coffee +32 -0
- data/vendor/assets/javascripts/groundworkcss/components/tooltips.coffee +5 -0
- data/vendor/assets/javascripts/groundworkcss/index.js +20 -0
- data/vendor/assets/javascripts/groundworkcss/libs/boxsizing.htc +501 -0
- data/vendor/assets/javascripts/groundworkcss/libs/html5shiv.min.js +8 -0
- data/vendor/assets/javascripts/groundworkcss/libs/modernizr-2.6.2.min.js +4 -0
- data/vendor/assets/javascripts/groundworkcss/libs/placeholder_polyfill.jquery.js +212 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.caption2.js +67 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.carousel.js +265 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.center.js +63 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.ie-fade.js +46 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.scrollVert.js +15 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.shuffle.js +62 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.swipe.js +70 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.tile.js +131 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/cycle/jquery.cycle2.video.js +66 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery-modals.js +193 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery-responsiveTables.coffee +61 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery-responsiveText.coffee +32 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery-tooltip.coffee +124 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.cycle2.js +1426 -0
- data/vendor/assets/javascripts/groundworkcss/plugins/jquery.magnific-popup.js +1760 -0
- data/vendor/assets/stylesheets/groundworkcss/_rails-settings.scss +202 -0
- data/vendor/assets/stylesheets/groundworkcss/_settings.scss +1 -0
- data/vendor/assets/stylesheets/groundworkcss/base/_all.scss +11 -0
- data/vendor/assets/stylesheets/groundworkcss/base/_animations.scss +29 -0
- data/vendor/assets/stylesheets/groundworkcss/base/_global.scss +64 -0
- data/vendor/assets/stylesheets/groundworkcss/base/_grid.scss +172 -0
- data/vendor/assets/stylesheets/groundworkcss/base/_helpers.scss +254 -0
- data/vendor/assets/stylesheets/groundworkcss/base/_reset.scss +81 -0
- data/vendor/assets/stylesheets/groundworkcss/core/_all.scss +11 -0
- data/vendor/assets/stylesheets/groundworkcss/core/_constants.scss +121 -0
- data/vendor/assets/stylesheets/groundworkcss/core/_defaults.scss +202 -0
- data/vendor/assets/stylesheets/groundworkcss/core/_mixins.scss +206 -0
- data/vendor/assets/stylesheets/groundworkcss/font-awesome-ie7.min.css +22 -0
- data/vendor/assets/stylesheets/groundworkcss/form/_all.scss +10 -0
- data/vendor/assets/stylesheets/groundworkcss/form/_forms.scss +240 -0
- data/vendor/assets/stylesheets/groundworkcss/form/_tiles.scss +100 -0
- data/vendor/assets/stylesheets/groundworkcss/groundwork-ie.scss +130 -0
- data/vendor/assets/stylesheets/groundworkcss/groundwork.scss +22 -0
- data/vendor/assets/stylesheets/groundworkcss/index.scss +3 -0
- data/vendor/assets/stylesheets/groundworkcss/magnific-popup.css +393 -0
- data/vendor/assets/stylesheets/groundworkcss/misc/_all.scss +9 -0
- data/vendor/assets/stylesheets/groundworkcss/misc/_social-icons.scss +96 -0
- data/vendor/assets/stylesheets/groundworkcss/nav/_all.scss +11 -0
- data/vendor/assets/stylesheets/groundworkcss/nav/_buttons.scss +334 -0
- data/vendor/assets/stylesheets/groundworkcss/nav/_navigation.scss +400 -0
- data/vendor/assets/stylesheets/groundworkcss/nav/_tabs.scss +230 -0
- data/vendor/assets/stylesheets/groundworkcss/no-svg.scss +355 -0
- data/vendor/assets/stylesheets/groundworkcss/placeholder_polyfill.css +32 -0
- data/vendor/assets/stylesheets/groundworkcss/responsive/_all.scss +13 -0
- data/vendor/assets/stylesheets/groundworkcss/responsive/_desktop.scss +26 -0
- data/vendor/assets/stylesheets/groundworkcss/responsive/_helpers.scss +16 -0
- data/vendor/assets/stylesheets/groundworkcss/responsive/_ipad.scss +28 -0
- data/vendor/assets/stylesheets/groundworkcss/responsive/_mobile.scss +44 -0
- data/vendor/assets/stylesheets/groundworkcss/responsive/_small-tablet.scss +196 -0
- data/vendor/assets/stylesheets/groundworkcss/type/_all.scss +9 -0
- data/vendor/assets/stylesheets/groundworkcss/type/_font-awesome.scss +542 -0
- data/vendor/assets/stylesheets/groundworkcss/type/_typography.scss +360 -0
- data/vendor/assets/stylesheets/groundworkcss/type/_webfonts.scss +28 -0
- data/vendor/assets/stylesheets/groundworkcss/ui/_all.scss +13 -0
- data/vendor/assets/stylesheets/groundworkcss/ui/_callouts.scss +130 -0
- data/vendor/assets/stylesheets/groundworkcss/ui/_messages.scss +124 -0
- data/vendor/assets/stylesheets/groundworkcss/ui/_modals.scss +558 -0
- data/vendor/assets/stylesheets/groundworkcss/ui/_tables.scss +142 -0
- data/vendor/assets/stylesheets/groundworkcss/ui/_tooltips.scss +196 -0
- metadata +427 -0
@@ -0,0 +1,193 @@
|
|
1
|
+
/*
|
2
|
+
*
|
3
|
+
* jQuery Modals by Gary Hepting
|
4
|
+
*
|
5
|
+
* Open source under the MIT License.
|
6
|
+
*
|
7
|
+
* Copyright © 2013 Gary Hepting. All rights reserved.
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
|
11
|
+
|
12
|
+
(function() {
|
13
|
+
(function($) {
|
14
|
+
var elems, modals;
|
15
|
+
|
16
|
+
if ($('div#iframeModal').length < 1) {
|
17
|
+
$('body').append('<div class="iframe modal" id="iframeModal"><iframe marginheight="0" marginwidth="0" frameborder="0"></iframe></div>');
|
18
|
+
$('div#iframeModal').prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>');
|
19
|
+
}
|
20
|
+
$('a.modal').each(function() {
|
21
|
+
$(this).attr('data-url', $(this).attr('href'));
|
22
|
+
return $(this).attr('href', '#iframeModal');
|
23
|
+
});
|
24
|
+
$('a.modal').on("click", function(e) {
|
25
|
+
$('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" src="' + $(this).attr('data-url') + '"></iframe>');
|
26
|
+
e.preventDefault();
|
27
|
+
return false;
|
28
|
+
});
|
29
|
+
elems = [];
|
30
|
+
$.fn.modal = function() {
|
31
|
+
this.each(function() {
|
32
|
+
var $this;
|
33
|
+
|
34
|
+
$(this).not('#iframeModal').wrapInner('<div class="modal-content"></div>');
|
35
|
+
$(this).prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>').appendTo('body');
|
36
|
+
$this = $(this);
|
37
|
+
return $('[href=#' + $(this).attr('id') + ']').on("click", function(e) {
|
38
|
+
modals.open($(this).attr('href'), $(this).hasClass('fullscreen'));
|
39
|
+
e.preventDefault();
|
40
|
+
return false;
|
41
|
+
});
|
42
|
+
});
|
43
|
+
$('div.modal .close').on("click", function() {
|
44
|
+
return modals.close();
|
45
|
+
});
|
46
|
+
return $('div.modal .fullscreen').on("click", function() {
|
47
|
+
return modals.fullscreen($(this).parent('div.modal'));
|
48
|
+
});
|
49
|
+
};
|
50
|
+
modals = (function() {
|
51
|
+
var close, fullscreen, open;
|
52
|
+
|
53
|
+
$('body').addClass('modal-ready');
|
54
|
+
if ($("#overlay").length < 1) {
|
55
|
+
$('body').append('<div id="overlay"></div>');
|
56
|
+
}
|
57
|
+
$('#overlay, div.modal .close').bind("click", function(e) {
|
58
|
+
return close();
|
59
|
+
});
|
60
|
+
open = function(elem, fullscreen) {
|
61
|
+
$(window).bind("keydown", function(e) {
|
62
|
+
var keyCode;
|
63
|
+
|
64
|
+
keyCode = (e.which ? e.which : e.keyCode);
|
65
|
+
if (keyCode === 27) {
|
66
|
+
return close();
|
67
|
+
}
|
68
|
+
});
|
69
|
+
$(elem).addClass("active");
|
70
|
+
if (!$(elem).hasClass('iframe')) {
|
71
|
+
$(elem).css({
|
72
|
+
width: 'auto',
|
73
|
+
height: 'auto'
|
74
|
+
});
|
75
|
+
$(elem).css({
|
76
|
+
height: $(elem).outerHeight()
|
77
|
+
});
|
78
|
+
}
|
79
|
+
$(elem).css({
|
80
|
+
top: '50%',
|
81
|
+
left: '50%',
|
82
|
+
'margin-top': ($(elem).outerHeight() / -2) + 'px',
|
83
|
+
'margin-left': ($(elem).outerWidth() / -2) + 'px'
|
84
|
+
});
|
85
|
+
setTimeout(function() {
|
86
|
+
return $('body').addClass("modal-active");
|
87
|
+
}, 0);
|
88
|
+
setTimeout(function() {
|
89
|
+
return $('body').removeClass('modal-ready');
|
90
|
+
}, 400);
|
91
|
+
if (fullscreen) {
|
92
|
+
modals.fullscreen(elem);
|
93
|
+
}
|
94
|
+
};
|
95
|
+
close = function() {
|
96
|
+
var modal;
|
97
|
+
|
98
|
+
modal = $('div.modal.active');
|
99
|
+
$(window).unbind("keydown");
|
100
|
+
$('body').removeClass("modal-active").addClass('modal-ready');
|
101
|
+
if (modal.hasClass('iframe')) {
|
102
|
+
$('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0"></iframe>');
|
103
|
+
modal.css({
|
104
|
+
width: '80%',
|
105
|
+
height: '80%'
|
106
|
+
});
|
107
|
+
} else {
|
108
|
+
modal.css({
|
109
|
+
width: 'auto',
|
110
|
+
height: 'auto'
|
111
|
+
});
|
112
|
+
}
|
113
|
+
modal.css({
|
114
|
+
top: '10%',
|
115
|
+
left: '10%',
|
116
|
+
'max-width': '80%',
|
117
|
+
'max-height': '80%',
|
118
|
+
'margin-top': 0,
|
119
|
+
'margin-left': 0
|
120
|
+
});
|
121
|
+
modal.removeClass("active").removeClass("fullscreen");
|
122
|
+
$('i.fullscreen', modal).removeClass('icon-resize-small').addClass('icon-resize-full');
|
123
|
+
};
|
124
|
+
fullscreen = function(elem) {
|
125
|
+
if ($('div.modal.active').hasClass('fullscreen')) {
|
126
|
+
$('div.modal i.fullscreen').removeClass('icon-resize-small').addClass('icon-resize-full');
|
127
|
+
if ($('div.modal.active').hasClass('iframe')) {
|
128
|
+
$('div.modal.active').css({
|
129
|
+
width: '80%',
|
130
|
+
height: '80%'
|
131
|
+
});
|
132
|
+
} else {
|
133
|
+
$('div.modal.active').css({
|
134
|
+
width: 'auto',
|
135
|
+
height: 'auto'
|
136
|
+
});
|
137
|
+
$('div.modal.active').css({
|
138
|
+
height: $('div.modal.active').outerHeight()
|
139
|
+
});
|
140
|
+
}
|
141
|
+
$('div.modal.active').removeClass('fullscreen').css({
|
142
|
+
'max-width': '80%',
|
143
|
+
'max-height': '80%'
|
144
|
+
});
|
145
|
+
$('div.modal.active').delay(100).css({
|
146
|
+
top: '50%',
|
147
|
+
left: '50%',
|
148
|
+
'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
|
149
|
+
'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
|
150
|
+
});
|
151
|
+
} else {
|
152
|
+
$('div.modal i.fullscreen').addClass('icon-resize-small').removeClass('icon-resize-full');
|
153
|
+
$('div.modal.active').addClass('fullscreen').css({
|
154
|
+
top: 0,
|
155
|
+
left: 0,
|
156
|
+
'margin-top': 0,
|
157
|
+
'margin-left': 0,
|
158
|
+
width: '100%',
|
159
|
+
height: '100%',
|
160
|
+
'max-width': '100%',
|
161
|
+
'max-height': '100%'
|
162
|
+
});
|
163
|
+
}
|
164
|
+
};
|
165
|
+
return {
|
166
|
+
open: open,
|
167
|
+
close: close,
|
168
|
+
fullscreen: fullscreen
|
169
|
+
};
|
170
|
+
})();
|
171
|
+
return $(window).resize(function() {
|
172
|
+
return $('div.modal.active').each(function() {
|
173
|
+
if (!$(this).hasClass('fullscreen')) {
|
174
|
+
$(this).removeClass('active').css({
|
175
|
+
top: '50%',
|
176
|
+
left: '50%',
|
177
|
+
'margin-top': ($(this).outerHeight() / -2) + 'px',
|
178
|
+
'margin-left': ($(this).outerWidth() / -2) + 'px'
|
179
|
+
}).addClass('active');
|
180
|
+
if (!$(this).hasClass('iframe')) {
|
181
|
+
$(this).css({
|
182
|
+
height: 'auto'
|
183
|
+
});
|
184
|
+
return $(this).css({
|
185
|
+
height: $(this).outerHeight()
|
186
|
+
});
|
187
|
+
}
|
188
|
+
}
|
189
|
+
});
|
190
|
+
});
|
191
|
+
})(jQuery);
|
192
|
+
|
193
|
+
}).call(this);
|
@@ -0,0 +1,61 @@
|
|
1
|
+
###
|
2
|
+
*
|
3
|
+
* jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
|
4
|
+
*
|
5
|
+
* Open source under the MIT License.
|
6
|
+
*
|
7
|
+
* Copyright © 2013 Gary Hepting. All rights reserved.
|
8
|
+
*
|
9
|
+
###
|
10
|
+
|
11
|
+
(($) ->
|
12
|
+
elems = []
|
13
|
+
$.fn.responsiveTable = (options) ->
|
14
|
+
settings =
|
15
|
+
compressor: options.compressor or 10
|
16
|
+
minSize: options.minSize or Number.NEGATIVE_INFINITY
|
17
|
+
maxSize: options.maxSize or Number.POSITIVE_INFINITY
|
18
|
+
padding: 2
|
19
|
+
height: "auto" # '100%' will fit tables (and containers) to viewport height as well
|
20
|
+
adjust_parents: true # if height specified, force parent elements to be height 100%
|
21
|
+
|
22
|
+
@each ->
|
23
|
+
elem = $(this)
|
24
|
+
elem.attr('data-compression',settings.compressor)
|
25
|
+
elem.attr('data-min',settings.minSize)
|
26
|
+
elem.attr('data-max',settings.maxSize)
|
27
|
+
elem.attr('data-padding',settings.padding)
|
28
|
+
# count columns
|
29
|
+
columns = $("tr", elem).first().children("th, td").length
|
30
|
+
# count rows
|
31
|
+
rows = $("tr", elem).length
|
32
|
+
unless settings.height is "auto"
|
33
|
+
# set height of table
|
34
|
+
$this.css "height", settings.height
|
35
|
+
# set height of each parent of table
|
36
|
+
if settings.adjust_parents
|
37
|
+
$this.parents().each ->
|
38
|
+
$(this).css "height", "100%"
|
39
|
+
# set column widths
|
40
|
+
$("tr th, tr td", elem).each ->
|
41
|
+
if $(this).attr('data-width') != ''
|
42
|
+
width = parseInt($(this).attr('data-width'))
|
43
|
+
else
|
44
|
+
width = Math.floor(100 / columns)
|
45
|
+
$(this).css "width", width + "%"
|
46
|
+
# set row heights
|
47
|
+
$("tr th, tr td", elem).css "height", Math.floor(100 / rows) + "%"
|
48
|
+
# set cell font sizes
|
49
|
+
fontSize = Math.floor(Math.max(Math.min((elem.width() / (settings.compressor)), parseFloat(settings.maxSize)), parseFloat(settings.minSize)))
|
50
|
+
$("tr th, tr td", elem).css "font-size", fontSize + "px"
|
51
|
+
#
|
52
|
+
elems.push elem
|
53
|
+
|
54
|
+
$(window).on "resize", ->
|
55
|
+
$(elems).each ->
|
56
|
+
elem = $(this)
|
57
|
+
# set cell font sizes
|
58
|
+
fontSize = Math.floor(Math.max(Math.min((elem.width() / (elem.attr('data-compression'))), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))))
|
59
|
+
$("tr th, tr td", elem).css "font-size", fontSize + "px"
|
60
|
+
|
61
|
+
) jQuery
|
@@ -0,0 +1,32 @@
|
|
1
|
+
###
|
2
|
+
*
|
3
|
+
* jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText
|
4
|
+
*
|
5
|
+
* Open source under the MIT License.
|
6
|
+
*
|
7
|
+
* Copyright © 2013 Gary Hepting. All rights reserved.
|
8
|
+
*
|
9
|
+
###
|
10
|
+
|
11
|
+
(($) ->
|
12
|
+
elems = []
|
13
|
+
$.fn.responsiveText = (options) ->
|
14
|
+
settings =
|
15
|
+
compressor: options.compressor or 10
|
16
|
+
minSize: options.minSize or Number.NEGATIVE_INFINITY
|
17
|
+
maxSize: options.maxSize or Number.POSITIVE_INFINITY
|
18
|
+
|
19
|
+
@each ->
|
20
|
+
elem = $(this)
|
21
|
+
elem.attr('data-compression',settings.compressor)
|
22
|
+
elem.attr('data-min',settings.minSize)
|
23
|
+
elem.attr('data-max',settings.maxSize)
|
24
|
+
elem.css "font-size", Math.floor(Math.max(Math.min(elem.width() / (settings.compressor), parseFloat(settings.maxSize)), parseFloat(settings.minSize)))
|
25
|
+
elems.push elem
|
26
|
+
|
27
|
+
$(window).on "resize", ->
|
28
|
+
$(elems).each ->
|
29
|
+
elem = $(this)
|
30
|
+
elem.css "font-size", Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))))
|
31
|
+
|
32
|
+
) jQuery
|
@@ -0,0 +1,124 @@
|
|
1
|
+
###
|
2
|
+
*
|
3
|
+
* jQuery Tooltips by Gary Hepting - https://github.com/ghepting/jquery-tooltips
|
4
|
+
*
|
5
|
+
* Open source under the MIT 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
|
+
if $('#tooltip').length != 1
|
25
|
+
# add tooltip element to DOM
|
26
|
+
tooltip = $("<div id=\"tooltip\"></div>")
|
27
|
+
tooltip.appendTo("body").hide()
|
28
|
+
|
29
|
+
getElementPosition = (el) ->
|
30
|
+
offset = el.offset()
|
31
|
+
win = $(window)
|
32
|
+
top: top = offset.top - win.scrollTop()
|
33
|
+
left: left = offset.left - win.scrollLeft()
|
34
|
+
bottom: bottom = win.height() - top - el.outerHeight()
|
35
|
+
right: right = win.width() - left - el.outerWidth()
|
36
|
+
|
37
|
+
setPosition = (trigger) ->
|
38
|
+
coords = getElementPosition(trigger)
|
39
|
+
if tooltip.outerWidth() > ($(window).width() - 20)
|
40
|
+
tooltip.css('width',$(window).width() - 20)
|
41
|
+
attrs = {}
|
42
|
+
tooltip.css('max-width',
|
43
|
+
Math.min(
|
44
|
+
($(window).width()-parseInt($('body').css('padding-left'))-parseInt($('body').css('padding-right'))),
|
45
|
+
parseInt(tooltip.css('max-width'))
|
46
|
+
)
|
47
|
+
)
|
48
|
+
width = tooltip.outerWidth()
|
49
|
+
height = tooltip.outerHeight()
|
50
|
+
if coords.left <= coords.right
|
51
|
+
tooltip.addClass('left')
|
52
|
+
attrs.left = coords.left
|
53
|
+
else
|
54
|
+
tooltip.addClass('right')
|
55
|
+
attrs.right = coords.right
|
56
|
+
if (coords.top-options.topOffset) > (height+20)
|
57
|
+
tooltip.addClass('top')
|
58
|
+
attrs.top = (trigger.offset().top - height) - 20
|
59
|
+
else
|
60
|
+
tooltip.addClass('bottom')
|
61
|
+
attrs.top = trigger.offset().top + trigger.outerHeight() - 4
|
62
|
+
tooltip.css attrs
|
63
|
+
|
64
|
+
resettooltip = ->
|
65
|
+
tooltip.text('').removeClass().css
|
66
|
+
left: 'auto'
|
67
|
+
right: 'auto'
|
68
|
+
top: 'auto'
|
69
|
+
bottom: 'auto'
|
70
|
+
width: 'auto'
|
71
|
+
'padding-left': 'auto'
|
72
|
+
'padding-right': 'auto'
|
73
|
+
|
74
|
+
closetooltip = ->
|
75
|
+
tooltip.stop().hide()
|
76
|
+
resettooltip()
|
77
|
+
$('[role=tooltip]').removeClass('on')
|
78
|
+
|
79
|
+
showtooltip = (trigger) ->
|
80
|
+
clearTimeout(delayShow)
|
81
|
+
delayShow = setTimeout ->
|
82
|
+
tooltip.css({"opacity": 0, "display": "block"}).text(trigger.attr('data-title'))
|
83
|
+
$.each ['disabled', 'info', 'alert', 'warning', 'error', 'success', 'green', 'turquoise', 'blue', 'purple', 'pink', 'yellow', 'orange', 'red', 'asphalt'], (index, value) ->
|
84
|
+
if trigger.hasClass(value)
|
85
|
+
tooltip.addClass(value)
|
86
|
+
setPosition(trigger)
|
87
|
+
trigger.addClass('on')
|
88
|
+
tooltip.animate
|
89
|
+
top: "+=10"
|
90
|
+
opacity: 1
|
91
|
+
, options.speed
|
92
|
+
, options.delay
|
93
|
+
|
94
|
+
@each ->
|
95
|
+
$this = $(this)
|
96
|
+
$this.attr('role','tooltip').attr('data-title',$this.attr('title'))
|
97
|
+
$this.removeAttr "title"
|
98
|
+
|
99
|
+
|
100
|
+
$('body').on(
|
101
|
+
'focus', '[role=tooltip]', ->
|
102
|
+
showtooltip($(this))
|
103
|
+
).on(
|
104
|
+
'blur', '[role=tooltip]', ->
|
105
|
+
clearTimeout(delayShow)
|
106
|
+
closetooltip()
|
107
|
+
).on(
|
108
|
+
'mouseenter', '[role=tooltip]:not(input,select,textarea)', ->
|
109
|
+
showtooltip($(this))
|
110
|
+
).on(
|
111
|
+
'mouseleave', '[role=tooltip]:not(input,select,textarea)', ->
|
112
|
+
clearTimeout(delayShow)
|
113
|
+
closetooltip()
|
114
|
+
)
|
115
|
+
|
116
|
+
$(window).on
|
117
|
+
scroll: ->
|
118
|
+
trigger = $('[role=tooltip].on')
|
119
|
+
if trigger.length
|
120
|
+
setPosition(trigger)
|
121
|
+
$('#tooltip').css
|
122
|
+
top: "+=10"
|
123
|
+
|
124
|
+
) jQuery
|
@@ -0,0 +1,1426 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery Cycle2 - Version: 20130307
|
3
|
+
* http://malsup.com/jquery/cycle2/
|
4
|
+
* Copyright (c) 2012 M. Alsup; Dual licensed: MIT/GPL
|
5
|
+
* Requires: jQuery v1.7 or later
|
6
|
+
*/
|
7
|
+
;(function($) {
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
var version = '20130307';
|
11
|
+
|
12
|
+
$.fn.cycle = function( options ) {
|
13
|
+
// fix mistakes with the ready state
|
14
|
+
var o;
|
15
|
+
if ( this.length === 0 && !$.isReady ) {
|
16
|
+
o = { s: this.selector, c: this.context };
|
17
|
+
$.fn.cycle.log('requeuing slideshow (dom not ready)');
|
18
|
+
$(function() {
|
19
|
+
$( o.s, o.c ).cycle(options);
|
20
|
+
});
|
21
|
+
return this;
|
22
|
+
}
|
23
|
+
|
24
|
+
return this.each(function() {
|
25
|
+
var data, opts, shortName, val;
|
26
|
+
var container = $(this);
|
27
|
+
var log = $.fn.cycle.log;
|
28
|
+
|
29
|
+
if ( container.data('cycle.opts') )
|
30
|
+
return; // already initialized
|
31
|
+
|
32
|
+
if ( container.data('cycle-log') === false ||
|
33
|
+
( options && options.log === false ) ||
|
34
|
+
( opts && opts.log === false) ) {
|
35
|
+
log = $.noop;
|
36
|
+
}
|
37
|
+
|
38
|
+
log('--c2 init--');
|
39
|
+
data = container.data();
|
40
|
+
for (var p in data) {
|
41
|
+
// allow props to be accessed sans 'cycle' prefix and log the overrides
|
42
|
+
if (data.hasOwnProperty(p) && /^cycle[A-Z]+/.test(p) ) {
|
43
|
+
val = data[p];
|
44
|
+
shortName = p.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, lowerCase);
|
45
|
+
log(shortName+':', val, '('+typeof val +')');
|
46
|
+
data[shortName] = val;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
opts = $.extend( {}, $.fn.cycle.defaults, data, options || {});
|
51
|
+
|
52
|
+
opts.timeoutId = 0;
|
53
|
+
opts.paused = opts.paused || false; // #57
|
54
|
+
opts.container = container;
|
55
|
+
opts._maxZ = opts.maxZ;
|
56
|
+
|
57
|
+
opts.API = $.extend ( { _container: container }, $.fn.cycle.API );
|
58
|
+
opts.API.log = log;
|
59
|
+
opts.API.trigger = function( eventName, args ) {
|
60
|
+
opts.container.trigger( eventName, args );
|
61
|
+
return opts.API;
|
62
|
+
};
|
63
|
+
|
64
|
+
container.data( 'cycle.opts', opts );
|
65
|
+
container.data( 'cycle.API', opts.API );
|
66
|
+
|
67
|
+
// opportunity for plugins to modify opts and API
|
68
|
+
opts.API.trigger('cycle-bootstrap', [ opts, opts.API ]);
|
69
|
+
|
70
|
+
opts.API.addInitialSlides();
|
71
|
+
opts.API.preInitSlideshow();
|
72
|
+
|
73
|
+
if ( opts.slides.length )
|
74
|
+
opts.API.initSlideshow();
|
75
|
+
});
|
76
|
+
};
|
77
|
+
|
78
|
+
$.fn.cycle.API = {
|
79
|
+
opts: function() {
|
80
|
+
return this._container.data( 'cycle.opts' );
|
81
|
+
},
|
82
|
+
addInitialSlides: function() {
|
83
|
+
var opts = this.opts();
|
84
|
+
var slides = opts.slides;
|
85
|
+
opts.slideCount = 0;
|
86
|
+
opts.slides = $(); // empty set
|
87
|
+
|
88
|
+
// add slides that already exist
|
89
|
+
slides = slides.jquery ? slides : opts.container.find( slides );
|
90
|
+
|
91
|
+
if ( opts.random ) {
|
92
|
+
slides.sort(function() {return Math.random() - 0.5;});
|
93
|
+
}
|
94
|
+
|
95
|
+
opts.API.add( slides );
|
96
|
+
},
|
97
|
+
|
98
|
+
preInitSlideshow: function() {
|
99
|
+
var opts = this.opts();
|
100
|
+
opts.API.trigger('cycle-pre-initialize', [ opts ]);
|
101
|
+
var tx = $.fn.cycle.transitions[opts.fx];
|
102
|
+
if (tx && $.isFunction(tx.preInit))
|
103
|
+
tx.preInit( opts );
|
104
|
+
opts._preInitialized = true;
|
105
|
+
},
|
106
|
+
|
107
|
+
postInitSlideshow: function() {
|
108
|
+
var opts = this.opts();
|
109
|
+
opts.API.trigger('cycle-post-initialize', [ opts ]);
|
110
|
+
var tx = $.fn.cycle.transitions[opts.fx];
|
111
|
+
if (tx && $.isFunction(tx.postInit))
|
112
|
+
tx.postInit( opts );
|
113
|
+
},
|
114
|
+
|
115
|
+
initSlideshow: function() {
|
116
|
+
var opts = this.opts();
|
117
|
+
var pauseObj = opts.container;
|
118
|
+
var slideOpts;
|
119
|
+
opts.API.calcFirstSlide();
|
120
|
+
|
121
|
+
if ( opts.container.css('position') == 'static' )
|
122
|
+
opts.container.css('position', 'relative');
|
123
|
+
|
124
|
+
$(opts.slides[opts.currSlide]).css('opacity',1).show();
|
125
|
+
opts.API.stackSlides( opts.slides[opts.currSlide], opts.slides[opts.nextSlide], !opts.reverse );
|
126
|
+
|
127
|
+
if ( opts.pauseOnHover ) {
|
128
|
+
// allow pauseOnHover to specify an element
|
129
|
+
if ( opts.pauseOnHover !== true )
|
130
|
+
pauseObj = $( opts.pauseOnHover );
|
131
|
+
|
132
|
+
pauseObj.hover(
|
133
|
+
function(){
|
134
|
+
opts.hoverPaused = true;
|
135
|
+
if ( ! opts.paused )
|
136
|
+
opts.API.trigger('cycle-paused', [ opts ] );
|
137
|
+
},
|
138
|
+
function(){
|
139
|
+
opts.hoverPaused = false;
|
140
|
+
if ( ! opts.paused )
|
141
|
+
opts.API.trigger('cycle-resumed', [ opts ] );
|
142
|
+
}
|
143
|
+
);
|
144
|
+
}
|
145
|
+
|
146
|
+
// stage initial transition
|
147
|
+
if ( opts.timeout ) {
|
148
|
+
slideOpts = opts.API.getSlideOpts( opts.nextSlide );
|
149
|
+
opts.API.queueTransition( slideOpts );
|
150
|
+
}
|
151
|
+
|
152
|
+
opts._initialized = true;
|
153
|
+
opts.API.updateView( true );
|
154
|
+
opts.container.on('cycle-paused cycle-resumed', function(e) {
|
155
|
+
opts.container[ e.type === 'cycle-paused' ? 'addClass' : 'removeClass' ]('cycle-paused');
|
156
|
+
});
|
157
|
+
opts.API.trigger('cycle-initialized', [ opts ]);
|
158
|
+
opts.API.postInitSlideshow();
|
159
|
+
},
|
160
|
+
|
161
|
+
|
162
|
+
add: function( slides, prepend ) {
|
163
|
+
var opts = this.opts();
|
164
|
+
var oldSlideCount = opts.slideCount;
|
165
|
+
var startSlideshow = false;
|
166
|
+
var len;
|
167
|
+
|
168
|
+
if ( $.type(slides) == 'string')
|
169
|
+
slides = $.trim( slides );
|
170
|
+
|
171
|
+
$( slides ).each(function(i) {
|
172
|
+
var slideOpts;
|
173
|
+
var slide = $(this);
|
174
|
+
|
175
|
+
if ( prepend )
|
176
|
+
opts.container.prepend( slide );
|
177
|
+
else
|
178
|
+
opts.container.append( slide );
|
179
|
+
|
180
|
+
opts.slideCount++;
|
181
|
+
slideOpts = opts.API.buildSlideOpts( slide );
|
182
|
+
|
183
|
+
if ( prepend )
|
184
|
+
opts.slides = $( slide ).add( opts.slides );
|
185
|
+
else
|
186
|
+
opts.slides = opts.slides.add( slide );
|
187
|
+
|
188
|
+
opts.API.initSlide( slideOpts, slide, --opts._maxZ );
|
189
|
+
|
190
|
+
slide.data('cycle.opts', slideOpts);
|
191
|
+
opts.API.trigger('cycle-slide-added', [ opts, slideOpts, slide ]);
|
192
|
+
});
|
193
|
+
|
194
|
+
opts.API.updateView( true );
|
195
|
+
|
196
|
+
startSlideshow = opts._preInitialized && (oldSlideCount < 2 && opts.slideCount >= 1);
|
197
|
+
if ( startSlideshow ) {
|
198
|
+
if ( !opts._initialized )
|
199
|
+
opts.API.initSlideshow();
|
200
|
+
else if ( opts.timeout ) {
|
201
|
+
len = opts.slides.length;
|
202
|
+
opts.nextSlide = opts.reverse ? len - 1 : 1;
|
203
|
+
if ( !opts.timeoutId ) {
|
204
|
+
opts.API.queueTransition( opts );
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
},
|
209
|
+
|
210
|
+
calcFirstSlide: function() {
|
211
|
+
var opts = this.opts();
|
212
|
+
var firstSlideIndex;
|
213
|
+
firstSlideIndex = parseInt( opts.startingSlide || 0, 10 );
|
214
|
+
if (firstSlideIndex >= opts.slides.length || firstSlideIndex < 0)
|
215
|
+
firstSlideIndex = 0;
|
216
|
+
|
217
|
+
opts.currSlide = firstSlideIndex;
|
218
|
+
if ( opts.reverse ) {
|
219
|
+
opts.nextSlide = firstSlideIndex - 1;
|
220
|
+
if (opts.nextSlide < 0)
|
221
|
+
opts.nextSlide = opts.slides.length - 1;
|
222
|
+
}
|
223
|
+
else {
|
224
|
+
opts.nextSlide = firstSlideIndex + 1;
|
225
|
+
if (opts.nextSlide == opts.slides.length)
|
226
|
+
opts.nextSlide = 0;
|
227
|
+
}
|
228
|
+
},
|
229
|
+
|
230
|
+
calcNextSlide: function() {
|
231
|
+
var opts = this.opts();
|
232
|
+
var roll;
|
233
|
+
if ( opts.reverse ) {
|
234
|
+
roll = (opts.nextSlide - 1) < 0;
|
235
|
+
opts.nextSlide = roll ? opts.slideCount - 1 : opts.nextSlide-1;
|
236
|
+
opts.currSlide = roll ? 0 : opts.nextSlide+1;
|
237
|
+
}
|
238
|
+
else {
|
239
|
+
roll = (opts.nextSlide + 1) == opts.slides.length;
|
240
|
+
opts.nextSlide = roll ? 0 : opts.nextSlide+1;
|
241
|
+
opts.currSlide = roll ? opts.slides.length-1 : opts.nextSlide-1;
|
242
|
+
}
|
243
|
+
},
|
244
|
+
|
245
|
+
calcTx: function( slideOpts, manual ) {
|
246
|
+
var opts = slideOpts;
|
247
|
+
var tx;
|
248
|
+
if ( manual && opts.manualFx )
|
249
|
+
tx = $.fn.cycle.transitions[opts.manualFx];
|
250
|
+
if ( !tx )
|
251
|
+
tx = $.fn.cycle.transitions[opts.fx];
|
252
|
+
|
253
|
+
if (!tx) {
|
254
|
+
tx = $.fn.cycle.transitions.fade;
|
255
|
+
opts.API.log('Transition "' + opts.fx + '" not found. Using fade.');
|
256
|
+
}
|
257
|
+
return tx;
|
258
|
+
},
|
259
|
+
|
260
|
+
prepareTx: function( manual, fwd ) {
|
261
|
+
var opts = this.opts();
|
262
|
+
var after, curr, next, slideOpts, tx;
|
263
|
+
|
264
|
+
if ( opts.slideCount < 2 ) {
|
265
|
+
opts.timeoutId = 0;
|
266
|
+
return;
|
267
|
+
}
|
268
|
+
if ( manual && ( !opts.busy || opts.manualTrump ) ) {
|
269
|
+
opts.API.stopTransition();
|
270
|
+
opts.busy = false;
|
271
|
+
clearTimeout(opts.timeoutId);
|
272
|
+
opts.timeoutId = 0;
|
273
|
+
}
|
274
|
+
if ( opts.busy )
|
275
|
+
return;
|
276
|
+
if ( opts.timeoutId === 0 && !manual )
|
277
|
+
return;
|
278
|
+
|
279
|
+
curr = opts.slides[opts.currSlide];
|
280
|
+
next = opts.slides[opts.nextSlide];
|
281
|
+
slideOpts = opts.API.getSlideOpts( opts.nextSlide );
|
282
|
+
tx = opts.API.calcTx( slideOpts, manual );
|
283
|
+
|
284
|
+
opts._tx = tx;
|
285
|
+
|
286
|
+
if ( manual && slideOpts.manualSpeed !== undefined )
|
287
|
+
slideOpts.speed = slideOpts.manualSpeed;
|
288
|
+
|
289
|
+
// if ( opts.nextSlide === opts.currSlide )
|
290
|
+
// opts.API.calcNextSlide();
|
291
|
+
|
292
|
+
// ensure that:
|
293
|
+
// 1. advancing to a different slide
|
294
|
+
// 2. this is either a manual event (prev/next, pager, cmd) or
|
295
|
+
// a timer event and slideshow is not paused
|
296
|
+
if ( opts.nextSlide != opts.currSlide &&
|
297
|
+
(manual || (!opts.paused && !opts.hoverPaused && opts.timeout) )) { // #62
|
298
|
+
|
299
|
+
opts.API.trigger('cycle-before', [ slideOpts, curr, next, fwd ]);
|
300
|
+
if ( tx.before )
|
301
|
+
tx.before( slideOpts, curr, next, fwd );
|
302
|
+
|
303
|
+
after = function() {
|
304
|
+
opts.busy = false;
|
305
|
+
// #76; bail if slideshow has been destroyed
|
306
|
+
if (! opts.container.data( 'cycle.opts' ) )
|
307
|
+
return;
|
308
|
+
|
309
|
+
if (tx.after)
|
310
|
+
tx.after( slideOpts, curr, next, fwd );
|
311
|
+
opts.API.trigger('cycle-after', [ slideOpts, curr, next, fwd ]);
|
312
|
+
opts.API.queueTransition( slideOpts);
|
313
|
+
opts.API.updateView( true );
|
314
|
+
};
|
315
|
+
|
316
|
+
opts.busy = true;
|
317
|
+
if (tx.transition)
|
318
|
+
tx.transition(slideOpts, curr, next, fwd, after);
|
319
|
+
else
|
320
|
+
opts.API.doTransition( slideOpts, curr, next, fwd, after);
|
321
|
+
|
322
|
+
opts.API.calcNextSlide();
|
323
|
+
opts.API.updateView();
|
324
|
+
} else {
|
325
|
+
opts.API.queueTransition( slideOpts );
|
326
|
+
}
|
327
|
+
},
|
328
|
+
|
329
|
+
// perform the actual animation
|
330
|
+
doTransition: function( slideOpts, currEl, nextEl, fwd, callback) {
|
331
|
+
var opts = slideOpts;
|
332
|
+
var curr = $(currEl), next = $(nextEl);
|
333
|
+
var fn = function() {
|
334
|
+
// make sure animIn has something so that callback doesn't trigger immediately
|
335
|
+
next.animate(opts.animIn || { opacity: 1}, opts.speed, opts.easeIn || opts.easing, callback);
|
336
|
+
};
|
337
|
+
|
338
|
+
next.css(opts.cssBefore || {});
|
339
|
+
curr.animate(opts.animOut || {}, opts.speed, opts.easeOut || opts.easing, function() {
|
340
|
+
curr.css(opts.cssAfter || {});
|
341
|
+
if (!opts.sync) {
|
342
|
+
fn();
|
343
|
+
}
|
344
|
+
});
|
345
|
+
if (opts.sync) {
|
346
|
+
fn();
|
347
|
+
}
|
348
|
+
},
|
349
|
+
|
350
|
+
queueTransition: function( slideOpts ) {
|
351
|
+
var opts = this.opts();
|
352
|
+
if (opts.nextSlide === 0 && --opts.loop === 0) {
|
353
|
+
opts.API.log('terminating; loop=0');
|
354
|
+
opts.timeout = 0;
|
355
|
+
if (slideOpts.timeout) {
|
356
|
+
setTimeout(function() {
|
357
|
+
opts.API.trigger('cycle-finished', [ opts ]);
|
358
|
+
}, slideOpts.timeout);
|
359
|
+
}
|
360
|
+
else {
|
361
|
+
opts.API.trigger('cycle-finished', [ opts ]);
|
362
|
+
}
|
363
|
+
// reset nextSlide
|
364
|
+
opts.nextSlide = opts.currSlide;
|
365
|
+
return;
|
366
|
+
}
|
367
|
+
if (slideOpts.timeout) {
|
368
|
+
opts.timeoutId = setTimeout(function() {
|
369
|
+
opts.API.prepareTx( false, !opts.reverse );
|
370
|
+
}, slideOpts.timeout );
|
371
|
+
}
|
372
|
+
},
|
373
|
+
|
374
|
+
stopTransition: function() {
|
375
|
+
var opts = this.opts();
|
376
|
+
if ( opts.slides.filter(':animated').length ) {
|
377
|
+
opts.slides.stop(false, true);
|
378
|
+
opts.API.trigger('cycle-transition-stopped', [ opts ]);
|
379
|
+
}
|
380
|
+
|
381
|
+
if ( opts._tx && opts._tx.stopTransition )
|
382
|
+
opts._tx.stopTransition( opts );
|
383
|
+
},
|
384
|
+
|
385
|
+
// advance slide forward or back
|
386
|
+
advanceSlide: function( val ) {
|
387
|
+
var opts = this.opts();
|
388
|
+
clearTimeout(opts.timeoutId);
|
389
|
+
opts.timeoutId = 0;
|
390
|
+
opts.nextSlide = opts.currSlide + val;
|
391
|
+
|
392
|
+
if (opts.nextSlide < 0)
|
393
|
+
opts.nextSlide = opts.slides.length - 1;
|
394
|
+
else if (opts.nextSlide >= opts.slides.length)
|
395
|
+
opts.nextSlide = 0;
|
396
|
+
|
397
|
+
opts.API.prepareTx( true, val >= 0 );
|
398
|
+
return false;
|
399
|
+
},
|
400
|
+
|
401
|
+
buildSlideOpts: function( slide ) {
|
402
|
+
var opts = this.opts();
|
403
|
+
var val, shortName;
|
404
|
+
var slideOpts = slide.data() || {};
|
405
|
+
for (var p in slideOpts) {
|
406
|
+
// allow props to be accessed sans 'cycle' prefix and log the overrides
|
407
|
+
if (slideOpts.hasOwnProperty(p) && /^cycle[A-Z]+/.test(p) ) {
|
408
|
+
val = slideOpts[p];
|
409
|
+
shortName = p.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, lowerCase);
|
410
|
+
opts.API.log('['+(opts.slideCount-1)+']', shortName+':', val, '('+typeof val +')');
|
411
|
+
slideOpts[shortName] = val;
|
412
|
+
}
|
413
|
+
}
|
414
|
+
|
415
|
+
slideOpts = $.extend( {}, $.fn.cycle.defaults, opts, slideOpts );
|
416
|
+
slideOpts.slideNum = opts.slideCount;
|
417
|
+
|
418
|
+
try {
|
419
|
+
// these props should always be read from the master state object
|
420
|
+
delete slideOpts.API;
|
421
|
+
delete slideOpts.slideCount;
|
422
|
+
delete slideOpts.currSlide;
|
423
|
+
delete slideOpts.nextSlide;
|
424
|
+
delete slideOpts.slides;
|
425
|
+
} catch(e) {
|
426
|
+
// no op
|
427
|
+
}
|
428
|
+
return slideOpts;
|
429
|
+
},
|
430
|
+
|
431
|
+
getSlideOpts: function( index ) {
|
432
|
+
var opts = this.opts();
|
433
|
+
if ( index === undefined )
|
434
|
+
index = opts.currSlide;
|
435
|
+
|
436
|
+
var slide = opts.slides[index];
|
437
|
+
var slideOpts = $(slide).data('cycle.opts');
|
438
|
+
return $.extend( {}, opts, slideOpts );
|
439
|
+
},
|
440
|
+
|
441
|
+
initSlide: function( slideOpts, slide, suggestedZindex ) {
|
442
|
+
var opts = this.opts();
|
443
|
+
slide.css( slideOpts.slideCss || {} );
|
444
|
+
if ( suggestedZindex > 0 )
|
445
|
+
slide.css( 'zIndex', suggestedZindex );
|
446
|
+
|
447
|
+
// ensure that speed settings are sane
|
448
|
+
if ( isNaN( slideOpts.speed ) )
|
449
|
+
slideOpts.speed = $.fx.speeds[slideOpts.speed] || $.fx.speeds._default;
|
450
|
+
if ( !slideOpts.sync )
|
451
|
+
slideOpts.speed = slideOpts.speed / 2;
|
452
|
+
|
453
|
+
slide.addClass( opts.slideClass );
|
454
|
+
},
|
455
|
+
|
456
|
+
updateView: function( isAfter ) {
|
457
|
+
var opts = this.opts();
|
458
|
+
if ( !opts._initialized )
|
459
|
+
return;
|
460
|
+
var slideOpts = opts.API.getSlideOpts();
|
461
|
+
var currSlide = opts.slides[ opts.currSlide ];
|
462
|
+
|
463
|
+
if ( ! isAfter ) {
|
464
|
+
opts.API.trigger('cycle-update-view-before', [ opts, slideOpts, currSlide ]);
|
465
|
+
if ( opts.updateView < 0 )
|
466
|
+
return;
|
467
|
+
}
|
468
|
+
|
469
|
+
if ( opts.slideActiveClass ) {
|
470
|
+
opts.slides.removeClass( opts.slideActiveClass )
|
471
|
+
.eq( opts.currSlide ).addClass( opts.slideActiveClass );
|
472
|
+
}
|
473
|
+
|
474
|
+
if ( isAfter && opts.hideNonActive )
|
475
|
+
opts.slides.filter( ':not(.' + opts.slideActiveClass + ')' ).hide();
|
476
|
+
|
477
|
+
opts.API.trigger('cycle-update-view', [ opts, slideOpts, currSlide, isAfter ]);
|
478
|
+
opts.API.trigger('cycle-update-view-after', [ opts, slideOpts, currSlide ]);
|
479
|
+
},
|
480
|
+
|
481
|
+
getComponent: function( name ) {
|
482
|
+
var opts = this.opts();
|
483
|
+
var selector = opts[name];
|
484
|
+
if (typeof selector === 'string') {
|
485
|
+
// if selector is a child selector then use find, otherwise query full dom
|
486
|
+
return (/^\s*\>/).test( selector ) ? opts.container.find( selector ) : $( selector );
|
487
|
+
}
|
488
|
+
if (selector.jquery)
|
489
|
+
return selector;
|
490
|
+
|
491
|
+
return $(selector);
|
492
|
+
},
|
493
|
+
|
494
|
+
stackSlides: function( curr, next, fwd ) {
|
495
|
+
var opts = this.opts();
|
496
|
+
if ( !curr ) {
|
497
|
+
curr = opts.slides[opts.currSlide];
|
498
|
+
next = opts.slides[opts.nextSlide];
|
499
|
+
fwd = !opts.reverse;
|
500
|
+
}
|
501
|
+
|
502
|
+
// reset the zIndex for the common case:
|
503
|
+
// curr slide on top, next slide beneath, and the rest in order to be shown
|
504
|
+
$(curr).css('zIndex', opts.maxZ);
|
505
|
+
|
506
|
+
var i;
|
507
|
+
var z = opts.maxZ - 2;
|
508
|
+
var len = opts.slideCount;
|
509
|
+
if (fwd) {
|
510
|
+
for ( i = opts.currSlide + 1; i < len; i++ )
|
511
|
+
$( opts.slides[i] ).css( 'zIndex', z-- );
|
512
|
+
for ( i = 0; i < opts.currSlide; i++ )
|
513
|
+
$( opts.slides[i] ).css( 'zIndex', z-- );
|
514
|
+
}
|
515
|
+
else {
|
516
|
+
for ( i = opts.currSlide - 1; i >= 0; i-- )
|
517
|
+
$( opts.slides[i] ).css( 'zIndex', z-- );
|
518
|
+
for ( i = len - 1; i > opts.currSlide; i-- )
|
519
|
+
$( opts.slides[i] ).css( 'zIndex', z-- );
|
520
|
+
}
|
521
|
+
|
522
|
+
$(next).css('zIndex', opts.maxZ - 1);
|
523
|
+
},
|
524
|
+
|
525
|
+
getSlideIndex: function( el ) {
|
526
|
+
return this.opts().slides.index( el );
|
527
|
+
}
|
528
|
+
|
529
|
+
}; // API
|
530
|
+
|
531
|
+
// default logger
|
532
|
+
$.fn.cycle.log = function log() {
|
533
|
+
/*global console:true */
|
534
|
+
if (window.console && console.log)
|
535
|
+
console.log('[cycle2] ' + Array.prototype.join.call(arguments, ' ') );
|
536
|
+
};
|
537
|
+
|
538
|
+
$.fn.cycle.version = function() { return 'Cycle2: ' + version; };
|
539
|
+
|
540
|
+
// helper functions
|
541
|
+
|
542
|
+
function lowerCase(s) {
|
543
|
+
return (s || '').toLowerCase();
|
544
|
+
}
|
545
|
+
|
546
|
+
// expose transition object
|
547
|
+
$.fn.cycle.transitions = {
|
548
|
+
custom: {
|
549
|
+
},
|
550
|
+
none: {
|
551
|
+
before: function( opts, curr, next, fwd ) {
|
552
|
+
opts.API.stackSlides( next, curr, fwd );
|
553
|
+
opts.cssBefore = { opacity: 1, display: 'block' };
|
554
|
+
}
|
555
|
+
},
|
556
|
+
fade: {
|
557
|
+
before: function( opts, curr, next, fwd ) {
|
558
|
+
var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {};
|
559
|
+
opts.API.stackSlides( curr, next, fwd );
|
560
|
+
opts.cssBefore = $.extend(css, { opacity: 0, display: 'block' });
|
561
|
+
opts.animIn = { opacity: 1 };
|
562
|
+
opts.animOut = { opacity: 0 };
|
563
|
+
}
|
564
|
+
},
|
565
|
+
fadeout: {
|
566
|
+
before: function( opts , curr, next, fwd ) {
|
567
|
+
var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {};
|
568
|
+
opts.API.stackSlides( curr, next, fwd );
|
569
|
+
opts.cssBefore = $.extend(css, { opacity: 1, display: 'block' });
|
570
|
+
opts.animOut = { opacity: 0 };
|
571
|
+
}
|
572
|
+
},
|
573
|
+
scrollHorz: {
|
574
|
+
before: function( opts, curr, next, fwd ) {
|
575
|
+
opts.API.stackSlides( curr, next, fwd );
|
576
|
+
var w = opts.container.css('overflow','hidden').width();
|
577
|
+
opts.cssBefore = { left: fwd ? w : - w, top: 0, opacity: 1, display: 'block' };
|
578
|
+
opts.cssAfter = { zIndex: opts._maxZ - 2, left: 0 };
|
579
|
+
opts.animIn = { left: 0 };
|
580
|
+
opts.animOut = { left: fwd ? -w : w };
|
581
|
+
}
|
582
|
+
}
|
583
|
+
};
|
584
|
+
|
585
|
+
// @see: http://jquery.malsup.com/cycle2/api
|
586
|
+
$.fn.cycle.defaults = {
|
587
|
+
allowWrap: true,
|
588
|
+
autoSelector: '.cycle-slideshow[data-cycle-auto-init!=false]',
|
589
|
+
delay: 0,
|
590
|
+
easing: null,
|
591
|
+
fx: 'fade',
|
592
|
+
hideNonActive: true,
|
593
|
+
loop: 0,
|
594
|
+
manualFx: undefined,
|
595
|
+
manualSpeed: undefined,
|
596
|
+
manualTrump: true,
|
597
|
+
maxZ: 100,
|
598
|
+
pauseOnHover: false,
|
599
|
+
reverse: false,
|
600
|
+
slideActiveClass: 'cycle-slide-active',
|
601
|
+
slideClass: 'cycle-slide',
|
602
|
+
slideCss: { position: 'absolute', top: 0, left: 0 },
|
603
|
+
slides: '> img',
|
604
|
+
speed: 500,
|
605
|
+
startingSlide: 0,
|
606
|
+
sync: true,
|
607
|
+
timeout: 4000,
|
608
|
+
updateView: -1
|
609
|
+
};
|
610
|
+
|
611
|
+
// automatically find and run slideshows
|
612
|
+
$(document).ready(function() {
|
613
|
+
$( $.fn.cycle.defaults.autoSelector ).cycle();
|
614
|
+
});
|
615
|
+
|
616
|
+
})(jQuery);
|
617
|
+
|
618
|
+
/*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130322 */
|
619
|
+
(function($) {
|
620
|
+
"use strict";
|
621
|
+
|
622
|
+
$.extend($.fn.cycle.defaults, {
|
623
|
+
autoHeight: 0 // setting this option to -1 disables autoHeight logic
|
624
|
+
});
|
625
|
+
|
626
|
+
$(document).on( 'cycle-initialized cycle-slide-added cycle-slide-removed', initAutoHeight);
|
627
|
+
$(document).on( 'cycle-destroyed', cleanup);
|
628
|
+
|
629
|
+
function initAutoHeight(e, opts) {
|
630
|
+
var autoHeight = opts.autoHeight;
|
631
|
+
var clone, ratio, timeout;
|
632
|
+
|
633
|
+
cleanup( e, opts );
|
634
|
+
|
635
|
+
$(window).on( 'resize orientationchange', onResize );
|
636
|
+
opts._autoHeightOnResize = onResize;
|
637
|
+
|
638
|
+
if ( autoHeight === 'calc' || ( $.type( autoHeight ) == 'number' && autoHeight >= 0 ) ) {
|
639
|
+
if ( autoHeight === 'calc' ) {
|
640
|
+
autoHeight = calcSentinelIndex( opts );
|
641
|
+
}
|
642
|
+
else if ( autoHeight >= opts.slides.length ) {
|
643
|
+
autoHeight = 0;
|
644
|
+
}
|
645
|
+
|
646
|
+
// clone existing slide as sentinel
|
647
|
+
clone = $( opts.slides[ autoHeight ] ).clone();
|
648
|
+
|
649
|
+
// #50; remove special attributes from cloned content
|
650
|
+
clone.removeAttr( 'id name rel' ).find( '[id],[name],[rel]' ).removeAttr( 'id name rel' );
|
651
|
+
|
652
|
+
clone.css({
|
653
|
+
position: 'static',
|
654
|
+
visibility: 'hidden',
|
655
|
+
display: 'block'
|
656
|
+
}).prependTo( opts.container ).addClass('cycle-sentinel cycle-slide');
|
657
|
+
clone.find( '*' ).css( 'visibility', 'hidden' );
|
658
|
+
|
659
|
+
opts._sentinel = clone;
|
660
|
+
}
|
661
|
+
else if ( $.type( autoHeight ) == 'string' && /\d+\:\d+/.test( autoHeight ) ) {
|
662
|
+
// use ratio
|
663
|
+
ratio = autoHeight.match(/(\d+)\:(\d+)/);
|
664
|
+
ratio = ratio[1] / ratio[2];
|
665
|
+
opts._autoHeightRatio = ratio;
|
666
|
+
setTimeout(function() {
|
667
|
+
$(window).triggerHandler('resize');
|
668
|
+
},15);
|
669
|
+
}
|
670
|
+
|
671
|
+
function onResize() {
|
672
|
+
if ( opts._autoHeightRatio ) {
|
673
|
+
opts.container.height( opts.container.width() / ratio );
|
674
|
+
}
|
675
|
+
else {
|
676
|
+
clearTimeout( timeout );
|
677
|
+
timeout = setTimeout(function() {
|
678
|
+
initAutoHeight(e, opts);
|
679
|
+
}, 50);
|
680
|
+
}
|
681
|
+
}
|
682
|
+
}
|
683
|
+
|
684
|
+
function cleanup( e, opts ) {
|
685
|
+
if ( opts._sentinel ) {
|
686
|
+
opts._sentinel.remove();
|
687
|
+
opts._sentinel = null;
|
688
|
+
}
|
689
|
+
if ( opts._autoHeightOnResize ) {
|
690
|
+
$(window).off( 'resize orientationchange', opts._autoHeightOnResize );
|
691
|
+
opts._autoHeightOnResize = null;
|
692
|
+
}
|
693
|
+
}
|
694
|
+
|
695
|
+
function calcSentinelIndex( opts ) {
|
696
|
+
var index = 0, max = -1;
|
697
|
+
|
698
|
+
// calculate tallest slide index
|
699
|
+
opts.slides.each(function(i) {
|
700
|
+
var h = $(this).height();
|
701
|
+
if ( h > max ) {
|
702
|
+
max = h;
|
703
|
+
index = i;
|
704
|
+
}
|
705
|
+
});
|
706
|
+
return index;
|
707
|
+
}
|
708
|
+
|
709
|
+
})(jQuery);
|
710
|
+
|
711
|
+
/*! caption plugin for Cycle2; version: 20130306 */
|
712
|
+
(function($) {
|
713
|
+
"use strict";
|
714
|
+
|
715
|
+
$.extend($.fn.cycle.defaults, {
|
716
|
+
caption: '> .cycle-caption',
|
717
|
+
captionTemplate: '{{slideNum}} / {{slideCount}}',
|
718
|
+
overlay: '> .cycle-overlay',
|
719
|
+
overlayTemplate: '<div>{{title}}</div><div>{{desc}}</div>',
|
720
|
+
captionModule: 'caption'
|
721
|
+
});
|
722
|
+
|
723
|
+
$(document).on( 'cycle-update-view', function( e, opts, slideOpts, currSlide ) {
|
724
|
+
if ( opts.captionModule !== 'caption' )
|
725
|
+
return;
|
726
|
+
var el;
|
727
|
+
$.each(['caption','overlay'], function() {
|
728
|
+
var name = this;
|
729
|
+
var template = slideOpts[name+'Template'];
|
730
|
+
var el = opts.API.getComponent( name );
|
731
|
+
if( el.length && template ) {
|
732
|
+
el.html( opts.API.tmpl( template, slideOpts, opts, currSlide ) );
|
733
|
+
el.show();
|
734
|
+
}
|
735
|
+
else {
|
736
|
+
el.hide();
|
737
|
+
}
|
738
|
+
});
|
739
|
+
});
|
740
|
+
|
741
|
+
$(document).on( 'cycle-destroyed', function( e, opts ) {
|
742
|
+
var el;
|
743
|
+
$.each(['caption','overlay'], function() {
|
744
|
+
var name = this, template = opts[name+'Template'];
|
745
|
+
if ( opts[name] && template ) {
|
746
|
+
el = opts.API.getComponent( 'caption' );
|
747
|
+
el.empty();
|
748
|
+
}
|
749
|
+
});
|
750
|
+
});
|
751
|
+
|
752
|
+
})(jQuery);
|
753
|
+
|
754
|
+
/*! command plugin for Cycle2; version: 20130203 */
|
755
|
+
(function($) {
|
756
|
+
"use strict";
|
757
|
+
|
758
|
+
var c2 = $.fn.cycle;
|
759
|
+
|
760
|
+
$.fn.cycle = function( options ) {
|
761
|
+
var cmd, cmdFn, opts;
|
762
|
+
var args = $.makeArray( arguments );
|
763
|
+
|
764
|
+
if ( $.type( options ) == 'number' ) {
|
765
|
+
return this.cycle( 'goto', options );
|
766
|
+
}
|
767
|
+
|
768
|
+
if ( $.type( options ) == 'string' ) {
|
769
|
+
return this.each(function() {
|
770
|
+
var cmdArgs;
|
771
|
+
cmd = options;
|
772
|
+
opts = $(this).data('cycle.opts');
|
773
|
+
|
774
|
+
if ( opts === undefined ) {
|
775
|
+
c2.log('slideshow must be initialized before sending commands; "' + cmd + '" ignored');
|
776
|
+
return;
|
777
|
+
}
|
778
|
+
else {
|
779
|
+
cmd = cmd == 'goto' ? 'jump' : cmd; // issue #3; change 'goto' to 'jump' internally
|
780
|
+
cmdFn = opts.API[ cmd ];
|
781
|
+
if ( $.isFunction( cmdFn )) {
|
782
|
+
cmdArgs = $.makeArray( args );
|
783
|
+
cmdArgs.shift();
|
784
|
+
return cmdFn.apply( opts.API, cmdArgs );
|
785
|
+
}
|
786
|
+
else {
|
787
|
+
c2.log( 'unknown command: ', cmd );
|
788
|
+
}
|
789
|
+
}
|
790
|
+
});
|
791
|
+
}
|
792
|
+
else {
|
793
|
+
return c2.apply( this, arguments );
|
794
|
+
}
|
795
|
+
};
|
796
|
+
|
797
|
+
// copy props
|
798
|
+
$.extend( $.fn.cycle, c2 );
|
799
|
+
|
800
|
+
$.extend( c2.API, {
|
801
|
+
next: function() {
|
802
|
+
var opts = this.opts();
|
803
|
+
if ( opts.busy && ! opts.manualTrump )
|
804
|
+
return;
|
805
|
+
|
806
|
+
var count = opts.reverse ? -1 : 1;
|
807
|
+
if ( opts.allowWrap === false && ( opts.currSlide + count ) >= opts.slideCount )
|
808
|
+
return;
|
809
|
+
|
810
|
+
opts.API.advanceSlide( count );
|
811
|
+
opts.API.trigger('cycle-next', [ opts ]).log('cycle-next');
|
812
|
+
},
|
813
|
+
|
814
|
+
prev: function() {
|
815
|
+
var opts = this.opts();
|
816
|
+
if ( opts.busy && ! opts.manualTrump )
|
817
|
+
return;
|
818
|
+
var count = opts.reverse ? 1 : -1;
|
819
|
+
if ( opts.allowWrap === false && ( opts.currSlide + count ) < 0 )
|
820
|
+
return;
|
821
|
+
|
822
|
+
opts.API.advanceSlide( count );
|
823
|
+
opts.API.trigger('cycle-prev', [ opts ]).log('cycle-prev');
|
824
|
+
},
|
825
|
+
|
826
|
+
destroy: function() {
|
827
|
+
var opts = this.opts();
|
828
|
+
clearTimeout(opts.timeoutId);
|
829
|
+
opts.timeoutId = 0;
|
830
|
+
opts.API.stop();
|
831
|
+
opts.API.trigger( 'cycle-destroyed', [ opts ] ).log('cycle-destroyed');
|
832
|
+
opts.container.removeData( 'cycle.opts' );
|
833
|
+
|
834
|
+
// #75; remove inline styles
|
835
|
+
if ( ! opts.retainStylesOnDestroy ) {
|
836
|
+
opts.container.removeAttr( 'style' );
|
837
|
+
opts.slides.removeAttr( 'style' );
|
838
|
+
opts.slides.removeClass( 'cycle-slide-active' );
|
839
|
+
}
|
840
|
+
},
|
841
|
+
|
842
|
+
jump: function( index ) {
|
843
|
+
// go to the requested slide
|
844
|
+
var fwd;
|
845
|
+
var opts = this.opts();
|
846
|
+
if ( opts.busy && ! opts.manualTrump )
|
847
|
+
return;
|
848
|
+
var num = parseInt( index, 10 );
|
849
|
+
if (isNaN(num) || num < 0 || num >= opts.slides.length) {
|
850
|
+
opts.API.log('goto: invalid slide index: ' + num);
|
851
|
+
return;
|
852
|
+
}
|
853
|
+
if (num == opts.currSlide) {
|
854
|
+
opts.API.log('goto: skipping, already on slide', num);
|
855
|
+
return;
|
856
|
+
}
|
857
|
+
opts.nextSlide = num;
|
858
|
+
clearTimeout(opts.timeoutId);
|
859
|
+
opts.timeoutId = 0;
|
860
|
+
opts.API.log('goto: ', num, ' (zero-index)');
|
861
|
+
fwd = opts.currSlide < opts.nextSlide;
|
862
|
+
opts.API.prepareTx( true, fwd );
|
863
|
+
},
|
864
|
+
|
865
|
+
stop: function() {
|
866
|
+
var opts = this.opts();
|
867
|
+
var pauseObj = opts.container;
|
868
|
+
clearTimeout(opts.timeoutId);
|
869
|
+
opts.timeoutId = 0;
|
870
|
+
opts.API.stopTransition();
|
871
|
+
if ( opts.pauseOnHover ) {
|
872
|
+
if ( opts.pauseOnHover !== true )
|
873
|
+
pauseObj = $( opts.pauseOnHover );
|
874
|
+
pauseObj.off('mouseenter mouseleave');
|
875
|
+
}
|
876
|
+
opts.API.trigger('cycle-stopped', [ opts ]).log('cycle-stopped');
|
877
|
+
},
|
878
|
+
|
879
|
+
pause: function() {
|
880
|
+
var opts = this.opts();
|
881
|
+
opts.paused = true;
|
882
|
+
opts.API.trigger('cycle-paused', [ opts ]).log('cycle-paused');
|
883
|
+
},
|
884
|
+
|
885
|
+
resume: function() {
|
886
|
+
var opts = this.opts();
|
887
|
+
opts.paused = false;
|
888
|
+
opts.API.trigger('cycle-resumed', [ opts ]).log('cycle-resumed');
|
889
|
+
},
|
890
|
+
|
891
|
+
reinit: function() {
|
892
|
+
var opts = this.opts();
|
893
|
+
opts.API.destroy();
|
894
|
+
opts.container.cycle();
|
895
|
+
},
|
896
|
+
|
897
|
+
remove: function( index ) {
|
898
|
+
var opts = this.opts();
|
899
|
+
var slide, slideToRemove, slides = [], slideNum = 1;
|
900
|
+
for ( var i=0; i < opts.slides.length; i++ ) {
|
901
|
+
slide = opts.slides[i];
|
902
|
+
if ( i == index ) {
|
903
|
+
slideToRemove = slide;
|
904
|
+
}
|
905
|
+
else {
|
906
|
+
slides.push( slide );
|
907
|
+
$( slide ).data('cycle.opts').slideNum = slideNum;
|
908
|
+
slideNum++;
|
909
|
+
}
|
910
|
+
}
|
911
|
+
if ( slideToRemove ) {
|
912
|
+
opts.slides = $( slides );
|
913
|
+
opts.slideCount--;
|
914
|
+
$( slideToRemove ).remove();
|
915
|
+
if (index == opts.currSlide) {
|
916
|
+
opts.API.advanceSlide( 1 );
|
917
|
+
}
|
918
|
+
|
919
|
+
opts.API.trigger('cycle-slide-removed', [ opts, index, slideToRemove ]).log('cycle-slide-removed');
|
920
|
+
opts.API.updateView();
|
921
|
+
}
|
922
|
+
}
|
923
|
+
|
924
|
+
});
|
925
|
+
|
926
|
+
// listen for clicks on elements with data-cycle-cmd attribute
|
927
|
+
$(document).on('click.cycle', '[data-cycle-cmd]', function(e) {
|
928
|
+
// issue cycle command
|
929
|
+
e.preventDefault();
|
930
|
+
var el = $(this);
|
931
|
+
var command = el.data('cycle-cmd');
|
932
|
+
var context = el.data('cycle-context') || '.cycle-slideshow';
|
933
|
+
$(context).cycle(command, el.data('cycle-arg'));
|
934
|
+
});
|
935
|
+
|
936
|
+
|
937
|
+
})(jQuery);
|
938
|
+
|
939
|
+
/*! hash plugin for Cycle2; version: 20121120 */
|
940
|
+
(function($) {
|
941
|
+
"use strict";
|
942
|
+
|
943
|
+
$(document).on( 'cycle-pre-initialize', function( e, opts ) {
|
944
|
+
onHashChange( opts, true );
|
945
|
+
|
946
|
+
opts._onHashChange = function() {
|
947
|
+
onHashChange( opts, false );
|
948
|
+
};
|
949
|
+
|
950
|
+
$( window ).on( 'hashchange', opts._onHashChange);
|
951
|
+
});
|
952
|
+
|
953
|
+
$(document).on( 'cycle-update-view', function( e, opts, slideOpts ) {
|
954
|
+
if ( slideOpts.hash ) {
|
955
|
+
opts._hashFence = true;
|
956
|
+
window.location.hash = slideOpts.hash;
|
957
|
+
}
|
958
|
+
});
|
959
|
+
|
960
|
+
$(document).on( 'cycle-destroyed', function( e, opts) {
|
961
|
+
if ( opts._onHashChange ) {
|
962
|
+
$( window ).off( 'hashchange', opts._onHashChange );
|
963
|
+
}
|
964
|
+
});
|
965
|
+
|
966
|
+
function onHashChange( opts, setStartingSlide ) {
|
967
|
+
var hash;
|
968
|
+
if ( opts._hashFence ) {
|
969
|
+
opts._hashFence = false;
|
970
|
+
return;
|
971
|
+
}
|
972
|
+
|
973
|
+
hash = window.location.hash.substring(1);
|
974
|
+
|
975
|
+
opts.slides.each(function(i) {
|
976
|
+
if ( $(this).data( 'cycle-hash' ) == hash ) {
|
977
|
+
if ( setStartingSlide === true ) {
|
978
|
+
opts.startingSlide = i;
|
979
|
+
}
|
980
|
+
else {
|
981
|
+
opts.nextSlide = i;
|
982
|
+
opts.API.prepareTx( true, false );
|
983
|
+
}
|
984
|
+
return false;
|
985
|
+
}
|
986
|
+
});
|
987
|
+
}
|
988
|
+
|
989
|
+
})(jQuery);
|
990
|
+
|
991
|
+
/*! loader plugin for Cycle2; version: 20130307 */
|
992
|
+
(function($) {
|
993
|
+
"use strict";
|
994
|
+
|
995
|
+
$.extend($.fn.cycle.defaults, {
|
996
|
+
loader: false
|
997
|
+
});
|
998
|
+
|
999
|
+
$(document).on( 'cycle-bootstrap', function( e, opts ) {
|
1000
|
+
var addFn;
|
1001
|
+
|
1002
|
+
if ( !opts.loader )
|
1003
|
+
return;
|
1004
|
+
|
1005
|
+
// override API.add for this slideshow
|
1006
|
+
addFn = opts.API.add;
|
1007
|
+
opts.API.add = add;
|
1008
|
+
|
1009
|
+
function add( slides, prepend ) {
|
1010
|
+
var slideArr = [];
|
1011
|
+
if ( $.type( slides ) == 'string' )
|
1012
|
+
slides = $.trim( slides );
|
1013
|
+
else if ( $.type( slides) === 'array' ) {
|
1014
|
+
for (var i=0; i < slides.length; i++ )
|
1015
|
+
slides[i] = $(slides[i])[0];
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
slides = $( slides );
|
1019
|
+
var slideCount = slides.length;
|
1020
|
+
|
1021
|
+
if ( ! slideCount )
|
1022
|
+
return;
|
1023
|
+
|
1024
|
+
slides.hide().appendTo('body').each(function(i) { // appendTo fixes #56
|
1025
|
+
var count = 0;
|
1026
|
+
var slide = $(this);
|
1027
|
+
var images = slide.is('img') ? slide : slide.find('img');
|
1028
|
+
slide.data('index', i);
|
1029
|
+
// allow some images to be marked as unimportant (and filter out images w/o src value)
|
1030
|
+
images = images.filter(':not(.cycle-loader-ignore)').filter(':not([src=""])');
|
1031
|
+
if ( ! images.length ) {
|
1032
|
+
--slideCount;
|
1033
|
+
slideArr.push( slide );
|
1034
|
+
return;
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
count = images.length;
|
1038
|
+
images.each(function() {
|
1039
|
+
// add images that are already loaded
|
1040
|
+
if ( this.complete ) {
|
1041
|
+
imageLoaded();
|
1042
|
+
}
|
1043
|
+
else {
|
1044
|
+
$(this).load(function() {
|
1045
|
+
imageLoaded();
|
1046
|
+
}).error(function() {
|
1047
|
+
if ( --count === 0 ) {
|
1048
|
+
// ignore this slide
|
1049
|
+
opts.API.log('slide skipped; img not loaded:', this.src);
|
1050
|
+
if ( --slideCount === 0 && opts.loader == 'wait') {
|
1051
|
+
addFn.apply( opts.API, [ slideArr, prepend ] );
|
1052
|
+
}
|
1053
|
+
}
|
1054
|
+
});
|
1055
|
+
}
|
1056
|
+
});
|
1057
|
+
|
1058
|
+
function imageLoaded() {
|
1059
|
+
if ( --count === 0 ) {
|
1060
|
+
--slideCount;
|
1061
|
+
addSlide( slide );
|
1062
|
+
}
|
1063
|
+
}
|
1064
|
+
});
|
1065
|
+
|
1066
|
+
if ( slideCount )
|
1067
|
+
opts.container.addClass('cycle-loading');
|
1068
|
+
|
1069
|
+
|
1070
|
+
function addSlide( slide ) {
|
1071
|
+
var curr;
|
1072
|
+
if ( opts.loader == 'wait' ) {
|
1073
|
+
slideArr.push( slide );
|
1074
|
+
if ( slideCount === 0 ) {
|
1075
|
+
// #59; sort slides into original markup order
|
1076
|
+
slideArr.sort( sorter );
|
1077
|
+
addFn.apply( opts.API, [ slideArr, prepend ] );
|
1078
|
+
opts.container.removeClass('cycle-loading');
|
1079
|
+
}
|
1080
|
+
}
|
1081
|
+
else {
|
1082
|
+
curr = $(opts.slides[opts.currSlide]);
|
1083
|
+
addFn.apply( opts.API, [ slide, prepend ] );
|
1084
|
+
curr.show();
|
1085
|
+
opts.container.removeClass('cycle-loading');
|
1086
|
+
}
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
function sorter(a, b) {
|
1090
|
+
return a.data('index') - b.data('index');
|
1091
|
+
}
|
1092
|
+
}
|
1093
|
+
});
|
1094
|
+
|
1095
|
+
})(jQuery);
|
1096
|
+
|
1097
|
+
/*! pager plugin for Cycle2; version: 20130203 */
|
1098
|
+
(function($) {
|
1099
|
+
"use strict";
|
1100
|
+
|
1101
|
+
$.extend($.fn.cycle.defaults, {
|
1102
|
+
pager: '> .cycle-pager',
|
1103
|
+
pagerActiveClass: 'cycle-pager-active',
|
1104
|
+
pagerEvent: 'click.cycle',
|
1105
|
+
pagerTemplate: '<span>•</span>'
|
1106
|
+
});
|
1107
|
+
|
1108
|
+
$(document).on( 'cycle-bootstrap', function( e, opts, API ) {
|
1109
|
+
// add method to API
|
1110
|
+
API.buildPagerLink = buildPagerLink;
|
1111
|
+
});
|
1112
|
+
|
1113
|
+
$(document).on( 'cycle-slide-added', function( e, opts, slideOpts, slideAdded ) {
|
1114
|
+
if ( opts.pager ) {
|
1115
|
+
opts.API.buildPagerLink ( opts, slideOpts, slideAdded );
|
1116
|
+
opts.API.page = page;
|
1117
|
+
}
|
1118
|
+
});
|
1119
|
+
|
1120
|
+
$(document).on( 'cycle-slide-removed', function( e, opts, index, slideRemoved ) {
|
1121
|
+
if ( opts.pager ) {
|
1122
|
+
var pagers = opts.API.getComponent( 'pager' );
|
1123
|
+
pagers.each(function() {
|
1124
|
+
var pager = $(this);
|
1125
|
+
$( pager.children()[index] ).remove();
|
1126
|
+
});
|
1127
|
+
}
|
1128
|
+
});
|
1129
|
+
|
1130
|
+
$(document).on( 'cycle-update-view', function( e, opts, slideOpts ) {
|
1131
|
+
var pagers;
|
1132
|
+
|
1133
|
+
if ( opts.pager ) {
|
1134
|
+
pagers = opts.API.getComponent( 'pager' );
|
1135
|
+
pagers.each(function() {
|
1136
|
+
$(this).children().removeClass( opts.pagerActiveClass )
|
1137
|
+
.eq( opts.currSlide ).addClass( opts.pagerActiveClass );
|
1138
|
+
});
|
1139
|
+
}
|
1140
|
+
});
|
1141
|
+
|
1142
|
+
$(document).on( 'cycle-destroyed', function( e, opts ) {
|
1143
|
+
var pagers;
|
1144
|
+
if (opts.pager && opts.pagerTemplate) {
|
1145
|
+
pagers = opts.API.getComponent( 'pager' );
|
1146
|
+
pagers.empty();
|
1147
|
+
}
|
1148
|
+
});
|
1149
|
+
|
1150
|
+
function buildPagerLink( opts, slideOpts, slide ) {
|
1151
|
+
var pagerLink;
|
1152
|
+
var pagers = opts.API.getComponent( 'pager' );
|
1153
|
+
pagers.each(function() {
|
1154
|
+
var pager = $(this);
|
1155
|
+
if ( slideOpts.pagerTemplate ) {
|
1156
|
+
var markup = opts.API.tmpl( slideOpts.pagerTemplate, slideOpts, opts, slide[0] );
|
1157
|
+
pagerLink = $( markup ).appendTo( pager );
|
1158
|
+
}
|
1159
|
+
else {
|
1160
|
+
pagerLink = pager.children().eq( opts.slideCount - 1 );
|
1161
|
+
}
|
1162
|
+
pagerLink.on( opts.pagerEvent, function(e) {
|
1163
|
+
e.preventDefault();
|
1164
|
+
opts.API.page( pager, e.currentTarget);
|
1165
|
+
});
|
1166
|
+
});
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
function page( pager, target ) {
|
1170
|
+
/*jshint validthis:true */
|
1171
|
+
var opts = this.opts();
|
1172
|
+
if ( opts.busy && ! opts.manualTrump )
|
1173
|
+
return;
|
1174
|
+
|
1175
|
+
var index = pager.children().index( target );
|
1176
|
+
var nextSlide = index;
|
1177
|
+
var fwd = opts.currSlide < nextSlide;
|
1178
|
+
if (opts.currSlide == nextSlide) {
|
1179
|
+
return; // no op, clicked pager for the currently displayed slide
|
1180
|
+
}
|
1181
|
+
opts.nextSlide = nextSlide;
|
1182
|
+
opts.API.prepareTx( true, fwd );
|
1183
|
+
opts.API.trigger('cycle-pager-activated', [opts, pager, target ]);
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
})(jQuery);
|
1187
|
+
|
1188
|
+
|
1189
|
+
/*! prevnext plugin for Cycle2; version: 20130307 */
|
1190
|
+
(function($) {
|
1191
|
+
"use strict";
|
1192
|
+
|
1193
|
+
$.extend($.fn.cycle.defaults, {
|
1194
|
+
next: '> .cycle-next',
|
1195
|
+
nextEvent: 'click.cycle',
|
1196
|
+
disabledClass: 'disabled',
|
1197
|
+
prev: '> .cycle-prev',
|
1198
|
+
prevEvent: 'click.cycle',
|
1199
|
+
swipe: false
|
1200
|
+
});
|
1201
|
+
|
1202
|
+
$(document).on( 'cycle-initialized', function( e, opts ) {
|
1203
|
+
opts.API.getComponent( 'next' ).on( opts.nextEvent, function(e) {
|
1204
|
+
e.preventDefault();
|
1205
|
+
opts.API.next();
|
1206
|
+
});
|
1207
|
+
|
1208
|
+
opts.API.getComponent( 'prev' ).on( opts.prevEvent, function(e) {
|
1209
|
+
e.preventDefault();
|
1210
|
+
opts.API.prev();
|
1211
|
+
});
|
1212
|
+
|
1213
|
+
if ( opts.swipe ) {
|
1214
|
+
var nextEvent = opts.swipeVert ? 'swipeUp.cycle' : 'swipeLeft.cycle swipeleft.cycle';
|
1215
|
+
var prevEvent = opts.swipeVert ? 'swipeDown.cycle' : 'swipeRight.cycle swiperight.cycle';
|
1216
|
+
opts.container.on( nextEvent, function(e) {
|
1217
|
+
opts.API.next();
|
1218
|
+
});
|
1219
|
+
opts.container.on( prevEvent, function() {
|
1220
|
+
opts.API.prev();
|
1221
|
+
});
|
1222
|
+
}
|
1223
|
+
});
|
1224
|
+
|
1225
|
+
$(document).on( 'cycle-update-view', function( e, opts, slideOpts, currSlide ) {
|
1226
|
+
if ( opts.allowWrap )
|
1227
|
+
return;
|
1228
|
+
|
1229
|
+
var cls = opts.disabledClass;
|
1230
|
+
var next = opts.API.getComponent( 'next' );
|
1231
|
+
var prev = opts.API.getComponent( 'prev' );
|
1232
|
+
var prevBoundry = opts._prevBoundry || 0;
|
1233
|
+
var nextBoundry = opts._nextBoundry || opts.slideCount - 1;
|
1234
|
+
|
1235
|
+
if ( opts.currSlide == nextBoundry )
|
1236
|
+
next.addClass( cls ).prop( 'disabled', true );
|
1237
|
+
else
|
1238
|
+
next.removeClass( cls ).prop( 'disabled', false );
|
1239
|
+
|
1240
|
+
if ( opts.currSlide === prevBoundry )
|
1241
|
+
prev.addClass( cls ).prop( 'disabled', true );
|
1242
|
+
else
|
1243
|
+
prev.removeClass( cls ).prop( 'disabled', false );
|
1244
|
+
});
|
1245
|
+
|
1246
|
+
|
1247
|
+
$(document).on( 'cycle-destroyed', function( e, opts ) {
|
1248
|
+
opts.API.getComponent( 'prev' ).off( opts.nextEvent );
|
1249
|
+
opts.API.getComponent( 'next' ).off( opts.prevEvent );
|
1250
|
+
opts.container.off( 'swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle' );
|
1251
|
+
});
|
1252
|
+
|
1253
|
+
})(jQuery);
|
1254
|
+
|
1255
|
+
/*! progressive loader plugin for Cycle2; version: 20130315 */
|
1256
|
+
(function($) {
|
1257
|
+
"use strict";
|
1258
|
+
|
1259
|
+
$.extend($.fn.cycle.defaults, {
|
1260
|
+
progressive: false
|
1261
|
+
});
|
1262
|
+
|
1263
|
+
$(document).on( 'cycle-pre-initialize', function( e, opts ) {
|
1264
|
+
if ( !opts.progressive )
|
1265
|
+
return;
|
1266
|
+
|
1267
|
+
var API = opts.API;
|
1268
|
+
var nextFn = API.next;
|
1269
|
+
var prevFn = API.prev;
|
1270
|
+
var prepareTxFn = API.prepareTx;
|
1271
|
+
var type = $.type( opts.progressive );
|
1272
|
+
var slides, scriptEl;
|
1273
|
+
|
1274
|
+
if ( type == 'array' ) {
|
1275
|
+
slides = opts.progressive;
|
1276
|
+
}
|
1277
|
+
else if ($.isFunction( opts.progressive ) ) {
|
1278
|
+
slides = opts.progressive( opts );
|
1279
|
+
}
|
1280
|
+
else if ( type == 'string' ) {
|
1281
|
+
scriptEl = $( opts.progressive );
|
1282
|
+
slides = $.trim( scriptEl.html() );
|
1283
|
+
if ( !slides )
|
1284
|
+
return;
|
1285
|
+
// is it json array?
|
1286
|
+
if ( /^(\[)/.test( slides ) ) {
|
1287
|
+
try {
|
1288
|
+
slides = $.parseJSON( slides );
|
1289
|
+
}
|
1290
|
+
catch(err) {
|
1291
|
+
API.log( 'error parsing progressive slides', err );
|
1292
|
+
return;
|
1293
|
+
}
|
1294
|
+
}
|
1295
|
+
else {
|
1296
|
+
// plain text, split on delimeter
|
1297
|
+
slides = slides.split( new RegExp( scriptEl.data('cycle-split') || '\n') );
|
1298
|
+
|
1299
|
+
// #95; look for empty slide
|
1300
|
+
if ( ! slides[ slides.length - 1 ] )
|
1301
|
+
slides.pop();
|
1302
|
+
}
|
1303
|
+
}
|
1304
|
+
|
1305
|
+
|
1306
|
+
|
1307
|
+
if ( prepareTxFn ) {
|
1308
|
+
API.prepareTx = function( manual, fwd ) {
|
1309
|
+
var index, slide;
|
1310
|
+
|
1311
|
+
if ( manual || slides.length === 0 ) {
|
1312
|
+
prepareTxFn.apply( opts.API, [ manual, fwd ] );
|
1313
|
+
return;
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
if ( fwd && opts.currSlide == ( opts.slideCount-1) ) {
|
1317
|
+
slide = slides[ 0 ];
|
1318
|
+
slides = slides.slice( 1 );
|
1319
|
+
opts.container.one('cycle-slide-added', function(e, opts ) {
|
1320
|
+
setTimeout(function() {
|
1321
|
+
opts.API.advanceSlide( 1 );
|
1322
|
+
},50);
|
1323
|
+
});
|
1324
|
+
opts.API.add( slide );
|
1325
|
+
}
|
1326
|
+
else if ( !fwd && opts.currSlide === 0 ) {
|
1327
|
+
index = slides.length-1;
|
1328
|
+
slide = slides[ index ];
|
1329
|
+
slides = slides.slice( 0, index );
|
1330
|
+
opts.container.one('cycle-slide-added', function(e, opts ) {
|
1331
|
+
setTimeout(function() {
|
1332
|
+
opts.currSlide = 1;
|
1333
|
+
opts.API.advanceSlide( -1 );
|
1334
|
+
},50);
|
1335
|
+
});
|
1336
|
+
opts.API.add( slide, true );
|
1337
|
+
}
|
1338
|
+
else {
|
1339
|
+
prepareTxFn.apply( opts.API, [ manual, fwd ] );
|
1340
|
+
}
|
1341
|
+
};
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
if ( nextFn ) {
|
1345
|
+
API.next = function() {
|
1346
|
+
var opts = this.opts();
|
1347
|
+
if ( slides.length && opts.currSlide == ( opts.slideCount - 1 ) ) {
|
1348
|
+
var slide = slides[ 0 ];
|
1349
|
+
slides = slides.slice( 1 );
|
1350
|
+
opts.container.one('cycle-slide-added', function(e, opts ) {
|
1351
|
+
nextFn.apply( opts.API );
|
1352
|
+
opts.container.removeClass('cycle-loading');
|
1353
|
+
});
|
1354
|
+
opts.container.addClass('cycle-loading');
|
1355
|
+
opts.API.add( slide );
|
1356
|
+
}
|
1357
|
+
else {
|
1358
|
+
nextFn.apply( opts.API );
|
1359
|
+
}
|
1360
|
+
};
|
1361
|
+
}
|
1362
|
+
|
1363
|
+
if ( prevFn ) {
|
1364
|
+
API.prev = function() {
|
1365
|
+
var opts = this.opts();
|
1366
|
+
if ( slides.length && opts.currSlide === 0 ) {
|
1367
|
+
var index = slides.length-1;
|
1368
|
+
var slide = slides[ index ];
|
1369
|
+
slides = slides.slice( 0, index );
|
1370
|
+
opts.container.one('cycle-slide-added', function(e, opts ) {
|
1371
|
+
opts.currSlide = 1;
|
1372
|
+
opts.API.advanceSlide( -1 );
|
1373
|
+
opts.container.removeClass('cycle-loading');
|
1374
|
+
});
|
1375
|
+
opts.container.addClass('cycle-loading');
|
1376
|
+
opts.API.add( slide, true );
|
1377
|
+
}
|
1378
|
+
else {
|
1379
|
+
prevFn.apply( opts.API );
|
1380
|
+
}
|
1381
|
+
};
|
1382
|
+
}
|
1383
|
+
});
|
1384
|
+
|
1385
|
+
})(jQuery);
|
1386
|
+
|
1387
|
+
/*! tmpl plugin for Cycle2; version: 20121227 */
|
1388
|
+
(function($) {
|
1389
|
+
"use strict";
|
1390
|
+
|
1391
|
+
$.extend($.fn.cycle.defaults, {
|
1392
|
+
tmplRegex: '{{((.)?.*?)}}'
|
1393
|
+
});
|
1394
|
+
|
1395
|
+
$.extend($.fn.cycle.API, {
|
1396
|
+
tmpl: function( str, opts /*, ... */) {
|
1397
|
+
var regex = new RegExp( opts.tmplRegex || $.fn.cycle.defaults.tmplRegex, 'g' );
|
1398
|
+
var args = $.makeArray( arguments );
|
1399
|
+
args.shift();
|
1400
|
+
return str.replace(regex, function(_, str) {
|
1401
|
+
var i, j, obj, prop, names = str.split('.');
|
1402
|
+
for (i=0; i < args.length; i++) {
|
1403
|
+
obj = args[i];
|
1404
|
+
if ( ! obj )
|
1405
|
+
continue;
|
1406
|
+
if (names.length > 1) {
|
1407
|
+
prop = obj;
|
1408
|
+
for (j=0; j < names.length; j++) {
|
1409
|
+
obj = prop;
|
1410
|
+
prop = prop[ names[j] ] || str;
|
1411
|
+
}
|
1412
|
+
} else {
|
1413
|
+
prop = obj[str];
|
1414
|
+
}
|
1415
|
+
|
1416
|
+
if ($.isFunction(prop))
|
1417
|
+
return prop.apply(obj, args);
|
1418
|
+
if (prop !== undefined && prop !== null && prop != str)
|
1419
|
+
return prop;
|
1420
|
+
}
|
1421
|
+
return str;
|
1422
|
+
});
|
1423
|
+
}
|
1424
|
+
});
|
1425
|
+
|
1426
|
+
})(jQuery);
|