├── _source ├── 404.html ├── sitemap.html ├── _layouts │ ├── post.html │ └── default.html ├── page1.html ├── page2.html ├── page3.html ├── _posts │ └── .gitignore ├── _includes │ ├── orbit.html │ ├── footer.html │ └── nav.html ├── robots.txt ├── assets │ ├── images │ │ └── foundation │ │ │ └── orbit │ │ │ ├── bullets.jpg │ │ │ ├── loading.gif │ │ │ ├── left-arrow.png │ │ │ ├── mask-black.png │ │ │ ├── pause-black.png │ │ │ ├── right-arrow.png │ │ │ ├── timer-black.png │ │ │ ├── rotator-black.png │ │ │ ├── left-arrow-small.png │ │ │ └── right-arrow-small.png │ └── js │ │ ├── app.js │ │ ├── modernizr.foundation.js │ │ └── zepto.js ├── humans.txt └── index.html ├── .gitignore ├── _config.yml ├── config.rb ├── sass ├── app.scss ├── _normalize.scss └── _settings.scss └── readme.md /_source/404.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_source/sitemap.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_source/_layouts/post.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache -------------------------------------------------------------------------------- /_source/page1.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Page1 4 | --- 5 | 6 | -------------------------------------------------------------------------------- /_source/page2.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Page2 4 | --- 5 | 6 |

This is Page2.

-------------------------------------------------------------------------------- /_source/page3.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Page3 4 | --- 5 | 6 |

This is Page3.

-------------------------------------------------------------------------------- /_source/_posts/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /_source/_includes/orbit.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_source/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/bullets.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/bullets.jpg -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/loading.gif -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/left-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/left-arrow.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/mask-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/mask-black.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/pause-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/pause-black.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/right-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/right-arrow.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/timer-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/timer-black.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/rotator-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/rotator-black.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/left-arrow-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/left-arrow-small.png -------------------------------------------------------------------------------- /_source/assets/images/foundation/orbit/right-arrow-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rememberlenny/Jekyll-Foundation-SASS/HEAD/_source/assets/images/foundation/orbit/right-arrow-small.png -------------------------------------------------------------------------------- /_source/humans.txt: -------------------------------------------------------------------------------- 1 | /* Created By Dave Cohen in Vienna. */ 2 | 3 | 4 | /* SITE */ 5 | Standards: HTML5, CSS3 6 | Components: jQuery, Foundation, html5 Boilerplate 7 | Software: Sublime Text 2, Git, Jekyll 8 | 9 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: A Triangle Jekyll 2 | author: Leonard Kiyoshi Bogdonoff 3 | linkedin: http://www.linkedin.com/pub/leonard-bogdonoff/25/14b/8a6 4 | twitter: rememberlenny 5 | github: rememberlenny 6 | source: ./_source 7 | destination: ./_site -------------------------------------------------------------------------------- /_source/_includes/footer.html: -------------------------------------------------------------------------------- 1 |
2 | {{ site.author }} | @{{ site.twitter }} | Github: {{ site.github }} 3 | 4 |
-------------------------------------------------------------------------------- /_source/_includes/nav.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | require 'zurb-foundation' 2 | # Require any additional compass plugins here. 3 | 4 | 5 | # Set this to the root of your project when deployed: 6 | http_path = "/" 7 | css_dir = "assets/css" 8 | sass_dir = "sass" 9 | images_dir = "assets/images" 10 | 11 | # You can select your preferred output style here (can be overridden via the command line): 12 | # output_style = :expanded or :nested or :compact or :compressed 13 | 14 | # To enable relative paths to assets via compass helper functions. Uncomment: 15 | # relative_assets = true 16 | 17 | # To disable debugging comments that display the original location of your selectors. Uncomment: 18 | # line_comments = false 19 | 20 | 21 | # If you prefer the indented syntax, you might want to regenerate this 22 | # project again passing --syntax sass, or you can uncomment this: 23 | # preferred_syntax = :sass 24 | # and then run: 25 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 26 | -------------------------------------------------------------------------------- /_source/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Welcome! 4 | --- 5 | 6 |

this is the default index page!

7 | 8 | 9 |
10 | 11 |

To get started, see the readme.md file. View the source for this page to see how to split up the grid and position elements, or view the foundation documents

. 12 | 13 | 14 |
15 |
16 | 17 | 18 |
19 | 20 | 21 |
22 |

Some Stuff

23 |
24 | 25 | 26 |
27 |

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat obcaecati eaque soluta rerum tempora molestias neque asperiores sit nulla error accusantium eveniet quia omnis impedit enim aspernatur sint ad earum.

28 |
29 | 30 | 31 |
32 |

Even More Important Stuff

33 |
34 | 35 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /_source/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{ site.title }}{{ page.title }} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | {% include nav.html %} 29 | 30 | 31 |
32 | 33 | 34 | {{ content }} 35 | 36 | 37 | 38 |
39 | 40 | {% include footer.html %} 41 | 42 | 43 |
44 |
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /_source/assets/js/app.js: -------------------------------------------------------------------------------- 1 | ;(function ($, window, undefined) { 2 | 'use strict'; 3 | 4 | var $doc = $(document), 5 | Modernizr = window.Modernizr; 6 | 7 | $(document).ready(function() { 8 | $.fn.foundationAlerts ? $doc.foundationAlerts() : null; 9 | $.fn.foundationButtons ? $doc.foundationButtons() : null; 10 | $.fn.foundationAccordion ? $doc.foundationAccordion() : null; 11 | $.fn.foundationNavigation ? $doc.foundationNavigation() : null; 12 | $.fn.foundationTopBar ? $doc.foundationTopBar() : null; 13 | $.fn.foundationCustomForms ? $doc.foundationCustomForms() : null; 14 | $.fn.foundationMediaQueryViewer ? $doc.foundationMediaQueryViewer() : null; 15 | $.fn.foundationTabs ? $doc.foundationTabs({callback : $.foundation.customForms.appendCustomMarkup}) : null; 16 | $.fn.foundationTooltips ? $doc.foundationTooltips() : null; 17 | $.fn.foundationMagellan ? $doc.foundationMagellan() : null; 18 | $.fn.foundationClearing ? $doc.foundationClearing() : null; 19 | 20 | $.fn.placeholder ? $('input, textarea').placeholder() : null; 21 | }); 22 | 23 | // UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids 24 | // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'both'}); 25 | // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'both'}); 26 | // $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'both'}); 27 | // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'both'}); 28 | 29 | // Hide address bar on mobile devices (except if #hash present, so we don't mess up deep linking). 30 | if (Modernizr.touch && !window.location.hash) { 31 | $(window).load(function () { 32 | setTimeout(function () { 33 | window.scrollTo(0, 1); 34 | }, 0); 35 | }); 36 | } 37 | 38 | })(jQuery, this); 39 | -------------------------------------------------------------------------------- /sass/app.scss: -------------------------------------------------------------------------------- 1 | // Global Foundation Settings 2 | @import "settings"; 3 | 4 | // Comment out this import if you don't want to use normalize 5 | @import "normalize"; 6 | 7 | // Comment out this import if you are customizing you imports below 8 | @import "foundation"; 9 | 10 | // Import specific parts of Foundation by commenting the import "foundation" 11 | // and uncommenting what you want below. You must uncomment the following if customizing 12 | 13 | // @import "foundation/components/global"; // *always required 14 | // @import "foundation/components/grid"; 15 | 16 | // 17 | // Use this grid if you want to start using the new Foundation 5 grid early. 18 | // It will change breakpoints to min-width: 640px and 1024px. 19 | // 20 | // @import "foundation/components/grid-5"; 21 | // 22 | 23 | // @import "foundation/components/visibility"; 24 | // @import "foundation/components/block-grid"; 25 | // @import "foundation/components/type"; 26 | // @import "foundation/components/buttons"; 27 | // @import "foundation/components/forms"; // *requires components/buttons 28 | // @import "foundation/components/custom-forms"; // *requires components/buttons, components/forms 29 | // @import "foundation/components/button-groups"; // *requires components/buttons 30 | // @import "foundation/components/dropdown-buttons"; // *requires components/buttons 31 | // @import "foundation/components/split-buttons"; // *requires components/buttons 32 | // @import "foundation/components/flex-video"; 33 | // @import "foundation/components/section"; 34 | // @import "foundation/components/top-bar"; // *requires components/grid 35 | // @import "foundation/components/orbit"; 36 | // @import "foundation/components/reveal"; 37 | // @import "foundation/components/joyride"; 38 | // @import "foundation/components/clearing"; 39 | // @import "foundation/components/alert-boxes"; 40 | // @import "foundation/components/breadcrumbs"; 41 | // @import "foundation/components/keystrokes"; 42 | // @import "foundation/components/labels"; 43 | // @import "foundation/components/inline-lists"; 44 | // @import "foundation/components/pagination"; 45 | // @import "foundation/components/panels"; 46 | // @import "foundation/components/pricing-tables"; 47 | // @import "foundation/components/progress-bars"; 48 | // @import "foundation/components/side-nav"; 49 | // @import "foundation/components/sub-nav"; 50 | // @import "foundation/components/switch"; 51 | // @import "foundation/components/magellan"; 52 | // @import "foundation/components/tables"; 53 | // @import "foundation/components/thumbs"; 54 | // @import "foundation/components/tooltips"; 55 | // @import "foundation/components/dropdown"; 56 | 57 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Jekyll + Foundation SCSS # 2 | 3 | Foundation self declares to be the most advanced responsive front-end framework in the world. 4 | 5 | ## What's Included: ## 6 | * all the directories that Jekyll needs to compile your static site 7 | * jQuery 8 | * the entire foundation framework 9 | * a default html5 template in _layouts 10 | * a default nav bar under _includes 11 | * default index and 404 page, along with 3 other empty pages 12 | 13 | 14 | ## How To 'Install' It ## 15 | 16 | First, make sure you have [Ruby](https://www.ruby-lang.org/en/) and the [Jekyll](http://jekyllrb.com/) gem installed (```gem install jekyll```). 17 | 18 | Then, just download the .zip or 19 | 20 | git clone git@github.com:rememberlenny/Jekyll-Foundation-SASS.git 21 | 22 | ## How To 'Run' It ## 23 | 24 | **Serving Jekyll** 25 | To set up a local development server use the command ```jekyll serve```. The files from ```_site``` will be served to [http://localhost:4000](http://localhost:4000) by default. 26 | 27 | **SASS -> CSS** 28 | To compile the SASS files into CSS, run ```compass watch```. Files from ```sass/*``` will render to ```_source/assets/css```. 29 | 30 | **Preparing for build** 31 | After you have compiled your SASS with Compass, its time build. Build for deploymentwith the command ```jekyll build```. The files will render to ```_site```. 32 | 33 | 34 | ## Tutorial: ## 35 | 36 | ### Layouts ### 37 | 38 | The easiest way is to use the default layout (HTML5 Boilerplate -- _layouts/default.html). To use a layout, put this at the top of your page: 39 | 40 | --- 41 | layout: default 42 | title: YourPageTitleHere 43 | --- 44 | 45 |

Page-Specific HTML Content

46 |

etc...

47 | 48 | 49 | 50 | ### Includes ### 51 | 52 | If you're planning on reusing a few snippets of code on several pages, DRY (Don't Repeat Yourself)! Create an include HTML file and put it in the _includes/ directory. Kind of like a Rails helper. 53 | 54 | To call an include in a page, just write 55 | 56 | {% include yourincludename.html %} 57 | 58 | 59 | For an example of this, see _layouts/default.html -- I include the nav.html snippet on the default layout, meaning it displays on every page that uses that layout. 60 | 61 | 62 | ### Slideshows ### 63 | 64 | Foundation's Orbit code is ready to plug into your website; the javascript to trigger it can be found in _includes/orbit.html -- just include that on the page where you want a slideshow, and then add a div#slideshow with image tags inside: 65 | 66 |
67 | blah 68 | yeah 69 | bar 70 |
71 | 72 | For more information see [Zurb's Foundation documentation.](http://foundation.zurb.com/docs/orbit.php) 73 | 74 | 75 | 76 | ## That's It! ## 77 | 78 | Have Fun and make some cool websites. 79 | 80 | Comments, improvements, and suitcases filled with money can be sent to lenny@atriangle.com 81 | 82 | 83 | -Lenny 84 | 85 | ## Thanks ## 86 | 87 | Thanks to [Dave Cohen](https://github.com/groovemonkey) for making [jekyll-foundation-base](https://github.com/groovemonkey/jekyll-foundation-base):. -------------------------------------------------------------------------------- /_source/assets/js/modernizr.foundation.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function y(a){j.cssText=a}function z(a,b){return y(m.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",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={svg:"http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=r.slice,t,u=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(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=s.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(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?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)){"img"!=a&&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=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?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),"img"!=a&&(r||2===y[c]?(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("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&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&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},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 $cursor-default-value: url(http://cursors-site.net/path/to/custom/cursor/default.cur),progress; 130 | 131 | // $cursor-crosshair-value: "crosshair"; 132 | // $cursor-default-value: "default"; 133 | // $cursor-pointer-value: "pointer"; 134 | // $cursor-help-value: "help"; 135 | 136 | // 137 | // Grid Variables 138 | // 139 | 140 | // $row-width: emCalc(1000); 141 | // $column-gutter: emCalc(30); 142 | // $total-columns: 12; 143 | 144 | // 145 | // Block Grid Variables 146 | // 147 | 148 | // We use this to control the maximum number of block grid elements per row 149 | 150 | // $block-grid-elements: 12; 151 | // $block-grid-default-spacing: emCalc(20); 152 | 153 | // Enables media queries for block-grid classes. Set to false if writing semantic HTML. 154 | 155 | // $block-grid-media-queries: true; 156 | 157 | // 158 | // Typography Variables 159 | // 160 | 161 | // Control header font styles 162 | 163 | // $header-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; 164 | // $header-font-weight: bold; 165 | // $header-font-style: normal; 166 | // $header-font-color: #222; 167 | // $header-line-height: 1.4; 168 | // $header-top-margin: .2em; 169 | // $header-bottom-margin: .5em; 170 | // $header-text-rendering: optimizeLegibility; 171 | 172 | // Control header font sizes 173 | 174 | // $h1-font-size: emCalc(44); 175 | // $h2-font-size: emCalc(37); 176 | // $h3-font-size: emCalc(27); 177 | // $h4-font-size: emCalc(23); 178 | // $h5-font-size: emCalc(18); 179 | // $h6-font-size: 1em; 180 | 181 | // Control how subheaders are styled. 182 | 183 | // $subheader-line-height: 1.4; 184 | // $subheader-font-color: lighten($header-font-color, 30%); 185 | // $subheader-font-weight: 300; 186 | // $subheader-top-margin: .2em; 187 | // $subheader-bottom-margin: .5em; 188 | 189 | // A general styling 190 | 191 | // $small-font-size: 60%; 192 | // $small-font-color: lighten($header-font-color, 30%); 193 | 194 | // Style paragraphs 195 | 196 | // $paragraph-font-family: inherit; 197 | // $paragraph-font-weight: normal; 198 | // $paragraph-font-size: 1em; 199 | // $paragraph-line-height: 1.6; 200 | // $paragraph-margin-bottom: emCalc(20); 201 | // $paragraph-aside-font-size: emCalc(14); 202 | // $paragraph-aside-line-height: 1.35; 203 | // $paragraph-aside-font-style: italic; 204 | // $paragraph-text-rendering: optimizeLegibility; 205 | 206 | // Style tags 207 | 208 | // $code-color: darken($alert-color, 15%); 209 | // $code-font-family: Consolas, 'Liberation Mono', Courier, monospace; 210 | // $code-font-weight: bold; 211 | 212 | // Style anchors 213 | 214 | // $anchor-text-decoration: none; 215 | // $anchor-font-color: $primary-color; 216 | // $anchor-font-color-hover: darken($primary-color, 5%); 217 | 218 | // Style the
element 219 | 220 | // $hr-border-width: 1px; 221 | // $hr-border-style: solid; 222 | // $hr-border-color: #ddd; 223 | // $hr-margin: emCalc(20); 224 | 225 | // Style lists 226 | 227 | // $list-style-position: outside; 228 | // $list-side-margin: 0; 229 | // $list-nested-margin: emCalc(20); 230 | // $definition-list-header-weight: bold; 231 | // $definition-list-header-margin-bottom: .3em; 232 | // $definition-list-margin-bottom: emCalc(12); 233 | 234 | // Style blockquotes 235 | 236 | // $blockquote-font-color: lighten($header-font-color, 30%); 237 | // $blockquote-padding: emCalc(9, 20, 0, 19); 238 | // $blockquote-border: 1px solid #ddd; 239 | // $blockquote-cite-font-size: emCalc(13); 240 | // $blockquote-cite-font-color: lighten($header-font-color, 20%); 241 | // $blockquote-cite-link-color: $blockquote-cite-font-color; 242 | 243 | // Acronym styles 244 | 245 | // $acronym-underline: 1px dotted #ddd; 246 | 247 | // Control padding and margin 248 | 249 | // $microformat-padding: emCalc(10, 12); 250 | // $microformat-margin: emCalc(0, 0, 20, 0); 251 | 252 | // Control the border styles 253 | 254 | // $microformat-border-width: 1px; 255 | // $microformat-border-style: solid; 256 | // $microformat-border-color: #ddd; 257 | 258 | // Control full name font styles 259 | 260 | // $microformat-fullname-font-weight: bold; 261 | // $microformat-fullname-font-size: emCalc(15); 262 | 263 | // Control the summary font styles 264 | 265 | // $microformat-summary-font-weight: bold; 266 | 267 | // Control abbr padding 268 | // $microformat-abbr-padding: emCalc(0, 1); 269 | 270 | // Control abbr font styles 271 | 272 | // $microformat-abbr-font-weight: bold; 273 | // $microformat-abbr-font-decoration: none; 274 | 275 | // 276 | // Form Variables 277 | // 278 | 279 | // We use this to set the base for lots of form spacing and positioning styles 280 | 281 | // $form-spacing: emCalc(16); 282 | 283 | // We use these to style the labels in different ways 284 | 285 | // $form-label-pointer: pointer; 286 | // $form-label-font-size: emCalc(14); 287 | // $form-label-font-weight: 500; 288 | // $form-label-font-color: lighten(#000, 30%); 289 | // $form-label-bottom-margin: emCalc(3); 290 | // $input-font-family: inherit; 291 | // $input-font-color: rgba(0,0,0,0.75); 292 | // $input-font-size: emCalc(14); 293 | // $input-bg-color: #fff; 294 | // $input-focus-bg-color: darken(#fff, 2%); 295 | // $input-border-color: darken(#fff, 20%); 296 | // $input-focus-border-color: darken(#fff, 40%); 297 | // $input-border-style: solid; 298 | // $input-border-width: 1px; 299 | // $input-disabled-bg: #ddd; 300 | // $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 301 | // $input-include-glowing-effect: true; 302 | 303 | // We use these to style the fieldset border and spacing. 304 | 305 | // $fieldset-border-style: solid; 306 | // $fieldset-border-width: 1px; 307 | // $fieldset-border-color: #ddd; 308 | // $fieldset-padding: emCalc(20); 309 | // $fieldset-margin: emCalc(18, 0); 310 | 311 | // We use these to style the legends when you use them 312 | 313 | // $legend-bg: #fff; 314 | // $legend-font-weight: bold; 315 | // $legend-padding: emCalc(0, 3); 316 | 317 | // We use these to style the prefix and postfix input elements 318 | 319 | // $input-prefix-bg: darken(#fff, 5%); 320 | // $input-prefix-border-color: darken(#fff, 20%); 321 | // $input-prefix-border-size: 1px; 322 | // $input-prefix-border-type: solid; 323 | // $input-prefix-overflow: hidden; 324 | // $input-prefix-font-color: #333; 325 | // $input-prefix-font-color-alt: #fff; 326 | 327 | // We use these to style the error states for inputs and labels 328 | 329 | // $input-error-message-padding: emCalc(6, 4); 330 | // $input-error-message-top: 0; 331 | // $input-error-message-font-size: emCalc(12); 332 | // $input-error-message-font-weight: bold; 333 | // $input-error-message-font-color: #fff; 334 | // $input-error-message-font-color-alt: #333; 335 | 336 | // We use this to style the glowing effect of inputs when focused 337 | 338 | // $glowing-effect-fade-time: 0.45s; 339 | // $glowing-effect-color: $input-focus-border-color; 340 | 341 | // 342 | // Button Variables 343 | // 344 | 345 | // We use these to build padding for buttons. 346 | 347 | // $button-med: emCalc(12); 348 | // $button-tny: emCalc(7); 349 | // $button-sml: emCalc(9); 350 | // $button-lrg: emCalc(16); 351 | 352 | // We use this to control the display property. 353 | 354 | // $button-display: inline-block; 355 | // $button-margin-bottom: emCalc(20); 356 | 357 | // We use these to control button text styles. 358 | 359 | // $button-font-family: inherit; 360 | // $button-font-color: #fff; 361 | // $button-font-color-alt: #333; 362 | // $button-font-med: emCalc(16); 363 | // $button-font-tny: emCalc(11); 364 | // $button-font-sml: emCalc(13); 365 | // $button-font-lrg: emCalc(20); 366 | // $button-font-weight: bold; 367 | // $button-font-align: center; 368 | 369 | // We use these to control various hover effects. 370 | 371 | // $button-function-factor: 10%; 372 | 373 | // We use these to control button border styles. 374 | 375 | // $button-border-width: 1px; 376 | // $button-border-style: solid; 377 | 378 | // We use this to set the default radius used throughout the core. 379 | 380 | // $button-radius: $global-radius; 381 | // $button-round: $global-rounded; 382 | 383 | // We use this to set default opacity for disabled buttons. 384 | 385 | // $button-disabled-opacity: 0.6; 386 | 387 | // 388 | // Button Groups 389 | // 390 | 391 | // Sets the margin for the right side by default, and the left margin if right-to-left direction is used 392 | 393 | // $button-bar-margin-opposite: emCalc(10); 394 | 395 | // 396 | // Dropdown Button Variables 397 | // 398 | 399 | // We use these to set the color of the pip in dropdown buttons 400 | 401 | // $dropdown-button-pip-color: #fff; 402 | // $dropdown-button-pip-color-alt: #333; 403 | 404 | // We use these to style tiny dropdown buttons 405 | 406 | // $dropdown-button-padding-tny: $button-tny * 5; 407 | // $dropdown-button-pip-size-tny: $button-tny; 408 | // $dropdown-button-pip-opposite-tny: $button-tny * 2; 409 | // $dropdown-button-pip-top-tny: -$button-tny / 2 + emCalc(1); 410 | 411 | // We use these to style small dropdown buttons 412 | 413 | // $dropdown-button-padding-sml: $button-sml * 5; 414 | // $dropdown-button-pip-size-sml: $button-sml; 415 | // $dropdown-button-pip-opposite-sml: $button-sml * 2; 416 | // $dropdown-button-pip-top-sml: -$button-sml / 2 + emCalc(1); 417 | 418 | // We use these to style medium dropdown buttons 419 | 420 | // $dropdown-button-padding-med: $button-med * 4 + emCalc(3); 421 | // $dropdown-button-pip-size-med: $button-med - emCalc(3); 422 | // $dropdown-button-pip-opposite-med: $button-med * 2; 423 | // $dropdown-button-pip-top-med: -$button-med / 2 + emCalc(2); 424 | 425 | // We use these to style large dropdown buttons 426 | 427 | // $dropdown-button-padding-lrg: $button-lrg * 4; 428 | // $dropdown-button-pip-size-lrg: $button-lrg - emCalc(6); 429 | // $dropdown-button-pip-opposite-lrg: $button-lrg + emCalc(12); 430 | // $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3); 431 | 432 | // 433 | // Split Button Variables 434 | // 435 | 436 | // We use these to control different shared styles for Split Buttons 437 | 438 | // $split-button-function-factor: 15%; 439 | // $split-button-pip-color: #fff; 440 | // $split-button-pip-color-alt: #333; 441 | // $split-button-active-bg-tint: rgba(0,0,0,0.1); 442 | 443 | // We use these to control tiny split buttons 444 | 445 | // $split-button-padding-tny: $button-tny * 9; 446 | // $split-button-span-width-tny: $button-tny * 6.5; 447 | // $split-button-pip-size-tny: $button-tny; 448 | // $split-button-pip-top-tny: $button-tny * 2; 449 | // $split-button-pip-default-float-tny: emCalc(-5); 450 | 451 | // We use these to control small split buttons 452 | 453 | // $split-button-padding-sml: $button-sml * 7; 454 | // $split-button-span-width-sml: $button-sml * 5; 455 | // $split-button-pip-size-sml: $button-sml; 456 | // $split-button-pip-top-sml: $button-sml * 1.5; 457 | // $split-button-pip-default-float-sml: emCalc(-9); 458 | 459 | // We use these to control medium split buttons 460 | 461 | // $split-button-padding-med: $button-med * 6.4; 462 | // $split-button-span-width-med: $button-med * 4; 463 | // $split-button-pip-size-med: $button-med - emCalc(3); 464 | // $split-button-pip-top-med: $button-med * 1.5; 465 | // $split-button-pip-default-float-med: emCalc(-9); 466 | 467 | // We use these to control large split buttons 468 | 469 | // $split-button-padding-lrg: $button-lrg * 6; 470 | // $split-button-span-width-lrg: $button-lrg * 3.75; 471 | // $split-button-pip-size-lrg: $button-lrg - emCalc(6); 472 | // $split-button-pip-top-lrg: $button-lrg + emCalc(5); 473 | // $split-button-pip-default-float-lrg: emCalc(-9); 474 | 475 | // 476 | // Alert Box Variables 477 | // 478 | 479 | // We use this to control alert padding. 480 | 481 | // $alert-padding-top: emCalc(11); 482 | // $alert-padding-default-float: $alert-padding-top; 483 | // $alert-padding-opposite-direction: $alert-padding-top + emCalc(10); 484 | // $alert-padding-bottom: $alert-padding-top + emCalc(1); 485 | 486 | // We use these to control text style. 487 | 488 | // $alert-font-weight: bold; 489 | // $alert-font-size: emCalc(14); 490 | // $alert-font-color: #fff; 491 | // $alert-font-color-alt: darken($secondary-color, 60%); 492 | 493 | // We use this for close hover effect. 494 | 495 | // $alert-function-factor: 10%; 496 | 497 | // We use these to control border styles. 498 | 499 | // $alert-border-style: solid; 500 | // $alert-border-width: 1px; 501 | // $alert-border-color: darken($primary-color, $alert-function-factor); 502 | // $alert-bottom-margin: emCalc(20); 503 | 504 | // We use these to style the close buttons 505 | 506 | // $alert-close-color: #333; 507 | // $alert-close-position: emCalc(5); 508 | // $alert-close-font-size: emCalc(22); 509 | // $alert-close-opacity: 0.3; 510 | // $alert-close-opacity-hover: 0.5; 511 | // $alert-close-padding: 5px 4px 4px; 512 | 513 | // We use this to control border radius 514 | 515 | // $alert-radius: $global-radius; 516 | 517 | 518 | // 519 | // Breadcrumb Variables 520 | // 521 | 522 | // We use this to set the background color for the breadcrumb container. 523 | 524 | // $crumb-bg: lighten($secondary-color, 5%); 525 | 526 | // We use these to set the padding around the breadcrumbs. 527 | 528 | // $crumb-padding: emCalc(9, 14, 9); 529 | // $crumb-side-padding: emCalc(12); 530 | 531 | // We use these to control border styles. 532 | 533 | // $crumb-function-factor: 10%; 534 | // $crumb-border-size: 1px; 535 | // $crumb-border-style: solid; 536 | // $crumb-border-color: darken($crumb-bg, $crumb-function-factor); 537 | // $crumb-radius: $global-radius; 538 | 539 | // We use these to set various text styles for breadcrumbs. 540 | 541 | // $crumb-font-size: emCalc(11); 542 | // $crumb-font-color: $primary-color; 543 | // $crumb-font-color-current: #333; 544 | // $crumb-font-color-unavailable: #999; 545 | // $crumb-font-transform: uppercase; 546 | // $crumb-link-decor: underline; 547 | 548 | // We use these to control the slash between breadcrumbs 549 | 550 | // $crumb-slash-color: #aaa; 551 | // $crumb-slash: "/"; 552 | 553 | // 554 | // Clearing Variables 555 | // 556 | 557 | // We use these to set the background colors for parts of Clearing. 558 | 559 | // $clearing-bg: #111; 560 | // $clearing-caption-bg: $clearing-bg; 561 | // $clearing-carousel-bg: #111; 562 | // $clearing-img-bg: $clearing-bg; 563 | 564 | // We use these to style the close button 565 | 566 | // $clearing-close-color: #fff; 567 | // $clearing-close-size: 40px; 568 | 569 | // We use these to style the arrows 570 | 571 | // $clearing-arrow-size: 16px; 572 | // $clearing-arrow-color: $clearing-close-color; 573 | 574 | // We use these to style captions 575 | 576 | // $clearing-caption-font-color: #fff; 577 | // $clearing-caption-padding: 10px 30px; 578 | 579 | // We use these to make the image and carousel height and style 580 | 581 | // $clearing-active-img-height: 75%; 582 | // $clearing-carousel-height: 150px; 583 | // $clearing-carousel-thumb-width: 175px; 584 | // $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255); 585 | 586 | // 587 | // Custom Form Variables 588 | // 589 | 590 | // We use these to control the basic form styles input styles 591 | 592 | // $custom-form-border-color: #ccc; 593 | // $custom-form-border-size: 1px; 594 | // $custom-form-bg: #fff; 595 | // $custom-form-bg-disabled: #ddd; 596 | // $custom-form-input-size: 16px; 597 | // $custom-form-check-color: #222; 598 | // $custom-form-check-size: 16px; 599 | // $custom-form-radio-size: 8px; 600 | // $custom-form-checkbox-radius: 0px; 601 | 602 | // We use these to style the custom select form element. 603 | 604 | // $custom-select-bg: #fff; 605 | // $custom-select-fade-to-color: #f3f3f3; 606 | // $custom-select-border-color: #ddd; 607 | // $custom-select-triangle-color: #aaa; 608 | // $custom-select-triangle-color-open: #222; 609 | // $custom-select-height: emCalc(13) + ($form-spacing * 1.5); 610 | // $custom-select-margin-bottom: emCalc(20); 611 | // $custom-select-font-color-selected: #141414; 612 | // $custom-select-disabled-color: #888; 613 | 614 | // We use these to control the style of the custom select dropdown element. 615 | 616 | // $custom-dropdown-height: 200px; 617 | // $custom-dropdown-bg: #fff; 618 | // $custom-dropdown-border-color: darken(#fff, 20%); 619 | // $custom-dropdown-border-width: 1px; 620 | // $custom-dropdown-border-style: solid; 621 | // $custom-dropdown-font-color: #555; 622 | // $custom-dropdown-font-size: emCalc(14); 623 | // $custom-dropdown-color-selected: #eeeeee; 624 | // $custom-dropdown-font-color-selected: #000; 625 | // $custom-dropdown-shadow: 0 2px 2px 0px rgba(0,0,0,0.1); 626 | // $custom-dropdown-offset-top: auto; 627 | // $custom-dropdown-list-padding: emCalc(4); 628 | // $custom-dropdown-default-float-padding: emCalc(6); 629 | // $custom-dropdown-opposite-padding: emCalc(38); 630 | // $custom-dropdown-list-item-min-height: emCalc(24); 631 | // $custom-dropdown-width-small: 134px; 632 | // $custom-dropdown-width-medium: 254px; 633 | // $custom-dropdown-width-large: 434px; 634 | 635 | // 636 | // Dropdown Variables 637 | // 638 | 639 | // We use these to controls height and width styles. 640 | 641 | // $f-dropdown-max-width: 200px; 642 | // $f-dropdown-height: auto; 643 | // $f-dropdown-max-height: none; 644 | // $f-dropdown-margin-top: 2px; 645 | 646 | // We use this to control the background color 647 | 648 | // $f-dropdown-bg: #fff; 649 | 650 | // We use this to set the border styles for dropdowns. 651 | 652 | // $f-dropdown-border-style: solid; 653 | // $f-dropdown-border-width: 1px; 654 | // $f-dropdown-border-color: darken(#fff, 20%); 655 | 656 | // We use these to style the triangle pip. 657 | 658 | // $f-dropdown-triangle-size: 6px; 659 | // $f-dropdown-triangle-color: #fff; 660 | // $f-dropdown-triangle-side-offset: 10px; 661 | 662 | // We use these to control styles for the list elements. 663 | 664 | // $f-dropdown-list-style: none; 665 | // $f-dropdown-font-color: #555; 666 | // $f-dropdown-font-size: emCalc(14); 667 | // $f-dropdown-list-padding: emCalc(5, 10); 668 | // $f-dropdown-line-height: emCalc(18); 669 | // $f-dropdown-list-hover-bg: #eeeeee; 670 | // $dropdown-mobile-default-float: 0; 671 | 672 | // We use this to control the styles for when the dropdown has custom content. 673 | 674 | // $f-dropdown-content-padding: emCalc(20); 675 | 676 | // 677 | // Flex Video Variables 678 | // 679 | 680 | // We use these to control video container padding and margins 681 | 682 | // $flex-video-padding-top: emCalc(25); 683 | // $flex-video-padding-bottom: 67.5%; 684 | // $flex-video-margin-bottom: emCalc(16); 685 | 686 | // We use this to control widescreen bottom padding 687 | 688 | // $flex-video-widescreen-padding-bottom: 57.25%; 689 | 690 | // 691 | // Inline List Variables 692 | // 693 | 694 | // We use this to control the margins and padding of the inline list. 695 | 696 | // $inline-list-top-margin: 0; 697 | // $inline-list-opposite-margin: 0; 698 | // $inline-list-bottom-margin: emCalc(17); 699 | // $inline-list-default-float-margin: emCalc(-22); 700 | 701 | // $inline-list-padding: 0; 702 | 703 | // We use this to control the overflow of the inline list. 704 | 705 | // $inline-list-overflow: hidden; 706 | 707 | // We use this to control the list items 708 | 709 | // $inline-list-display: block; 710 | 711 | // We use this to control any elments within list items 712 | 713 | // $inline-list-children-display: block; 714 | 715 | // 716 | // Joyride Variables 717 | // 718 | 719 | // Controlling default Joyride styles 720 | 721 | // $joyride-tip-bg: rgb(0,0,0); 722 | // $joyride-tip-default-width: 300px; 723 | // $joyride-tip-padding: emCalc(18, 20, 24); 724 | // $joyride-tip-border: solid 1px #555; 725 | // $joyride-tip-radius: 4px; 726 | // $joyride-tip-position-offset: 22px; 727 | 728 | // Here, we're setting the tip dont styles 729 | 730 | // $joyride-tip-font-color: #fff; 731 | // $joyride-tip-font-size: emCalc(14); 732 | // $joyride-tip-header-weight: bold; 733 | 734 | // This changes the nub size 735 | 736 | // $joyride-tip-nub-size: 14px; 737 | 738 | // This adjusts the styles for the timer when its enabled 739 | 740 | // $joyride-tip-timer-width: 50px; 741 | // $joyride-tip-timer-height: 3px; 742 | // $joyride-tip-timer-color: #666; 743 | 744 | // This changes up the styles for the close button 745 | 746 | // $joyride-tip-close-color: #777; 747 | // $joyride-tip-close-size: 30px; 748 | // $joyride-tip-close-weight: normal; 749 | 750 | // When Joyride is filling the screen, we use this style for the bg 751 | 752 | // $joyride-screenfill: rgba(0,0,0,0.5); 753 | 754 | // 755 | // Keystroke Variables 756 | // 757 | 758 | // We use these to control text styles. 759 | 760 | // $keystroke-font: "Consolas", "Menlo", "Courier", monospace; 761 | // $keystroke-font-size: emCalc(14); 762 | // $keystroke-font-color: #222; 763 | // $keystroke-font-color-alt: #fff; 764 | // $keystroke-function-factor: 7%; 765 | 766 | // We use this to control keystroke padding. 767 | 768 | // $keystroke-padding: emCalc(2, 4, 0); 769 | 770 | // We use these to control background and border styles. 771 | 772 | // $keystroke-bg: darken(#fff, $keystroke-function-factor); 773 | // $keystroke-border-style: solid; 774 | // $keystroke-border-width: 1px; 775 | // $keystroke-border-color: darken($keystroke-bg, $keystroke-function-factor); 776 | // $keystroke-radius: $global-radius; 777 | 778 | // 779 | // Label Variables 780 | // 781 | 782 | // We use these to style the labels 783 | 784 | // $label-padding: emCalc(3, 10, 4); 785 | // $label-radius: $global-radius; 786 | 787 | // We use these to style the label text 788 | 789 | // $label-font-sizing: emCalc(14); 790 | // $label-font-weight: bold; 791 | // $label-font-color: #333; 792 | // $label-font-color-alt: #fff; 793 | 794 | // 795 | // Magellan Variables 796 | // 797 | 798 | // $magellan-bg: #fff; 799 | // $magellan-padding: 10px; 800 | 801 | // 802 | // Orbit Settings 803 | // 804 | 805 | // We use these to control the caption styles 806 | 807 | // $orbit-container-bg: #f5f5f5; 808 | // $orbit-caption-bg-old: rgb(0,0,0); 809 | // $orbit-caption-bg: rgba(0,0,0,0.6); 810 | // $orbit-caption-font-color: #fff; 811 | 812 | // We use these to control the left/right nav styles 813 | 814 | // $orbit-nav-bg-old: rgb(0,0,0); 815 | // $orbit-nav-bg: rgba(0,0,0,0.6); 816 | 817 | // We use these to control the timer styles 818 | 819 | // $orbit-timer-bg-old: rgb(0,0,0); 820 | // $orbit-timer-bg: rgba(0,0,0,0.6); 821 | 822 | // We use these to control the bullet nav styles 823 | 824 | // $orbit-bullet-nav-color: #999; 825 | // $orbit-bullet-nav-color-active: #555; 826 | 827 | // We use thes to controls the style of slide numbers 828 | 829 | // $orbit-slide-number-bg: rgba(0,0,0,0); 830 | // $orbit-slide-number-font-color: #fff; 831 | // $orbit-slide-number-padding: emCalc(5px); 832 | 833 | // Graceful Loading Wrapper and preloader 834 | 835 | // $wrapper-class: "slideshow-wrapper"; 836 | // $preloader-class: "preloader"; 837 | 838 | // 839 | // Pagination Variables 840 | // 841 | 842 | // We use these to control the pagination container 843 | 844 | // $pagination-height: emCalc(24); 845 | // $pagination-margin: emCalc(-5); 846 | 847 | // We use these to set the list-item properties 848 | 849 | // $pagination-li-float: $default-float; 850 | // $pagination-li-height: emCalc(24); 851 | // $pagination-li-font-color: #222; 852 | // $pagination-li-font-size: emCalc(14); 853 | // $pagination-li-margin: emCalc(5); 854 | 855 | // We use these for the pagination anchor links 856 | 857 | // $pagination-link-pad: emCalc(1, 7, 1); 858 | // $pagination-link-font-color: #999; 859 | // $pagination-link-active-bg: darken(#fff, 10%); 860 | 861 | // We use these for disabled anchor links 862 | 863 | // $pagination-link-unavailable-cursor: default; 864 | // $pagination-link-unavailable-font-color: #999; 865 | // $pagination-link-unavailable-bg-active: transparent; 866 | 867 | // We use these for currently selected anchor links 868 | 869 | // $pagination-link-current-background: $primary-color; 870 | // $pagination-link-current-font-color: #fff; 871 | // $pagination-link-current-font-weight: bold; 872 | // $pagination-link-current-cursor: default; 873 | // $pagination-link-current-active-bg: $primary-color; 874 | 875 | // 876 | // Panel Variables 877 | // 878 | 879 | // We use these to control the background and border styles 880 | 881 | // $panel-bg: darken(#fff, 5%); 882 | // $panel-border-style: solid; 883 | // $panel-border-size: 1px; 884 | 885 | // We use this % to control how much we darken things on hover 886 | 887 | // $panel-function-factor: 10%; 888 | // $panel-border-color: darken($panel-bg, $panel-function-factor); 889 | 890 | // We use these to set default inner padding and bottom margin 891 | 892 | // $panel-margin-bottom: emCalc(20); 893 | // $panel-padding: emCalc(20); 894 | 895 | // We use these to set default font colors 896 | 897 | // $panel-font-color: #333; 898 | // $panel-font-color-alt: #fff; 899 | 900 | // $panel-header-adjust: true; 901 | 902 | // 903 | // Pricing Table Variables 904 | // 905 | 906 | // We use this to control the border color 907 | 908 | // $price-table-border: solid 1px #ddd; 909 | 910 | // We use this to control the bottom margin of the pricing table 911 | 912 | // $price-table-margin-bottom: emCalc(20); 913 | 914 | // We use these to control the title styles 915 | 916 | // $price-title-bg: #ddd; 917 | // $price-title-padding: emCalc(15, 20); 918 | // $price-title-align: center; 919 | // $price-title-color: #333; 920 | // $price-title-weight: bold; 921 | // $price-title-size: emCalc(16); 922 | 923 | // We use these to control the price styles 924 | 925 | // $price-money-bg: #eee; 926 | // $price-money-padding: emCalc(15, 20); 927 | // $price-money-align: center; 928 | // $price-money-color: #333; 929 | // $price-money-weight: normal; 930 | // $price-money-size: emCalc(20); 931 | 932 | // We use these to control the description styles 933 | 934 | // $price-bg: #fff; 935 | // $price-desc-color: #777; 936 | // $price-desc-padding: emCalc(15); 937 | // $price-desc-align: center; 938 | // $price-desc-font-size: emCalc(12); 939 | // $price-desc-weight: normal; 940 | // $price-desc-line-height: 1.4; 941 | // $price-desc-bottom-border: dotted 1px #ddd; 942 | 943 | // We use these to control the list item styles 944 | 945 | // $price-item-color: #333; 946 | // $price-item-padding: emCalc(15); 947 | // $price-item-align: center; 948 | // $price-item-font-size: emCalc(14); 949 | // $price-item-weight: normal; 950 | // $price-item-bottom-border: dotted 1px #ddd; 951 | 952 | // We use these to control the CTA area styles 953 | 954 | // $price-cta-bg: #f5f5f5; 955 | // $price-cta-align: center; 956 | // $price-cta-padding: emCalc(20, 20, 0); 957 | 958 | // 959 | // Progress Bar Variables 960 | // 961 | 962 | // We use this to se the prog bar height 963 | 964 | // $progress-bar-height: emCalc(25); 965 | // $progress-bar-color: transparent; 966 | 967 | // We use these to control the border styles 968 | 969 | // $progress-bar-border-color: darken(#fff, 20%); 970 | // $progress-bar-border-size: 1px; 971 | // $progress-bar-border-style: solid; 972 | // $progress-bar-border-radius: $global-radius; 973 | 974 | // We use these to control the margin & padding 975 | 976 | // $progress-bar-pad: emCalc(2); 977 | // $progress-bar-margin-bottom: emCalc(10); 978 | 979 | // We use these to set the meter colors 980 | 981 | // $progress-meter-color: $primary-color; 982 | // $progress-meter-secondary-color: $secondary-color; 983 | // $progress-meter-success-color: $success-color; 984 | // $progress-meter-alert-color: $alert-color; 985 | 986 | // 987 | // Reveal Variables 988 | // 989 | 990 | // We use these to control the style of the reveal overlay. 991 | 992 | // $reveal-overlay-bg: rgba(#000, .45); 993 | // $reveal-overlay-bg-old: #000; 994 | 995 | // We use these to control the style of the modal itself. 996 | 997 | // $reveal-modal-bg: #fff; 998 | // $reveal-position-top: 50px; 999 | // $reveal-default-width: 80%; 1000 | // $reveal-modal-padding: emCalc(20); 1001 | // $reveal-box-shadow: 0 0 10px rgba(#000,.4); 1002 | 1003 | // We use these to style the reveal close button 1004 | 1005 | // $reveal-close-font-size: emCalc(22); 1006 | // $reveal-close-top: emCalc(8); 1007 | // $reveal-close-side: emCalc(11); 1008 | // $reveal-close-color: #aaa; 1009 | // $reveal-close-weight: bold; 1010 | 1011 | // We use these to control the modal border 1012 | 1013 | // $reveal-border-style: solid; 1014 | // $reveal-border-width: 1px; 1015 | // $reveal-border-color: #666; 1016 | 1017 | // $reveal-modal-class: "reveal-modal"; 1018 | // $close-reveal-modal-class: "close-reveal-modal"; 1019 | 1020 | // 1021 | // Section Variables 1022 | // 1023 | 1024 | // We use these to set padding and hover factor 1025 | 1026 | // $section-title-padding: emCalc(15); 1027 | // $section-content-padding: emCalc(15); 1028 | // $section-function-factor: 10%; 1029 | 1030 | // These style the titles 1031 | 1032 | // $section-title-color: #333; 1033 | // $section-title-color-active: #333; 1034 | // $section-title-bg: #efefef; 1035 | // $section-title-bg-active: darken($section-title-bg, $section-function-factor); 1036 | // $section-title-bg-active-tabs: #fff; 1037 | // $section-title-bg-hover: darken($section-title-bg, $section-function-factor / 2); 1038 | 1039 | // Want to control border size, here ya go! 1040 | 1041 | // $section-border-size: 1px; 1042 | // $section-border-style: solid; 1043 | // $section-border-color: #ccc; 1044 | 1045 | // Font controls 1046 | 1047 | // $section-font-size: emCalc(14); 1048 | 1049 | // Control the color of the background and some size options 1050 | 1051 | // $section-content-bg: #fff; 1052 | // $section-vertical-nav-min-width: emCalc(200); 1053 | // $section-vertical-tabs-title-width: emCalc(200); 1054 | // $section-bottom-margin: emCalc(20); 1055 | 1056 | // $title-selector: ".title"; 1057 | // $content-selector: ".content"; 1058 | // $active-region-selector: ".active"; 1059 | 1060 | // 1061 | // Side Nav Variables 1062 | // 1063 | 1064 | // We use this to control padding. 1065 | 1066 | // $side-nav-padding: emCalc(14, 0); 1067 | 1068 | // We use these to control list styles. 1069 | 1070 | // $side-nav-list-type: none; 1071 | // $side-nav-list-position: inside; 1072 | // $side-nav-list-margin: emCalc(0, 0, 7, 0); 1073 | 1074 | // We use these to control link styles. 1075 | 1076 | // $side-nav-link-color: $primary-color; 1077 | // $side-nav-link-color-active: lighten(#000, 30%); 1078 | // $side-nav-font-size: emCalc(14); 1079 | // $side-nav-font-weight: bold; 1080 | 1081 | // We use these to control border styles 1082 | 1083 | // $side-nav-divider-size: 1px; 1084 | // $side-nav-divider-style: solid; 1085 | // $side-nav-divider-color: darken(#fff, 10%); 1086 | 1087 | // 1088 | // Sub Nav Variables 1089 | // 1090 | 1091 | // We use these to control margin and padding 1092 | 1093 | // $sub-nav-list-margin: emCalc(-4, 0, 18); 1094 | // $sub-nav-list-padding-top: emCalc(4); 1095 | 1096 | // We use this to control the definition 1097 | 1098 | // $sub-nav-font-size: emCalc(14); 1099 | // $sub-nav-font-color: #999; 1100 | // $sub-nav-font-weight: normal; 1101 | // $sub-nav-text-decoration: none; 1102 | // $sub-nav-border-radius: 1000px; 1103 | 1104 | // We use these to control the active item styles 1105 | 1106 | // $sub-nav-active-font-weight: bold; 1107 | // $sub-nav-active-bg: $primary-color; 1108 | // $sub-nav-active-color: #fff; 1109 | // $sub-nav-active-padding: emCalc(3, 9); 1110 | // $sub-nav-active-cursor: default; 1111 | 1112 | // 1113 | // Switch Variables 1114 | // 1115 | 1116 | // Controlling border styles and background colors for the switch container 1117 | 1118 | // $switch-border-color: darken(#fff, 20%); 1119 | // $switch-border-style: solid; 1120 | // $switch-border-width: 1px; 1121 | // $switch-bg: #fff; 1122 | 1123 | // We use these to control the switch heights for our default classes 1124 | 1125 | // $switch-height-tny: 22px; 1126 | // $switch-height-sml: 28px; 1127 | // $switch-height-med: 36px; 1128 | // $switch-height-lrg: 44px; 1129 | // $switch-bottom-margin: emCalc(20); 1130 | 1131 | // We use these to control default font sizes for our classes. 1132 | 1133 | // $switch-font-size-tny: 11px; 1134 | // $switch-font-size-sml: 12px; 1135 | // $switch-font-size-med: 14px; 1136 | // $switch-font-size-lrg: 17px; 1137 | // $switch-label-side-padding: 6px; 1138 | 1139 | // We use these to style the switch-paddle 1140 | 1141 | // $switch-paddle-bg: #fff; 1142 | // $switch-paddle-fade-to-color: darken($switch-paddle-bg, 10%); 1143 | // $switch-paddle-border-color: darken($switch-paddle-bg, 35%); 1144 | // $switch-paddle-border-width: 1px; 1145 | // $switch-paddle-border-style: solid; 1146 | // $switch-paddle-transition-speed: .1s; 1147 | // $switch-paddle-transition-ease: ease-out; 1148 | // $switch-positive-color: lighten($success-color, 50%); 1149 | // $switch-negative-color: #f5f5f5; 1150 | 1151 | // Outline Style for tabbing through switches 1152 | 1153 | // $switch-label-outline: 1px dotted #888; 1154 | 1155 | // 1156 | // Table Variables 1157 | // 1158 | 1159 | // These control the background color for the table and even rows 1160 | 1161 | // $table-bg: #fff; 1162 | // $table-even-row-bg: #f9f9f9; 1163 | 1164 | // These control the table cell border style 1165 | 1166 | // $table-border-style: solid; 1167 | // $table-border-size: 1px; 1168 | // $table-border-color: #ddd; 1169 | 1170 | // These control the table head styles 1171 | 1172 | // $table-head-bg: #f5f5f5; 1173 | // $table-head-font-size: emCalc(14); 1174 | // $table-head-font-color: #222; 1175 | // $table-head-font-weight: bold; 1176 | // $table-head-padding: emCalc(8, 10, 10); 1177 | 1178 | // These control the row padding and font styles 1179 | 1180 | // $table-row-padding: emCalc(9, 10); 1181 | // $table-row-font-size: emCalc(14); 1182 | // $table-row-font-color: #222; 1183 | // $table-line-height: emCalc(18); 1184 | 1185 | // These are for controlling the display and margin of tables 1186 | 1187 | // $table-display: table-cell; 1188 | // $table-margin-bottom: emCalc(20); 1189 | 1190 | // 1191 | // Image Thumbnail Variables 1192 | // 1193 | 1194 | // We use these to control border styles 1195 | 1196 | // $thumb-border-style: solid; 1197 | // $thumb-border-width: 4px; 1198 | // $thumb-border-color: #fff; 1199 | // $thumb-box-shadow: 0 0 0 1px rgba(#000,.2); 1200 | // $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5); 1201 | 1202 | // Radius and transition speed for thumbs 1203 | 1204 | // $thumb-radius: $global-radius; 1205 | // $thumb-transition-speed: 200ms; 1206 | 1207 | // 1208 | // Tooltip Variables 1209 | // 1210 | 1211 | // $has-tip-border-bottom: dotted 1px #ccc; 1212 | // $has-tip-font-weight: bold; 1213 | // $has-tip-font-color: #333; 1214 | // $has-tip-border-bottom-hover: dotted 1px darken($primary-color, 20%); 1215 | // $has-tip-font-color-hover: $primary-color; 1216 | // $has-tip-cursor-type: help; 1217 | 1218 | // $tooltip-padding: emCalc(8); 1219 | // $tooltip-bg: #000; 1220 | // $tooltip-font-size: emCalc(15); 1221 | // $tooltip-font-weight: bold; 1222 | // $tooltip-font-color: #fff; 1223 | // $tooltip-line-height: 1.3; 1224 | // $tooltip-close-font-size: emCalc(10); 1225 | // $tooltip-close-font-weight: normal; 1226 | // $tooltip-close-font-color: #888; 1227 | // $tooltip-font-size-sml: emCalc(14); 1228 | // $tooltip-radius: $global-radius; 1229 | // $tooltip-pip-size: 5px; 1230 | 1231 | // 1232 | // Top Bar Variables 1233 | // 1234 | 1235 | // Background color for the top bar 1236 | 1237 | // $topbar-bg: #111; 1238 | 1239 | // Height and margin 1240 | 1241 | // $topbar-height: 45px; 1242 | // $topbar-margin-bottom: emCalc(30); 1243 | 1244 | // Control Input height for top bar 1245 | 1246 | // $topbar-input-height: 2.45em; 1247 | 1248 | // Controlling the styles for the title in the top bar 1249 | 1250 | // $topbar-title-weight: bold; 1251 | // $topbar-title-font-size: emCalc(17); 1252 | 1253 | // Style the top bar dropdown elements 1254 | 1255 | // $topbar-dropdown-bg: #222; 1256 | // $topbar-dropdown-link-color: #fff; 1257 | // $topbar-dropdown-link-bg: lighten($topbar-bg, 5%); 1258 | // $topbar-dropdown-toggle-size: 5px; 1259 | // $topbar-dropdown-toggle-color: #fff; 1260 | // $topbar-dropdown-toggle-alpha: 0.5; 1261 | 1262 | // Set the link colors and styles for top-level nav 1263 | 1264 | // $topbar-link-color: #fff; 1265 | // $topbar-link-color-hover: #fff; 1266 | // $topbar-link-color-active: #fff; 1267 | // $topbar-link-weight: bold; 1268 | // $topbar-link-font-size: emCalc(13); 1269 | // $topbar-link-hover-lightness: -30%; // Darken by 30% 1270 | // $topbar-link-bg-hover: darken($topbar-bg, 3%); 1271 | // $topbar-link-bg-active: darken($topbar-bg, 3%); 1272 | 1273 | // $topbar-dropdown-label-color: #555; 1274 | // $topbar-dropdown-label-text-transform: uppercase; 1275 | // $topbar-dropdown-label-font-weight: bold; 1276 | // $topbar-dropdown-label-font-size: emCalc(10); 1277 | 1278 | // Top menu icon styles 1279 | 1280 | // $topbar-menu-link-transform: uppercase; 1281 | // $topbar-menu-link-font-size: emCalc(13); 1282 | // $topbar-menu-link-weight: bold; 1283 | // $topbar-menu-link-color: #fff; 1284 | // $topbar-menu-icon-color: #fff; 1285 | // $topbar-menu-link-color-toggled: #888; 1286 | // $topbar-menu-icon-color-toggled: #888; 1287 | 1288 | // Transitions and breakpoint styles 1289 | 1290 | // $topbar-transition-speed: 300ms; 1291 | // $topbar-breakpoint: emCalc(940); // Change to 9999px for always mobile layout 1292 | // $topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})"; 1293 | 1294 | // Divider Styles 1295 | 1296 | // $topbar-divider-border-bottom: solid 1px lighten($topbar-bg, 10%); 1297 | // $topbar-divider-border-top: solid 1px darken($topbar-bg, 10%); 1298 | 1299 | // Sticky Class 1300 | 1301 | // $topbar-sticky-class: ".sticky"; 1302 | -------------------------------------------------------------------------------- /_source/assets/js/zepto.js: -------------------------------------------------------------------------------- 1 | /* Zepto v1.0-1-ga3cab6c - polyfill zepto detect event ajax form fx - zeptojs.com/license */ 2 | 3 | 4 | ;(function(undefined){ 5 | if (String.prototype.trim === undefined) // fix for iOS 3.2 6 | String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, '') } 7 | 8 | // For iOS 3.x 9 | // from https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce 10 | if (Array.prototype.reduce === undefined) 11 | Array.prototype.reduce = function(fun){ 12 | if(this === void 0 || this === null) throw new TypeError() 13 | var t = Object(this), len = t.length >>> 0, k = 0, accumulator 14 | if(typeof fun != 'function') throw new TypeError() 15 | if(len == 0 && arguments.length == 1) throw new TypeError() 16 | 17 | if(arguments.length >= 2) 18 | accumulator = arguments[1] 19 | else 20 | do{ 21 | if(k in t){ 22 | accumulator = t[k++] 23 | break 24 | } 25 | if(++k >= len) throw new TypeError() 26 | } while (true) 27 | 28 | while (k < len){ 29 | if(k in t) accumulator = fun.call(undefined, accumulator, t[k], k, t) 30 | k++ 31 | } 32 | return accumulator 33 | } 34 | 35 | })() 36 | 37 | var Zepto = (function() { 38 | var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter, 39 | document = window.document, 40 | elementDisplay = {}, classCache = {}, 41 | getComputedStyle = document.defaultView.getComputedStyle, 42 | cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 }, 43 | fragmentRE = /^\s*<(\w+|!)[^>]*>/, 44 | tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, 45 | rootNodeRE = /^(?:body|html)$/i, 46 | 47 | // special attributes that should be get/set via method calls 48 | methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], 49 | 50 | adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], 51 | table = document.createElement('table'), 52 | tableRow = document.createElement('tr'), 53 | containers = { 54 | 'tr': document.createElement('tbody'), 55 | 'tbody': table, 'thead': table, 'tfoot': table, 56 | 'td': tableRow, 'th': tableRow, 57 | '*': document.createElement('div') 58 | }, 59 | readyRE = /complete|loaded|interactive/, 60 | classSelectorRE = /^\.([\w-]+)$/, 61 | idSelectorRE = /^#([\w-]*)$/, 62 | tagSelectorRE = /^[\w-]+$/, 63 | class2type = {}, 64 | toString = class2type.toString, 65 | zepto = {}, 66 | camelize, uniq, 67 | tempParent = document.createElement('div') 68 | 69 | zepto.matches = function(element, selector) { 70 | if (!element || element.nodeType !== 1) return false 71 | var matchesSelector = element.webkitMatchesSelector || element.mozMatchesSelector || 72 | element.oMatchesSelector || element.matchesSelector 73 | if (matchesSelector) return matchesSelector.call(element, selector) 74 | // fall back to performing a selector: 75 | var match, parent = element.parentNode, temp = !parent 76 | if (temp) (parent = tempParent).appendChild(element) 77 | match = ~zepto.qsa(parent, selector).indexOf(element) 78 | temp && tempParent.removeChild(element) 79 | return match 80 | } 81 | 82 | function type(obj) { 83 | return obj == null ? String(obj) : 84 | class2type[toString.call(obj)] || "object" 85 | } 86 | 87 | function isFunction(value) { return type(value) == "function" } 88 | function isWindow(obj) { return obj != null && obj == obj.window } 89 | function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE } 90 | function isObject(obj) { return type(obj) == "object" } 91 | function isPlainObject(obj) { 92 | return isObject(obj) && !isWindow(obj) && obj.__proto__ == Object.prototype 93 | } 94 | function isArray(value) { return value instanceof Array } 95 | function likeArray(obj) { return typeof obj.length == 'number' } 96 | 97 | function compact(array) { return filter.call(array, function(item){ return item != null }) } 98 | function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array } 99 | camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) } 100 | function dasherize(str) { 101 | return str.replace(/::/g, '/') 102 | .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') 103 | .replace(/([a-z\d])([A-Z])/g, '$1_$2') 104 | .replace(/_/g, '-') 105 | .toLowerCase() 106 | } 107 | uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) } 108 | 109 | function classRE(name) { 110 | return name in classCache ? 111 | classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)')) 112 | } 113 | 114 | function maybeAddPx(name, value) { 115 | return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value 116 | } 117 | 118 | function defaultDisplay(nodeName) { 119 | var element, display 120 | if (!elementDisplay[nodeName]) { 121 | element = document.createElement(nodeName) 122 | document.body.appendChild(element) 123 | display = getComputedStyle(element, '').getPropertyValue("display") 124 | element.parentNode.removeChild(element) 125 | display == "none" && (display = "block") 126 | elementDisplay[nodeName] = display 127 | } 128 | return elementDisplay[nodeName] 129 | } 130 | 131 | function children(element) { 132 | return 'children' in element ? 133 | slice.call(element.children) : 134 | $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node }) 135 | } 136 | 137 | // `$.zepto.fragment` takes a html string and an optional tag name 138 | // to generate DOM nodes nodes from the given html string. 139 | // The generated DOM nodes are returned as an array. 140 | // This function can be overriden in plugins for example to make 141 | // it compatible with browsers that don't support the DOM fully. 142 | zepto.fragment = function(html, name, properties) { 143 | if (html.replace) html = html.replace(tagExpanderRE, "<$1>") 144 | if (name === undefined) name = fragmentRE.test(html) && RegExp.$1 145 | if (!(name in containers)) name = '*' 146 | 147 | var nodes, dom, container = containers[name] 148 | container.innerHTML = '' + html 149 | dom = $.each(slice.call(container.childNodes), function(){ 150 | container.removeChild(this) 151 | }) 152 | if (isPlainObject(properties)) { 153 | nodes = $(dom) 154 | $.each(properties, function(key, value) { 155 | if (methodAttributes.indexOf(key) > -1) nodes[key](value) 156 | else nodes.attr(key, value) 157 | }) 158 | } 159 | return dom 160 | } 161 | 162 | // `$.zepto.Z` swaps out the prototype of the given `dom` array 163 | // of nodes with `$.fn` and thus supplying all the Zepto functions 164 | // to the array. Note that `__proto__` is not supported on Internet 165 | // Explorer. This method can be overriden in plugins. 166 | zepto.Z = function(dom, selector) { 167 | dom = dom || [] 168 | dom.__proto__ = $.fn 169 | dom.selector = selector || '' 170 | return dom 171 | } 172 | 173 | // `$.zepto.isZ` should return `true` if the given object is a Zepto 174 | // collection. This method can be overriden in plugins. 175 | zepto.isZ = function(object) { 176 | return object instanceof zepto.Z 177 | } 178 | 179 | // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and 180 | // takes a CSS selector and an optional context (and handles various 181 | // special cases). 182 | // This method can be overriden in plugins. 183 | zepto.init = function(selector, context) { 184 | // If nothing given, return an empty Zepto collection 185 | if (!selector) return zepto.Z() 186 | // If a function is given, call it when the DOM is ready 187 | else if (isFunction(selector)) return $(document).ready(selector) 188 | // If a Zepto collection is given, juts return it 189 | else if (zepto.isZ(selector)) return selector 190 | else { 191 | var dom 192 | // normalize array if an array of nodes is given 193 | if (isArray(selector)) dom = compact(selector) 194 | // Wrap DOM nodes. If a plain object is given, duplicate it. 195 | else if (isObject(selector)) 196 | dom = [isPlainObject(selector) ? $.extend({}, selector) : selector], selector = null 197 | // If it's a html fragment, create nodes from it 198 | else if (fragmentRE.test(selector)) 199 | dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null 200 | // If there's a context, create a collection on that context first, and select 201 | // nodes from there 202 | else if (context !== undefined) return $(context).find(selector) 203 | // And last but no least, if it's a CSS selector, use it to select nodes. 204 | else dom = zepto.qsa(document, selector) 205 | // create a new Zepto collection from the nodes found 206 | return zepto.Z(dom, selector) 207 | } 208 | } 209 | 210 | // `$` will be the base `Zepto` object. When calling this 211 | // function just call `$.zepto.init, which makes the implementation 212 | // details of selecting nodes and creating Zepto collections 213 | // patchable in plugins. 214 | $ = function(selector, context){ 215 | return zepto.init(selector, context) 216 | } 217 | 218 | function extend(target, source, deep) { 219 | for (key in source) 220 | if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { 221 | if (isPlainObject(source[key]) && !isPlainObject(target[key])) 222 | target[key] = {} 223 | if (isArray(source[key]) && !isArray(target[key])) 224 | target[key] = [] 225 | extend(target[key], source[key], deep) 226 | } 227 | else if (source[key] !== undefined) target[key] = source[key] 228 | } 229 | 230 | // Copy all but undefined properties from one or more 231 | // objects to the `target` object. 232 | $.extend = function(target){ 233 | var deep, args = slice.call(arguments, 1) 234 | if (typeof target == 'boolean') { 235 | deep = target 236 | target = args.shift() 237 | } 238 | args.forEach(function(arg){ extend(target, arg, deep) }) 239 | return target 240 | } 241 | 242 | // `$.zepto.qsa` is Zepto's CSS selector implementation which 243 | // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`. 244 | // This method can be overriden in plugins. 245 | zepto.qsa = function(element, selector){ 246 | var found 247 | return (isDocument(element) && idSelectorRE.test(selector)) ? 248 | ( (found = element.getElementById(RegExp.$1)) ? [found] : [] ) : 249 | (element.nodeType !== 1 && element.nodeType !== 9) ? [] : 250 | slice.call( 251 | classSelectorRE.test(selector) ? element.getElementsByClassName(RegExp.$1) : 252 | tagSelectorRE.test(selector) ? element.getElementsByTagName(selector) : 253 | element.querySelectorAll(selector) 254 | ) 255 | } 256 | 257 | function filtered(nodes, selector) { 258 | return selector === undefined ? $(nodes) : $(nodes).filter(selector) 259 | } 260 | 261 | $.contains = function(parent, node) { 262 | return parent !== node && parent.contains(node) 263 | } 264 | 265 | function funcArg(context, arg, idx, payload) { 266 | return isFunction(arg) ? arg.call(context, idx, payload) : arg 267 | } 268 | 269 | function setAttribute(node, name, value) { 270 | value == null ? node.removeAttribute(name) : node.setAttribute(name, value) 271 | } 272 | 273 | // access className property while respecting SVGAnimatedString 274 | function className(node, value){ 275 | var klass = node.className, 276 | svg = klass && klass.baseVal !== undefined 277 | 278 | if (value === undefined) return svg ? klass.baseVal : klass 279 | svg ? (klass.baseVal = value) : (node.className = value) 280 | } 281 | 282 | // "true" => true 283 | // "false" => false 284 | // "null" => null 285 | // "42" => 42 286 | // "42.5" => 42.5 287 | // JSON => parse if valid 288 | // String => self 289 | function deserializeValue(value) { 290 | var num 291 | try { 292 | return value ? 293 | value == "true" || 294 | ( value == "false" ? false : 295 | value == "null" ? null : 296 | !isNaN(num = Number(value)) ? num : 297 | /^[\[\{]/.test(value) ? $.parseJSON(value) : 298 | value ) 299 | : value 300 | } catch(e) { 301 | return value 302 | } 303 | } 304 | 305 | $.type = type 306 | $.isFunction = isFunction 307 | $.isWindow = isWindow 308 | $.isArray = isArray 309 | $.isPlainObject = isPlainObject 310 | 311 | $.isEmptyObject = function(obj) { 312 | var name 313 | for (name in obj) return false 314 | return true 315 | } 316 | 317 | $.inArray = function(elem, array, i){ 318 | return emptyArray.indexOf.call(array, elem, i) 319 | } 320 | 321 | $.camelCase = camelize 322 | $.trim = function(str) { return str.trim() } 323 | 324 | // plugin compatibility 325 | $.uuid = 0 326 | $.support = { } 327 | $.expr = { } 328 | 329 | $.map = function(elements, callback){ 330 | var value, values = [], i, key 331 | if (likeArray(elements)) 332 | for (i = 0; i < elements.length; i++) { 333 | value = callback(elements[i], i) 334 | if (value != null) values.push(value) 335 | } 336 | else 337 | for (key in elements) { 338 | value = callback(elements[key], key) 339 | if (value != null) values.push(value) 340 | } 341 | return flatten(values) 342 | } 343 | 344 | $.each = function(elements, callback){ 345 | var i, key 346 | if (likeArray(elements)) { 347 | for (i = 0; i < elements.length; i++) 348 | if (callback.call(elements[i], i, elements[i]) === false) return elements 349 | } else { 350 | for (key in elements) 351 | if (callback.call(elements[key], key, elements[key]) === false) return elements 352 | } 353 | 354 | return elements 355 | } 356 | 357 | $.grep = function(elements, callback){ 358 | return filter.call(elements, callback) 359 | } 360 | 361 | if (window.JSON) $.parseJSON = JSON.parse 362 | 363 | // Populate the class2type map 364 | $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { 365 | class2type[ "[object " + name + "]" ] = name.toLowerCase() 366 | }) 367 | 368 | // Define methods that will be available on all 369 | // Zepto collections 370 | $.fn = { 371 | // Because a collection acts like an array 372 | // copy over these useful array functions. 373 | forEach: emptyArray.forEach, 374 | reduce: emptyArray.reduce, 375 | push: emptyArray.push, 376 | sort: emptyArray.sort, 377 | indexOf: emptyArray.indexOf, 378 | concat: emptyArray.concat, 379 | 380 | // `map` and `slice` in the jQuery API work differently 381 | // from their array counterparts 382 | map: function(fn){ 383 | return $($.map(this, function(el, i){ return fn.call(el, i, el) })) 384 | }, 385 | slice: function(){ 386 | return $(slice.apply(this, arguments)) 387 | }, 388 | 389 | ready: function(callback){ 390 | if (readyRE.test(document.readyState)) callback($) 391 | else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false) 392 | return this 393 | }, 394 | get: function(idx){ 395 | return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length] 396 | }, 397 | toArray: function(){ return this.get() }, 398 | size: function(){ 399 | return this.length 400 | }, 401 | remove: function(){ 402 | return this.each(function(){ 403 | if (this.parentNode != null) 404 | this.parentNode.removeChild(this) 405 | }) 406 | }, 407 | each: function(callback){ 408 | emptyArray.every.call(this, function(el, idx){ 409 | return callback.call(el, idx, el) !== false 410 | }) 411 | return this 412 | }, 413 | filter: function(selector){ 414 | if (isFunction(selector)) return this.not(this.not(selector)) 415 | return $(filter.call(this, function(element){ 416 | return zepto.matches(element, selector) 417 | })) 418 | }, 419 | add: function(selector,context){ 420 | return $(uniq(this.concat($(selector,context)))) 421 | }, 422 | is: function(selector){ 423 | return this.length > 0 && zepto.matches(this[0], selector) 424 | }, 425 | not: function(selector){ 426 | var nodes=[] 427 | if (isFunction(selector) && selector.call !== undefined) 428 | this.each(function(idx){ 429 | if (!selector.call(this,idx)) nodes.push(this) 430 | }) 431 | else { 432 | var excludes = typeof selector == 'string' ? this.filter(selector) : 433 | (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector) 434 | this.forEach(function(el){ 435 | if (excludes.indexOf(el) < 0) nodes.push(el) 436 | }) 437 | } 438 | return $(nodes) 439 | }, 440 | has: function(selector){ 441 | return this.filter(function(){ 442 | return isObject(selector) ? 443 | $.contains(this, selector) : 444 | $(this).find(selector).size() 445 | }) 446 | }, 447 | eq: function(idx){ 448 | return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1) 449 | }, 450 | first: function(){ 451 | var el = this[0] 452 | return el && !isObject(el) ? el : $(el) 453 | }, 454 | last: function(){ 455 | var el = this[this.length - 1] 456 | return el && !isObject(el) ? el : $(el) 457 | }, 458 | find: function(selector){ 459 | var result, $this = this 460 | if (typeof selector == 'object') 461 | result = $(selector).filter(function(){ 462 | var node = this 463 | return emptyArray.some.call($this, function(parent){ 464 | return $.contains(parent, node) 465 | }) 466 | }) 467 | else if (this.length == 1) result = $(zepto.qsa(this[0], selector)) 468 | else result = this.map(function(){ return zepto.qsa(this, selector) }) 469 | return result 470 | }, 471 | closest: function(selector, context){ 472 | var node = this[0], collection = false 473 | if (typeof selector == 'object') collection = $(selector) 474 | while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) 475 | node = node !== context && !isDocument(node) && node.parentNode 476 | return $(node) 477 | }, 478 | parents: function(selector){ 479 | var ancestors = [], nodes = this 480 | while (nodes.length > 0) 481 | nodes = $.map(nodes, function(node){ 482 | if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) { 483 | ancestors.push(node) 484 | return node 485 | } 486 | }) 487 | return filtered(ancestors, selector) 488 | }, 489 | parent: function(selector){ 490 | return filtered(uniq(this.pluck('parentNode')), selector) 491 | }, 492 | children: function(selector){ 493 | return filtered(this.map(function(){ return children(this) }), selector) 494 | }, 495 | contents: function() { 496 | return this.map(function() { return slice.call(this.childNodes) }) 497 | }, 498 | siblings: function(selector){ 499 | return filtered(this.map(function(i, el){ 500 | return filter.call(children(el.parentNode), function(child){ return child!==el }) 501 | }), selector) 502 | }, 503 | empty: function(){ 504 | return this.each(function(){ this.innerHTML = '' }) 505 | }, 506 | // `pluck` is borrowed from Prototype.js 507 | pluck: function(property){ 508 | return $.map(this, function(el){ return el[property] }) 509 | }, 510 | show: function(){ 511 | return this.each(function(){ 512 | this.style.display == "none" && (this.style.display = null) 513 | if (getComputedStyle(this, '').getPropertyValue("display") == "none") 514 | this.style.display = defaultDisplay(this.nodeName) 515 | }) 516 | }, 517 | replaceWith: function(newContent){ 518 | return this.before(newContent).remove() 519 | }, 520 | wrap: function(structure){ 521 | var func = isFunction(structure) 522 | if (this[0] && !func) 523 | var dom = $(structure).get(0), 524 | clone = dom.parentNode || this.length > 1 525 | 526 | return this.each(function(index){ 527 | $(this).wrapAll( 528 | func ? structure.call(this, index) : 529 | clone ? dom.cloneNode(true) : dom 530 | ) 531 | }) 532 | }, 533 | wrapAll: function(structure){ 534 | if (this[0]) { 535 | $(this[0]).before(structure = $(structure)) 536 | var children 537 | // drill down to the inmost element 538 | while ((children = structure.children()).length) structure = children.first() 539 | $(structure).append(this) 540 | } 541 | return this 542 | }, 543 | wrapInner: function(structure){ 544 | var func = isFunction(structure) 545 | return this.each(function(index){ 546 | var self = $(this), contents = self.contents(), 547 | dom = func ? structure.call(this, index) : structure 548 | contents.length ? contents.wrapAll(dom) : self.append(dom) 549 | }) 550 | }, 551 | unwrap: function(){ 552 | this.parent().each(function(){ 553 | $(this).replaceWith($(this).children()) 554 | }) 555 | return this 556 | }, 557 | clone: function(){ 558 | return this.map(function(){ return this.cloneNode(true) }) 559 | }, 560 | hide: function(){ 561 | return this.css("display", "none") 562 | }, 563 | toggle: function(setting){ 564 | return this.each(function(){ 565 | var el = $(this) 566 | ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide() 567 | }) 568 | }, 569 | prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') }, 570 | next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') }, 571 | html: function(html){ 572 | return html === undefined ? 573 | (this.length > 0 ? this[0].innerHTML : null) : 574 | this.each(function(idx){ 575 | var originHtml = this.innerHTML 576 | $(this).empty().append( funcArg(this, html, idx, originHtml) ) 577 | }) 578 | }, 579 | text: function(text){ 580 | return text === undefined ? 581 | (this.length > 0 ? this[0].textContent : null) : 582 | this.each(function(){ this.textContent = text }) 583 | }, 584 | attr: function(name, value){ 585 | var result 586 | return (typeof name == 'string' && value === undefined) ? 587 | (this.length == 0 || this[0].nodeType !== 1 ? undefined : 588 | (name == 'value' && this[0].nodeName == 'INPUT') ? this.val() : 589 | (!(result = this[0].getAttribute(name)) && name in this[0]) ? this[0][name] : result 590 | ) : 591 | this.each(function(idx){ 592 | if (this.nodeType !== 1) return 593 | if (isObject(name)) for (key in name) setAttribute(this, key, name[key]) 594 | else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name))) 595 | }) 596 | }, 597 | removeAttr: function(name){ 598 | return this.each(function(){ this.nodeType === 1 && setAttribute(this, name) }) 599 | }, 600 | prop: function(name, value){ 601 | return (value === undefined) ? 602 | (this[0] && this[0][name]) : 603 | this.each(function(idx){ 604 | this[name] = funcArg(this, value, idx, this[name]) 605 | }) 606 | }, 607 | data: function(name, value){ 608 | var data = this.attr('data-' + dasherize(name), value) 609 | return data !== null ? deserializeValue(data) : undefined 610 | }, 611 | val: function(value){ 612 | return (value === undefined) ? 613 | (this[0] && (this[0].multiple ? 614 | $(this[0]).find('option').filter(function(o){ return this.selected }).pluck('value') : 615 | this[0].value) 616 | ) : 617 | this.each(function(idx){ 618 | this.value = funcArg(this, value, idx, this.value) 619 | }) 620 | }, 621 | offset: function(coordinates){ 622 | if (coordinates) return this.each(function(index){ 623 | var $this = $(this), 624 | coords = funcArg(this, coordinates, index, $this.offset()), 625 | parentOffset = $this.offsetParent().offset(), 626 | props = { 627 | top: coords.top - parentOffset.top, 628 | left: coords.left - parentOffset.left 629 | } 630 | 631 | if ($this.css('position') == 'static') props['position'] = 'relative' 632 | $this.css(props) 633 | }) 634 | if (this.length==0) return null 635 | var obj = this[0].getBoundingClientRect() 636 | return { 637 | left: obj.left + window.pageXOffset, 638 | top: obj.top + window.pageYOffset, 639 | width: Math.round(obj.width), 640 | height: Math.round(obj.height) 641 | } 642 | }, 643 | css: function(property, value){ 644 | if (arguments.length < 2 && typeof property == 'string') 645 | return this[0] && (this[0].style[camelize(property)] || getComputedStyle(this[0], '').getPropertyValue(property)) 646 | 647 | var css = '' 648 | if (type(property) == 'string') { 649 | if (!value && value !== 0) 650 | this.each(function(){ this.style.removeProperty(dasherize(property)) }) 651 | else 652 | css = dasherize(property) + ":" + maybeAddPx(property, value) 653 | } else { 654 | for (key in property) 655 | if (!property[key] && property[key] !== 0) 656 | this.each(function(){ this.style.removeProperty(dasherize(key)) }) 657 | else 658 | css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';' 659 | } 660 | 661 | return this.each(function(){ this.style.cssText += ';' + css }) 662 | }, 663 | index: function(element){ 664 | return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]) 665 | }, 666 | hasClass: function(name){ 667 | return emptyArray.some.call(this, function(el){ 668 | return this.test(className(el)) 669 | }, classRE(name)) 670 | }, 671 | addClass: function(name){ 672 | return this.each(function(idx){ 673 | classList = [] 674 | var cls = className(this), newName = funcArg(this, name, idx, cls) 675 | newName.split(/\s+/g).forEach(function(klass){ 676 | if (!$(this).hasClass(klass)) classList.push(klass) 677 | }, this) 678 | classList.length && className(this, cls + (cls ? " " : "") + classList.join(" ")) 679 | }) 680 | }, 681 | removeClass: function(name){ 682 | return this.each(function(idx){ 683 | if (name === undefined) return className(this, '') 684 | classList = className(this) 685 | funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){ 686 | classList = classList.replace(classRE(klass), " ") 687 | }) 688 | className(this, classList.trim()) 689 | }) 690 | }, 691 | toggleClass: function(name, when){ 692 | return this.each(function(idx){ 693 | var $this = $(this), names = funcArg(this, name, idx, className(this)) 694 | names.split(/\s+/g).forEach(function(klass){ 695 | (when === undefined ? !$this.hasClass(klass) : when) ? 696 | $this.addClass(klass) : $this.removeClass(klass) 697 | }) 698 | }) 699 | }, 700 | scrollTop: function(){ 701 | if (!this.length) return 702 | return ('scrollTop' in this[0]) ? this[0].scrollTop : this[0].scrollY 703 | }, 704 | position: function() { 705 | if (!this.length) return 706 | 707 | var elem = this[0], 708 | // Get *real* offsetParent 709 | offsetParent = this.offsetParent(), 710 | // Get correct offsets 711 | offset = this.offset(), 712 | parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset() 713 | 714 | // Subtract element margins 715 | // note: when an element has margin: auto the offsetLeft and marginLeft 716 | // are the same in Safari causing offset.left to incorrectly be 0 717 | offset.top -= parseFloat( $(elem).css('margin-top') ) || 0 718 | offset.left -= parseFloat( $(elem).css('margin-left') ) || 0 719 | 720 | // Add offsetParent borders 721 | parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0 722 | parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0 723 | 724 | // Subtract the two offsets 725 | return { 726 | top: offset.top - parentOffset.top, 727 | left: offset.left - parentOffset.left 728 | } 729 | }, 730 | offsetParent: function() { 731 | return this.map(function(){ 732 | var parent = this.offsetParent || document.body 733 | while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") 734 | parent = parent.offsetParent 735 | return parent 736 | }) 737 | } 738 | } 739 | 740 | // for now 741 | $.fn.detach = $.fn.remove 742 | 743 | // Generate the `width` and `height` functions 744 | ;['width', 'height'].forEach(function(dimension){ 745 | $.fn[dimension] = function(value){ 746 | var offset, el = this[0], 747 | Dimension = dimension.replace(/./, function(m){ return m[0].toUpperCase() }) 748 | if (value === undefined) return isWindow(el) ? el['inner' + Dimension] : 749 | isDocument(el) ? el.documentElement['offset' + Dimension] : 750 | (offset = this.offset()) && offset[dimension] 751 | else return this.each(function(idx){ 752 | el = $(this) 753 | el.css(dimension, funcArg(this, value, idx, el[dimension]())) 754 | }) 755 | } 756 | }) 757 | 758 | function traverseNode(node, fun) { 759 | fun(node) 760 | for (var key in node.childNodes) traverseNode(node.childNodes[key], fun) 761 | } 762 | 763 | // Generate the `after`, `prepend`, `before`, `append`, 764 | // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods. 765 | adjacencyOperators.forEach(function(operator, operatorIndex) { 766 | var inside = operatorIndex % 2 //=> prepend, append 767 | 768 | $.fn[operator] = function(){ 769 | // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings 770 | var argType, nodes = $.map(arguments, function(arg) { 771 | argType = type(arg) 772 | return argType == "object" || argType == "array" || arg == null ? 773 | arg : zepto.fragment(arg) 774 | }), 775 | parent, copyByClone = this.length > 1 776 | if (nodes.length < 1) return this 777 | 778 | return this.each(function(_, target){ 779 | parent = inside ? target : target.parentNode 780 | 781 | // convert all methods to a "before" operation 782 | target = operatorIndex == 0 ? target.nextSibling : 783 | operatorIndex == 1 ? target.firstChild : 784 | operatorIndex == 2 ? target : 785 | null 786 | 787 | nodes.forEach(function(node){ 788 | if (copyByClone) node = node.cloneNode(true) 789 | else if (!parent) return $(node).remove() 790 | 791 | traverseNode(parent.insertBefore(node, target), function(el){ 792 | if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && 793 | (!el.type || el.type === 'text/javascript') && !el.src) 794 | window['eval'].call(window, el.innerHTML) 795 | }) 796 | }) 797 | }) 798 | } 799 | 800 | // after => insertAfter 801 | // prepend => prependTo 802 | // before => insertBefore 803 | // append => appendTo 804 | $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){ 805 | $(html)[operator](this) 806 | return this 807 | } 808 | }) 809 | 810 | zepto.Z.prototype = $.fn 811 | 812 | // Export internal API functions in the `$.zepto` namespace 813 | zepto.uniq = uniq 814 | zepto.deserializeValue = deserializeValue 815 | $.zepto = zepto 816 | 817 | return $ 818 | })() 819 | 820 | window.Zepto = Zepto 821 | '$' in window || (window.$ = Zepto) 822 | 823 | ;(function($){ 824 | function detect(ua){ 825 | var os = this.os = {}, browser = this.browser = {}, 826 | webkit = ua.match(/WebKit\/([\d.]+)/), 827 | android = ua.match(/(Android)\s+([\d.]+)/), 828 | ipad = ua.match(/(iPad).*OS\s([\d_]+)/), 829 | iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/), 830 | webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/), 831 | touchpad = webos && ua.match(/TouchPad/), 832 | kindle = ua.match(/Kindle\/([\d.]+)/), 833 | silk = ua.match(/Silk\/([\d._]+)/), 834 | blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/), 835 | bb10 = ua.match(/(BB10).*Version\/([\d.]+)/), 836 | rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/), 837 | playbook = ua.match(/PlayBook/), 838 | chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/), 839 | firefox = ua.match(/Firefox\/([\d.]+)/) 840 | 841 | // Todo: clean this up with a better OS/browser seperation: 842 | // - discern (more) between multiple browsers on android 843 | // - decide if kindle fire in silk mode is android or not 844 | // - Firefox on Android doesn't specify the Android version 845 | // - possibly devide in os, device and browser hashes 846 | 847 | if (browser.webkit = !!webkit) browser.version = webkit[1] 848 | 849 | if (android) os.android = true, os.version = android[2] 850 | if (iphone) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.') 851 | if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.') 852 | if (webos) os.webos = true, os.version = webos[2] 853 | if (touchpad) os.touchpad = true 854 | if (blackberry) os.blackberry = true, os.version = blackberry[2] 855 | if (bb10) os.bb10 = true, os.version = bb10[2] 856 | if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2] 857 | if (playbook) browser.playbook = true 858 | if (kindle) os.kindle = true, os.version = kindle[1] 859 | if (silk) browser.silk = true, browser.version = silk[1] 860 | if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true 861 | if (chrome) browser.chrome = true, browser.version = chrome[1] 862 | if (firefox) browser.firefox = true, browser.version = firefox[1] 863 | 864 | os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) || (firefox && ua.match(/Tablet/))) 865 | os.phone = !!(!os.tablet && (android || iphone || webos || blackberry || bb10 || 866 | (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) || (firefox && ua.match(/Mobile/)))) 867 | } 868 | 869 | detect.call($, navigator.userAgent) 870 | // make available to unit tests 871 | $.__detect = detect 872 | 873 | })(Zepto) 874 | 875 | ;(function($){ 876 | var $$ = $.zepto.qsa, handlers = {}, _zid = 1, specialEvents={}, 877 | hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } 878 | 879 | specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' 880 | 881 | function zid(element) { 882 | return element._zid || (element._zid = _zid++) 883 | } 884 | function findHandlers(element, event, fn, selector) { 885 | event = parse(event) 886 | if (event.ns) var matcher = matcherFor(event.ns) 887 | return (handlers[zid(element)] || []).filter(function(handler) { 888 | return handler 889 | && (!event.e || handler.e == event.e) 890 | && (!event.ns || matcher.test(handler.ns)) 891 | && (!fn || zid(handler.fn) === zid(fn)) 892 | && (!selector || handler.sel == selector) 893 | }) 894 | } 895 | function parse(event) { 896 | var parts = ('' + event).split('.') 897 | return {e: parts[0], ns: parts.slice(1).sort().join(' ')} 898 | } 899 | function matcherFor(ns) { 900 | return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') 901 | } 902 | 903 | function eachEvent(events, fn, iterator){ 904 | if ($.type(events) != "string") $.each(events, iterator) 905 | else events.split(/\s/).forEach(function(type){ iterator(type, fn) }) 906 | } 907 | 908 | function eventCapture(handler, captureSetting) { 909 | return handler.del && 910 | (handler.e == 'focus' || handler.e == 'blur') || 911 | !!captureSetting 912 | } 913 | 914 | function realEvent(type) { 915 | return hover[type] || type 916 | } 917 | 918 | function add(element, events, fn, selector, getDelegate, capture){ 919 | var id = zid(element), set = (handlers[id] || (handlers[id] = [])) 920 | eachEvent(events, fn, function(event, fn){ 921 | var handler = parse(event) 922 | handler.fn = fn 923 | handler.sel = selector 924 | // emulate mouseenter, mouseleave 925 | if (handler.e in hover) fn = function(e){ 926 | var related = e.relatedTarget 927 | if (!related || (related !== this && !$.contains(this, related))) 928 | return handler.fn.apply(this, arguments) 929 | } 930 | handler.del = getDelegate && getDelegate(fn, event) 931 | var callback = handler.del || fn 932 | handler.proxy = function (e) { 933 | var result = callback.apply(element, [e].concat(e.data)) 934 | if (result === false) e.preventDefault(), e.stopPropagation() 935 | return result 936 | } 937 | handler.i = set.length 938 | set.push(handler) 939 | element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) 940 | }) 941 | } 942 | function remove(element, events, fn, selector, capture){ 943 | var id = zid(element) 944 | eachEvent(events || '', fn, function(event, fn){ 945 | findHandlers(element, event, fn, selector).forEach(function(handler){ 946 | delete handlers[id][handler.i] 947 | element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) 948 | }) 949 | }) 950 | } 951 | 952 | $.event = { add: add, remove: remove } 953 | 954 | $.proxy = function(fn, context) { 955 | if ($.isFunction(fn)) { 956 | var proxyFn = function(){ return fn.apply(context, arguments) } 957 | proxyFn._zid = zid(fn) 958 | return proxyFn 959 | } else if (typeof context == 'string') { 960 | return $.proxy(fn[context], fn) 961 | } else { 962 | throw new TypeError("expected function") 963 | } 964 | } 965 | 966 | $.fn.bind = function(event, callback){ 967 | return this.each(function(){ 968 | add(this, event, callback) 969 | }) 970 | } 971 | $.fn.unbind = function(event, callback){ 972 | return this.each(function(){ 973 | remove(this, event, callback) 974 | }) 975 | } 976 | $.fn.one = function(event, callback){ 977 | return this.each(function(i, element){ 978 | add(this, event, callback, null, function(fn, type){ 979 | return function(){ 980 | var result = fn.apply(element, arguments) 981 | remove(element, type, fn) 982 | return result 983 | } 984 | }) 985 | }) 986 | } 987 | 988 | var returnTrue = function(){return true}, 989 | returnFalse = function(){return false}, 990 | ignoreProperties = /^([A-Z]|layer[XY]$)/, 991 | eventMethods = { 992 | preventDefault: 'isDefaultPrevented', 993 | stopImmediatePropagation: 'isImmediatePropagationStopped', 994 | stopPropagation: 'isPropagationStopped' 995 | } 996 | function createProxy(event) { 997 | var key, proxy = { originalEvent: event } 998 | for (key in event) 999 | if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] 1000 | 1001 | $.each(eventMethods, function(name, predicate) { 1002 | proxy[name] = function(){ 1003 | this[predicate] = returnTrue 1004 | return event[name].apply(event, arguments) 1005 | } 1006 | proxy[predicate] = returnFalse 1007 | }) 1008 | return proxy 1009 | } 1010 | 1011 | // emulates the 'defaultPrevented' property for browsers that have none 1012 | function fix(event) { 1013 | if (!('defaultPrevented' in event)) { 1014 | event.defaultPrevented = false 1015 | var prevent = event.preventDefault 1016 | event.preventDefault = function() { 1017 | this.defaultPrevented = true 1018 | prevent.call(this) 1019 | } 1020 | } 1021 | } 1022 | 1023 | $.fn.delegate = function(selector, event, callback){ 1024 | return this.each(function(i, element){ 1025 | add(element, event, callback, selector, function(fn){ 1026 | return function(e){ 1027 | var evt, match = $(e.target).closest(selector, element).get(0) 1028 | if (match) { 1029 | evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) 1030 | return fn.apply(match, [evt].concat([].slice.call(arguments, 1))) 1031 | } 1032 | } 1033 | }) 1034 | }) 1035 | } 1036 | $.fn.undelegate = function(selector, event, callback){ 1037 | return this.each(function(){ 1038 | remove(this, event, callback, selector) 1039 | }) 1040 | } 1041 | 1042 | $.fn.live = function(event, callback){ 1043 | $(document.body).delegate(this.selector, event, callback) 1044 | return this 1045 | } 1046 | $.fn.die = function(event, callback){ 1047 | $(document.body).undelegate(this.selector, event, callback) 1048 | return this 1049 | } 1050 | 1051 | $.fn.on = function(event, selector, callback){ 1052 | return !selector || $.isFunction(selector) ? 1053 | this.bind(event, selector || callback) : this.delegate(selector, event, callback) 1054 | } 1055 | $.fn.off = function(event, selector, callback){ 1056 | return !selector || $.isFunction(selector) ? 1057 | this.unbind(event, selector || callback) : this.undelegate(selector, event, callback) 1058 | } 1059 | 1060 | $.fn.trigger = function(event, data){ 1061 | if (typeof event == 'string' || $.isPlainObject(event)) event = $.Event(event) 1062 | fix(event) 1063 | event.data = data 1064 | return this.each(function(){ 1065 | // items in the collection might not be DOM elements 1066 | // (todo: possibly support events on plain old objects) 1067 | if('dispatchEvent' in this) this.dispatchEvent(event) 1068 | }) 1069 | } 1070 | 1071 | // triggers event handlers on current element just as if an event occurred, 1072 | // doesn't trigger an actual event, doesn't bubble 1073 | $.fn.triggerHandler = function(event, data){ 1074 | var e, result 1075 | this.each(function(i, element){ 1076 | e = createProxy(typeof event == 'string' ? $.Event(event) : event) 1077 | e.data = data 1078 | e.target = element 1079 | $.each(findHandlers(element, event.type || event), function(i, handler){ 1080 | result = handler.proxy(e) 1081 | if (e.isImmediatePropagationStopped()) return false 1082 | }) 1083 | }) 1084 | return result 1085 | } 1086 | 1087 | // shortcut methods for `.bind(event, fn)` for each event type 1088 | ;('focusin focusout load resize scroll unload click dblclick '+ 1089 | 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ 1090 | 'change select keydown keypress keyup error').split(' ').forEach(function(event) { 1091 | $.fn[event] = function(callback) { 1092 | return callback ? 1093 | this.bind(event, callback) : 1094 | this.trigger(event) 1095 | } 1096 | }) 1097 | 1098 | ;['focus', 'blur'].forEach(function(name) { 1099 | $.fn[name] = function(callback) { 1100 | if (callback) this.bind(name, callback) 1101 | else this.each(function(){ 1102 | try { this[name]() } 1103 | catch(e) {} 1104 | }) 1105 | return this 1106 | } 1107 | }) 1108 | 1109 | $.Event = function(type, props) { 1110 | if (typeof type != 'string') props = type, type = props.type 1111 | var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true 1112 | if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) 1113 | event.initEvent(type, bubbles, true, null, null, null, null, null, null, null, null, null, null, null, null) 1114 | event.isDefaultPrevented = function(){ return this.defaultPrevented } 1115 | return event 1116 | } 1117 | 1118 | })(Zepto) 1119 | 1120 | ;(function($){ 1121 | var jsonpID = 0, 1122 | document = window.document, 1123 | key, 1124 | name, 1125 | rscript = /)<[^<]*)*<\/script>/gi, 1126 | scriptTypeRE = /^(?:text|application)\/javascript/i, 1127 | xmlTypeRE = /^(?:text|application)\/xml/i, 1128 | jsonType = 'application/json', 1129 | htmlType = 'text/html', 1130 | blankRE = /^\s*$/ 1131 | 1132 | // trigger a custom event and return false if it was cancelled 1133 | function triggerAndReturn(context, eventName, data) { 1134 | var event = $.Event(eventName) 1135 | $(context).trigger(event, data) 1136 | return !event.defaultPrevented 1137 | } 1138 | 1139 | // trigger an Ajax "global" event 1140 | function triggerGlobal(settings, context, eventName, data) { 1141 | if (settings.global) return triggerAndReturn(context || document, eventName, data) 1142 | } 1143 | 1144 | // Number of active Ajax requests 1145 | $.active = 0 1146 | 1147 | function ajaxStart(settings) { 1148 | if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') 1149 | } 1150 | function ajaxStop(settings) { 1151 | if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') 1152 | } 1153 | 1154 | // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable 1155 | function ajaxBeforeSend(xhr, settings) { 1156 | var context = settings.context 1157 | if (settings.beforeSend.call(context, xhr, settings) === false || 1158 | triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) 1159 | return false 1160 | 1161 | triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) 1162 | } 1163 | function ajaxSuccess(data, xhr, settings) { 1164 | var context = settings.context, status = 'success' 1165 | settings.success.call(context, data, status, xhr) 1166 | triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) 1167 | ajaxComplete(status, xhr, settings) 1168 | } 1169 | // type: "timeout", "error", "abort", "parsererror" 1170 | function ajaxError(error, type, xhr, settings) { 1171 | var context = settings.context 1172 | settings.error.call(context, xhr, type, error) 1173 | triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error]) 1174 | ajaxComplete(type, xhr, settings) 1175 | } 1176 | // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" 1177 | function ajaxComplete(status, xhr, settings) { 1178 | var context = settings.context 1179 | settings.complete.call(context, xhr, status) 1180 | triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) 1181 | ajaxStop(settings) 1182 | } 1183 | 1184 | // Empty function, used as default callback 1185 | function empty() {} 1186 | 1187 | $.ajaxJSONP = function(options){ 1188 | if (!('type' in options)) return $.ajax(options) 1189 | 1190 | var callbackName = 'jsonp' + (++jsonpID), 1191 | script = document.createElement('script'), 1192 | cleanup = function() { 1193 | clearTimeout(abortTimeout) 1194 | $(script).remove() 1195 | delete window[callbackName] 1196 | }, 1197 | abort = function(type){ 1198 | cleanup() 1199 | // In case of manual abort or timeout, keep an empty function as callback 1200 | // so that the SCRIPT tag that eventually loads won't result in an error. 1201 | if (!type || type == 'timeout') window[callbackName] = empty 1202 | ajaxError(null, type || 'abort', xhr, options) 1203 | }, 1204 | xhr = { abort: abort }, abortTimeout 1205 | 1206 | if (ajaxBeforeSend(xhr, options) === false) { 1207 | abort('abort') 1208 | return false 1209 | } 1210 | 1211 | window[callbackName] = function(data){ 1212 | cleanup() 1213 | ajaxSuccess(data, xhr, options) 1214 | } 1215 | 1216 | script.onerror = function() { abort('error') } 1217 | 1218 | script.src = options.url.replace(/=\?/, '=' + callbackName) 1219 | $('head').append(script) 1220 | 1221 | if (options.timeout > 0) abortTimeout = setTimeout(function(){ 1222 | abort('timeout') 1223 | }, options.timeout) 1224 | 1225 | return xhr 1226 | } 1227 | 1228 | $.ajaxSettings = { 1229 | // Default type of request 1230 | type: 'GET', 1231 | // Callback that is executed before request 1232 | beforeSend: empty, 1233 | // Callback that is executed if the request succeeds 1234 | success: empty, 1235 | // Callback that is executed the the server drops error 1236 | error: empty, 1237 | // Callback that is executed on request complete (both: error and success) 1238 | complete: empty, 1239 | // The context for the callbacks 1240 | context: null, 1241 | // Whether to trigger "global" Ajax events 1242 | global: true, 1243 | // Transport 1244 | xhr: function () { 1245 | return new window.XMLHttpRequest() 1246 | }, 1247 | // MIME types mapping 1248 | accepts: { 1249 | script: 'text/javascript, application/javascript', 1250 | json: jsonType, 1251 | xml: 'application/xml, text/xml', 1252 | html: htmlType, 1253 | text: 'text/plain' 1254 | }, 1255 | // Whether the request is to another domain 1256 | crossDomain: false, 1257 | // Default timeout 1258 | timeout: 0, 1259 | // Whether data should be serialized to string 1260 | processData: true, 1261 | // Whether the browser should be allowed to cache GET responses 1262 | cache: true, 1263 | } 1264 | 1265 | function mimeToDataType(mime) { 1266 | if (mime) mime = mime.split(';', 2)[0] 1267 | return mime && ( mime == htmlType ? 'html' : 1268 | mime == jsonType ? 'json' : 1269 | scriptTypeRE.test(mime) ? 'script' : 1270 | xmlTypeRE.test(mime) && 'xml' ) || 'text' 1271 | } 1272 | 1273 | function appendQuery(url, query) { 1274 | return (url + '&' + query).replace(/[&?]{1,2}/, '?') 1275 | } 1276 | 1277 | // serialize payload and append it to the URL for GET requests 1278 | function serializeData(options) { 1279 | if (options.processData && options.data && $.type(options.data) != "string") 1280 | options.data = $.param(options.data, options.traditional) 1281 | if (options.data && (!options.type || options.type.toUpperCase() == 'GET')) 1282 | options.url = appendQuery(options.url, options.data) 1283 | } 1284 | 1285 | $.ajax = function(options){ 1286 | var settings = $.extend({}, options || {}) 1287 | for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] 1288 | 1289 | ajaxStart(settings) 1290 | 1291 | if (!settings.crossDomain) settings.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(settings.url) && 1292 | RegExp.$2 != window.location.host 1293 | 1294 | if (!settings.url) settings.url = window.location.toString() 1295 | serializeData(settings) 1296 | if (settings.cache === false) settings.url = appendQuery(settings.url, '_=' + Date.now()) 1297 | 1298 | var dataType = settings.dataType, hasPlaceholder = /=\?/.test(settings.url) 1299 | if (dataType == 'jsonp' || hasPlaceholder) { 1300 | if (!hasPlaceholder) settings.url = appendQuery(settings.url, 'callback=?') 1301 | return $.ajaxJSONP(settings) 1302 | } 1303 | 1304 | var mime = settings.accepts[dataType], 1305 | baseHeaders = { }, 1306 | protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, 1307 | xhr = settings.xhr(), abortTimeout 1308 | 1309 | if (!settings.crossDomain) baseHeaders['X-Requested-With'] = 'XMLHttpRequest' 1310 | if (mime) { 1311 | baseHeaders['Accept'] = mime 1312 | if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] 1313 | xhr.overrideMimeType && xhr.overrideMimeType(mime) 1314 | } 1315 | if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) 1316 | baseHeaders['Content-Type'] = (settings.contentType || 'application/x-www-form-urlencoded') 1317 | settings.headers = $.extend(baseHeaders, settings.headers || {}) 1318 | 1319 | xhr.onreadystatechange = function(){ 1320 | if (xhr.readyState == 4) { 1321 | xhr.onreadystatechange = empty; 1322 | clearTimeout(abortTimeout) 1323 | var result, error = false 1324 | if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { 1325 | dataType = dataType || mimeToDataType(xhr.getResponseHeader('content-type')) 1326 | result = xhr.responseText 1327 | 1328 | try { 1329 | // http://perfectionkills.com/global-eval-what-are-the-options/ 1330 | if (dataType == 'script') (1,eval)(result) 1331 | else if (dataType == 'xml') result = xhr.responseXML 1332 | else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) 1333 | } catch (e) { error = e } 1334 | 1335 | if (error) ajaxError(error, 'parsererror', xhr, settings) 1336 | else ajaxSuccess(result, xhr, settings) 1337 | } else { 1338 | ajaxError(null, xhr.status ? 'error' : 'abort', xhr, settings) 1339 | } 1340 | } 1341 | } 1342 | 1343 | var async = 'async' in settings ? settings.async : true 1344 | xhr.open(settings.type, settings.url, async) 1345 | 1346 | for (name in settings.headers) xhr.setRequestHeader(name, settings.headers[name]) 1347 | 1348 | if (ajaxBeforeSend(xhr, settings) === false) { 1349 | xhr.abort() 1350 | return false 1351 | } 1352 | 1353 | if (settings.timeout > 0) abortTimeout = setTimeout(function(){ 1354 | xhr.onreadystatechange = empty 1355 | xhr.abort() 1356 | ajaxError(null, 'timeout', xhr, settings) 1357 | }, settings.timeout) 1358 | 1359 | // avoid sending empty string (#319) 1360 | xhr.send(settings.data ? settings.data : null) 1361 | return xhr 1362 | } 1363 | 1364 | // handle optional data/success arguments 1365 | function parseArguments(url, data, success, dataType) { 1366 | var hasData = !$.isFunction(data) 1367 | return { 1368 | url: url, 1369 | data: hasData ? data : undefined, 1370 | success: !hasData ? data : $.isFunction(success) ? success : undefined, 1371 | dataType: hasData ? dataType || success : success 1372 | } 1373 | } 1374 | 1375 | $.get = function(url, data, success, dataType){ 1376 | return $.ajax(parseArguments.apply(null, arguments)) 1377 | } 1378 | 1379 | $.post = function(url, data, success, dataType){ 1380 | var options = parseArguments.apply(null, arguments) 1381 | options.type = 'POST' 1382 | return $.ajax(options) 1383 | } 1384 | 1385 | $.getJSON = function(url, data, success){ 1386 | var options = parseArguments.apply(null, arguments) 1387 | options.dataType = 'json' 1388 | return $.ajax(options) 1389 | } 1390 | 1391 | $.fn.load = function(url, data, success){ 1392 | if (!this.length) return this 1393 | var self = this, parts = url.split(/\s/), selector, 1394 | options = parseArguments(url, data, success), 1395 | callback = options.success 1396 | if (parts.length > 1) options.url = parts[0], selector = parts[1] 1397 | options.success = function(response){ 1398 | self.html(selector ? 1399 | $('
').html(response.replace(rscript, "")).find(selector) 1400 | : response) 1401 | callback && callback.apply(self, arguments) 1402 | } 1403 | $.ajax(options) 1404 | return this 1405 | } 1406 | 1407 | var escape = encodeURIComponent 1408 | 1409 | function serialize(params, obj, traditional, scope){ 1410 | var type, array = $.isArray(obj) 1411 | $.each(obj, function(key, value) { 1412 | type = $.type(value) 1413 | if (scope) key = traditional ? scope : scope + '[' + (array ? '' : key) + ']' 1414 | // handle data in serializeArray() format 1415 | if (!scope && array) params.add(value.name, value.value) 1416 | // recurse into nested objects 1417 | else if (type == "array" || (!traditional && type == "object")) 1418 | serialize(params, value, traditional, key) 1419 | else params.add(key, value) 1420 | }) 1421 | } 1422 | 1423 | $.param = function(obj, traditional){ 1424 | var params = [] 1425 | params.add = function(k, v){ this.push(escape(k) + '=' + escape(v)) } 1426 | serialize(params, obj, traditional) 1427 | return params.join('&').replace(/%20/g, '+') 1428 | } 1429 | })(Zepto) 1430 | 1431 | ;(function ($) { 1432 | $.fn.serializeArray = function () { 1433 | var result = [], el 1434 | $( Array.prototype.slice.call(this.get(0).elements) ).each(function () { 1435 | el = $(this) 1436 | var type = el.attr('type') 1437 | if (this.nodeName.toLowerCase() != 'fieldset' && 1438 | !this.disabled && type != 'submit' && type != 'reset' && type != 'button' && 1439 | ((type != 'radio' && type != 'checkbox') || this.checked)) 1440 | result.push({ 1441 | name: el.attr('name'), 1442 | value: el.val() 1443 | }) 1444 | }) 1445 | return result 1446 | } 1447 | 1448 | $.fn.serialize = function () { 1449 | var result = [] 1450 | this.serializeArray().forEach(function (elm) { 1451 | result.push( encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value) ) 1452 | }) 1453 | return result.join('&') 1454 | } 1455 | 1456 | $.fn.submit = function (callback) { 1457 | if (callback) this.bind('submit', callback) 1458 | else if (this.length) { 1459 | var event = $.Event('submit') 1460 | this.eq(0).trigger(event) 1461 | if (!event.defaultPrevented) this.get(0).submit() 1462 | } 1463 | return this 1464 | } 1465 | 1466 | })(Zepto) 1467 | 1468 | ;(function($, undefined){ 1469 | var prefix = '', eventPrefix, endEventName, endAnimationName, 1470 | vendors = { Webkit: 'webkit', Moz: '', O: 'o', ms: 'MS' }, 1471 | document = window.document, testEl = document.createElement('div'), 1472 | supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i, 1473 | transform, 1474 | transitionProperty, transitionDuration, transitionTiming, 1475 | animationName, animationDuration, animationTiming, 1476 | cssReset = {} 1477 | 1478 | function dasherize(str) { return downcase(str.replace(/([a-z])([A-Z])/, '$1-$2')) } 1479 | function downcase(str) { return str.toLowerCase() } 1480 | function normalizeEvent(name) { return eventPrefix ? eventPrefix + name : downcase(name) } 1481 | 1482 | $.each(vendors, function(vendor, event){ 1483 | if (testEl.style[vendor + 'TransitionProperty'] !== undefined) { 1484 | prefix = '-' + downcase(vendor) + '-' 1485 | eventPrefix = event 1486 | return false 1487 | } 1488 | }) 1489 | 1490 | transform = prefix + 'transform' 1491 | cssReset[transitionProperty = prefix + 'transition-property'] = 1492 | cssReset[transitionDuration = prefix + 'transition-duration'] = 1493 | cssReset[transitionTiming = prefix + 'transition-timing-function'] = 1494 | cssReset[animationName = prefix + 'animation-name'] = 1495 | cssReset[animationDuration = prefix + 'animation-duration'] = 1496 | cssReset[animationTiming = prefix + 'animation-timing-function'] = '' 1497 | 1498 | $.fx = { 1499 | off: (eventPrefix === undefined && testEl.style.transitionProperty === undefined), 1500 | speeds: { _default: 400, fast: 200, slow: 600 }, 1501 | cssPrefix: prefix, 1502 | transitionEnd: normalizeEvent('TransitionEnd'), 1503 | animationEnd: normalizeEvent('AnimationEnd') 1504 | } 1505 | 1506 | $.fn.animate = function(properties, duration, ease, callback){ 1507 | if ($.isPlainObject(duration)) 1508 | ease = duration.easing, callback = duration.complete, duration = duration.duration 1509 | if (duration) duration = (typeof duration == 'number' ? duration : 1510 | ($.fx.speeds[duration] || $.fx.speeds._default)) / 1000 1511 | return this.anim(properties, duration, ease, callback) 1512 | } 1513 | 1514 | $.fn.anim = function(properties, duration, ease, callback){ 1515 | var key, cssValues = {}, cssProperties, transforms = '', 1516 | that = this, wrappedCallback, endEvent = $.fx.transitionEnd 1517 | 1518 | if (duration === undefined) duration = 0.4 1519 | if ($.fx.off) duration = 0 1520 | 1521 | if (typeof properties == 'string') { 1522 | // keyframe animation 1523 | cssValues[animationName] = properties 1524 | cssValues[animationDuration] = duration + 's' 1525 | cssValues[animationTiming] = (ease || 'linear') 1526 | endEvent = $.fx.animationEnd 1527 | } else { 1528 | cssProperties = [] 1529 | // CSS transitions 1530 | for (key in properties) 1531 | if (supportedTransforms.test(key)) transforms += key + '(' + properties[key] + ') ' 1532 | else cssValues[key] = properties[key], cssProperties.push(dasherize(key)) 1533 | 1534 | if (transforms) cssValues[transform] = transforms, cssProperties.push(transform) 1535 | if (duration > 0 && typeof properties === 'object') { 1536 | cssValues[transitionProperty] = cssProperties.join(', ') 1537 | cssValues[transitionDuration] = duration + 's' 1538 | cssValues[transitionTiming] = (ease || 'linear') 1539 | } 1540 | } 1541 | 1542 | wrappedCallback = function(event){ 1543 | if (typeof event !== 'undefined') { 1544 | if (event.target !== event.currentTarget) return // makes sure the event didn't bubble from "below" 1545 | $(event.target).unbind(endEvent, wrappedCallback) 1546 | } 1547 | $(this).css(cssReset) 1548 | callback && callback.call(this) 1549 | } 1550 | if (duration > 0) this.bind(endEvent, wrappedCallback) 1551 | 1552 | // trigger page reflow so new elements can animate 1553 | this.size() && this.get(0).clientLeft 1554 | 1555 | this.css(cssValues) 1556 | 1557 | if (duration <= 0) setTimeout(function() { 1558 | that.each(function(){ wrappedCallback.call(this) }) 1559 | }, 0) 1560 | 1561 | return this 1562 | } 1563 | 1564 | testEl = null 1565 | })(Zepto) 1566 | 1567 | // Zepto.js 1568 | // (c) 2010-2012 Thomas Fuchs 1569 | // Zepto.js may be freely distributed under the MIT license. 1570 | 1571 | ;(function($, undefined){ 1572 | var document = window.document, docElem = document.documentElement, 1573 | origShow = $.fn.show, origHide = $.fn.hide, origToggle = $.fn.toggle 1574 | 1575 | function anim(el, speed, opacity, scale, callback) { 1576 | if (typeof speed == 'function' && !callback) callback = speed, speed = undefined 1577 | var props = { opacity: opacity } 1578 | if (scale) { 1579 | props.scale = scale 1580 | el.css($.fx.cssPrefix + 'transform-origin', '0 0') 1581 | } 1582 | return el.animate(props, speed, null, callback) 1583 | } 1584 | 1585 | function hide(el, speed, scale, callback) { 1586 | return anim(el, speed, 0, scale, function(){ 1587 | origHide.call($(this)) 1588 | callback && callback.call(this) 1589 | }) 1590 | } 1591 | 1592 | $.fn.show = function(speed, callback) { 1593 | origShow.call(this) 1594 | if (speed === undefined) speed = 0 1595 | else this.css('opacity', 0) 1596 | return anim(this, speed, 1, '1,1', callback) 1597 | } 1598 | 1599 | $.fn.hide = function(speed, callback) { 1600 | if (speed === undefined) return origHide.call(this) 1601 | else return hide(this, speed, '0,0', callback) 1602 | } 1603 | 1604 | $.fn.toggle = function(speed, callback) { 1605 | if (speed === undefined || typeof speed == 'boolean') 1606 | return origToggle.call(this, speed) 1607 | else return this.each(function(){ 1608 | var el = $(this) 1609 | el[el.css('display') == 'none' ? 'show' : 'hide'](speed, callback) 1610 | }) 1611 | } 1612 | 1613 | $.fn.fadeTo = function(speed, opacity, callback) { 1614 | return anim(this, speed, opacity, null, callback) 1615 | } 1616 | 1617 | $.fn.fadeIn = function(speed, callback) { 1618 | var target = this.css('opacity') 1619 | if (target > 0) this.css('opacity', 0) 1620 | else target = 1 1621 | return origShow.call(this).fadeTo(speed, target, callback) 1622 | } 1623 | 1624 | $.fn.fadeOut = function(speed, callback) { 1625 | return hide(this, speed, null, callback) 1626 | } 1627 | 1628 | $.fn.fadeToggle = function(speed, callback) { 1629 | return this.each(function(){ 1630 | var el = $(this) 1631 | el[ 1632 | (el.css('opacity') == 0 || el.css('display') == 'none') ? 'fadeIn' : 'fadeOut' 1633 | ](speed, callback) 1634 | }) 1635 | } 1636 | 1637 | })(Zepto) 1638 | 1639 | // Zepto.js 1640 | // (c) 2010-2012 Thomas Fuchs 1641 | // Zepto.js may be freely distributed under the MIT license. 1642 | 1643 | ;(function($){ 1644 | var cache = [], timeout 1645 | 1646 | $.fn.remove = function(){ 1647 | return this.each(function(){ 1648 | if(this.parentNode){ 1649 | if(this.tagName === 'IMG'){ 1650 | cache.push(this) 1651 | this.src = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=' 1652 | if (timeout) clearTimeout(timeout) 1653 | timeout = setTimeout(function(){ cache = [] }, 60000) 1654 | } 1655 | this.parentNode.removeChild(this) 1656 | } 1657 | }) 1658 | } 1659 | })(Zepto) 1660 | 1661 | // Zepto.js 1662 | // (c) 2010-2012 Thomas Fuchs 1663 | // Zepto.js may be freely distributed under the MIT license. 1664 | 1665 | // The following code is heavily inspired by jQuery's $.fn.data() 1666 | 1667 | ;(function($) { 1668 | var data = {}, dataAttr = $.fn.data, camelize = $.camelCase, 1669 | exp = $.expando = 'Zepto' + (+new Date()) 1670 | 1671 | // Get value from node: 1672 | // 1. first try key as given, 1673 | // 2. then try camelized key, 1674 | // 3. fall back to reading "data-*" attribute. 1675 | function getData(node, name) { 1676 | var id = node[exp], store = id && data[id] 1677 | if (name === undefined) return store || setData(node) 1678 | else { 1679 | if (store) { 1680 | if (name in store) return store[name] 1681 | var camelName = camelize(name) 1682 | if (camelName in store) return store[camelName] 1683 | } 1684 | return dataAttr.call($(node), name) 1685 | } 1686 | } 1687 | 1688 | // Store value under camelized key on node 1689 | function setData(node, name, value) { 1690 | var id = node[exp] || (node[exp] = ++$.uuid), 1691 | store = data[id] || (data[id] = attributeData(node)) 1692 | if (name !== undefined) store[camelize(name)] = value 1693 | return store 1694 | } 1695 | 1696 | // Read all "data-*" attributes from a node 1697 | function attributeData(node) { 1698 | var store = {} 1699 | $.each(node.attributes, function(i, attr){ 1700 | if (attr.name.indexOf('data-') == 0) 1701 | store[camelize(attr.name.replace('data-', ''))] = 1702 | $.zepto.deserializeValue(attr.value) 1703 | }) 1704 | return store 1705 | } 1706 | 1707 | $.fn.data = function(name, value) { 1708 | return value === undefined ? 1709 | // set multiple values via object 1710 | $.isPlainObject(name) ? 1711 | this.each(function(i, node){ 1712 | $.each(name, function(key, value){ setData(node, key, value) }) 1713 | }) : 1714 | // get value from first element 1715 | this.length == 0 ? undefined : getData(this[0], name) : 1716 | // set value on all elements 1717 | this.each(function(){ setData(this, name, value) }) 1718 | } 1719 | 1720 | $.fn.removeData = function(names) { 1721 | if (typeof names == 'string') names = names.split(/\s+/) 1722 | return this.each(function(){ 1723 | var id = this[exp], store = id && data[id] 1724 | if (store) $.each(names, function(){ delete store[camelize(this)] }) 1725 | }) 1726 | } 1727 | })(Zepto) 1728 | 1729 | ;(function($){ 1730 | var zepto = $.zepto, oldQsa = zepto.qsa, oldMatches = zepto.matches 1731 | 1732 | function visible(elem){ 1733 | elem = $(elem) 1734 | return !!(elem.width() || elem.height()) && elem.css("display") !== "none" 1735 | } 1736 | 1737 | // Implements a subset from: 1738 | // http://api.jquery.com/category/selectors/jquery-selector-extensions/ 1739 | // 1740 | // Each filter function receives the current index, all nodes in the 1741 | // considered set, and a value if there were parentheses. The value 1742 | // of `this` is the node currently being considered. The function returns the 1743 | // resulting node(s), null, or undefined. 1744 | // 1745 | // Complex selectors are not supported: 1746 | // li:has(label:contains("foo")) + li:has(label:contains("bar")) 1747 | // ul.inner:first > li 1748 | var filters = $.expr[':'] = { 1749 | visible: function(){ if (visible(this)) return this }, 1750 | hidden: function(){ if (!visible(this)) return this }, 1751 | selected: function(){ if (this.selected) return this }, 1752 | checked: function(){ if (this.checked) return this }, 1753 | parent: function(){ return this.parentNode }, 1754 | first: function(idx){ if (idx === 0) return this }, 1755 | last: function(idx, nodes){ if (idx === nodes.length - 1) return this }, 1756 | eq: function(idx, _, value){ if (idx === value) return this }, 1757 | contains: function(idx, _, text){ if ($(this).text().indexOf(text) > -1) return this }, 1758 | has: function(idx, _, sel){ if (zepto.qsa(this, sel).length) return this } 1759 | } 1760 | 1761 | var filterRe = new RegExp('(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*'), 1762 | childRe = /^\s*>/, 1763 | classTag = 'Zepto' + (+new Date()) 1764 | 1765 | function process(sel, fn) { 1766 | // quote the hash in `a[href^=#]` expression 1767 | sel = sel.replace(/=#\]/g, '="#"]') 1768 | var filter, arg, match = filterRe.exec(sel) 1769 | if (match && match[2] in filters) { 1770 | filter = filters[match[2]], arg = match[3] 1771 | sel = match[1] 1772 | if (arg) { 1773 | var num = Number(arg) 1774 | if (isNaN(num)) arg = arg.replace(/^["']|["']$/g, '') 1775 | else arg = num 1776 | } 1777 | } 1778 | return fn(sel, filter, arg) 1779 | } 1780 | 1781 | zepto.qsa = function(node, selector) { 1782 | return process(selector, function(sel, filter, arg){ 1783 | try { 1784 | var taggedParent 1785 | if (!sel && filter) sel = '*' 1786 | else if (childRe.test(sel)) 1787 | // support "> *" child queries by tagging the parent node with a 1788 | // unique class and prepending that classname onto the selector 1789 | taggedParent = $(node).addClass(classTag), sel = '.'+classTag+' '+sel 1790 | 1791 | var nodes = oldQsa(node, sel) 1792 | } catch(e) { 1793 | console.error('error performing selector: %o', selector) 1794 | throw e 1795 | } finally { 1796 | if (taggedParent) taggedParent.removeClass(classTag) 1797 | } 1798 | return !filter ? nodes : 1799 | zepto.uniq($.map(nodes, function(n, i){ return filter.call(n, i, nodes, arg) })) 1800 | }) 1801 | } 1802 | 1803 | zepto.matches = function(node, selector){ 1804 | return process(selector, function(sel, filter, arg){ 1805 | return (!sel || oldMatches(node, sel)) && 1806 | (!filter || filter.call(node, null, arg) === node) 1807 | }) 1808 | } 1809 | })(Zepto) 1810 | 1811 | // Zepto.js 1812 | // (c) 2010-2012 Thomas Fuchs 1813 | // Zepto.js may be freely distributed under the MIT license. 1814 | 1815 | ;(function($){ 1816 | $.fn.end = function(){ 1817 | return this.prevObject || $() 1818 | } 1819 | 1820 | $.fn.andSelf = function(){ 1821 | return this.add(this.prevObject || $()) 1822 | } 1823 | 1824 | 'filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings'.split(',').forEach(function(property){ 1825 | var fn = $.fn[property] 1826 | $.fn[property] = function(){ 1827 | var ret = fn.apply(this, arguments) 1828 | ret.prevObject = this 1829 | return ret 1830 | } 1831 | }) 1832 | })(Zepto) 1833 | 1834 | // Zepto.js 1835 | // (c) 2010-2012 Thomas Fuchs 1836 | // Zepto.js may be freely distributed under the MIT license. 1837 | 1838 | ;(function($){ 1839 | var touch = {}, 1840 | touchTimeout, tapTimeout, swipeTimeout, 1841 | longTapDelay = 750, longTapTimeout 1842 | 1843 | function parentIfText(node) { 1844 | return 'tagName' in node ? node : node.parentNode 1845 | } 1846 | 1847 | function swipeDirection(x1, x2, y1, y2) { 1848 | var xDelta = Math.abs(x1 - x2), yDelta = Math.abs(y1 - y2) 1849 | return xDelta >= yDelta ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') 1850 | } 1851 | 1852 | function longTap() { 1853 | longTapTimeout = null 1854 | if (touch.last) { 1855 | touch.el.trigger('longTap') 1856 | touch = {} 1857 | } 1858 | } 1859 | 1860 | function cancelLongTap() { 1861 | if (longTapTimeout) clearTimeout(longTapTimeout) 1862 | longTapTimeout = null 1863 | } 1864 | 1865 | function cancelAll() { 1866 | if (touchTimeout) clearTimeout(touchTimeout) 1867 | if (tapTimeout) clearTimeout(tapTimeout) 1868 | if (swipeTimeout) clearTimeout(swipeTimeout) 1869 | if (longTapTimeout) clearTimeout(longTapTimeout) 1870 | touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null 1871 | touch = {} 1872 | } 1873 | 1874 | $(document).ready(function(){ 1875 | var now, delta 1876 | 1877 | $(document.body) 1878 | .bind('touchstart', function(e){ 1879 | now = Date.now() 1880 | delta = now - (touch.last || now) 1881 | touch.el = $(parentIfText(e.touches[0].target)) 1882 | touchTimeout && clearTimeout(touchTimeout) 1883 | touch.x1 = e.touches[0].pageX 1884 | touch.y1 = e.touches[0].pageY 1885 | if (delta > 0 && delta <= 250) touch.isDoubleTap = true 1886 | touch.last = now 1887 | longTapTimeout = setTimeout(longTap, longTapDelay) 1888 | }) 1889 | .bind('touchmove', function(e){ 1890 | cancelLongTap() 1891 | touch.x2 = e.touches[0].pageX 1892 | touch.y2 = e.touches[0].pageY 1893 | if (Math.abs(touch.x1 - touch.x2) > 10) 1894 | e.preventDefault() 1895 | }) 1896 | .bind('touchend', function(e){ 1897 | cancelLongTap() 1898 | 1899 | // swipe 1900 | if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || 1901 | (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) 1902 | 1903 | swipeTimeout = setTimeout(function() { 1904 | touch.el.trigger('swipe') 1905 | touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) 1906 | touch = {} 1907 | }, 0) 1908 | 1909 | // normal tap 1910 | else if ('last' in touch) 1911 | 1912 | // delay by one tick so we can cancel the 'tap' event if 'scroll' fires 1913 | // ('tap' fires before 'scroll') 1914 | tapTimeout = setTimeout(function() { 1915 | 1916 | // trigger universal 'tap' with the option to cancelTouch() 1917 | // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) 1918 | var event = $.Event('tap') 1919 | event.cancelTouch = cancelAll 1920 | touch.el.trigger(event) 1921 | 1922 | // trigger double tap immediately 1923 | if (touch.isDoubleTap) { 1924 | touch.el.trigger('doubleTap') 1925 | touch = {} 1926 | } 1927 | 1928 | // trigger single tap after 250ms of inactivity 1929 | else { 1930 | touchTimeout = setTimeout(function(){ 1931 | touchTimeout = null 1932 | touch.el.trigger('singleTap') 1933 | touch = {} 1934 | }, 250) 1935 | } 1936 | 1937 | }, 0) 1938 | 1939 | }) 1940 | .bind('touchcancel', cancelAll) 1941 | 1942 | $(window).bind('scroll', cancelAll) 1943 | }) 1944 | 1945 | ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(m){ 1946 | $.fn[m] = function(callback){ return this.bind(m, callback) } 1947 | }) 1948 | })(Zepto) 1949 | 1950 | 1951 | // outer and inner height/width support 1952 | if (this.Zepto) { 1953 | (function($) { 1954 | var ioDim, _base; 1955 | ioDim = function(elem, Dimension, dimension, includeBorder, includeMargin) { 1956 | var sides, size; 1957 | if (elem) { 1958 | size = elem[dimension](); 1959 | sides = { 1960 | width: ["left", "right"], 1961 | height: ["top", "bottom"] 1962 | }; 1963 | sides[dimension].forEach(function(side) { 1964 | size += parseInt(elem.css("padding-" + side), 10); 1965 | if (includeBorder) { 1966 | size += parseInt(elem.css("border-" + side + "-width"), 10); 1967 | } 1968 | if (includeMargin) { 1969 | return size += parseInt(elem.css("margin-" + side), 10); 1970 | } 1971 | }); 1972 | return size; 1973 | } else { 1974 | return null; 1975 | } 1976 | }; 1977 | ["width", "height"].forEach(function(dimension) { 1978 | var Dimension, _base, _base1, _name, _name1; 1979 | Dimension = dimension.replace(/./, function(m) { 1980 | return m[0].toUpperCase(); 1981 | }); 1982 | (_base = $.fn)[_name = "inner" + Dimension] || (_base[_name] = function(includeMargin) { 1983 | return ioDim(this, Dimension, dimension, false, includeMargin); 1984 | }); 1985 | return (_base1 = $.fn)[_name1 = "outer" + Dimension] || (_base1[_name1] = function(includeMargin) { 1986 | return ioDim(this, Dimension, dimension, true, includeMargin); 1987 | }); 1988 | }); 1989 | return (_base = $.fn).detach || (_base.detach = function(selector) { 1990 | var cloned, set; 1991 | set = this; 1992 | if (selector != null) { 1993 | set = set.filter(selector); 1994 | } 1995 | cloned = set.clone(true); 1996 | set.remove(); 1997 | return cloned; 1998 | }); 1999 | })(Zepto); 2000 | } --------------------------------------------------------------------------------