rails-uikit-sass 2.27.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +43 -0
  4. data/lib/assets/stylesheets/rails-uikit-sass.scss +3 -0
  5. data/lib/rails-uikit-sass.rb +12 -0
  6. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  8. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  9. data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
  10. data/vendor/assets/javascripts/components/accordion.js +180 -0
  11. data/vendor/assets/javascripts/components/accordion.min.js +2 -0
  12. data/vendor/assets/javascripts/components/autocomplete.js +340 -0
  13. data/vendor/assets/javascripts/components/autocomplete.min.js +2 -0
  14. data/vendor/assets/javascripts/components/datepicker.js +3167 -0
  15. data/vendor/assets/javascripts/components/datepicker.min.js +3 -0
  16. data/vendor/assets/javascripts/components/form-password.js +67 -0
  17. data/vendor/assets/javascripts/components/form-password.min.js +2 -0
  18. data/vendor/assets/javascripts/components/form-select.js +85 -0
  19. data/vendor/assets/javascripts/components/form-select.min.js +2 -0
  20. data/vendor/assets/javascripts/components/grid-parallax.js +168 -0
  21. data/vendor/assets/javascripts/components/grid-parallax.min.js +2 -0
  22. data/vendor/assets/javascripts/components/grid.js +540 -0
  23. data/vendor/assets/javascripts/components/grid.min.js +2 -0
  24. data/vendor/assets/javascripts/components/htmleditor.js +679 -0
  25. data/vendor/assets/javascripts/components/htmleditor.min.js +2 -0
  26. data/vendor/assets/javascripts/components/lightbox.js +588 -0
  27. data/vendor/assets/javascripts/components/lightbox.min.js +2 -0
  28. data/vendor/assets/javascripts/components/nestable.js +653 -0
  29. data/vendor/assets/javascripts/components/nestable.min.js +2 -0
  30. data/vendor/assets/javascripts/components/notify.js +189 -0
  31. data/vendor/assets/javascripts/components/notify.min.js +2 -0
  32. data/vendor/assets/javascripts/components/pagination.js +147 -0
  33. data/vendor/assets/javascripts/components/pagination.min.js +2 -0
  34. data/vendor/assets/javascripts/components/parallax.js +462 -0
  35. data/vendor/assets/javascripts/components/parallax.min.js +2 -0
  36. data/vendor/assets/javascripts/components/search.js +92 -0
  37. data/vendor/assets/javascripts/components/search.min.js +2 -0
  38. data/vendor/assets/javascripts/components/slider.js +552 -0
  39. data/vendor/assets/javascripts/components/slider.min.js +2 -0
  40. data/vendor/assets/javascripts/components/slideset.js +523 -0
  41. data/vendor/assets/javascripts/components/slideset.min.js +2 -0
  42. data/vendor/assets/javascripts/components/slideshow-fx.js +382 -0
  43. data/vendor/assets/javascripts/components/slideshow-fx.min.js +2 -0
  44. data/vendor/assets/javascripts/components/slideshow.js +596 -0
  45. data/vendor/assets/javascripts/components/slideshow.min.js +2 -0
  46. data/vendor/assets/javascripts/components/sortable.js +688 -0
  47. data/vendor/assets/javascripts/components/sortable.min.js +2 -0
  48. data/vendor/assets/javascripts/components/sticky.js +364 -0
  49. data/vendor/assets/javascripts/components/sticky.min.js +2 -0
  50. data/vendor/assets/javascripts/components/timepicker.js +192 -0
  51. data/vendor/assets/javascripts/components/timepicker.min.js +2 -0
  52. data/vendor/assets/javascripts/components/tooltip.js +235 -0
  53. data/vendor/assets/javascripts/components/tooltip.min.js +2 -0
  54. data/vendor/assets/javascripts/components/upload.js +262 -0
  55. data/vendor/assets/javascripts/components/upload.min.js +2 -0
  56. data/vendor/assets/javascripts/core/alert.js +66 -0
  57. data/vendor/assets/javascripts/core/alert.min.js +2 -0
  58. data/vendor/assets/javascripts/core/button.js +156 -0
  59. data/vendor/assets/javascripts/core/button.min.js +2 -0
  60. data/vendor/assets/javascripts/core/core.js +820 -0
  61. data/vendor/assets/javascripts/core/core.min.js +2 -0
  62. data/vendor/assets/javascripts/core/cover.js +87 -0
  63. data/vendor/assets/javascripts/core/cover.min.js +2 -0
  64. data/vendor/assets/javascripts/core/dropdown.js +534 -0
  65. data/vendor/assets/javascripts/core/dropdown.min.js +2 -0
  66. data/vendor/assets/javascripts/core/grid.js +117 -0
  67. data/vendor/assets/javascripts/core/grid.min.js +2 -0
  68. data/vendor/assets/javascripts/core/modal.js +387 -0
  69. data/vendor/assets/javascripts/core/modal.min.js +2 -0
  70. data/vendor/assets/javascripts/core/nav.js +153 -0
  71. data/vendor/assets/javascripts/core/nav.min.js +2 -0
  72. data/vendor/assets/javascripts/core/offcanvas.js +197 -0
  73. data/vendor/assets/javascripts/core/offcanvas.min.js +2 -0
  74. data/vendor/assets/javascripts/core/scrollspy.js +209 -0
  75. data/vendor/assets/javascripts/core/scrollspy.min.js +2 -0
  76. data/vendor/assets/javascripts/core/smooth-scroll.js +62 -0
  77. data/vendor/assets/javascripts/core/smooth-scroll.min.js +2 -0
  78. data/vendor/assets/javascripts/core/switcher.js +307 -0
  79. data/vendor/assets/javascripts/core/switcher.min.js +2 -0
  80. data/vendor/assets/javascripts/core/tab.js +169 -0
  81. data/vendor/assets/javascripts/core/tab.min.js +2 -0
  82. data/vendor/assets/javascripts/core/toggle.js +124 -0
  83. data/vendor/assets/javascripts/core/toggle.min.js +2 -0
  84. data/vendor/assets/javascripts/core/touch.js +175 -0
  85. data/vendor/assets/javascripts/core/touch.min.js +2 -0
  86. data/vendor/assets/javascripts/core/utility.js +335 -0
  87. data/vendor/assets/javascripts/core/utility.min.js +2 -0
  88. data/vendor/assets/javascripts/uikit.js +3898 -0
  89. data/vendor/assets/javascripts/uikit.min.js +3 -0
  90. data/vendor/assets/stylesheets/components/accordion.scss +94 -0
  91. data/vendor/assets/stylesheets/components/autocomplete.scss +107 -0
  92. data/vendor/assets/stylesheets/components/datepicker.scss +197 -0
  93. data/vendor/assets/stylesheets/components/dotnav.scss +212 -0
  94. data/vendor/assets/stylesheets/components/form-advanced.scss +128 -0
  95. data/vendor/assets/stylesheets/components/form-file.scss +63 -0
  96. data/vendor/assets/stylesheets/components/form-password.scss +74 -0
  97. data/vendor/assets/stylesheets/components/form-select.scss +66 -0
  98. data/vendor/assets/stylesheets/components/htmleditor.scss +269 -0
  99. data/vendor/assets/stylesheets/components/nestable.scss +231 -0
  100. data/vendor/assets/stylesheets/components/notify.scss +190 -0
  101. data/vendor/assets/stylesheets/components/placeholder.scss +66 -0
  102. data/vendor/assets/stylesheets/components/progress.scss +173 -0
  103. data/vendor/assets/stylesheets/components/search.scss +309 -0
  104. data/vendor/assets/stylesheets/components/slidenav.scss +183 -0
  105. data/vendor/assets/stylesheets/components/slider.scss +139 -0
  106. data/vendor/assets/stylesheets/components/slideshow.scss +208 -0
  107. data/vendor/assets/stylesheets/components/sortable.scss +124 -0
  108. data/vendor/assets/stylesheets/components/sticky.scss +57 -0
  109. data/vendor/assets/stylesheets/components/tooltip.scss +178 -0
  110. data/vendor/assets/stylesheets/components/upload.scss +34 -0
  111. data/vendor/assets/stylesheets/core/alert.scss +141 -0
  112. data/vendor/assets/stylesheets/core/animation.scss +599 -0
  113. data/vendor/assets/stylesheets/core/article.scss +139 -0
  114. data/vendor/assets/stylesheets/core/badge.scss +110 -0
  115. data/vendor/assets/stylesheets/core/base.scss +563 -0
  116. data/vendor/assets/stylesheets/core/block.scss +155 -0
  117. data/vendor/assets/stylesheets/core/breadcrumb.scss +86 -0
  118. data/vendor/assets/stylesheets/core/button.scss +406 -0
  119. data/vendor/assets/stylesheets/core/close.scss +132 -0
  120. data/vendor/assets/stylesheets/core/column.scss +209 -0
  121. data/vendor/assets/stylesheets/core/comment.scss +172 -0
  122. data/vendor/assets/stylesheets/core/contrast.scss +493 -0
  123. data/vendor/assets/stylesheets/core/cover.scss +70 -0
  124. data/vendor/assets/stylesheets/core/description-list.scss +71 -0
  125. data/vendor/assets/stylesheets/core/dropdown.scss +283 -0
  126. data/vendor/assets/stylesheets/core/flex.scss +320 -0
  127. data/vendor/assets/stylesheets/core/form.scss +629 -0
  128. data/vendor/assets/stylesheets/core/grid.scss +731 -0
  129. data/vendor/assets/stylesheets/core/icon.scss +930 -0
  130. data/vendor/assets/stylesheets/core/list.scss +102 -0
  131. data/vendor/assets/stylesheets/core/modal.scss +343 -0
  132. data/vendor/assets/stylesheets/core/nav.scss +468 -0
  133. data/vendor/assets/stylesheets/core/navbar.scss +325 -0
  134. data/vendor/assets/stylesheets/core/offcanvas.scss +203 -0
  135. data/vendor/assets/stylesheets/core/overlay.scss +534 -0
  136. data/vendor/assets/stylesheets/core/pagination.scss +197 -0
  137. data/vendor/assets/stylesheets/core/panel.scss +332 -0
  138. data/vendor/assets/stylesheets/core/print.scss +61 -0
  139. data/vendor/assets/stylesheets/core/subnav.scss +213 -0
  140. data/vendor/assets/stylesheets/core/switcher.scss +38 -0
  141. data/vendor/assets/stylesheets/core/tab.scss +368 -0
  142. data/vendor/assets/stylesheets/core/table.scss +147 -0
  143. data/vendor/assets/stylesheets/core/text.scss +136 -0
  144. data/vendor/assets/stylesheets/core/thumbnail.scss +122 -0
  145. data/vendor/assets/stylesheets/core/thumbnav.scss +122 -0
  146. data/vendor/assets/stylesheets/core/utility.scss +610 -0
  147. data/vendor/assets/stylesheets/core/variables.scss +23 -0
  148. data/vendor/assets/stylesheets/uikit-mixins.scss +327 -0
  149. data/vendor/assets/stylesheets/uikit-variables.scss +819 -0
  150. data/vendor/assets/stylesheets/uikit.scss +52 -0
  151. metadata +251 -0
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){var s;window.UIkit&&(s=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-nestable",["uikit"],function(){return s||t(UIkit)})}(function(t){"use strict";var s,e="ontouchstart"in window,i=t.$html,l=[],a=t.$win,n=e?"touchstart":"mousedown",o=e?"touchmove":"mousemove",h=e?"touchend":"mouseup",r=e?"touchcancel":"mouseup";return t.component("nestable",{defaults:{listBaseClass:"uk-nestable",listClass:"uk-nestable-list",listItemClass:"uk-nestable-item",dragClass:"uk-nestable-dragged",movingClass:"uk-nestable-moving",noChildrenClass:"uk-nestable-nochildren",emptyClass:"uk-nestable-empty",handleClass:"",collapsedClass:"uk-collapsed",placeholderClass:"uk-nestable-placeholder",noDragClass:"uk-nestable-nodrag",group:!1,maxDepth:10,threshold:20,idlethreshold:10},boot:function(){t.$html.on("mousemove touchmove",function(){if(s){var e=s.offset().top;e<t.$win.scrollTop()?t.$win.scrollTop(t.$win.scrollTop()-Math.ceil(s.height()/2)):e+s.height()>window.innerHeight+t.$win.scrollTop()&&t.$win.scrollTop(t.$win.scrollTop()+Math.ceil(s.height()/2))}}),t.ready(function(s){t.$("[data-uk-nestable]",s).each(function(){var s=t.$(this);s.data("nestable")||t.nestable(s,t.Utils.options(s.attr("data-uk-nestable")))})})},init:function(){var i=this;Object.keys(this.options).forEach(function(t){-1!=String(t).indexOf("Class")&&(i.options["_"+t]="."+i.options[t])}),this.find(this.options._listItemClass).find(">ul").addClass(this.options.listClass),this.checkEmptyList(),this.reset(),this.element.data("nestable-group",this.options.group||t.Utils.uid("nestable-group")),this.find(this.options._listItemClass).each(function(){i.setParent(t.$(this))}),this.on("click","[data-nestable-action]",function(s){if(!i.dragEl&&(e||0===s.button)){s.preventDefault();var l=t.$(s.currentTarget),a=l.data("nestableAction"),n=l.closest(i.options._listItemClass);"collapse"===a&&i.collapseItem(n),"expand"===a&&i.expandItem(n),"toggle"===a&&i.toggleItem(n)}});var l=function(s){var l=t.$(s.target),a=l.is("a[href]")?l:l.parents("a[href]");s.target!==i.element[0]&&(l.is(i.options._noDragClass)||l.closest(i.options._noDragClass).length||l.is("[data-nestable-action]")||l.closest("[data-nestable-action]").length||(i.options.handleClass&&!l.hasClass(i.options.handleClass)&&i.options.handleClass&&(l=l.closest(i.options._handleClass)),!l.length||i.dragEl||!e&&0!==s.button||e&&1!==s.touches.length||(s.originalEvent&&s.originalEvent.touches&&(s=evt.originalEvent.touches[0]),i.delayMove=function(t){a=!1,t.preventDefault(),i.dragStart(s),i.trigger("start.uk.nestable",[i]),i.delayMove=!1},i.delayMove.x=parseInt(s.pageX,10),i.delayMove.y=parseInt(s.pageY,10),i.delayMove.threshold=i.options.idlethreshold,a.length&&"touchend"==h&&i.one(h,function(){a&&a.attr("href").trim()&&(location.href=a.attr("href"))}),s.preventDefault())))},d=function(t){t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i.delayMove&&(Math.abs(t.pageX-i.delayMove.x)>i.delayMove.threshold||Math.abs(t.pageY-i.delayMove.y)>i.delayMove.threshold)&&(window.getSelection().toString()?i.delayMove=!1:i.delayMove(t)),i.dragEl&&(t.preventDefault(),i.dragMove(t),i.trigger("move.uk.nestable",[i]))},p=function(t){i.dragEl&&(t.preventDefault(),i.dragStop(e?t.touches[0]:t)),s=!1,i.delayMove=!1};e?(this.element[0].addEventListener(n,l,!1),window.addEventListener(o,d,!1),window.addEventListener(h,p,!1),window.addEventListener(r,p,!1)):(this.on(n,l),a.on(o,d),a.on(h,p))},serialize:function(){var s,e=0,i=this,l=function(s,e){var a=[],n=s.children(i.options._listItemClass);return n.each(function(){for(var s,n,o,h=t.$(this),r={},d=h.children(i.options._listClass),p=0;p<h[0].attributes.length;p++)s=h[0].attributes[p],0===s.name.indexOf("data-")&&(n=s.name.substr(5),o=t.Utils.str2json(s.value),r[n]=o||"false"==s.value||"0"==s.value?o:s.value);d.length&&(r.children=l(d,e+1)),a.push(r)}),a};return s=l(i.element,e)},list:function(s){var e=[],i=this,l=0,a=function(i,l,n){var o=i.children(s._listItemClass);o.each(function(i){var o=t.$(this),h=t.$.extend({parent_id:n?n:null,depth:l,order:i},o.data()),r=o.children(s._listClass);e.push(h),r.length&&a(r,l+1,o.data(s.idProperty||"id"))})};return s=t.$.extend({},i.options,s),a(i.element,l),e},reset:function(){this.mouse={offsetX:0,offsetY:0,startX:0,startY:0,lastX:0,lastY:0,nowX:0,nowY:0,distX:0,distY:0,dirAx:0,dirX:0,dirY:0,lastDirX:0,lastDirY:0,distAxX:0,distAxY:0},this.moving=!1,this.dragEl=null,this.dragRootEl=null,this.dragDepth=0,this.hasNewRoot=!1,this.pointEl=null;for(var t=0;t<l.length;t++)this.checkEmptyList(l[t]);l=[]},toggleItem:function(t){this[t.hasClass(this.options.collapsedClass)?"expandItem":"collapseItem"](t)},expandItem:function(t){t.removeClass(this.options.collapsedClass)},collapseItem:function(t){var s=t.children(this.options._listClass);s.length&&t.addClass(this.options.collapsedClass)},expandAll:function(){var s=this;this.find(s.options._listItemClass).each(function(){s.expandItem(t.$(this))})},collapseAll:function(){var s=this;this.find(s.options._listItemClass).each(function(){s.collapseItem(t.$(this))})},setParent:function(t){t.children(this.options._listClass).length&&t.addClass("uk-parent")},unsetParent:function(t){t.removeClass("uk-parent "+this.options.collapsedClass),t.children(this.options._listClass).remove()},dragStart:function(e){var l=this.mouse,a=t.$(e.target),n=a.closest(this.options._listItemClass),o=n.offset();this.placeEl=n,l.offsetX=e.pageX-o.left,l.offsetY=e.pageY-o.top,l.startX=l.lastX=o.left,l.startY=l.lastY=o.top,this.dragRootEl=this.element,this.dragEl=t.$("<ul></ul>").addClass(this.options.listClass+" "+this.options.dragClass).append(n.clone()),this.dragEl.css("width",n.width()),this.placeEl.addClass(this.options.placeholderClass),s=this.dragEl,this.tmpDragOnSiblings=[n[0].previousSibling,n[0].nextSibling],t.$body.append(this.dragEl),this.dragEl.css({left:o.left,top:o.top});var h,r,d=this.dragEl.find(this.options._listItemClass);for(h=0;h<d.length;h++)r=t.$(d[h]).parents(this.options._listClass+","+this.options._listBaseClass).length,r>this.dragDepth&&(this.dragDepth=r);i.addClass(this.options.movingClass)},dragStop:function(){var s=t.$(this.placeEl),e=this.placeEl.parents(this.options._listBaseClass+":first");this.placeEl.removeClass(this.options.placeholderClass),this.dragEl.remove(),this.element[0]!==e[0]?(e.trigger("change.uk.nestable",[e.data("nestable"),s,"added"]),this.element.trigger("change.uk.nestable",[this,s,"removed"])):this.element.trigger("change.uk.nestable",[this,s,"moved"]),this.trigger("stop.uk.nestable",[this,s]),this.reset(),i.removeClass(this.options.movingClass)},dragMove:function(s){var e,i,a,n,o,h=this.options,r=this.mouse,d=this.dragRootEl?this.dragRootEl.data("nestable").options.maxDepth:h.maxDepth;this.dragEl.css({left:s.pageX-r.offsetX,top:s.pageY-r.offsetY}),r.lastX=r.nowX,r.lastY=r.nowY,r.nowX=s.pageX,r.nowY=s.pageY,r.distX=r.nowX-r.lastX,r.distY=r.nowY-r.lastY,r.lastDirX=r.dirX,r.lastDirY=r.dirY,r.dirX=0===r.distX?0:r.distX>0?1:-1,r.dirY=0===r.distY?0:r.distY>0?1:-1;var p=Math.abs(r.distX)>Math.abs(r.distY)?1:0;if(!r.moving)return r.dirAx=p,r.moving=!0,void 0;if(r.dirAx!==p?(r.distAxX=0,r.distAxY=0):(r.distAxX+=Math.abs(r.distX),0!==r.dirX&&r.dirX!==r.lastDirX&&(r.distAxX=0),r.distAxY+=Math.abs(r.distY),0!==r.dirY&&r.dirY!==r.lastDirY&&(r.distAxY=0)),r.dirAx=p,r.dirAx&&r.distAxX>=h.threshold&&(r.distAxX=0,a=this.placeEl.prev("li"),r.distX>0&&a.length&&!a.hasClass(h.collapsedClass)&&!a.hasClass(h.noChildrenClass)&&(e=a.find(h._listClass).last(),o=this.placeEl.parents(h._listClass+","+h._listBaseClass).length,o+this.dragDepth<=d&&(e.length?(e=a.children(h._listClass).last(),e.append(this.placeEl)):(e=t.$("<ul/>").addClass(h.listClass),e.append(this.placeEl),a.append(e),this.setParent(a)))),r.distX<0&&(n=this.placeEl.next(h._listItemClass),!n.length))){var c=this.placeEl.closest([h._listBaseClass,h._listClass].join(",")),g=c.closest(h._listItemClass);g.length&&(g.after(this.placeEl),c.children().length||this.unsetParent(g))}var u=!1,f=s.pageX-(window.pageXOffset||document.scrollLeft||0),m=s.pageY-(window.pageYOffset||document.documentElement.scrollTop);if(this.pointEl=t.$(document.elementFromPoint(f,m)),h.handleClass&&this.pointEl.hasClass(h.handleClass))this.pointEl=this.pointEl.closest(h._listItemClass);else{var C=this.pointEl.closest(h._listItemClass);C.length&&(this.pointEl=C)}if(!this.placeEl.find(this.pointEl).length){if(this.pointEl.data("nestable")&&!this.pointEl.children().length)u=!0,this.checkEmptyList(this.pointEl);else if(!this.pointEl.length||!this.pointEl.hasClass(h.listItemClass))return;var v=this.element,E=this.pointEl.closest(this.options._listBaseClass),b=v[0]!=E[0];if(!r.dirAx||b||u){if(b&&h.group!==E.data("nestable-group"))return;if(l.push(v),o=this.dragDepth-1+this.pointEl.parents(h._listClass+","+h._listBaseClass).length,o>d)return;var X=s.pageY<this.pointEl.offset().top+this.pointEl.height()/2;i=this.placeEl.parent(),u?this.pointEl.append(this.placeEl):X?this.pointEl.before(this.placeEl):this.pointEl.after(this.placeEl),i.children().length||i.data("nestable")||this.unsetParent(i.parent()),this.checkEmptyList(this.dragRootEl),this.checkEmptyList(v),b&&(this.dragRootEl=E,this.hasNewRoot=this.element[0]!==this.dragRootEl[0])}}},checkEmptyList:function(s){s=s?t.$(s):this.element,this.options.emptyClass&&s[s.children().length?"removeClass":"addClass"](this.options.emptyClass)}}),t.nestable});
@@ -0,0 +1,189 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(addon) {
3
+
4
+ var component;
5
+
6
+ if (window.UIkit) {
7
+ component = addon(UIkit);
8
+ }
9
+
10
+ if (typeof define == 'function' && define.amd) {
11
+ define('uikit-notify', ['uikit'], function(){
12
+ return component || addon(UIkit);
13
+ });
14
+ }
15
+
16
+ })(function(UI){
17
+
18
+ "use strict";
19
+
20
+ var containers = {},
21
+ messages = {},
22
+
23
+ notify = function(options){
24
+
25
+ if (UI.$.type(options) == 'string') {
26
+ options = { message: options };
27
+ }
28
+
29
+ if (arguments[1]) {
30
+ options = UI.$.extend(options, UI.$.type(arguments[1]) == 'string' ? {status:arguments[1]} : arguments[1]);
31
+ }
32
+
33
+ return (new Message(options)).show();
34
+ },
35
+ closeAll = function(group, instantly){
36
+
37
+ var id;
38
+
39
+ if (group) {
40
+ for(id in messages) { if(group===messages[id].group) messages[id].close(instantly); }
41
+ } else {
42
+ for(id in messages) { messages[id].close(instantly); }
43
+ }
44
+ };
45
+
46
+ var Message = function(options){
47
+
48
+ this.options = UI.$.extend({}, Message.defaults, options);
49
+
50
+ this.uuid = UI.Utils.uid('notifymsg');
51
+ this.element = UI.$([
52
+
53
+ '<div class="uk-notify-message">',
54
+ '<a class="uk-close"></a>',
55
+ '<div></div>',
56
+ '</div>'
57
+
58
+ ].join('')).data("notifyMessage", this);
59
+
60
+ this.content(this.options.message);
61
+
62
+ // status
63
+ if (this.options.status) {
64
+ this.element.addClass('uk-notify-message-'+this.options.status);
65
+ this.currentstatus = this.options.status;
66
+ }
67
+
68
+ this.group = this.options.group;
69
+
70
+ messages[this.uuid] = this;
71
+
72
+ if(!containers[this.options.pos]) {
73
+ containers[this.options.pos] = UI.$('<div class="uk-notify uk-notify-'+this.options.pos+'"></div>').appendTo('body').on("click", ".uk-notify-message", function(){
74
+
75
+ var message = UI.$(this).data('notifyMessage');
76
+
77
+ message.element.trigger('manualclose.uk.notify', [message]);
78
+ message.close();
79
+ });
80
+ }
81
+ };
82
+
83
+
84
+ UI.$.extend(Message.prototype, {
85
+
86
+ uuid: false,
87
+ element: false,
88
+ timout: false,
89
+ currentstatus: "",
90
+ group: false,
91
+
92
+ show: function() {
93
+
94
+ if (this.element.is(':visible')) return;
95
+
96
+ var $this = this;
97
+
98
+ containers[this.options.pos].show().prepend(this.element);
99
+
100
+ var marginbottom = parseInt(this.element.css('margin-bottom'), 10);
101
+
102
+ this.element.css({opacity:0, marginTop: -1*this.element.outerHeight(), marginBottom:0}).animate({opacity:1, marginTop:0, marginBottom:marginbottom}, function(){
103
+
104
+ if ($this.options.timeout) {
105
+
106
+ var closefn = function(){ $this.close(); };
107
+
108
+ $this.timeout = setTimeout(closefn, $this.options.timeout);
109
+
110
+ $this.element.hover(
111
+ function() { clearTimeout($this.timeout); },
112
+ function() { $this.timeout = setTimeout(closefn, $this.options.timeout); }
113
+ );
114
+ }
115
+
116
+ });
117
+
118
+ return this;
119
+ },
120
+
121
+ close: function(instantly) {
122
+
123
+ var $this = this,
124
+ finalize = function(){
125
+ $this.element.remove();
126
+
127
+ if (!containers[$this.options.pos].children().length) {
128
+ containers[$this.options.pos].hide();
129
+ }
130
+
131
+ $this.options.onClose.apply($this, []);
132
+ $this.element.trigger('close.uk.notify', [$this]);
133
+
134
+ delete messages[$this.uuid];
135
+ };
136
+
137
+ if (this.timeout) clearTimeout(this.timeout);
138
+
139
+ if (instantly) {
140
+ finalize();
141
+ } else {
142
+ this.element.animate({opacity:0, marginTop: -1* this.element.outerHeight(), marginBottom:0}, function(){
143
+ finalize();
144
+ });
145
+ }
146
+ },
147
+
148
+ content: function(html){
149
+
150
+ var container = this.element.find(">div");
151
+
152
+ if(!html) {
153
+ return container.html();
154
+ }
155
+
156
+ container.html(html);
157
+
158
+ return this;
159
+ },
160
+
161
+ status: function(status) {
162
+
163
+ if (!status) {
164
+ return this.currentstatus;
165
+ }
166
+
167
+ this.element.removeClass('uk-notify-message-'+this.currentstatus).addClass('uk-notify-message-'+status);
168
+
169
+ this.currentstatus = status;
170
+
171
+ return this;
172
+ }
173
+ });
174
+
175
+ Message.defaults = {
176
+ message: "",
177
+ status: "",
178
+ timeout: 5000,
179
+ group: null,
180
+ pos: 'top-center',
181
+ onClose: function() {}
182
+ };
183
+
184
+ UI.notify = notify;
185
+ UI.notify.message = Message;
186
+ UI.notify.closeAll = closeAll;
187
+
188
+ return notify;
189
+ });
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-notify",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e={},i={},s=function(e){return"string"==t.$.type(e)&&(e={message:e}),arguments[1]&&(e=t.$.extend(e,"string"==t.$.type(arguments[1])?{status:arguments[1]}:arguments[1])),new n(e).show()},o=function(t,e){var s;if(t)for(s in i)t===i[s].group&&i[s].close(e);else for(s in i)i[s].close(e)},n=function(s){this.options=t.$.extend({},n.defaults,s),this.uuid=t.Utils.uid("notifymsg"),this.element=t.$(['<div class="uk-notify-message">','<a class="uk-close"></a>',"<div></div>","</div>"].join("")).data("notifyMessage",this),this.content(this.options.message),this.options.status&&(this.element.addClass("uk-notify-message-"+this.options.status),this.currentstatus=this.options.status),this.group=this.options.group,i[this.uuid]=this,e[this.options.pos]||(e[this.options.pos]=t.$('<div class="uk-notify uk-notify-'+this.options.pos+'"></div>').appendTo("body").on("click",".uk-notify-message",function(){var e=t.$(this).data("notifyMessage");e.element.trigger("manualclose.uk.notify",[e]),e.close()}))};return t.$.extend(n.prototype,{uuid:!1,element:!1,timout:!1,currentstatus:"",group:!1,show:function(){if(!this.element.is(":visible")){var t=this;e[this.options.pos].show().prepend(this.element);var i=parseInt(this.element.css("margin-bottom"),10);return this.element.css({opacity:0,marginTop:-1*this.element.outerHeight(),marginBottom:0}).animate({opacity:1,marginTop:0,marginBottom:i},function(){if(t.options.timeout){var e=function(){t.close()};t.timeout=setTimeout(e,t.options.timeout),t.element.hover(function(){clearTimeout(t.timeout)},function(){t.timeout=setTimeout(e,t.options.timeout)})}}),this}},close:function(t){var s=this,o=function(){s.element.remove(),e[s.options.pos].children().length||e[s.options.pos].hide(),s.options.onClose.apply(s,[]),s.element.trigger("close.uk.notify",[s]),delete i[s.uuid]};this.timeout&&clearTimeout(this.timeout),t?o():this.element.animate({opacity:0,marginTop:-1*this.element.outerHeight(),marginBottom:0},function(){o()})},content:function(t){var e=this.element.find(">div");return t?(e.html(t),this):e.html()},status:function(t){return t?(this.element.removeClass("uk-notify-message-"+this.currentstatus).addClass("uk-notify-message-"+t),this.currentstatus=t,this):this.currentstatus}}),n.defaults={message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:function(){}},t.notify=s,t.notify.message=n,t.notify.closeAll=o,s});
@@ -0,0 +1,147 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ /*
3
+ * Based on simplePagination - Copyright (c) 2012 Flavius Matis - http://flaviusmatis.github.com/simplePagination.js/ (MIT)
4
+ */
5
+ (function(addon) {
6
+
7
+ var component;
8
+
9
+ if (window.UIkit) {
10
+ component = addon(UIkit);
11
+ }
12
+
13
+ if (typeof define == 'function' && define.amd) {
14
+ define('uikit-pagination', ['uikit'], function(){
15
+ return component || addon(UIkit);
16
+ });
17
+ }
18
+
19
+ })(function(UI){
20
+
21
+ "use strict";
22
+
23
+ UI.component('pagination', {
24
+
25
+ defaults: {
26
+ items : 1,
27
+ itemsOnPage : 1,
28
+ pages : 0,
29
+ displayedPages : 7,
30
+ edges : 1,
31
+ currentPage : 0,
32
+ lblPrev : false,
33
+ lblNext : false,
34
+ onSelectPage : function() {}
35
+ },
36
+
37
+ boot: function() {
38
+
39
+ // init code
40
+ UI.ready(function(context) {
41
+
42
+ UI.$('[data-uk-pagination]', context).each(function(){
43
+ var ele = UI.$(this);
44
+
45
+ if (!ele.data('pagination')) {
46
+ UI.pagination(ele, UI.Utils.options(ele.attr('data-uk-pagination')));
47
+ }
48
+ });
49
+ });
50
+ },
51
+
52
+ init: function() {
53
+
54
+ var $this = this;
55
+
56
+ this.pages = this.options.pages ? this.options.pages : Math.ceil(this.options.items / this.options.itemsOnPage) ? Math.ceil(this.options.items / this.options.itemsOnPage) : 1;
57
+ this.currentPage = this.options.currentPage;
58
+ this.halfDisplayed = this.options.displayedPages / 2;
59
+
60
+ this.on('click', 'a[data-page]', function(e){
61
+ e.preventDefault();
62
+ $this.selectPage(UI.$(this).data('page'));
63
+ });
64
+
65
+ this._render();
66
+ },
67
+
68
+ _getInterval: function() {
69
+
70
+ return {
71
+ start: Math.ceil(this.currentPage > this.halfDisplayed ? Math.max(Math.min(this.currentPage - this.halfDisplayed, (this.pages - this.options.displayedPages)), 0) : 0),
72
+ end : Math.ceil(this.currentPage > this.halfDisplayed ? Math.min(this.currentPage + this.halfDisplayed, this.pages) : Math.min(this.options.displayedPages, this.pages))
73
+ };
74
+ },
75
+
76
+ render: function(pages) {
77
+ this.pages = pages ? pages : this.pages;
78
+ this._render();
79
+ },
80
+
81
+ selectPage: function(pageIndex, pages) {
82
+ this.currentPage = pageIndex;
83
+ this.render(pages);
84
+
85
+ this.options.onSelectPage.apply(this, [pageIndex]);
86
+ this.trigger('select.uk.pagination', [pageIndex, this]);
87
+ },
88
+
89
+ _render: function() {
90
+
91
+ var o = this.options, interval = this._getInterval(), i;
92
+
93
+ this.element.empty();
94
+
95
+ // Generate Prev link
96
+ if (o.lblPrev) this._append(this.currentPage - 1, {text: o.lblPrev});
97
+
98
+ // Generate start edges
99
+ if (interval.start > 0 && o.edges > 0) {
100
+
101
+ var end = Math.min(o.edges, interval.start);
102
+
103
+ for (i = 0; i < end; i++) this._append(i);
104
+
105
+ if (o.edges < interval.start && (interval.start - o.edges != 1)) {
106
+ this.element.append('<li><span>...</span></li>');
107
+ } else if (interval.start - o.edges == 1) {
108
+ this._append(o.edges);
109
+ }
110
+ }
111
+
112
+ // Generate interval links
113
+ for (i = interval.start; i < interval.end; i++) this._append(i);
114
+
115
+ // Generate end edges
116
+ if (interval.end < this.pages && o.edges > 0) {
117
+
118
+ if (this.pages - o.edges > interval.end && (this.pages - o.edges - interval.end != 1)) {
119
+ this.element.append('<li><span>...</span></li>');
120
+ } else if (this.pages - o.edges - interval.end == 1) {
121
+ this._append(interval.end++);
122
+ }
123
+
124
+ var begin = Math.max(this.pages - o.edges, interval.end);
125
+
126
+ for (i = begin; i < this.pages; i++) this._append(i);
127
+ }
128
+
129
+ // Generate Next link (unless option is set for at front)
130
+ if (o.lblNext) this._append(this.currentPage + 1, {text: o.lblNext});
131
+ },
132
+
133
+ _append: function(pageIndex, opts) {
134
+
135
+ var item, options;
136
+
137
+ pageIndex = pageIndex < 0 ? 0 : (pageIndex < this.pages ? pageIndex : this.pages - 1);
138
+ options = UI.$.extend({ text: pageIndex + 1 }, opts);
139
+
140
+ item = (pageIndex == this.currentPage) ? '<li class="uk-active"><span>' + (options.text) + '</span></li>' : '<li><a href="#page-'+(pageIndex+1)+'" data-page="'+pageIndex+'">'+options.text+'</a></li>';
141
+
142
+ this.element.append(item);
143
+ }
144
+ });
145
+
146
+ return UI.pagination;
147
+ });
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-pagination",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("pagination",{defaults:{items:1,itemsOnPage:1,pages:0,displayedPages:7,edges:1,currentPage:0,lblPrev:!1,lblNext:!1,onSelectPage:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-pagination]",e).each(function(){var e=t.$(this);e.data("pagination")||t.pagination(e,t.Utils.options(e.attr("data-uk-pagination")))})})},init:function(){var e=this;this.pages=this.options.pages?this.options.pages:Math.ceil(this.options.items/this.options.itemsOnPage)?Math.ceil(this.options.items/this.options.itemsOnPage):1,this.currentPage=this.options.currentPage,this.halfDisplayed=this.options.displayedPages/2,this.on("click","a[data-page]",function(i){i.preventDefault(),e.selectPage(t.$(this).data("page"))}),this._render()},_getInterval:function(){return{start:Math.ceil(this.currentPage>this.halfDisplayed?Math.max(Math.min(this.currentPage-this.halfDisplayed,this.pages-this.options.displayedPages),0):0),end:Math.ceil(this.currentPage>this.halfDisplayed?Math.min(this.currentPage+this.halfDisplayed,this.pages):Math.min(this.options.displayedPages,this.pages))}},render:function(t){this.pages=t?t:this.pages,this._render()},selectPage:function(t,e){this.currentPage=t,this.render(e),this.options.onSelectPage.apply(this,[t]),this.trigger("select.uk.pagination",[t,this])},_render:function(){var t,e=this.options,i=this._getInterval();if(this.element.empty(),e.lblPrev&&this._append(this.currentPage-1,{text:e.lblPrev}),i.start>0&&e.edges>0){var s=Math.min(e.edges,i.start);for(t=0;s>t;t++)this._append(t);e.edges<i.start&&i.start-e.edges!=1?this.element.append("<li><span>...</span></li>"):i.start-e.edges==1&&this._append(e.edges)}for(t=i.start;t<i.end;t++)this._append(t);if(i.end<this.pages&&e.edges>0){this.pages-e.edges>i.end&&this.pages-e.edges-i.end!=1?this.element.append("<li><span>...</span></li>"):this.pages-e.edges-i.end==1&&this._append(i.end++);var a=Math.max(this.pages-e.edges,i.end);for(t=a;t<this.pages;t++)this._append(t)}e.lblNext&&this._append(this.currentPage+1,{text:e.lblNext})},_append:function(e,i){var s,a;e=0>e?0:e<this.pages?e:this.pages-1,a=t.$.extend({text:e+1},i),s=e==this.currentPage?'<li class="uk-active"><span>'+a.text+"</span></li>":'<li><a href="#page-'+(e+1)+'" data-page="'+e+'">'+a.text+"</a></li>",this.element.append(s)}}),t.pagination});
@@ -0,0 +1,462 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(addon) {
3
+
4
+ var component;
5
+
6
+ if (window.UIkit) {
7
+ component = addon(UIkit);
8
+ }
9
+
10
+ if (typeof define == 'function' && define.amd) {
11
+ define('uikit-parallax', ['uikit'], function(){
12
+ return component || addon(UIkit);
13
+ });
14
+ }
15
+
16
+ })(function(UI){
17
+
18
+ "use strict";
19
+
20
+ var parallaxes = [],
21
+ supports3d = false,
22
+ scrolltop = 0,
23
+ wh = window.innerHeight,
24
+ checkParallaxes = function() {
25
+
26
+ scrolltop = UI.$win.scrollTop();
27
+
28
+ window.requestAnimationFrame(function(){
29
+ for (var i=0; i < parallaxes.length; i++) {
30
+ parallaxes[i].process();
31
+ }
32
+ });
33
+ };
34
+
35
+
36
+ UI.component('parallax', {
37
+
38
+ defaults: {
39
+ velocity : 0.5,
40
+ target : false,
41
+ viewport : false,
42
+ media : false
43
+ },
44
+
45
+ boot: function() {
46
+
47
+ supports3d = (function(){
48
+
49
+ var el = document.createElement('div'),
50
+ has3d,
51
+ transforms = {
52
+ 'WebkitTransform':'-webkit-transform',
53
+ 'MSTransform':'-ms-transform',
54
+ 'MozTransform':'-moz-transform',
55
+ 'Transform':'transform'
56
+ };
57
+
58
+ // Add it to the body to get the computed style.
59
+ document.body.insertBefore(el, null);
60
+
61
+ for (var t in transforms) {
62
+ if (el.style[t] !== undefined) {
63
+ el.style[t] = 'translate3d(1px,1px,1px)';
64
+ has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
65
+ }
66
+ }
67
+
68
+ document.body.removeChild(el);
69
+
70
+ return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
71
+ })();
72
+
73
+ // listen to scroll and resize
74
+ UI.$doc.on('scrolling.uk.document', checkParallaxes);
75
+ UI.$win.on('load resize orientationchange', UI.Utils.debounce(function(){
76
+ wh = window.innerHeight;
77
+ checkParallaxes();
78
+ }, 50));
79
+
80
+ // init code
81
+ UI.ready(function(context) {
82
+
83
+ UI.$('[data-uk-parallax]', context).each(function() {
84
+
85
+ var parallax = UI.$(this);
86
+
87
+ if (!parallax.data('parallax')) {
88
+ UI.parallax(parallax, UI.Utils.options(parallax.attr('data-uk-parallax')));
89
+ }
90
+ });
91
+ });
92
+ },
93
+
94
+ init: function() {
95
+
96
+ this.base = this.options.target ? UI.$(this.options.target) : this.element;
97
+ this.props = {};
98
+ this.velocity = (this.options.velocity || 1);
99
+
100
+ var reserved = ['target','velocity','viewport','plugins','media'];
101
+
102
+ Object.keys(this.options).forEach(function(prop){
103
+
104
+ if (reserved.indexOf(prop) !== -1) {
105
+ return;
106
+ }
107
+
108
+ var start, end, dir, diff, startend = String(this.options[prop]).split(',');
109
+
110
+ if (prop.match(/color/i)) {
111
+ start = startend[1] ? startend[0] : this._getStartValue(prop),
112
+ end = startend[1] ? startend[1] : startend[0];
113
+
114
+ if (!start) {
115
+ start = 'rgba(255,255,255,0)';
116
+ }
117
+
118
+ } else {
119
+ start = parseFloat(startend[1] ? startend[0] : this._getStartValue(prop)),
120
+ end = parseFloat(startend[1] ? startend[1] : startend[0]);
121
+ diff = (start < end ? (end-start):(start-end));
122
+ dir = (start < end ? 1:-1);
123
+ }
124
+
125
+ this.props[prop] = { start: start, end: end, dir: dir, diff: diff };
126
+
127
+ }.bind(this));
128
+
129
+ parallaxes.push(this);
130
+ },
131
+
132
+ process: function() {
133
+
134
+ if (this.options.media) {
135
+
136
+ switch(typeof(this.options.media)) {
137
+ case 'number':
138
+ if (window.innerWidth < this.options.media) {
139
+ return false;
140
+ }
141
+ break;
142
+ case 'string':
143
+ if (window.matchMedia && !window.matchMedia(this.options.media).matches) {
144
+ return false;
145
+ }
146
+ break;
147
+ }
148
+ }
149
+
150
+ var percent = this.percentageInViewport();
151
+
152
+ if (this.options.viewport !== false) {
153
+ percent = (this.options.viewport === 0) ? 1 : percent / this.options.viewport;
154
+ }
155
+
156
+ this.update(percent);
157
+ },
158
+
159
+ percentageInViewport: function() {
160
+
161
+ var top = this.base.offset().top,
162
+ height = this.base.outerHeight(),
163
+ distance, percentage, percent;
164
+
165
+ if (top > (scrolltop + wh)) {
166
+ percent = 0;
167
+ } else if ((top + height) < scrolltop) {
168
+ percent = 1;
169
+ } else {
170
+
171
+ if ((top + height) < wh) {
172
+
173
+ percent = (scrolltop < wh ? scrolltop : scrolltop - wh) / (top+height);
174
+
175
+ } else {
176
+
177
+ distance = (scrolltop + wh) - top;
178
+ percentage = Math.round(distance / ((wh + height) / 100));
179
+ percent = percentage/100;
180
+ }
181
+ }
182
+
183
+ return percent;
184
+ },
185
+
186
+ update: function(percent) {
187
+
188
+ var $this = this,
189
+ css = {transform:'', filter:''},
190
+ compercent = percent * (1 - (this.velocity - (this.velocity * percent))),
191
+ opts, val;
192
+
193
+ if (compercent < 0) compercent = 0;
194
+ if (compercent > 1) compercent = 1;
195
+
196
+ if (this._percent !== undefined && this._percent == compercent) {
197
+ return;
198
+ }
199
+
200
+ Object.keys(this.props).forEach(function(prop) {
201
+
202
+ opts = this.props[prop];
203
+
204
+ if (percent === 0) {
205
+ val = opts.start;
206
+ } else if(percent === 1) {
207
+ val = opts.end;
208
+ } else if(opts.diff !== undefined) {
209
+ val = opts.start + (opts.diff * compercent * opts.dir);
210
+ }
211
+
212
+ if ((prop == 'bg' || prop == 'bgp') && !this._bgcover) {
213
+ this._bgcover = initBgImageParallax(this, prop, opts);
214
+ }
215
+
216
+ switch(prop) {
217
+
218
+ // transforms
219
+ case 'x':
220
+ css.transform += supports3d ? ' translate3d('+val+'px, 0, 0)':' translateX('+val+'px)';
221
+ break;
222
+ case 'xp':
223
+ css.transform += supports3d ? ' translate3d('+val+'%, 0, 0)':' translateX('+val+'%)';
224
+ break;
225
+ case 'y':
226
+ css.transform += supports3d ? ' translate3d(0, '+val+'px, 0)':' translateY('+val+'px)';
227
+ break;
228
+ case 'yp':
229
+ css.transform += supports3d ? ' translate3d(0, '+val+'%, 0)':' translateY('+val+'%)';
230
+ break;
231
+ case 'rotate':
232
+ css.transform += ' rotate('+val+'deg)';
233
+ break;
234
+ case 'scale':
235
+ css.transform += ' scale('+val+')';
236
+ break;
237
+
238
+ // bg image
239
+ case 'bg':
240
+
241
+ // don't move if image height is too small
242
+ // if ($this.element.data('bgsize') && ($this.element.data('bgsize').h + val - window.innerHeight) < 0) {
243
+ // break;
244
+ // }
245
+
246
+ css['background-position'] = '50% '+val+'px';
247
+ break;
248
+ case 'bgp':
249
+ css['background-position'] = '50% '+val+'%';
250
+ break;
251
+
252
+ // color
253
+ case 'color':
254
+ case 'background-color':
255
+ case 'border-color':
256
+ css[prop] = calcColor(opts.start, opts.end, compercent);
257
+ break;
258
+
259
+ // CSS Filter
260
+ case 'blur':
261
+ css.filter += ' blur('+val+'px)';
262
+ break;
263
+ case 'hue':
264
+ css.filter += ' hue-rotate('+val+'deg)';
265
+ break;
266
+ case 'grayscale':
267
+ css.filter += ' grayscale('+val+'%)';
268
+ break;
269
+ case 'invert':
270
+ css.filter += ' invert('+val+'%)';
271
+ break;
272
+ case 'fopacity':
273
+ css.filter += ' opacity('+val+'%)';
274
+ break;
275
+ case 'saturate':
276
+ css.filter += ' saturate('+val+'%)';
277
+ break;
278
+ case 'sepia':
279
+ css.filter += ' sepia('+val+'%)';
280
+ break;
281
+
282
+ default:
283
+ css[prop] = val;
284
+ break;
285
+ }
286
+
287
+ }.bind(this));
288
+
289
+ if (css.filter) {
290
+ css['-webkit-filter'] = css.filter;
291
+ }
292
+
293
+ this.element.css(css);
294
+
295
+ this._percent = compercent;
296
+ },
297
+
298
+ _getStartValue: function(prop) {
299
+
300
+ var value = 0;
301
+
302
+ switch(prop) {
303
+ case 'scale':
304
+ value = 1;
305
+ break;
306
+ default:
307
+ value = this.element.css(prop);
308
+ }
309
+
310
+ return (value || 0);
311
+ }
312
+
313
+ });
314
+
315
+
316
+ // helper
317
+
318
+ function initBgImageParallax(obj, prop, opts) {
319
+
320
+ var img = new Image(), url, element, size, check, ratio, width, height;
321
+
322
+ element = obj.element.css({backgroundSize: 'cover', backgroundRepeat: 'no-repeat'});
323
+ url = element.css('background-image').replace(/^url\(/g, '').replace(/\)$/g, '').replace(/("|')/g, '');
324
+ check = function() {
325
+
326
+ var w = element.innerWidth(), h = element.innerHeight(), extra = (prop=='bg') ? opts.diff : (opts.diff/100) * h;
327
+
328
+ h += extra;
329
+ w += Math.ceil(extra * ratio);
330
+
331
+ if (w-extra < size.w && h < size.h) {
332
+ return obj.element.css({backgroundSize: 'auto'});
333
+ }
334
+
335
+ // if element height < parent height (gap underneath)
336
+ if ((w / ratio) < h) {
337
+
338
+ width = Math.ceil(h * ratio);
339
+ height = h;
340
+
341
+ if (h > window.innerHeight) {
342
+ width = width * 1.2;
343
+ height = height * 1.2;
344
+ }
345
+
346
+ // element width < parent width (gap to right)
347
+ } else {
348
+
349
+ width = w;
350
+ height = Math.ceil(w / ratio);
351
+ }
352
+
353
+ element.css({backgroundSize: (width+'px '+height+'px')}).data('bgsize', {w:width,h:height});
354
+ };
355
+
356
+ img.onerror = function(){
357
+ // image url doesn't exist
358
+ };
359
+
360
+ img.onload = function(){
361
+ size = {w:img.width, h:img.height};
362
+ ratio = img.width / img.height;
363
+
364
+ UI.$win.on('load resize orientationchange', UI.Utils.debounce(function(){
365
+ check();
366
+ }, 50));
367
+
368
+ check();
369
+ };
370
+
371
+ img.src = url;
372
+
373
+ return true;
374
+ }
375
+
376
+
377
+ // Some named colors to work with, added by Bradley Ayers
378
+ // From Interface by Stefan Petre
379
+ // http://interface.eyecon.ro/
380
+ var colors = {
381
+ 'black': [0,0,0,1],
382
+ 'blue': [0,0,255,1],
383
+ 'brown': [165,42,42,1],
384
+ 'cyan': [0,255,255,1],
385
+ 'fuchsia': [255,0,255,1],
386
+ 'gold': [255,215,0,1],
387
+ 'green': [0,128,0,1],
388
+ 'indigo': [75,0,130,1],
389
+ 'khaki': [240,230,140,1],
390
+ 'lime': [0,255,0,1],
391
+ 'magenta': [255,0,255,1],
392
+ 'maroon': [128,0,0,1],
393
+ 'navy': [0,0,128,1],
394
+ 'olive': [128,128,0,1],
395
+ 'orange': [255,165,0,1],
396
+ 'pink': [255,192,203,1],
397
+ 'purple': [128,0,128,1],
398
+ 'violet': [128,0,128,1],
399
+ 'red': [255,0,0,1],
400
+ 'silver': [192,192,192,1],
401
+ 'white': [255,255,255,1],
402
+ 'yellow': [255,255,0,1],
403
+ 'transparent': [255,255,255,0]
404
+ };
405
+
406
+ function calcColor(start, end, pos) {
407
+
408
+ start = parseColor(start);
409
+ end = parseColor(end);
410
+ pos = pos || 0;
411
+
412
+ return calculateColor(start, end, pos);
413
+ }
414
+
415
+ /**!
416
+ * @preserve Color animation 1.6.0
417
+ * http://www.bitstorm.org/jquery/color-animation/
418
+ * Copyright 2011, 2013 Edwin Martin <edwin@bitstorm.org>
419
+ * Released under the MIT and GPL licenses.
420
+ */
421
+
422
+ // Calculate an in-between color. Returns "#aabbcc"-like string.
423
+ function calculateColor(begin, end, pos) {
424
+ var color = 'rgba('
425
+ + parseInt((begin[0] + pos * (end[0] - begin[0])), 10) + ','
426
+ + parseInt((begin[1] + pos * (end[1] - begin[1])), 10) + ','
427
+ + parseInt((begin[2] + pos * (end[2] - begin[2])), 10) + ','
428
+ + (begin && end ? parseFloat(begin[3] + pos * (end[3] - begin[3])) : 1);
429
+
430
+ color += ')';
431
+ return color;
432
+ }
433
+
434
+ // Parse an CSS-syntax color. Outputs an array [r, g, b]
435
+ function parseColor(color) {
436
+
437
+ var match, quadruplet;
438
+
439
+ // Match #aabbcc
440
+ if (match = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(color)) {
441
+ quadruplet = [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16), 1];
442
+
443
+ // Match #abc
444
+ } else if (match = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(color)) {
445
+ quadruplet = [parseInt(match[1], 16) * 17, parseInt(match[2], 16) * 17, parseInt(match[3], 16) * 17, 1];
446
+
447
+ // Match rgb(n, n, n)
448
+ } else if (match = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) {
449
+ quadruplet = [parseInt(match[1]), parseInt(match[2]), parseInt(match[3]), 1];
450
+
451
+ } else if (match = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(color)) {
452
+ quadruplet = [parseInt(match[1], 10), parseInt(match[2], 10), parseInt(match[3], 10),parseFloat(match[4])];
453
+
454
+ // No browser returns rgb(n%, n%, n%), so little reason to support this format.
455
+ } else {
456
+ quadruplet = colors[color] || [255,255,255,0];
457
+ }
458
+ return quadruplet;
459
+ }
460
+
461
+ return UI.parallax;
462
+ });