├── LICENSE
├── README.md
├── css
├── app.css
├── pageslider.css
├── topcoat-mobile-dark.css
└── topcoat-mobile-light.css
├── images
├── hamburger_dark.jpg
├── hamburger_dark.png
└── hamburger_dark.svg
├── index.html
├── js
├── app.js
├── fastclick.js
├── jquery.js
├── menu.js
└── pageslider.js
└── sample.html
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | wp-rest-api-demo
2 | ================
3 |
4 | Demo mobile app using WordPress REST API
5 |
6 | View the tutorial here http://apppresser.com/using-wordpress-rest-api-mobile-app
7 |
--------------------------------------------------------------------------------
/css/app.css:
--------------------------------------------------------------------------------
1 | .page {
2 | text-align: left;
3 | }
4 |
5 | .single-post, .static-page {
6 | padding: 15px;
7 | }
8 |
9 | /** Panel Menu **/
10 |
11 | .app {
12 | -webkit-backface-visibility: hidden;
13 | position: absolute;
14 | top: 0;
15 | right: 0;
16 | bottom: 0;
17 | left: 0;
18 | }
19 |
20 | .app-container {
21 | position: absolute;
22 | top: 0;
23 | right: 0;
24 | bottom: 0;
25 | left: 0;
26 | -webkit-box-shadow: 0 0 8px rgba(0,0,0,0.5);
27 | box-shadow: 0 0 8px rgba(0,0,0,0.5);
28 | border-left: 1px solid rgba(255,255,255,0.2);
29 | overflow: hidden;
30 | background-color: #dfe2e2;
31 | }
32 |
33 | .app-menu {
34 | position: absolute;
35 | top: 0;
36 | bottom: 0;
37 | width: 100%;
38 | overflow: scroll;
39 | }
40 |
41 | .js-menu-button {
42 | position: relative;
43 | top: 1px;
44 | }
45 |
46 | .slideIn {
47 | -webkit-transform: translate3D(0, 0, 0);
48 | -moz-transform: translate3D(0, 0, 0);
49 | -o-transform: translate3D(0, 0, 0);
50 | -ms-transform: translate3D(0, 0, 0);
51 | transform: translate3D(0, 0, 0);
52 | -webkit-animation-duration: 0.1s;
53 | -moz-animation-duration: 0.1s;
54 | -o-animation-duration: 0.1s;
55 | -ms-animation-duration: 0.1s;
56 | animation-duration: 0.1s;
57 | -webkit-animation-fill-mode: both;
58 | -moz-animation-fill-mode: both;
59 | -o-animation-fill-mode: both;
60 | -ms-animation-fill-mode: both;
61 | animation-fill-mode: both;
62 | -webkit-animation-name: slideIn;
63 | -moz-animation-name: slideIn;
64 | -o-animation-name: slideIn;
65 | -ms-animation-name: slideIn;
66 | animation-name: slideIn;
67 | }
68 |
69 | @-webkit-keyframes slideIn {
70 | 0% {
71 | -webkit-transform: translateX(0%);
72 | -moz-transform: translateX(0%);
73 | -o-transform: translateX(0%);
74 | -ms-transform: translateX(0%);
75 | transform: translateX(0%);
76 | }
77 |
78 | 100% {
79 | -webkit-transform: translateX(75%);
80 | -moz-transform: translateX(75%);
81 | -o-transform: translateX(75%);
82 | -ms-transform: translateX(75%);
83 | transform: translateX(75%);
84 | }
85 | }
86 |
87 | .slideOut {
88 | -webkit-transform: translate3D(0, 0, 0);
89 | -moz-transform: translate3D(0, 0, 0);
90 | -o-transform: translate3D(0, 0, 0);
91 | -ms-transform: translate3D(0, 0, 0);
92 | transform: translate3D(0, 0, 0);
93 | -webkit-animation-duration: 0.1s;
94 | -moz-animation-duration: 0.1s;
95 | -o-animation-duration: 0.1s;
96 | -ms-animation-duration: 0.1s;
97 | animation-duration: 0.1s;
98 | -webkit-animation-fill-mode: both;
99 | -moz-animation-fill-mode: both;
100 | -o-animation-fill-mode: both;
101 | -ms-animation-fill-mode: both;
102 | animation-fill-mode: both;
103 | -webkit-animation-name: slideOut;
104 | -moz-animation-name: slideOut;
105 | -o-animation-name: slideOut;
106 | -ms-animation-name: slideOut;
107 | animation-name: slideOut;
108 | }
109 |
110 | @-webkit-keyframes slideOut {
111 | 0% {
112 | -webkit-transform: translateX(75%);
113 | -moz-transform: translateX(75%);
114 | -o-transform: translateX(75%);
115 | -ms-transform: translateX(75%);
116 | transform: translateX(75%);
117 | }
118 |
119 | 100% {
120 | -webkit-transform: translateX(0%);
121 | -moz-transform: translateX(0%);
122 | -o-transform: translateX(0%);
123 | -ms-transform: translateX(0%);
124 | transform: translateX(0%);
125 | }
126 | }
--------------------------------------------------------------------------------
/css/pageslider.css:
--------------------------------------------------------------------------------
1 | #container {
2 | position: absolute;
3 | width: 100%;
4 | height: 100%;
5 |
6 | }
7 |
8 | .page {
9 | position: absolute;
10 | top: 0;
11 | left: 0;
12 | width: 100%;
13 | height: 100%;
14 | -webkit-transform: translate3d(0, 0, 0);
15 | transform: translate3d(0, 0, 0);
16 | }
17 |
18 | .page.left {
19 | -webkit-transform: translate3d(-100%, 0, 0);
20 | transform: translate3d(-100%, 0, 0);
21 | }
22 |
23 | .page.center {
24 | -webkit-transform: translate3d(0, 0, 0);
25 | transform: translate3d(0, 0, 0);
26 | }
27 |
28 | .page.right {
29 | -webkit-transform: translate3d(100%, 0, 0);
30 | transform: translate3d(100%, 0, 0);
31 | }
32 |
33 | .page.transition {
34 | -webkit-transition-duration: .25s;
35 | transition-duration: .25s;
36 | }
--------------------------------------------------------------------------------
/css/topcoat-mobile-dark.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Source Sans";
3 | src: url("../font/SourceSansPro-Regular.otf");
4 | }
5 | @font-face {
6 | font-family: "Source Sans";
7 | src: url("../font/SourceSansPro-Light.otf");
8 | font-weight: 200;
9 | }
10 | @font-face {
11 | font-family: "Source Sans";
12 | src: url("../font/SourceSansPro-Semibold.otf");
13 | font-weight: 600;
14 | }
15 |
16 | body {
17 | margin: 0;
18 | padding: 0;
19 | background: #3a3f42 url("../img/bg_dark.png") repeat-x;
20 | color: #000;
21 | font: 16px "Source Sans", helvetica, arial, sans-serif;
22 | font-weight: 200;
23 | text-rendering: optimizeLegibility;
24 | }
25 |
26 | .topcoat-icon--menu-stack {
27 | background: url("../img/hamburger_light.svg") no-repeat;
28 | -webkit-background-size: cover;
29 | -moz-background-size: cover;
30 | background-size: cover;
31 | }
32 |
33 | .quarter {
34 | width: 25%;
35 | }
36 | .half {
37 | width: 50%;
38 | }
39 | .three-quarters {
40 | width: 75%;
41 | }
42 | .third {
43 | width: 33.333%;
44 | }
45 | .two-thirds {
46 | width: 66.666%;
47 | }
48 | .full {
49 | width: 100%;
50 | }
51 |
52 | .left {
53 | text-align: left;
54 | }
55 | .center {
56 | text-align: center;
57 | }
58 | .right {
59 | text-align: right;
60 | }
61 |
62 | .reset-ui {
63 | -webkit-box-sizing: border-box;
64 | -moz-box-sizing: border-box;
65 | box-sizing: border-box;
66 | -webkit-background-clip: padding;
67 | -moz-background-clip: padding;
68 | background-clip: padding-box;
69 | position: relative;
70 | display: inline-block;
71 | vertical-align: top;
72 | padding: 0;
73 | margin: 0;
74 | font: inherit;
75 | color: inherit;
76 | background: transparent;
77 | border: none;
78 | cursor: default;
79 | -webkit-user-select: none;
80 | -moz-user-select: none;
81 | -ms-user-select: none;
82 | user-select: none;
83 | -o-text-overflow: ellipsis;
84 | text-overflow: ellipsis;
85 | white-space: nowrap;
86 | overflow: hidden;
87 | }
88 |
89 | /*
90 | Copyright 2012 Adobe Systems Inc.;
91 | Licensed under the Apache License, Version 2.0 (the "License");
92 | you may not use this file except in compliance with the License.
93 | You may obtain a copy of the License at
94 |
95 | http://www.apache.org/licenses/LICENSE-2.0
96 |
97 | Unless required by applicable law or agreed to in writing, software
98 | distributed under the License is distributed on an "AS IS" BASIS,
99 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
100 | See the License for the specific language governing permissions and
101 | limitations under the License.
102 | */
103 |
104 | /*
105 | Button
106 | ------
107 |
108 | :active - Active state
109 |
110 | .is-active - Simulates an active state on mobile devices
111 |
112 | :disabled - Disabled state
113 |
114 | .is-disabled - Simulates a disabled state on mobile devices
115 |
116 | Button
117 | Button
118 | Button
119 | */
120 | .topcoat-button,
121 | .topcoat-button--quiet,
122 | .topcoat-button--large,
123 | .topcoat-button--large--quiet,
124 | .topcoat-button--cta,
125 | .topcoat-button--large--cta {
126 | position: relative;
127 | display: inline-block;
128 | vertical-align: top;
129 | -webkit-box-sizing: border-box;
130 | -moz-box-sizing: border-box;
131 | box-sizing: border-box;
132 | -webkit-background-clip: padding;
133 | -moz-background-clip: padding;
134 | background-clip: padding-box;
135 | padding: 0;
136 | margin: 0;
137 | font: inherit;
138 | color: inherit;
139 | background: transparent;
140 | border: none;
141 | cursor: default;
142 | -webkit-user-select: none;
143 | -moz-user-select: none;
144 | -ms-user-select: none;
145 | user-select: none;
146 | -o-text-overflow: ellipsis;
147 | text-overflow: ellipsis;
148 | white-space: nowrap;
149 | overflow: hidden;
150 | padding: 0 1.25rem;
151 | font-size: 16px;
152 | line-height: 3rem;
153 | letter-spacing: 1px;
154 | color: #c6c8c8;
155 | text-shadow: 0 -1px rgba(0,0,0,0.69);
156 | vertical-align: top;
157 | background-color: #595b5b;
158 | -webkit-box-shadow: inset 0 1px rgba(255,255,255,0.12);
159 | box-shadow: inset 0 1px rgba(255,255,255,0.12);
160 | border: 1px solid rgba(0,0,0,0.36);
161 | -webkit-border-radius: 6px;
162 | border-radius: 6px;
163 | }
164 | .topcoat-button:active,
165 | .topcoat-button.is-active,
166 | .topcoat-button--large:active,
167 | .topcoat-button--large.is-active {
168 | background-color: #404141;
169 | -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.18);
170 | box-shadow: inset 0 1px rgba(0,0,0,0.18);
171 | }
172 | .topcoat-button:disabled,
173 | .topcoat-button.is-disabled {
174 | opacity: 0.3;
175 | cursor: default;
176 | pointer-events: none;
177 | }
178 | /*
179 | Quiet Button
180 | ------------
181 |
182 | :active - Quiet button active state
183 |
184 | .is-active - Simulates active state for a quiet button on touch interfaces
185 |
186 | :disabled - Disabled state
187 |
188 | .is-disabled - Simulates disabled state
189 |
190 | Button
191 | Button
192 | Button
193 | */
194 | .topcoat-button--quiet {
195 | background: transparent;
196 | border: 1px solid transparent;
197 | -webkit-box-shadow: none;
198 | box-shadow: none;
199 | }
200 | .topcoat-button--quiet:active,
201 | .topcoat-button--quiet.is-active,
202 | .topcoat-button--large--quiet:active,
203 | .topcoat-button--large--quiet.is-active {
204 | color: #c6c8c8;
205 | text-shadow: 0 -1px rgba(0,0,0,0.69);
206 | background-color: #404141;
207 | border: 1px solid rgba(0,0,0,0.36);
208 | -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.18);
209 | box-shadow: inset 0 1px rgba(0,0,0,0.18);
210 | }
211 | .topcoat-button--quiet:disabled,
212 | .topcoat-button--quiet.is-disabled {
213 | opacity: 0.3;
214 | cursor: default;
215 | pointer-events: none;
216 | }
217 | /*
218 | Large Button
219 | ------------
220 |
221 | :active - Active state
222 |
223 | .is-active - Simulates active state touch interfaces
224 |
225 | :disabled - Disabled state
226 |
227 | .is-disabled - Simulates disabled state
228 |
229 | Button
230 | Button
231 | Button
232 | */
233 | .topcoat-button--large,
234 | .topcoat-button--large--quiet {
235 | font-size: 1.3rem;
236 | line-height: 4rem;
237 | }
238 | .topcoat-button--large:disabled,
239 | .topcoat-button--large.is-disabled {
240 | opacity: 0.3;
241 | cursor: default;
242 | pointer-events: none;
243 | }
244 | /*
245 | Large Quiet Button
246 | ------------------
247 |
248 | :active - Active state
249 |
250 | .is-pressed - Simulates active state on touch interfaces
251 |
252 | :disabled - Disabled state
253 |
254 | .is-disabled - Simulates disabled state
255 |
256 |
257 | Button
258 | Button
259 | Button
260 | */
261 | .topcoat-button--large--quiet {
262 | background: transparent;
263 | border: 1px solid transparent;
264 | -webkit-box-shadow: none;
265 | box-shadow: none;
266 | }
267 | .topcoat-button--large--quiet:disabled,
268 | .topcoat-button--large--quiet.is-disabled {
269 | opacity: 0.3;
270 | cursor: default;
271 | pointer-events: none;
272 | }
273 | /*
274 | Call To Action Button
275 | ---------------------
276 |
277 | :active - Active state
278 |
279 | .is-pressed - Simulates active state on touch interfaces
280 |
281 | :disabled - Disabled state
282 |
283 | .is-disabled - Simulates disabled state
284 |
285 |
286 | Button
287 | Button
288 | Button
289 |
290 | */
291 | .topcoat-button--cta,
292 | .topcoat-button--large--cta {
293 | border: 1px solid #143250;
294 | background-color: #288edf;
295 | -webkit-box-shadow: inset 0 1px rgba(255,255,255,0.36);
296 | box-shadow: inset 0 1px rgba(255,255,255,0.36);
297 | color: #fff;
298 | font-weight: 500;
299 | text-shadow: 0 -1px rgba(0,0,0,0.36);
300 | }
301 | .topcoat-button--cta:active,
302 | .topcoat-button--cta.is-active,
303 | .topcoat-button--large--cta:active,
304 | .topcoat-button--large--cta.is-active {
305 | background-color: #1976c3;
306 | -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.12);
307 | box-shadow: inset 0 1px rgba(0,0,0,0.12);
308 | }
309 | .topcoat-button--cta:disabled,
310 | .topcoat-button--cta.is-disabled {
311 | opacity: 0.3;
312 | cursor: default;
313 | pointer-events: none;
314 | }
315 | /*
316 | Large Call To Action Button
317 | ---------------------------
318 |
319 | :active - Active state
320 |
321 | .is-active - Simulates active state touch interfaces
322 |
323 | :disabled - Disabled state
324 |
325 | .is-disabled - Simulates disabled state
326 |
327 | Button
328 | Button
329 | Button
330 | */
331 | .topcoat-button--large--cta {
332 | font-size: 1.3rem;
333 | line-height: 4rem;
334 | }
335 | .topcoat-button--large-cta:disabled,
336 | .topcoat-button--large--cta.is-disabled {
337 | opacity: 0.3;
338 | cursor: default;
339 | pointer-events: none;
340 | }
341 |
342 | /*
343 | Copyright 2012 Adobe Systems Inc.;
344 | Licensed under the Apache License, Version 2.0 (the "License");
345 | you may not use this file except in compliance with the License.
346 | You may obtain a copy of the License at
347 |
348 | http://www.apache.org/licenses/LICENSE-2.0
349 |
350 | Unless required by applicable law or agreed to in writing, software
351 | distributed under the License is distributed on an "AS IS" BASIS,
352 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
353 | See the License for the specific language governing permissions and
354 | limitations under the License.
355 | */
356 |
357 | /*
358 | Icon Button
359 | -----------
360 |
361 | :active - Active state
362 |
363 | .is-active - Simulates an active state on mobile devices
364 |
365 | :disabled - Disabled state
366 |
367 | .is-disabled - Simulates a disabled state on mobile devices
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 | */
381 | .topcoat-icon-button,
382 | .topcoat-icon-button--quiet,
383 | .topcoat-icon-button--large,
384 | .topcoat-icon-button--large--quiet {
385 | position: relative;
386 | display: inline-block;
387 | vertical-align: top;
388 | -webkit-box-sizing: border-box;
389 | -moz-box-sizing: border-box;
390 | box-sizing: border-box;
391 | -webkit-background-clip: padding;
392 | -moz-background-clip: padding;
393 | background-clip: padding-box;
394 | padding: 0;
395 | margin: 0;
396 | font: inherit;
397 | color: inherit;
398 | background: transparent;
399 | border: none;
400 | cursor: default;
401 | -webkit-user-select: none;
402 | -moz-user-select: none;
403 | -ms-user-select: none;
404 | user-select: none;
405 | -o-text-overflow: ellipsis;
406 | text-overflow: ellipsis;
407 | white-space: nowrap;
408 | overflow: hidden;
409 | padding: 0 0.75rem;
410 | line-height: 3rem;
411 | letter-spacing: 1px;
412 | color: #c6c8c8;
413 | text-shadow: 0 -1px rgba(0,0,0,0.69);
414 | vertical-align: baseline;
415 | background-color: #595b5b;
416 | -webkit-box-shadow: inset 0 1px rgba(255,255,255,0.12);
417 | box-shadow: inset 0 1px rgba(255,255,255,0.12);
418 | border: 1px solid rgba(0,0,0,0.36);
419 | -webkit-border-radius: 6px;
420 | border-radius: 6px;
421 | }
422 | .topcoat-icon-button:active,
423 | .topcoat-icon-button.is-active {
424 | background-color: #404141;
425 | -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.18);
426 | box-shadow: inset 0 1px rgba(0,0,0,0.18);
427 | }
428 | .topcoat-icon-button:disabled,
429 | .topcoat-icon-button.is-disabled {
430 | opacity: 0.3;
431 | cursor: default;
432 | pointer-events: none;
433 | }
434 | /*
435 | Quiet Icon Button
436 | -----------------
437 |
438 | :active - Button active state
439 |
440 | .is-active - Simulates active state for a button on touch interfaces
441 |
442 | :disabled - Disabled state
443 |
444 | .is-disabled - Simulates disabled state
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 | */
458 | .topcoat-icon-button--quiet {
459 | background: transparent;
460 | border: 1px solid transparent;
461 | -webkit-box-shadow: none;
462 | box-shadow: none;
463 | }
464 | .topcoat-icon-button--quiet:active,
465 | .topcoat-icon-button--quiet.is-active,
466 | .topcoat-icon-button--large--quiet:active,
467 | .topcoat-icon-button--large--quiet.is-active {
468 | color: #c6c8c8;
469 | text-shadow: 0 -1px rgba(0,0,0,0.69);
470 | background-color: #404141;
471 | border: 1px solid rgba(0,0,0,0.36);
472 | -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.18);
473 | box-shadow: inset 0 1px rgba(0,0,0,0.18);
474 | }
475 | .topcoat-icon-button--quiet:disabled,
476 | .topcoat-icon-button--quiet.is-disabled {
477 | opacity: 0.3;
478 | cursor: default;
479 | pointer-events: none;
480 | }
481 | /*
482 | Large Icon Button
483 | -----------------
484 |
485 | :active - Active state
486 |
487 | .is-active - Simulates an active state on mobile devices
488 |
489 | :disabled - Disabled state
490 |
491 | .is-disabled - Simulates a disabled state on mobile devices
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 | */
505 | .topcoat-icon-button--large,
506 | .topcoat-icon-button--large--quiet {
507 | width: 4rem;
508 | height: 4rem;
509 | line-height: 4rem;
510 | }
511 | .topcoat-icon-button--large:active,
512 | .topcoat-icon-button--large.is-active {
513 | background-color: #404141;
514 | -webkit-box-shadow: inset 0 1px rgba(0,0,0,0.18);
515 | box-shadow: inset 0 1px rgba(0,0,0,0.18);
516 | }
517 | .topcoat-icon-button--large:disabled,
518 | .topcoat-icon-button--large.is-disabled {
519 | opacity: 0.3;
520 | cursor: default;
521 | pointer-events: none;
522 | }
523 | /*
524 | Large Quiet Icon Button
525 | -----------------------
526 |
527 | :active - Active state
528 |
529 | .is-active - Simulates an active state on mobile devices
530 |
531 | :disabled - Disabled state
532 |
533 | .is-disabled - Simulates a disabled state on mobile devices
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 | */
547 | .topcoat-icon-button--large--quiet {
548 | background: transparent;
549 | border: 1px solid transparent;
550 | -webkit-box-shadow: none;
551 | box-shadow: none;
552 | }
553 | .topcoat-icon-button--large--quiet:disabled,
554 | .topcoat-icon-button--large--quiet.is-disabled {
555 | opacity: 0.3;
556 | cursor: default;
557 | pointer-events: none;
558 | }
559 | .topcoat-icon,
560 | .topcoat-icon--large {
561 | position: relative;
562 | display: inline-block;
563 | vertical-align: top;
564 | overflow: hidden;
565 | width: 1.5rem;
566 | height: 1.5rem;
567 | vertical-align: middle;
568 | }
569 | .topcoat-icon--large {
570 | width: 2.5rem;
571 | height: 2.5rem;
572 | }
573 |
574 | /*
575 | Copyright 2012 Adobe Systems Inc.;
576 | Licensed under the Apache License, Version 2.0 (the "License");
577 | you may not use this file except in compliance with the License.
578 | You may obtain a copy of the License at
579 |
580 | http://www.apache.org/licenses/LICENSE-2.0
581 |
582 | Unless required by applicable law or agreed to in writing, software
583 | distributed under the License is distributed on an "AS IS" BASIS,
584 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
585 | See the License for the specific language governing permissions and
586 | limitations under the License.
587 | */
588 |
589 | /*
590 | List
591 | ------------
592 |
593 |
594 |
Category
595 |
596 |
597 | Item
598 |
599 |
600 | Item
601 |
602 |
603 | Item
604 |
605 |
606 |
607 |
608 | */
609 | .topcoat-list__container {
610 | padding: 0;
611 | margin: 0;
612 | font: inherit;
613 | color: inherit;
614 | background: transparent;
615 | border: none;
616 | cursor: default;
617 | -webkit-user-select: none;
618 | -moz-user-select: none;
619 | -ms-user-select: none;
620 | user-select: none;
621 | overflow: auto;
622 | -webkit-overflow-scrolling: touch;
623 | border-top: 1px solid #2f3234;
624 | border-bottom: 1px solid #eff1f1;
625 | background-color: #444849;
626 | }
627 | .topcoat-list__header {
628 | margin: 0;
629 | padding: 4px 20px;
630 | font-size: 0.9em;
631 | font-weight: 400;
632 | background-color: #3b3e40;
633 | color: #868888;
634 | text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
635 | border-top: solid 1px rgba(255,255,255,0.1);
636 | border-bottom: solid 1px rgba(255,255,255,0.05);
637 | }
638 | .topcoat-list {
639 | padding: 0;
640 | margin: 0;
641 | list-style-type: none;
642 | border-top: 1px solid #2f3234;
643 | color: #c6c8c8;
644 | }
645 | .topcoat-list__item {
646 | margin: 0;
647 | padding: 0;
648 | padding: 1.25rem;
649 | border-top: 1px solid #5e6061;
650 | border-bottom: 1px solid #2f3234;
651 | }
652 | .topcoat-list__item:first-child {
653 | border-top: 1px solid rgba(0,0,0,0.05);
654 | }
655 |
656 | /*
657 | Copyright 2012 Adobe Systems Inc.;
658 | Licensed under the Apache License, Version 2.0 (the "License");
659 | you may not use this file except in compliance with the License.
660 | You may obtain a copy of the License at
661 |
662 | http://www.apache.org/licenses/LICENSE-2.0
663 |
664 | Unless required by applicable law or agreed to in writing, software
665 | distributed under the License is distributed on an "AS IS" BASIS,
666 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
667 | See the License for the specific language governing permissions and
668 | limitations under the License.
669 | */
670 |
671 | /*
672 | Navigation Bar
673 | --------------
674 |
675 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
' +
79 | '
';
80 |
81 | var page,
82 | hash = window.location.hash.replace(/^.*?#/,'');
83 | console.log(hash);
84 |
85 | /* If the hash is sample, show the samplePage. If it's anything else, load the singlePost view, otherwise it's the homePage */
86 |
87 | if (hash == 'sample') {
88 | page = samplePage;
89 | } else if (hash != '') {
90 | page = singlePost;
91 | app.getSinglePost(hash);
92 | } else {
93 | console.log('home page');
94 | page = homePage;
95 | app.init();
96 | }
97 |
98 | slider.slidePage($(page));
99 | },
100 |
101 | menus: function(event) {
102 |
103 | // Close the slide panel if a menu button is clicked
104 | $('.js-app-container').removeClass('slideIn').addClass('slideOut');
105 |
106 | }
107 |
108 | }
109 |
110 | var slider = new PageSlider($("#container"));
111 |
112 | $(window).on('hashchange', app.route);
113 |
114 | app.route();
--------------------------------------------------------------------------------
/js/fastclick.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
3 | *
4 | * @version 0.6.4
5 | * @codingstandard ftlabs-jsv2
6 | * @copyright The Financial Times Limited [All Rights Reserved]
7 | * @license MIT License (see LICENSE.txt)
8 | */
9 |
10 | /*jslint browser:true, node:true*/
11 | /*global define, Event, Node*/
12 |
13 |
14 | /**
15 | * Instantiate fast-clicking listeners on the specificed layer.
16 | *
17 | * @constructor
18 | * @param {Element} layer The layer to listen on
19 | */
20 | function FastClick(layer) {
21 | 'use strict';
22 | var oldOnClick, self = this;
23 |
24 |
25 | /**
26 | * Whether a click is currently being tracked.
27 | *
28 | * @type boolean
29 | */
30 | this.trackingClick = false;
31 |
32 |
33 | /**
34 | * Timestamp for when when click tracking started.
35 | *
36 | * @type number
37 | */
38 | this.trackingClickStart = 0;
39 |
40 |
41 | /**
42 | * The element being tracked for a click.
43 | *
44 | * @type EventTarget
45 | */
46 | this.targetElement = null;
47 |
48 |
49 | /**
50 | * X-coordinate of touch start event.
51 | *
52 | * @type number
53 | */
54 | this.touchStartX = 0;
55 |
56 |
57 | /**
58 | * Y-coordinate of touch start event.
59 | *
60 | * @type number
61 | */
62 | this.touchStartY = 0;
63 |
64 |
65 | /**
66 | * ID of the last touch, retrieved from Touch.identifier.
67 | *
68 | * @type number
69 | */
70 | this.lastTouchIdentifier = 0;
71 |
72 |
73 | /**
74 | * The FastClick layer.
75 | *
76 | * @type Element
77 | */
78 | this.layer = layer;
79 |
80 | if (!layer || !layer.nodeType) {
81 | throw new TypeError('Layer must be a document node');
82 | }
83 |
84 | /** @type function() */
85 | this.onClick = function() { return FastClick.prototype.onClick.apply(self, arguments); };
86 |
87 | /** @type function() */
88 | this.onMouse = function() { return FastClick.prototype.onMouse.apply(self, arguments); };
89 |
90 | /** @type function() */
91 | this.onTouchStart = function() { return FastClick.prototype.onTouchStart.apply(self, arguments); };
92 |
93 | /** @type function() */
94 | this.onTouchEnd = function() { return FastClick.prototype.onTouchEnd.apply(self, arguments); };
95 |
96 | /** @type function() */
97 | this.onTouchCancel = function() { return FastClick.prototype.onTouchCancel.apply(self, arguments); };
98 |
99 | if (FastClick.notNeeded()) {
100 | return;
101 | }
102 |
103 | // Set up event handlers as required
104 | if (this.deviceIsAndroid) {
105 | layer.addEventListener('mouseover', this.onMouse, true);
106 | layer.addEventListener('mousedown', this.onMouse, true);
107 | layer.addEventListener('mouseup', this.onMouse, true);
108 | }
109 |
110 | layer.addEventListener('click', this.onClick, true);
111 | layer.addEventListener('touchstart', this.onTouchStart, false);
112 | layer.addEventListener('touchend', this.onTouchEnd, false);
113 | layer.addEventListener('touchcancel', this.onTouchCancel, false);
114 |
115 | // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
116 | // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
117 | // layer when they are cancelled.
118 | if (!Event.prototype.stopImmediatePropagation) {
119 | layer.removeEventListener = function(type, callback, capture) {
120 | var rmv = Node.prototype.removeEventListener;
121 | if (type === 'click') {
122 | rmv.call(layer, type, callback.hijacked || callback, capture);
123 | } else {
124 | rmv.call(layer, type, callback, capture);
125 | }
126 | };
127 |
128 | layer.addEventListener = function(type, callback, capture) {
129 | var adv = Node.prototype.addEventListener;
130 | if (type === 'click') {
131 | adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
132 | if (!event.propagationStopped) {
133 | callback(event);
134 | }
135 | }), capture);
136 | } else {
137 | adv.call(layer, type, callback, capture);
138 | }
139 | };
140 | }
141 |
142 | // If a handler is already declared in the element's onclick attribute, it will be fired before
143 | // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
144 | // adding it as listener.
145 | if (typeof layer.onclick === 'function') {
146 |
147 | // Android browser on at least 3.2 requires a new reference to the function in layer.onclick
148 | // - the old one won't work if passed to addEventListener directly.
149 | oldOnClick = layer.onclick;
150 | layer.addEventListener('click', function(event) {
151 | oldOnClick(event);
152 | }, false);
153 | layer.onclick = null;
154 | }
155 | }
156 |
157 |
158 | /**
159 | * Android requires exceptions.
160 | *
161 | * @type boolean
162 | */
163 | FastClick.prototype.deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0;
164 |
165 |
166 | /**
167 | * iOS requires exceptions.
168 | *
169 | * @type boolean
170 | */
171 | FastClick.prototype.deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent);
172 |
173 |
174 | /**
175 | * iOS 4 requires an exception for select elements.
176 | *
177 | * @type boolean
178 | */
179 | FastClick.prototype.deviceIsIOS4 = FastClick.prototype.deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
180 |
181 |
182 | /**
183 | * iOS 6.0(+?) requires the target element to be manually derived
184 | *
185 | * @type boolean
186 | */
187 | FastClick.prototype.deviceIsIOSWithBadTarget = FastClick.prototype.deviceIsIOS && (/OS ([6-9]|\d{2})_\d/).test(navigator.userAgent);
188 |
189 |
190 | /**
191 | * Determine whether a given element requires a native click.
192 | *
193 | * @param {EventTarget|Element} target Target DOM element
194 | * @returns {boolean} Returns true if the element needs a native click
195 | */
196 | FastClick.prototype.needsClick = function(target) {
197 | 'use strict';
198 | var nodeName = target.nodeName.toLowerCase();
199 |
200 | if (nodeName === 'button' || nodeName === 'input') {
201 |
202 | // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
203 | // Don't send a synthetic click to disabled inputs (issue #62)
204 | if ((this.deviceIsIOS && target.type === 'file') || target.disabled) {
205 | return true;
206 | }
207 | } else if (nodeName === 'label' || nodeName === 'video') {
208 | return true;
209 | }
210 |
211 | return (/\bneedsclick\b/).test(target.className);
212 | };
213 |
214 |
215 | /**
216 | * Determine whether a given element requires a call to focus to simulate click into element.
217 | *
218 | * @param {EventTarget|Element} target Target DOM element
219 | * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
220 | */
221 | FastClick.prototype.needsFocus = function(target) {
222 | 'use strict';
223 | switch (target.nodeName.toLowerCase()) {
224 | case 'textarea':
225 | case 'select':
226 | return true;
227 | case 'input':
228 | switch (target.type) {
229 | case 'button':
230 | case 'checkbox':
231 | case 'file':
232 | case 'image':
233 | case 'radio':
234 | case 'submit':
235 | return false;
236 | }
237 |
238 | // No point in attempting to focus disabled inputs
239 | return !target.disabled && !target.readOnly;
240 | default:
241 | return (/\bneedsfocus\b/).test(target.className);
242 | }
243 | };
244 |
245 |
246 | /**
247 | * Send a click event to the specified element.
248 | *
249 | * @param {EventTarget|Element} targetElement
250 | * @param {Event} event
251 | */
252 | FastClick.prototype.sendClick = function(targetElement, event) {
253 | 'use strict';
254 | var clickEvent, touch;
255 |
256 | // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
257 | if (document.activeElement && document.activeElement !== targetElement) {
258 | document.activeElement.blur();
259 | }
260 |
261 | touch = event.changedTouches[0];
262 |
263 | // Synthesise a click event, with an extra attribute so it can be tracked
264 | clickEvent = document.createEvent('MouseEvents');
265 | clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
266 | clickEvent.forwardedTouchEvent = true;
267 | targetElement.dispatchEvent(clickEvent);
268 | };
269 |
270 |
271 | /**
272 | * @param {EventTarget|Element} targetElement
273 | */
274 | FastClick.prototype.focus = function(targetElement) {
275 | 'use strict';
276 | var length;
277 |
278 | if (this.deviceIsIOS && targetElement.setSelectionRange) {
279 | length = targetElement.value.length;
280 | targetElement.setSelectionRange(length, length);
281 | } else {
282 | targetElement.focus();
283 | }
284 | };
285 |
286 |
287 | /**
288 | * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
289 | *
290 | * @param {EventTarget|Element} targetElement
291 | */
292 | FastClick.prototype.updateScrollParent = function(targetElement) {
293 | 'use strict';
294 | var scrollParent, parentElement;
295 |
296 | scrollParent = targetElement.fastClickScrollParent;
297 |
298 | // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
299 | // target element was moved to another parent.
300 | if (!scrollParent || !scrollParent.contains(targetElement)) {
301 | parentElement = targetElement;
302 | do {
303 | if (parentElement.scrollHeight > parentElement.offsetHeight) {
304 | scrollParent = parentElement;
305 | targetElement.fastClickScrollParent = parentElement;
306 | break;
307 | }
308 |
309 | parentElement = parentElement.parentElement;
310 | } while (parentElement);
311 | }
312 |
313 | // Always update the scroll top tracker if possible.
314 | if (scrollParent) {
315 | scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
316 | }
317 | };
318 |
319 |
320 | /**
321 | * @param {EventTarget} targetElement
322 | * @returns {Element|EventTarget}
323 | */
324 | FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
325 | 'use strict';
326 |
327 | // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
328 | if (eventTarget.nodeType === Node.TEXT_NODE) {
329 | return eventTarget.parentNode;
330 | }
331 |
332 | return eventTarget;
333 | };
334 |
335 |
336 | /**
337 | * On touch start, record the position and scroll offset.
338 | *
339 | * @param {Event} event
340 | * @returns {boolean}
341 | */
342 | FastClick.prototype.onTouchStart = function(event) {
343 | 'use strict';
344 | var targetElement, touch, selection;
345 |
346 | targetElement = this.getTargetElementFromEventTarget(event.target);
347 | touch = event.targetTouches[0];
348 |
349 | if (this.deviceIsIOS) {
350 |
351 | // Only trusted events will deselect text on iOS (issue #49)
352 | selection = window.getSelection();
353 | if (selection.rangeCount && !selection.isCollapsed) {
354 | return true;
355 | }
356 |
357 | if (!this.deviceIsIOS4) {
358 |
359 | // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
360 | // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
361 | // with the same identifier as the touch event that previously triggered the click that triggered the alert.
362 | // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
363 | // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
364 | if (touch.identifier === this.lastTouchIdentifier) {
365 | event.preventDefault();
366 | return false;
367 | }
368 |
369 | this.lastTouchIdentifier = touch.identifier;
370 |
371 | // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
372 | // 1) the user does a fling scroll on the scrollable layer
373 | // 2) the user stops the fling scroll with another tap
374 | // then the event.target of the last 'touchend' event will be the element that was under the user's finger
375 | // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
376 | // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
377 | this.updateScrollParent(targetElement);
378 | }
379 | }
380 |
381 | this.trackingClick = true;
382 | this.trackingClickStart = event.timeStamp;
383 | this.targetElement = targetElement;
384 |
385 | this.touchStartX = touch.pageX;
386 | this.touchStartY = touch.pageY;
387 |
388 | // Prevent phantom clicks on fast double-tap (issue #36)
389 | if ((event.timeStamp - this.lastClickTime) < 200) {
390 | event.preventDefault();
391 | }
392 |
393 | return true;
394 | };
395 |
396 |
397 | /**
398 | * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
399 | *
400 | * @param {Event} event
401 | * @returns {boolean}
402 | */
403 | FastClick.prototype.touchHasMoved = function(event) {
404 | 'use strict';
405 | var touch = event.changedTouches[0];
406 |
407 | if (Math.abs(touch.pageX - this.touchStartX) > 10 || Math.abs(touch.pageY - this.touchStartY) > 10) {
408 | return true;
409 | }
410 |
411 | return false;
412 | };
413 |
414 |
415 | /**
416 | * Attempt to find the labelled control for the given label element.
417 | *
418 | * @param {EventTarget|HTMLLabelElement} labelElement
419 | * @returns {Element|null}
420 | */
421 | FastClick.prototype.findControl = function(labelElement) {
422 | 'use strict';
423 |
424 | // Fast path for newer browsers supporting the HTML5 control attribute
425 | if (labelElement.control !== undefined) {
426 | return labelElement.control;
427 | }
428 |
429 | // All browsers under test that support touch events also support the HTML5 htmlFor attribute
430 | if (labelElement.htmlFor) {
431 | return document.getElementById(labelElement.htmlFor);
432 | }
433 |
434 | // If no for attribute exists, attempt to retrieve the first labellable descendant element
435 | // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
436 | return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
437 | };
438 |
439 |
440 | /**
441 | * On touch end, determine whether to send a click event at once.
442 | *
443 | * @param {Event} event
444 | * @returns {boolean}
445 | */
446 | FastClick.prototype.onTouchEnd = function(event) {
447 | 'use strict';
448 | var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
449 |
450 | // If the touch has moved, cancel the click tracking
451 | if (this.touchHasMoved(event)) {
452 | this.trackingClick = false;
453 | this.targetElement = null;
454 | }
455 |
456 | if (!this.trackingClick) {
457 | return true;
458 | }
459 |
460 | // Prevent phantom clicks on fast double-tap (issue #36)
461 | if ((event.timeStamp - this.lastClickTime) < 200) {
462 | this.cancelNextClick = true;
463 | return true;
464 | }
465 |
466 | this.lastClickTime = event.timeStamp;
467 |
468 | trackingClickStart = this.trackingClickStart;
469 | this.trackingClick = false;
470 | this.trackingClickStart = 0;
471 |
472 | // On some iOS devices, the targetElement supplied with the event is invalid if the layer
473 | // is performing a transition or scroll, and has to be re-detected manually. Note that
474 | // for this to function correctly, it must be called *after* the event target is checked!
475 | // See issue #57; also filed as rdar://13048589 .
476 | if (this.deviceIsIOSWithBadTarget) {
477 | touch = event.changedTouches[0];
478 | targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset);
479 | }
480 |
481 | targetTagName = targetElement.tagName.toLowerCase();
482 | if (targetTagName === 'label') {
483 | forElement = this.findControl(targetElement);
484 | if (forElement) {
485 | this.focus(targetElement);
486 | if (this.deviceIsAndroid) {
487 | return false;
488 | }
489 |
490 | targetElement = forElement;
491 | }
492 | } else if (this.needsFocus(targetElement)) {
493 |
494 | // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
495 | // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
496 | if ((event.timeStamp - trackingClickStart) > 100 || (this.deviceIsIOS && window.top !== window && targetTagName === 'input')) {
497 | this.targetElement = null;
498 | return false;
499 | }
500 |
501 | this.focus(targetElement);
502 |
503 | // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
504 | if (!this.deviceIsIOS4 || targetTagName !== 'select') {
505 | this.targetElement = null;
506 | event.preventDefault();
507 | }
508 |
509 | return false;
510 | }
511 |
512 | if (this.deviceIsIOS && !this.deviceIsIOS4) {
513 |
514 | // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
515 | // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
516 | scrollParent = targetElement.fastClickScrollParent;
517 | if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
518 | return true;
519 | }
520 | }
521 |
522 | // Prevent the actual click from going though - unless the target node is marked as requiring
523 | // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
524 | if (!this.needsClick(targetElement)) {
525 | event.preventDefault();
526 | this.sendClick(targetElement, event);
527 | }
528 |
529 | return false;
530 | };
531 |
532 |
533 | /**
534 | * On touch cancel, stop tracking the click.
535 | *
536 | * @returns {void}
537 | */
538 | FastClick.prototype.onTouchCancel = function() {
539 | 'use strict';
540 | this.trackingClick = false;
541 | this.targetElement = null;
542 | };
543 |
544 |
545 | /**
546 | * Determine mouse events which should be permitted.
547 | *
548 | * @param {Event} event
549 | * @returns {boolean}
550 | */
551 | FastClick.prototype.onMouse = function(event) {
552 | 'use strict';
553 |
554 | // If a target element was never set (because a touch event was never fired) allow the event
555 | if (!this.targetElement) {
556 | return true;
557 | }
558 |
559 | if (event.forwardedTouchEvent) {
560 | return true;
561 | }
562 |
563 | // Programmatically generated events targeting a specific element should be permitted
564 | if (!event.cancelable) {
565 | return true;
566 | }
567 |
568 | // Derive and check the target element to see whether the mouse event needs to be permitted;
569 | // unless explicitly enabled, prevent non-touch click events from triggering actions,
570 | // to prevent ghost/doubleclicks.
571 | if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
572 |
573 | // Prevent any user-added listeners declared on FastClick element from being fired.
574 | if (event.stopImmediatePropagation) {
575 | event.stopImmediatePropagation();
576 | } else {
577 |
578 | // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
579 | event.propagationStopped = true;
580 | }
581 |
582 | // Cancel the event
583 | event.stopPropagation();
584 | event.preventDefault();
585 |
586 | return false;
587 | }
588 |
589 | // If the mouse event is permitted, return true for the action to go through.
590 | return true;
591 | };
592 |
593 |
594 | /**
595 | * On actual clicks, determine whether this is a touch-generated click, a click action occurring
596 | * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
597 | * an actual click which should be permitted.
598 | *
599 | * @param {Event} event
600 | * @returns {boolean}
601 | */
602 | FastClick.prototype.onClick = function(event) {
603 | 'use strict';
604 | var permitted;
605 |
606 | // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
607 | if (this.trackingClick) {
608 | this.targetElement = null;
609 | this.trackingClick = false;
610 | return true;
611 | }
612 |
613 | // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
614 | if (event.target.type === 'submit' && event.detail === 0) {
615 | return true;
616 | }
617 |
618 | permitted = this.onMouse(event);
619 |
620 | // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
621 | if (!permitted) {
622 | this.targetElement = null;
623 | }
624 |
625 | // If clicks are permitted, return true for the action to go through.
626 | return permitted;
627 | };
628 |
629 |
630 | /**
631 | * Remove all FastClick's event listeners.
632 | *
633 | * @returns {void}
634 | */
635 | FastClick.prototype.destroy = function() {
636 | 'use strict';
637 | var layer = this.layer;
638 |
639 | if (this.deviceIsAndroid) {
640 | layer.removeEventListener('mouseover', this.onMouse, true);
641 | layer.removeEventListener('mousedown', this.onMouse, true);
642 | layer.removeEventListener('mouseup', this.onMouse, true);
643 | }
644 |
645 | layer.removeEventListener('click', this.onClick, true);
646 | layer.removeEventListener('touchstart', this.onTouchStart, false);
647 | layer.removeEventListener('touchend', this.onTouchEnd, false);
648 | layer.removeEventListener('touchcancel', this.onTouchCancel, false);
649 | };
650 |
651 |
652 | FastClick.notNeeded = function() {
653 | 'use strict';
654 | var metaViewport;
655 |
656 | // Devices that don't support touch don't need FastClick
657 | if (typeof window.ontouchstart === 'undefined') {
658 | return true;
659 | }
660 |
661 | if ((/Chrome\/[0-9]+/).test(navigator.userAgent)) {
662 |
663 | // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
664 | if (FastClick.prototype.deviceIsAndroid) {
665 | metaViewport = document.querySelector('meta[name=viewport]');
666 | if (metaViewport && metaViewport.content.indexOf('user-scalable=no') !== -1) {
667 | return true;
668 | }
669 |
670 | // Chrome desktop doesn't need FastClick (issue #15)
671 | } else {
672 | return true;
673 | }
674 | }
675 |
676 | return false;
677 | };
678 |
679 |
680 | /**
681 | * Factory method for creating a FastClick object
682 | *
683 | * @param {Element} layer The layer to listen on
684 | */
685 | FastClick.attach = function(layer) {
686 | 'use strict';
687 | return new FastClick(layer);
688 | };
689 |
690 |
691 | if (typeof define !== 'undefined' && define.amd) {
692 |
693 | // AMD. Register as an anonymous module.
694 | define(function() {
695 | 'use strict';
696 | return FastClick;
697 | });
698 | } else if (typeof module !== 'undefined' && module.exports) {
699 | module.exports = FastClick.attach;
700 | module.exports.FastClick = FastClick;
701 | } else {
702 | window.FastClick = FastClick;
703 | }
704 |
--------------------------------------------------------------------------------
/js/jquery.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
3 | },_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"