skyron 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +22 -0
  4. data/README.md +28 -0
  5. data/Rakefile +2 -0
  6. data/lib/skyron.rb +9 -0
  7. data/lib/skyron/engine.rb +5 -0
  8. data/lib/skyron/version.rb +3 -0
  9. data/skyron.gemspec +17 -0
  10. data/stylesheets/_skyron.scss +0 -0
  11. data/stylesheets/skyron/_base.scss +0 -0
  12. data/stylesheets/skyron/_buttons.scss +0 -0
  13. data/stylesheets/skyron/_forms.scss +0 -0
  14. data/stylesheets/skyron/_grid.scss +0 -0
  15. data/stylesheets/skyron/_orbit.scss +0 -0
  16. data/stylesheets/skyron/_reveal.scss +0 -0
  17. data/stylesheets/skyron/_settings.scss +0 -0
  18. data/templates/project/.gitignore +44 -0
  19. data/templates/project/favicon.ico +0 -0
  20. data/templates/project/humans.txt +8 -0
  21. data/templates/project/index.html +133 -0
  22. data/templates/project/manifest.rb +61 -0
  23. data/templates/project/robots.txt +4 -0
  24. data/templates/project/sass/_settings.scss +48 -0
  25. data/templates/project/sass/skyron-styles/buttons.scss +0 -0
  26. data/templates/project/sass/skyron-styles/footer.scss +0 -0
  27. data/templates/project/sass/skyron-styles/forms.scss +0 -0
  28. data/templates/project/sass/skyron-styles/globals.scss +0 -0
  29. data/templates/project/sass/skyron-styles/grid.scss +0 -0
  30. data/templates/project/sass/skyron-styles/header.scss +0 -0
  31. data/templates/project/sass/skyron-styles/nav.scss +0 -0
  32. data/templates/project/sass/skyron-styles/orbit.scss +3 -0
  33. data/templates/project/sass/skyron-styles/pie.scss +73 -0
  34. data/templates/project/sass/skyron-styles/reveal.scss +3 -0
  35. data/templates/project/sass/skyron-styles/tabs.scss +0 -0
  36. data/templates/project/sass/style.scss +11 -0
  37. data/vendor/assets/images/orbit/bullets.jpg +0 -0
  38. data/vendor/assets/images/orbit/left-arrow-small.png +0 -0
  39. data/vendor/assets/images/orbit/left-arrow.png +0 -0
  40. data/vendor/assets/images/orbit/loading.gif +0 -0
  41. data/vendor/assets/images/orbit/mask-black.png +0 -0
  42. data/vendor/assets/images/orbit/pause-black.png +0 -0
  43. data/vendor/assets/images/orbit/right-arrow-small.png +0 -0
  44. data/vendor/assets/images/orbit/right-arrow.png +0 -0
  45. data/vendor/assets/images/orbit/rotator-black.png +0 -0
  46. data/vendor/assets/images/orbit/timer-black.png +0 -0
  47. data/vendor/assets/js/index.js +8 -0
  48. data/vendor/assets/js/jquery.customforms.js +258 -0
  49. data/vendor/assets/js/jquery.min.js +4 -0
  50. data/vendor/assets/js/jquery.offcanvas.js +50 -0
  51. data/vendor/assets/js/jquery.orbit-1.4.0.js +633 -0
  52. data/vendor/assets/js/jquery.placeholder.min.js +2 -0
  53. data/vendor/assets/js/jquery.reveal.js +178 -0
  54. data/vendor/assets/js/jquery.tooltips.js +166 -0
  55. data/vendor/assets/js/modernizr.js +4 -0
  56. data/vendor/assets/js/scripts.js +125 -0
  57. metadata +58 -2
@@ -0,0 +1,2 @@
1
+ /*! http://mths.be/placeholder v2.0.7 by @mathias */
2
+ ;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder');l==h.activeElement&&l.select()}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('<input>').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery));
@@ -0,0 +1,178 @@
1
+ /*
2
+ * jQuery Reveal Plugin 1.1
3
+ * www.ZURB.com
4
+ * Copyright 2010, ZURB
5
+ * Free to use under the MIT license.
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ */
8
+ /*globals jQuery */
9
+
10
+ (function ($) {
11
+ 'use strict';
12
+ var modalQueued = false;
13
+
14
+ $('a[data-reveal-id]').live('click', function (event) {
15
+ event.preventDefault();
16
+ var modalLocation = $(this).attr('data-reveal-id');
17
+ $('#' + modalLocation).reveal($(this).data());
18
+ });
19
+
20
+ $.fn.reveal = function (options) {
21
+ var defaults = {
22
+ animation: 'fadeAndPop', // fade, fadeAndPop, none
23
+ animationSpeed: 300, // how fast animtions are
24
+ closeOnBackgroundClick: true, // if you click background will modal close?
25
+ dismissModalClass: 'close-reveal-modal', // the class of a button or element that will close an open modal
26
+ open: $.noop,
27
+ opened: $.noop,
28
+ close: $.noop,
29
+ closed: $.noop
30
+ };
31
+ options = $.extend({}, defaults, options);
32
+
33
+ return this.each(function () {
34
+ var modal = $(this),
35
+ topMeasure = parseInt(modal.css('top'), 10),
36
+ topOffset = modal.height() + topMeasure,
37
+ locked = false,
38
+ modalBg = $('.reveal-modal-bg'),
39
+ closeButton;
40
+
41
+ if (modalBg.length === 0) {
42
+ modalBg = $('<div class="reveal-modal-bg" />').insertAfter(modal);
43
+ modalBg.fadeTo('fast', 0.8);
44
+ }
45
+
46
+ function unlockModal() {
47
+ locked = false;
48
+ }
49
+
50
+ function lockModal() {
51
+ locked = true;
52
+ }
53
+
54
+ function closeOpenModals(modal) {
55
+
56
+ var openModals = $(".reveal-modal.open");
57
+ if (openModals.length === 1) {
58
+ modalQueued = true;
59
+ $(".reveal-modal.open").trigger("reveal:close");
60
+ }
61
+ }
62
+
63
+ function openAnimation() {
64
+ if (!locked) {
65
+ lockModal();
66
+ closeOpenModals(modal);
67
+ modal.addClass("open");
68
+ if (options.animation === "fadeAndPop") {
69
+ modal.css({'top': $(document).scrollTop() - topOffset, 'opacity': 0, 'visibility': 'visible', 'display' : 'block'});
70
+ modalBg.fadeIn(options.animationSpeed / 2);
71
+ modal.delay(options.animationSpeed / 2).animate({
72
+ "top": $(document).scrollTop() + topMeasure + 'px',
73
+ "opacity": 1
74
+ }, options.animationSpeed, function () {
75
+ modal.trigger('reveal:opened');
76
+ });
77
+
78
+ }
79
+ if (options.animation === "fade") {
80
+ modal.css({'opacity': 0, 'visibility': 'visible', 'display' : 'block', 'top': $(document).scrollTop() + topMeasure});
81
+ modalBg.fadeIn(options.animationSpeed / 2);
82
+ modal.delay(options.animationSpeed / 2).animate({
83
+ "opacity": 1
84
+ }, options.animationSpeed, function () {
85
+ modal.trigger('reveal:opened');
86
+ });
87
+
88
+ }
89
+ if (options.animation === "none") {
90
+ modal.css({'visibility': 'visible', 'display' : 'block', 'top': $(document).scrollTop() + topMeasure});
91
+ modalBg.css({"display": "block"});
92
+ modal.trigger('reveal:opened');
93
+ }
94
+ }
95
+ }
96
+ modal.bind('reveal:open.reveal', openAnimation);
97
+
98
+ function closeAnimation() {
99
+ if (!locked) {
100
+ lockModal();
101
+ modal.removeClass("open");
102
+ if (options.animation === "fadeAndPop") {
103
+ modal.animate({
104
+ "top": $(document).scrollTop() - topOffset + 'px',
105
+ "opacity": 0
106
+ }, options.animationSpeed / 2, function () {
107
+ modal.css({'top': topMeasure, 'opacity': 1, 'visibility': 'hidden', 'display': 'none'});
108
+ });
109
+ if (!modalQueued) {
110
+ modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed, function () {
111
+ modal.trigger('reveal:closed');
112
+ });
113
+ } else {
114
+ modal.trigger('reveal:closed');
115
+ }
116
+ modalQueued = false;
117
+ }
118
+ if (options.animation === "fade") {
119
+ modal.animate({
120
+ "opacity" : 0
121
+ }, options.animationSpeed, function () {
122
+ modal.css({'opacity': 1, 'visibility': 'hidden', 'display' : 'none', 'top': topMeasure});
123
+ });
124
+ if (!modalQueued) {
125
+ modalBg.delay(options.animationSpeed).fadeOut(options.animationSpeed, function () {
126
+ modal.trigger('reveal:closed');
127
+ });
128
+ } else {
129
+ modal.trigger('reveal:closed');
130
+ }
131
+ }
132
+ if (options.animation === "none") {
133
+ modal.css({'visibility': 'hidden', 'display' : 'block', 'top': topMeasure});
134
+ if (!modalQueued) {
135
+ modalBg.css({'display': 'none'});
136
+ }
137
+ modal.trigger('reveal:closed');
138
+ }
139
+ }
140
+ }
141
+
142
+ function destroy() {
143
+ modal.unbind('.reveal');
144
+ modalBg.unbind('.reveal');
145
+ $('.' + options.dismissModalClass).unbind('.reveal');
146
+ $('body').unbind('.reveal');
147
+ }
148
+
149
+ modal.bind('reveal:close.reveal', closeAnimation);
150
+ modal.bind('reveal:opened.reveal reveal:closed.reveal', unlockModal);
151
+ modal.bind('reveal:closed.reveal', destroy);
152
+
153
+ modal.bind('reveal:open.reveal', options.open);
154
+ modal.bind('reveal:opened.reveal', options.opened);
155
+ modal.bind('reveal:close.reveal', options.close);
156
+ modal.bind('reveal:closed.reveal', options.closed);
157
+
158
+ modal.trigger('reveal:open');
159
+
160
+ closeButton = $('.' + options.dismissModalClass).bind('click.reveal', function () {
161
+ modal.trigger('reveal:close');
162
+ });
163
+
164
+ if (options.closeOnBackgroundClick) {
165
+ modalBg.css({"cursor": "pointer"});
166
+ modalBg.bind('click.reveal', function () {
167
+ modal.trigger('reveal:close');
168
+ });
169
+ }
170
+
171
+ $('body').bind('keyup.reveal', function (event) {
172
+ if (event.which === 27) { // 27 is the keycode for the Escape key
173
+ modal.trigger('reveal:close');
174
+ }
175
+ });
176
+ });
177
+ };
178
+ } (jQuery));
@@ -0,0 +1,166 @@
1
+ /*
2
+ * jQuery Foundation Tooltip Plugin 2.0.1
3
+ * http://foundation.zurb.com
4
+ * Copyright 2012, ZURB
5
+ * Free to use under the MIT license.
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ */
8
+
9
+ ;(function($) {
10
+ 'use strict';
11
+ var settings = {
12
+ bodyHeight : 0,
13
+ targetClass : '.has-tip',
14
+ tooltipClass : '.tooltip',
15
+ tipTemplate : function (selector, content) {
16
+ return '<span data-selector="' + selector + '" class="' + settings.tooltipClass.substring(1) + '">' + content + '<span class="nub"></span></span>';
17
+ }
18
+ },
19
+ methods = {
20
+ init : function (options) {
21
+ return this.each(function () {
22
+ var $body = $('body'),
23
+ self = this;
24
+
25
+ if (Modernizr.touch) {
26
+ $body.on('click.tooltip touchstart.tooltip touchend.tooltip', settings.targetClass, function (e) {
27
+ e.preventDefault();
28
+ var $this = $(this);
29
+ $(settings.tooltipClass).hide();
30
+ methods.showOrCreateTip($this);
31
+ });
32
+ $(settings.tooltipClass).on('click.tooltip touchstart.tooltip touchend.tooltip', function (e) {
33
+ e.preventDefault();
34
+ $(this).fadeOut(150);
35
+ });
36
+ } else {
37
+ $body.on('mouseover.tooltip mouseout.tooltip', settings.targetClass, function (e) {
38
+ var $this = $(this);
39
+ if (e.type === 'mouseover') {
40
+ methods.showOrCreateTip($this);
41
+ } else if (e.type === 'mouseout') {
42
+ methods.hide($this);
43
+ }
44
+ });
45
+ }
46
+
47
+ });
48
+ },
49
+ showOrCreateTip : function ($target) {
50
+ var $tip = methods.getTip($target);
51
+ if ($tip && $tip.length > 0) {
52
+ methods.show($target);
53
+ } else {
54
+ methods.create($target);
55
+ }
56
+ },
57
+ getTip : function ($target) {
58
+ var selector = methods.selector($target),
59
+ tip = null;
60
+ if (selector) tip = $('span[data-selector=' + selector + ']' + settings.tooltipClass);
61
+ return (tip) ? tip : false;
62
+ },
63
+ selector : function ($target) {
64
+ var id = $target.attr('id'),
65
+ dataSelector = $target.data('selector');
66
+ if (id === undefined && dataSelector === undefined) {
67
+ dataSelector = 'tooltip' + Math.random().toString(36).substring(7);
68
+ $target.attr('data-selector', dataSelector);
69
+ }
70
+ return (id) ? id : dataSelector;
71
+ },
72
+ create : function ($target) {
73
+ var $tip = $(settings.tipTemplate(methods.selector($target), $target.attr('title'))),
74
+ classes = methods.inheritable_classes($target);
75
+ $tip.addClass(classes).appendTo('body');
76
+ if (Modernizr.touch) $tip.append('<span class="tap-to-close">tap to close </span>');
77
+ $target.removeAttr('title');
78
+ methods.show($target);
79
+ },
80
+ reposition : function (target, tip, classes) {
81
+ var width, nub, nubHeight, nubWidth, row, objPos;
82
+
83
+ tip.css('visibility', 'hidden').show();
84
+
85
+ width = target.data('width');
86
+ nub = tip.children('.nub');
87
+ nubHeight = nub.outerHeight();
88
+ nubWidth = nub.outerWidth();
89
+
90
+ objPos = function (obj, top, right, bottom, left, width) {
91
+ return obj.css({
92
+ 'top' : top,
93
+ 'bottom' : bottom,
94
+ 'left' : left,
95
+ 'right' : right,
96
+ 'width' : (width) ? width : 'auto'
97
+ }).end();
98
+ };
99
+
100
+ objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left, width);
101
+ objPos(nub, -nubHeight, 'auto', 'auto', 10);
102
+
103
+ if ($(window).width() < 767) {
104
+ row = target.parents('.row');
105
+ tip.width(row.outerWidth() - 20).css('left', row.offset().left).addClass('tip-override');
106
+ objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
107
+ } else {
108
+ if (classes.indexOf('tip-top') > -1) {
109
+ objPos(tip, (target.offset().top - tip.outerHeight() - nubHeight), 'auto', 'auto', target.offset().left, width)
110
+ .removeClass('tip-override');
111
+ objPos(nub, 'auto', 'auto', -nubHeight, 'auto');
112
+ } else if (classes.indexOf('tip-left') > -1) {
113
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - nubHeight), 'auto', 'auto', (target.offset().left - tip.outerWidth() - 10), width)
114
+ .removeClass('tip-override');
115
+ objPos(nub, (tip.outerHeight() / 2) - (nubHeight / 2), -nubHeight, 'auto', 'auto');
116
+ } else if (classes.indexOf('tip-right') > -1) {
117
+ objPos(tip, (target.offset().top + (target.outerHeight() / 2) - nubHeight), 'auto', 'auto', (target.offset().left + target.outerWidth() + 10), width)
118
+ .removeClass('tip-override');
119
+ objPos(nub, (tip.outerHeight() / 2) - (nubHeight / 2), 'auto', 'auto', -nubHeight);
120
+ }
121
+ }
122
+ tip.css('visibility', 'visible').hide();
123
+ },
124
+ inheritable_classes : function (target) {
125
+ var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'noradius'],
126
+ filtered = target.attr('class').split(' ').map(function (el, i) {
127
+ if ($.inArray(el, inheritables) !== -1) {
128
+ return el;
129
+ }
130
+ }).join(' ');
131
+ return $.trim(filtered);
132
+ },
133
+ show : function ($target) {
134
+ var $tip = methods.getTip($target);
135
+ methods.reposition($target, $tip, $target.attr('class'));
136
+ $tip.fadeIn(150);
137
+ },
138
+ hide : function ($target) {
139
+ var $tip = methods.getTip($target);
140
+ $tip.fadeOut(150);
141
+ },
142
+ reload : function () {
143
+ var $self = $(this);
144
+ return ($self.data('tooltips')) ? $self.tooltips('destroy').tooltips('init') : $self.tooltips('init');
145
+ },
146
+ destroy : function () {
147
+ return this.each(function () {
148
+ $(window).off('.tooltip');
149
+ $(settings.targetClass).off('.tooltip');
150
+ $(settings.tooltipClass).each(function(i) {
151
+ $($(settings.targetClass).get(i)).attr('title', $(this).text());
152
+ }).remove();
153
+ });
154
+ }
155
+ };
156
+
157
+ $.fn.tooltips = function (method) {
158
+ if (methods[method]) {
159
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
160
+ } else if (typeof method === 'object' || ! method) {
161
+ return methods.init.apply(this, arguments);
162
+ } else {
163
+ $.error('Method ' + method + ' does not exist on jQuery.tooltips');
164
+ }
165
+ };
166
+ })(jQuery);
@@ -0,0 +1,4 @@
1
+ /* Modernizr 2.5.3 (Custom Build) | MIT & BSD
2
+ * Build: http://modernizr.com/download/#-touch-mq-cssclasses-addtest-teststyles-prefixes-ie8compat-load
3
+ */
4
+ ;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(m.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["&#173;","<style>",a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},u=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return t("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e});var C=function(c,d){var f=c.join(""),g=d.length;t(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch||(j.touch&&j.touch.offsetTop)===9},g,d)}([,["@media (",m.join("touch-enabled),("),h,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);n.touch=function(){return e.touch};for(var D in n)w(n,D)&&(s=D.toLowerCase(),e[s]=n[D](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},x(""),i=k=null,e._version=d,e._prefixes=m,e.mq=u,e.testStyles=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&document.documentMode===7});
@@ -0,0 +1,125 @@
1
+ jQuery(document).ready(function ($) {
2
+
3
+ /* Use this js doc for all application specific JS */
4
+
5
+ /* TABS --------------------------------- */
6
+ /* Remove if you don't need :) */
7
+
8
+ function activateTab($tab) {
9
+ var $activeTab = $tab.closest('dl').find('dd.active'),
10
+ contentLocation = $tab.children('a').attr("href") + 'Tab';
11
+
12
+ // Strip off the current url that IE adds
13
+ contentLocation = contentLocation.replace(/^.+#/, '#');
14
+
15
+ //Make Tab Active
16
+ $activeTab.removeClass('active');
17
+ $tab.addClass('active');
18
+
19
+ //Show Tab Content
20
+ $(contentLocation).closest('.tabs-content').children('li').removeClass('active').hide();
21
+ $(contentLocation).css('display', 'block').addClass('active');
22
+ }
23
+
24
+ $('dl.tabs dd a').on('click.fndtn', function (event) {
25
+ activateTab($(this).parent('dd'));
26
+ });
27
+
28
+ if (window.location.hash) {
29
+ activateTab($('a[href="' + window.location.hash + '"]').parent('dd'));
30
+ $.foundation.customForms.appendCustomMarkup();
31
+ }
32
+
33
+ /* ALERT BOXES ------------ */
34
+ $(".alert-box").delegate("a.close", "click", function(event) {
35
+ event.preventDefault();
36
+ $(this).closest(".alert-box").fadeOut(function(event){
37
+ $(this).remove();
38
+ });
39
+ });
40
+
41
+ /* PLACEHOLDER FOR FORMS ------------- */
42
+ /* Remove this and jquery.placeholder.min.js if you don't need :) */
43
+ $('input, textarea').placeholder();
44
+
45
+ /* TOOLTIPS ------------ */
46
+ $(this).tooltips();
47
+
48
+ /* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */
49
+ // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
50
+ // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
51
+ // $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'});
52
+ // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'});
53
+
54
+
55
+ /* DROPDOWN NAV ------------- */
56
+
57
+ var lockNavBar = false;
58
+ /* Windows Phone, sadly, does not register touch events :( */
59
+ if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) {
60
+ $('.nav-bar a.flyout-toggle').on('click.fndtn touchstart.fndtn', function(e) {
61
+ e.preventDefault();
62
+ var flyout = $(this).siblings('.flyout').first();
63
+ if (lockNavBar === false) {
64
+ $('.nav-bar .flyout').not(flyout).slideUp(500);
65
+ flyout.slideToggle(500, function(){
66
+ lockNavBar = false;
67
+ });
68
+ }
69
+ lockNavBar = true;
70
+ });
71
+ $('.nav-bar>li.has-flyout').addClass('is-touch');
72
+ } else {
73
+ $('.nav-bar>li.has-flyout').hover(function() {
74
+ $(this).children('.flyout').show();
75
+ }, function() {
76
+ $(this).children('.flyout').hide();
77
+ });
78
+ }
79
+
80
+ /* DISABLED BUTTONS ------------- */
81
+ /* Gives elements with a class of 'disabled' a return: false; */
82
+ $('.button.disabled').on('click.fndtn', function (event) {
83
+ event.preventDefault();
84
+ });
85
+
86
+
87
+ /* SPLIT BUTTONS/DROPDOWNS */
88
+ $('.button.dropdown > ul').addClass('no-hover');
89
+
90
+ $('.button.dropdown').on('click.fndtn touchstart.fndtn', function (e) {
91
+ e.stopPropagation();
92
+ });
93
+ $('.button.dropdown.split span').on('click.fndtn touchstart.fndtn', function (e) {
94
+ e.preventDefault();
95
+ $('.button.dropdown').not($(this).parent()).children('ul').removeClass('show-dropdown');
96
+ $(this).siblings('ul').toggleClass('show-dropdown');
97
+ });
98
+ $('.button.dropdown').not('.split').on('click.fndtn touchstart.fndtn', function (e) {
99
+ $('.button.dropdown').not(this).children('ul').removeClass('show-dropdown');
100
+ $(this).children('ul').toggleClass('show-dropdown');
101
+ });
102
+ $('body, html').on('click.fndtn touchstart.fndtn', function () {
103
+ $('.button.dropdown ul').removeClass('show-dropdown');
104
+ });
105
+
106
+ // Positioning the Flyout List
107
+ var normalButtonHeight = $('.button.dropdown:not(.large):not(.small):not(.tiny)').outerHeight() - 1,
108
+ largeButtonHeight = $('.button.large.dropdown').outerHeight() - 1,
109
+ smallButtonHeight = $('.button.small.dropdown').outerHeight() - 1,
110
+ tinyButtonHeight = $('.button.tiny.dropdown').outerHeight() - 1;
111
+
112
+ $('.button.dropdown:not(.large):not(.small):not(.tiny) > ul').css('top', normalButtonHeight);
113
+ $('.button.dropdown.large > ul').css('top', largeButtonHeight);
114
+ $('.button.dropdown.small > ul').css('top', smallButtonHeight);
115
+ $('.button.dropdown.tiny > ul').css('top', tinyButtonHeight);
116
+
117
+ $('.button.dropdown.up:not(.large):not(.small):not(.tiny) > ul').css('top', 'auto').css('bottom', normalButtonHeight - 2);
118
+ $('.button.dropdown.up.large > ul').css('top', 'auto').css('bottom', largeButtonHeight - 2);
119
+ $('.button.dropdown.up.small > ul').css('top', 'auto').css('bottom', smallButtonHeight - 2);
120
+ $('.button.dropdown.up.tiny > ul').css('top', 'auto').css('bottom', tinyButtonHeight - 2);
121
+
122
+ /* CUSTOM FORMS */
123
+ $.foundation.customForms.appendCustomMarkup();
124
+
125
+ });