├── img
└── logo.png
├── README.md
├── index.html
├── css
├── stylesheet.css
└── normalize.css
└── js
├── buttonmasher.js
├── sha.js
└── jquery.js
/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CoR/Buttonmasher/master/img/logo.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Buttonmasher
2 | Keep mashing buttons until you crack the code!
3 | (or write a script to do it for you).
4 |
5 | There's no way to know the secret code by looking at the source because it is encrypted using a SHA-512 hash
6 |
7 | Good luck!
8 |
9 | written using simple JavaScript, jQuery and sha.js
10 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | buttonmasher.js
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
Buttonmasher
43 |
44 |
Try to crack the code by mashing buttons
45 |
46 |
47 | The code is encrypted in SHA-512 hash so
48 | your best chance at
49 | cracking the code
50 | is either just mashing
51 | buttons (hence the name)
52 | or DDOS'ing
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/css/stylesheet.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Helvetica, Arial, "Lucida Grande", sans-serif;
3 | background-color: #f9f8eb
4 |
5 | }
6 |
7 | .buttonContainer > p {
8 |
9 | color: #504940;
10 | margin-top: -15px;
11 | margin-bottom: 20px;
12 | }
13 |
14 | .gameTitle {
15 | color: #635b52;
16 | }
17 |
18 | .wrongCode {
19 | color: red;
20 | }
21 |
22 |
23 | .testButton {
24 |
25 | background: #eaded2;
26 | color: #635b52;
27 |
28 | height: 70px;
29 | width: 70px;
30 |
31 | border: 5px solid green;
32 | border-radius: 5px;
33 |
34 | padding: 5px;
35 | margin: 0 10px 0 10px;
36 | position: absolute;
37 |
38 | top: 110px;
39 |
40 | }
41 |
42 | .testButton_1 {
43 | border-color: #f1462d;
44 | left: 10px;
45 | }
46 | .testButton_2 {
47 | border-color: #f1644d;
48 | left: 106px;
49 | }
50 | .testButton_3 {
51 | border-color: #f18152;
52 | left: 203px;
53 | }
54 | .testButton_4 {
55 | border-color: #e8bd3f;
56 | left: 300px;
57 | }
58 |
59 |
60 | .buttonContainer {
61 |
62 | width: 400px;
63 | height: 200px;
64 |
65 |
66 | position: absolute;
67 | top: 50px;
68 | left: 50%;
69 | margin-left: -325px;
70 |
71 | text-align: center;
72 | background-color: #c1b3a4;
73 | border-radius: 10px;
74 | }
75 |
76 | .numberDisplay {
77 |
78 | width: 200px;
79 | height: 100px;
80 |
81 | position: absolute;
82 | top: 50px;
83 | left: 50%;
84 | margin-left: 125px;
85 |
86 | padding: 50px 0 ;
87 |
88 | text-align: center;
89 | font-size: 70px;
90 |
91 | color: #504940;
92 | background-color: #c1b3a4;
93 | border-radius: 10px;
94 |
95 | }
96 |
97 |
98 | .secretImage {
99 |
100 | position: absolute;
101 | top: 300px;
102 | left: 50%;
103 | margin-left: -325px;
104 |
105 | width: 400px;
106 | height: 400px;
107 |
108 |
109 | background-color: #c1b3a4;
110 | border-radius: 10px;
111 | }
112 |
113 | .codeCrackedMessage {
114 | width: 360px;
115 | height: 250px;
116 |
117 | position: absolute;
118 | top: 125px;
119 | left: 20px;
120 | background-color: #ad9d8f;
121 | border-radius: 10px;
122 |
123 |
124 | }
125 | .codeCrackedMessage > h2 {
126 | text-align: center;
127 | font-size: 30px;
128 | color: green;
129 | }
130 |
131 | .codeCrackedMessage > p {
132 | text-align: center;
133 | margin-top: -10px;
134 |
135 |
136 | }
137 |
138 | .wrongCode {
139 | color: #e3161a;
140 | text-align: center;
141 | }
142 |
143 | .wrongCode > h2 {
144 | font-size: 30px;
145 | }
146 |
147 | .info {
148 | width: 200px;
149 | height: 400px;
150 |
151 | position: absolute;
152 | top: 300px;
153 | left: 50%;
154 | margin-left: 125px;
155 |
156 |
157 | background-color: #c1b3a4;
158 | border-radius: 10px;
159 |
160 | text-align: center;
161 | color:#504940;
162 |
163 | }
164 |
165 | .infoTitle {
166 | font-size: 26px;
167 | }
168 |
169 | .info p {
170 | margin-bottom: 10px;
171 | }
172 |
173 | .info img {
174 | width: 80px;
175 |
176 | left: 60px;
177 | bottom: 60px;
178 | position: absolute;
179 |
180 | }
181 |
182 |
183 |
184 | .codepad {
185 | position: absolute;
186 | top: 320px;
187 | left: 50%;
188 | margin-left: -305px;
189 |
190 | width: 360px;
191 | height: 86px;
192 |
193 |
194 | background-color: #ad9d8f;
195 | border-radius: 10px;
196 | }
197 |
198 |
199 | .enteredCodeDisplay_1 {
200 | background-color: rgb(255, 255, 255);
201 | height: 70px;
202 | width: 70px;
203 |
204 | position: absolute;
205 | top: 8px;
206 | left: 8px;
207 | border-radius: 5px;
208 | }
209 |
210 | .enteredCodeDisplay_2 {
211 | background-color: rgb(255, 255, 255);
212 | height: 70px;
213 | width: 70px;
214 |
215 | position: absolute;
216 | top: 8px;
217 | left: 100px;
218 | border-radius: 5px;
219 | }
220 |
221 | .enteredCodeDisplay_3 {
222 | background-color: rgb(255, 255, 255);
223 | height: 70px;
224 | width: 70px;
225 |
226 | position: absolute;
227 | top: 8px;
228 | left: 191px;
229 | border-radius: 5px;
230 | }
231 |
232 | .enteredCodeDisplay_4 {
233 | background-color: rgb(255, 255, 255);
234 | height: 70px;
235 | width: 70px;
236 |
237 | position: absolute;
238 | top: 8px;
239 | left: 283px;
240 | border-radius: 5px;
241 | }
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
--------------------------------------------------------------------------------
/js/buttonmasher.js:
--------------------------------------------------------------------------------
1 | var NUMBER_OF_STYLES = 4;
2 | var NUMBER_OF_BUTTONS = 4;
3 |
4 | var SECRET_CODE_HASHED = "1a78e5ac8e76a77ed8cb97d1789e53a679e8a8c33baa2192c38ad9e69781e3a8d514799916a21471bb441eae98228ecb86dde605dcb94f835e6243cfda66b5fc";
5 | var SECRET_CODE_LENGTH = 4;
6 |
7 | // used for hash
8 | var numberSystem = NUMBER_OF_BUTTONS + 1
9 | var divider = Math.pow(numberSystem, SECRET_CODE_LENGTH - 1);
10 |
11 | var numberDisplayCount = 0;
12 | var enteredCode = 0;
13 | var codeCracked = false;
14 |
15 |
16 | $(document).ready(function(){
17 |
18 |
19 | /**
20 | * clone the button a specific amount of times (NUMBER_OF_BUTTONS)
21 | */
22 | for (var i = 1; i < NUMBER_OF_BUTTONS; i++) {
23 | $(".testButton").first().clone().appendTo(".buttonContainer");
24 | }
25 |
26 | /**
27 | * Show how many buttons are pressed on the numberDisplay
28 | */
29 | $("div.numberDisplay").html(numberDisplayCount);
30 |
31 | /**
32 | * Add CSS styles to each button for use in the stylesheet
33 | */
34 | $(".testButton").each(function(index) {
35 | $(this).addClass("testButton_" + ((index % NUMBER_OF_STYLES) + 1));
36 | });
37 |
38 | $(".testButton").click(function(event){
39 |
40 | if (!codeCracked) {
41 | numberDisplayCount++;
42 | $("div.numberDisplay").html(numberDisplayCount);
43 |
44 | //use jquery to check what button is pressed and convert it to 1-based
45 | var lastEnteredButton = $(event.target).index(".testButton") + 1;
46 |
47 | //Change the colors in the colordisplay
48 | if ($(".enteredCodeDisplay_1").css("background-color") == "rgb(255, 255, 255)" ) {
49 |
50 | if (lastEnteredButton == 1) $(".enteredCodeDisplay_1").css("background-color", "rgb(235, 46, 34)");
51 | else if (lastEnteredButton == 2) $(".enteredCodeDisplay_1").css("background-color", "rgb(235, 75, 61)");
52 | else if (lastEnteredButton == 3) $(".enteredCodeDisplay_1").css("background-color", "rgb(235, 107, 64)");
53 | else if (lastEnteredButton == 4) $(".enteredCodeDisplay_1").css("background-color", "rgb(226, 177, 49)");
54 | else $(".enteredCodeDisplay_1").css("background-color", "pink");
55 | }
56 | else if ($(".enteredCodeDisplay_2").css("background-color") == "rgb(255, 255, 255)" ) {
57 |
58 | if (lastEnteredButton == 1) $(".enteredCodeDisplay_2").css("background-color", "rgb(235, 46, 34)");
59 | else if (lastEnteredButton == 2) $(".enteredCodeDisplay_2").css("background-color", "rgb(235, 75, 61)");
60 | else if (lastEnteredButton == 3) $(".enteredCodeDisplay_2").css("background-color", "rgb(235, 107, 64)");
61 | else if (lastEnteredButton == 4) $(".enteredCodeDisplay_2").css("background-color", "rgb(226, 177, 49)");
62 | else $(".enteredCodeDisplay_2").css("background-color", "pink");
63 | }
64 | else if ($(".enteredCodeDisplay_3").css("background-color") == "rgb(255, 255, 255)" ) {
65 |
66 | if (lastEnteredButton == 1) $(".enteredCodeDisplay_3").css("background-color", "rgb(235, 46, 34)");
67 | else if (lastEnteredButton == 2) $(".enteredCodeDisplay_3").css("background-color", "rgb(235, 75, 61)");
68 | else if (lastEnteredButton == 3) $(".enteredCodeDisplay_3").css("background-color", "rgb(235, 107, 64)");
69 | else if (lastEnteredButton == 4) $(".enteredCodeDisplay_3").css("background-color", "rgb(226, 177, 49)");
70 | else $(".enteredCodeDisplay_3").css("background-color", "pink");
71 | }
72 | else if ($(".enteredCodeDisplay_4").css("background-color") == "rgb(255, 255, 255)" ) {
73 |
74 | if (lastEnteredButton == 1) $(".enteredCodeDisplay_4").css("background-color", "rgb(235, 46, 34)");
75 | else if (lastEnteredButton == 2) $(".enteredCodeDisplay_4").css("background-color", "rgb(235, 75, 61)");
76 | else if (lastEnteredButton == 3) $(".enteredCodeDisplay_4").css("background-color", "rgb(235, 107, 64)");
77 | else if (lastEnteredButton == 4) $(".enteredCodeDisplay_4").css("background-color", "rgb(226, 177, 49)");
78 | else $(".enteredCodeDisplay_4").css("background-color", "pink");
79 | }
80 | else {
81 | $(".enteredCodeDisplay_1").css("background-color", "rgb(255, 255, 255)");
82 | $(".enteredCodeDisplay_2").css("background-color", "rgb(255, 255, 255)");
83 | $(".enteredCodeDisplay_3").css("background-color", "rgb(255, 255, 255)");
84 | $(".enteredCodeDisplay_4").css("background-color", "rgb(255, 255, 255)");
85 |
86 | if (lastEnteredButton == 1) $(".enteredCodeDisplay_1").css("background-color", "rgb(235, 46, 34)");
87 | else if (lastEnteredButton == 2) $(".enteredCodeDisplay_1").css("background-color", "rgb(235, 75, 61)");
88 | else if (lastEnteredButton == 3) $(".enteredCodeDisplay_1").css("background-color", "rgb(235, 107, 64)");
89 | else if (lastEnteredButton == 4) $(".enteredCodeDisplay_1").css("background-color", "rgb(226, 177, 49)");
90 | else $(".enteredCodeDisplay_1").css("background-color", "pink");
91 | $(".secretImage").html('WRONG CODE! Please try again
');
92 | enteredCode = 0;
93 | }
94 |
95 |
96 | //Use a mathematical algorithm to store the pressed button in enteredCode
97 | enteredCode = enteredCode % divider;
98 | enteredCode *= numberSystem;
99 | enteredCode += lastEnteredButton;
100 |
101 | // convert entered code to a SHA-512 hash string
102 | var enteredCodeHashed = hex_sha512("" + enteredCode);
103 |
104 | // If the code is correct, do stuff
105 | if (SECRET_CODE_HASHED == enteredCodeHashed) {
106 | codeCracked = true;
107 | $(".secretImage").html('You cracked the code! Congratulations!
');
108 |
109 | }
110 | }
111 | });
112 | });
--------------------------------------------------------------------------------
/css/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v3.0.0 | MIT License | git.io/normalize */
2 |
3 | /**
4 | * 1. Set default font family to sans-serif.
5 | * 2. Prevent iOS text size adjust after orientation change, without disabling
6 | * user zoom.
7 | */
8 |
9 | html {
10 | font-family: sans-serif; /* 1 */
11 | -ms-text-size-adjust: 100%; /* 2 */
12 | -webkit-text-size-adjust: 100%; /* 2 */
13 | }
14 |
15 | /**
16 | * Remove default margin.
17 | */
18 |
19 | body {
20 | margin: 0;
21 | }
22 |
23 | /* HTML5 display definitions
24 | ========================================================================== */
25 |
26 | /**
27 | * Correct `block` display not defined in IE 8/9.
28 | */
29 |
30 | article,
31 | aside,
32 | details,
33 | figcaption,
34 | figure,
35 | footer,
36 | header,
37 | hgroup,
38 | main,
39 | nav,
40 | section,
41 | summary {
42 | display: block;
43 | }
44 |
45 | /**
46 | * 1. Correct `inline-block` display not defined in IE 8/9.
47 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
48 | */
49 |
50 | audio,
51 | canvas,
52 | progress,
53 | video {
54 | display: inline-block; /* 1 */
55 | vertical-align: baseline; /* 2 */
56 | }
57 |
58 | /**
59 | * Prevent modern browsers from displaying `audio` without controls.
60 | * Remove excess height in iOS 5 devices.
61 | */
62 |
63 | audio:not([controls]) {
64 | display: none;
65 | height: 0;
66 | }
67 |
68 | /**
69 | * Address `[hidden]` styling not present in IE 8/9.
70 | * Hide the `template` element in IE, Safari, and Firefox < 22.
71 | */
72 |
73 | [hidden],
74 | template {
75 | display: none;
76 | }
77 |
78 | /* Links
79 | ========================================================================== */
80 |
81 | /**
82 | * Remove the gray background color from active links in IE 10.
83 | */
84 |
85 | a {
86 | background: transparent;
87 | }
88 |
89 | /**
90 | * Improve readability when focused and also mouse hovered in all browsers.
91 | */
92 |
93 | a:active,
94 | a:hover {
95 | outline: 0;
96 | }
97 |
98 | /* Text-level semantics
99 | ========================================================================== */
100 |
101 | /**
102 | * Address styling not present in IE 8/9, Safari 5, and Chrome.
103 | */
104 |
105 | abbr[title] {
106 | border-bottom: 1px dotted;
107 | }
108 |
109 | /**
110 | * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
111 | */
112 |
113 | b,
114 | strong {
115 | font-weight: bold;
116 | }
117 |
118 | /**
119 | * Address styling not present in Safari 5 and Chrome.
120 | */
121 |
122 | dfn {
123 | font-style: italic;
124 | }
125 |
126 | /**
127 | * Address variable `h1` font-size and margin within `section` and `article`
128 | * contexts in Firefox 4+, Safari 5, and Chrome.
129 | */
130 |
131 | h1 {
132 | font-size: 2em;
133 | margin: 0.67em 0;
134 | }
135 |
136 | /**
137 | * Address styling not present in IE 8/9.
138 | */
139 |
140 | mark {
141 | background: #ff0;
142 | color: #000;
143 | }
144 |
145 | /**
146 | * Address inconsistent and variable font size in all browsers.
147 | */
148 |
149 | small {
150 | font-size: 80%;
151 | }
152 |
153 | /**
154 | * Prevent `sub` and `sup` affecting `line-height` in all browsers.
155 | */
156 |
157 | sub,
158 | sup {
159 | font-size: 75%;
160 | line-height: 0;
161 | position: relative;
162 | vertical-align: baseline;
163 | }
164 |
165 | sup {
166 | top: -0.5em;
167 | }
168 |
169 | sub {
170 | bottom: -0.25em;
171 | }
172 |
173 | /* Embedded content
174 | ========================================================================== */
175 |
176 | /**
177 | * Remove border when inside `a` element in IE 8/9.
178 | */
179 |
180 | img {
181 | border: 0;
182 | }
183 |
184 | /**
185 | * Correct overflow displayed oddly in IE 9.
186 | */
187 |
188 | svg:not(:root) {
189 | overflow: hidden;
190 | }
191 |
192 | /* Grouping content
193 | ========================================================================== */
194 |
195 | /**
196 | * Address margin not present in IE 8/9 and Safari 5.
197 | */
198 |
199 | figure {
200 | margin: 1em 40px;
201 | }
202 |
203 | /**
204 | * Address differences between Firefox and other browsers.
205 | */
206 |
207 | hr {
208 | -moz-box-sizing: content-box;
209 | box-sizing: content-box;
210 | height: 0;
211 | }
212 |
213 | /**
214 | * Contain overflow in all browsers.
215 | */
216 |
217 | pre {
218 | overflow: auto;
219 | }
220 |
221 | /**
222 | * Address odd `em`-unit font size rendering in all browsers.
223 | */
224 |
225 | code,
226 | kbd,
227 | pre,
228 | samp {
229 | font-family: monospace, monospace;
230 | font-size: 1em;
231 | }
232 |
233 | /* Forms
234 | ========================================================================== */
235 |
236 | /**
237 | * Known limitation: by default, Chrome and Safari on OS X allow very limited
238 | * styling of `select`, unless a `border` property is set.
239 | */
240 |
241 | /**
242 | * 1. Correct color not being inherited.
243 | * Known issue: affects color of disabled elements.
244 | * 2. Correct font properties not being inherited.
245 | * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
246 | */
247 |
248 | button,
249 | input,
250 | optgroup,
251 | select,
252 | textarea {
253 | color: inherit; /* 1 */
254 | font: inherit; /* 2 */
255 | margin: 0; /* 3 */
256 | }
257 |
258 | /**
259 | * Address `overflow` set to `hidden` in IE 8/9/10.
260 | */
261 |
262 | button {
263 | overflow: visible;
264 | }
265 |
266 | /**
267 | * Address inconsistent `text-transform` inheritance for `button` and `select`.
268 | * All other form control elements do not inherit `text-transform` values.
269 | * Correct `button` style inheritance in Firefox, IE 8+, and Opera
270 | * Correct `select` style inheritance in Firefox.
271 | */
272 |
273 | button,
274 | select {
275 | text-transform: none;
276 | }
277 |
278 | /**
279 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
280 | * and `video` controls.
281 | * 2. Correct inability to style clickable `input` types in iOS.
282 | * 3. Improve usability and consistency of cursor style between image-type
283 | * `input` and others.
284 | */
285 |
286 | button,
287 | html input[type="button"], /* 1 */
288 | input[type="reset"],
289 | input[type="submit"] {
290 | -webkit-appearance: button; /* 2 */
291 | cursor: pointer; /* 3 */
292 | }
293 |
294 | /**
295 | * Re-set default cursor for disabled elements.
296 | */
297 |
298 | button[disabled],
299 | html input[disabled] {
300 | cursor: default;
301 | }
302 |
303 | /**
304 | * Remove inner padding and border in Firefox 4+.
305 | */
306 |
307 | button::-moz-focus-inner,
308 | input::-moz-focus-inner {
309 | border: 0;
310 | padding: 0;
311 | }
312 |
313 | /**
314 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in
315 | * the UA stylesheet.
316 | */
317 |
318 | input {
319 | line-height: normal;
320 | }
321 |
322 | /**
323 | * It's recommended that you don't attempt to style these elements.
324 | * Firefox's implementation doesn't respect box-sizing, padding, or width.
325 | *
326 | * 1. Address box sizing set to `content-box` in IE 8/9/10.
327 | * 2. Remove excess padding in IE 8/9/10.
328 | */
329 |
330 | input[type="checkbox"],
331 | input[type="radio"] {
332 | box-sizing: border-box; /* 1 */
333 | padding: 0; /* 2 */
334 | }
335 |
336 | /**
337 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain
338 | * `font-size` values of the `input`, it causes the cursor style of the
339 | * decrement button to change from `default` to `text`.
340 | */
341 |
342 | input[type="number"]::-webkit-inner-spin-button,
343 | input[type="number"]::-webkit-outer-spin-button {
344 | height: auto;
345 | }
346 |
347 | /**
348 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
349 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
350 | * (include `-moz` to future-proof).
351 | */
352 |
353 | input[type="search"] {
354 | -webkit-appearance: textfield; /* 1 */
355 | -moz-box-sizing: content-box;
356 | -webkit-box-sizing: content-box; /* 2 */
357 | box-sizing: content-box;
358 | }
359 |
360 | /**
361 | * Remove inner padding and search cancel button in Safari and Chrome on OS X.
362 | * Safari (but not Chrome) clips the cancel button when the search input has
363 | * padding (and `textfield` appearance).
364 | */
365 |
366 | input[type="search"]::-webkit-search-cancel-button,
367 | input[type="search"]::-webkit-search-decoration {
368 | -webkit-appearance: none;
369 | }
370 |
371 | /**
372 | * Define consistent border, margin, and padding.
373 | */
374 |
375 | fieldset {
376 | border: 1px solid #c0c0c0;
377 | margin: 0 2px;
378 | padding: 0.35em 0.625em 0.75em;
379 | }
380 |
381 | /**
382 | * 1. Correct `color` not being inherited in IE 8/9.
383 | * 2. Remove padding so people aren't caught out if they zero out fieldsets.
384 | */
385 |
386 | legend {
387 | border: 0; /* 1 */
388 | padding: 0; /* 2 */
389 | }
390 |
391 | /**
392 | * Remove default vertical scrollbar in IE 8/9.
393 | */
394 |
395 | textarea {
396 | overflow: auto;
397 | }
398 |
399 | /**
400 | * Don't inherit the `font-weight` (applied by a rule above).
401 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
402 | */
403 |
404 | optgroup {
405 | font-weight: bold;
406 | }
407 |
408 | /* Tables
409 | ========================================================================== */
410 |
411 | /**
412 | * Remove most spacing between table cells.
413 | */
414 |
415 | table {
416 | border-collapse: collapse;
417 | border-spacing: 0;
418 | }
419 |
420 | td,
421 | th {
422 | padding: 0;
423 | }
424 |
--------------------------------------------------------------------------------
/js/sha.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * A JavaScript implementation of the Secure Hash Algorithm, SHA-512, as defined
4 | * in FIPS 180-2
5 | * Version 2.2 Copyright Anonymous Contributor, Paul Johnston 2000 - 2009.
6 | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
7 | * Distributed under the BSD License
8 | * See http://pajhome.org.uk/crypt/md5 for details.
9 | */
10 |
11 | /*
12 | * Configurable variables. You may need to tweak these to be compatible with
13 | * the server-side, but the defaults work in most cases.
14 | */
15 | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
16 | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
17 |
18 | /*
19 | * These are the functions you'll usually want to call
20 | * They take string arguments and return either hex or base-64 encoded strings
21 | */
22 | function hex_sha512(s) { return rstr2hex(rstr_sha512(str2rstr_utf8(s))); }
23 | function b64_sha512(s) { return rstr2b64(rstr_sha512(str2rstr_utf8(s))); }
24 | function any_sha512(s, e) { return rstr2any(rstr_sha512(str2rstr_utf8(s)), e);}
25 | function hex_hmac_sha512(k, d)
26 | { return rstr2hex(rstr_hmac_sha512(str2rstr_utf8(k), str2rstr_utf8(d))); }
27 | function b64_hmac_sha512(k, d)
28 | { return rstr2b64(rstr_hmac_sha512(str2rstr_utf8(k), str2rstr_utf8(d))); }
29 | function any_hmac_sha512(k, d, e)
30 | { return rstr2any(rstr_hmac_sha512(str2rstr_utf8(k), str2rstr_utf8(d)), e);}
31 |
32 | /*
33 | * Perform a simple self-test to see if the VM is working
34 | */
35 | function sha512_vm_test()
36 | {
37 | return hex_sha512("abc").toLowerCase() ==
38 | "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a" +
39 | "2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f";
40 | }
41 |
42 | /*
43 | * Calculate the SHA-512 of a raw string
44 | */
45 | function rstr_sha512(s)
46 | {
47 | return binb2rstr(binb_sha512(rstr2binb(s), s.length * 8));
48 | }
49 |
50 | /*
51 | * Calculate the HMAC-SHA-512 of a key and some data (raw strings)
52 | */
53 | function rstr_hmac_sha512(key, data)
54 | {
55 | var bkey = rstr2binb(key);
56 | if(bkey.length > 32) bkey = binb_sha512(bkey, key.length * 8);
57 |
58 | var ipad = Array(32), opad = Array(32);
59 | for(var i = 0; i < 32; i++)
60 | {
61 | ipad[i] = bkey[i] ^ 0x36363636;
62 | opad[i] = bkey[i] ^ 0x5C5C5C5C;
63 | }
64 |
65 | var hash = binb_sha512(ipad.concat(rstr2binb(data)), 1024 + data.length * 8);
66 | return binb2rstr(binb_sha512(opad.concat(hash), 1024 + 512));
67 | }
68 |
69 | /*
70 | * Convert a raw string to a hex string
71 | */
72 | function rstr2hex(input)
73 | {
74 | try { hexcase } catch(e) { hexcase=0; }
75 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
76 | var output = "";
77 | var x;
78 | for(var i = 0; i < input.length; i++)
79 | {
80 | x = input.charCodeAt(i);
81 | output += hex_tab.charAt((x >>> 4) & 0x0F)
82 | + hex_tab.charAt( x & 0x0F);
83 | }
84 | return output;
85 | }
86 |
87 | /*
88 | * Convert a raw string to a base-64 string
89 | */
90 | function rstr2b64(input)
91 | {
92 | try { b64pad } catch(e) { b64pad=''; }
93 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
94 | var output = "";
95 | var len = input.length;
96 | for(var i = 0; i < len; i += 3)
97 | {
98 | var triplet = (input.charCodeAt(i) << 16)
99 | | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
100 | | (i + 2 < len ? input.charCodeAt(i+2) : 0);
101 | for(var j = 0; j < 4; j++)
102 | {
103 | if(i * 8 + j * 6 > input.length * 8) output += b64pad;
104 | else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
105 | }
106 | }
107 | return output;
108 | }
109 |
110 | /*
111 | * Convert a raw string to an arbitrary string encoding
112 | */
113 | function rstr2any(input, encoding)
114 | {
115 | var divisor = encoding.length;
116 | var i, j, q, x, quotient;
117 |
118 | /* Convert to an array of 16-bit big-endian values, forming the dividend */
119 | var dividend = Array(Math.ceil(input.length / 2));
120 | for(i = 0; i < dividend.length; i++)
121 | {
122 | dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
123 | }
124 |
125 | /*
126 | * Repeatedly perform a long division. The binary array forms the dividend,
127 | * the length of the encoding is the divisor. Once computed, the quotient
128 | * forms the dividend for the next step. All remainders are stored for later
129 | * use.
130 | */
131 | var full_length = Math.ceil(input.length * 8 /
132 | (Math.log(encoding.length) / Math.log(2)));
133 | var remainders = Array(full_length);
134 | for(j = 0; j < full_length; j++)
135 | {
136 | quotient = Array();
137 | x = 0;
138 | for(i = 0; i < dividend.length; i++)
139 | {
140 | x = (x << 16) + dividend[i];
141 | q = Math.floor(x / divisor);
142 | x -= q * divisor;
143 | if(quotient.length > 0 || q > 0)
144 | quotient[quotient.length] = q;
145 | }
146 | remainders[j] = x;
147 | dividend = quotient;
148 | }
149 |
150 | /* Convert the remainders to the output string */
151 | var output = "";
152 | for(i = remainders.length - 1; i >= 0; i--)
153 | output += encoding.charAt(remainders[i]);
154 |
155 | return output;
156 | }
157 |
158 | /*
159 | * Encode a string as utf-8.
160 | * For efficiency, this assumes the input is valid utf-16.
161 | */
162 | function str2rstr_utf8(input)
163 | {
164 | var output = "";
165 | var i = -1;
166 | var x, y;
167 |
168 | while(++i < input.length)
169 | {
170 | /* Decode utf-16 surrogate pairs */
171 | x = input.charCodeAt(i);
172 | y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
173 | if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
174 | {
175 | x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
176 | i++;
177 | }
178 |
179 | /* Encode output as utf-8 */
180 | if(x <= 0x7F)
181 | output += String.fromCharCode(x);
182 | else if(x <= 0x7FF)
183 | output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
184 | 0x80 | ( x & 0x3F));
185 | else if(x <= 0xFFFF)
186 | output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
187 | 0x80 | ((x >>> 6 ) & 0x3F),
188 | 0x80 | ( x & 0x3F));
189 | else if(x <= 0x1FFFFF)
190 | output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
191 | 0x80 | ((x >>> 12) & 0x3F),
192 | 0x80 | ((x >>> 6 ) & 0x3F),
193 | 0x80 | ( x & 0x3F));
194 | }
195 | return output;
196 | }
197 |
198 | /*
199 | * Encode a string as utf-16
200 | */
201 | function str2rstr_utf16le(input)
202 | {
203 | var output = "";
204 | for(var i = 0; i < input.length; i++)
205 | output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
206 | (input.charCodeAt(i) >>> 8) & 0xFF);
207 | return output;
208 | }
209 |
210 | function str2rstr_utf16be(input)
211 | {
212 | var output = "";
213 | for(var i = 0; i < input.length; i++)
214 | output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
215 | input.charCodeAt(i) & 0xFF);
216 | return output;
217 | }
218 |
219 | /*
220 | * Convert a raw string to an array of big-endian words
221 | * Characters >255 have their high-byte silently ignored.
222 | */
223 | function rstr2binb(input)
224 | {
225 | var output = Array(input.length >> 2);
226 | for(var i = 0; i < output.length; i++)
227 | output[i] = 0;
228 | for(var i = 0; i < input.length * 8; i += 8)
229 | output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
230 | return output;
231 | }
232 |
233 | /*
234 | * Convert an array of big-endian words to a string
235 | */
236 | function binb2rstr(input)
237 | {
238 | var output = "";
239 | for(var i = 0; i < input.length * 32; i += 8)
240 | output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF);
241 | return output;
242 | }
243 |
244 | /*
245 | * Calculate the SHA-512 of an array of big-endian dwords, and a bit length
246 | */
247 | var sha512_k;
248 | function binb_sha512(x, len)
249 | {
250 | if(sha512_k == undefined)
251 | {
252 | //SHA512 constants
253 | sha512_k = new Array(
254 | new int64(0x428a2f98, -685199838), new int64(0x71374491, 0x23ef65cd),
255 | new int64(-1245643825, -330482897), new int64(-373957723, -2121671748),
256 | new int64(0x3956c25b, -213338824), new int64(0x59f111f1, -1241133031),
257 | new int64(-1841331548, -1357295717), new int64(-1424204075, -630357736),
258 | new int64(-670586216, -1560083902), new int64(0x12835b01, 0x45706fbe),
259 | new int64(0x243185be, 0x4ee4b28c), new int64(0x550c7dc3, -704662302),
260 | new int64(0x72be5d74, -226784913), new int64(-2132889090, 0x3b1696b1),
261 | new int64(-1680079193, 0x25c71235), new int64(-1046744716, -815192428),
262 | new int64(-459576895, -1628353838), new int64(-272742522, 0x384f25e3),
263 | new int64(0xfc19dc6, -1953704523), new int64(0x240ca1cc, 0x77ac9c65),
264 | new int64(0x2de92c6f, 0x592b0275), new int64(0x4a7484aa, 0x6ea6e483),
265 | new int64(0x5cb0a9dc, -1119749164), new int64(0x76f988da, -2096016459),
266 | new int64(-1740746414, -295247957), new int64(-1473132947, 0x2db43210),
267 | new int64(-1341970488, -1728372417), new int64(-1084653625, -1091629340),
268 | new int64(-958395405, 0x3da88fc2), new int64(-710438585, -1828018395),
269 | new int64(0x6ca6351, -536640913), new int64(0x14292967, 0xa0e6e70),
270 | new int64(0x27b70a85, 0x46d22ffc), new int64(0x2e1b2138, 0x5c26c926),
271 | new int64(0x4d2c6dfc, 0x5ac42aed), new int64(0x53380d13, -1651133473),
272 | new int64(0x650a7354, -1951439906), new int64(0x766a0abb, 0x3c77b2a8),
273 | new int64(-2117940946, 0x47edaee6), new int64(-1838011259, 0x1482353b),
274 | new int64(-1564481375, 0x4cf10364), new int64(-1474664885, -1136513023),
275 | new int64(-1035236496, -789014639), new int64(-949202525, 0x654be30),
276 | new int64(-778901479, -688958952), new int64(-694614492, 0x5565a910),
277 | new int64(-200395387, 0x5771202a), new int64(0x106aa070, 0x32bbd1b8),
278 | new int64(0x19a4c116, -1194143544), new int64(0x1e376c08, 0x5141ab53),
279 | new int64(0x2748774c, -544281703), new int64(0x34b0bcb5, -509917016),
280 | new int64(0x391c0cb3, -976659869), new int64(0x4ed8aa4a, -482243893),
281 | new int64(0x5b9cca4f, 0x7763e373), new int64(0x682e6ff3, -692930397),
282 | new int64(0x748f82ee, 0x5defb2fc), new int64(0x78a5636f, 0x43172f60),
283 | new int64(-2067236844, -1578062990), new int64(-1933114872, 0x1a6439ec),
284 | new int64(-1866530822, 0x23631e28), new int64(-1538233109, -561857047),
285 | new int64(-1090935817, -1295615723), new int64(-965641998, -479046869),
286 | new int64(-903397682, -366583396), new int64(-779700025, 0x21c0c207),
287 | new int64(-354779690, -840897762), new int64(-176337025, -294727304),
288 | new int64(0x6f067aa, 0x72176fba), new int64(0xa637dc5, -1563912026),
289 | new int64(0x113f9804, -1090974290), new int64(0x1b710b35, 0x131c471b),
290 | new int64(0x28db77f5, 0x23047d84), new int64(0x32caab7b, 0x40c72493),
291 | new int64(0x3c9ebe0a, 0x15c9bebc), new int64(0x431d67c4, -1676669620),
292 | new int64(0x4cc5d4be, -885112138), new int64(0x597f299c, -60457430),
293 | new int64(0x5fcb6fab, 0x3ad6faec), new int64(0x6c44198c, 0x4a475817));
294 | }
295 |
296 | //Initial hash values
297 | var H = new Array(
298 | new int64(0x6a09e667, -205731576),
299 | new int64(-1150833019, -2067093701),
300 | new int64(0x3c6ef372, -23791573),
301 | new int64(-1521486534, 0x5f1d36f1),
302 | new int64(0x510e527f, -1377402159),
303 | new int64(-1694144372, 0x2b3e6c1f),
304 | new int64(0x1f83d9ab, -79577749),
305 | new int64(0x5be0cd19, 0x137e2179));
306 |
307 | var T1 = new int64(0, 0),
308 | T2 = new int64(0, 0),
309 | a = new int64(0,0),
310 | b = new int64(0,0),
311 | c = new int64(0,0),
312 | d = new int64(0,0),
313 | e = new int64(0,0),
314 | f = new int64(0,0),
315 | g = new int64(0,0),
316 | h = new int64(0,0),
317 | //Temporary variables not specified by the document
318 | s0 = new int64(0, 0),
319 | s1 = new int64(0, 0),
320 | Ch = new int64(0, 0),
321 | Maj = new int64(0, 0),
322 | r1 = new int64(0, 0),
323 | r2 = new int64(0, 0),
324 | r3 = new int64(0, 0);
325 | var j, i;
326 | var W = new Array(80);
327 | for(i=0; i<80; i++)
328 | W[i] = new int64(0, 0);
329 |
330 | // append padding to the source string. The format is described in the FIPS.
331 | x[len >> 5] |= 0x80 << (24 - (len & 0x1f));
332 | x[((len + 128 >> 10)<< 5) + 31] = len;
333 |
334 | for(i = 0; i=32
442 | //The function revrrot() is for that
443 | function int64rrot(dst, x, shift)
444 | {
445 | dst.l = (x.l >>> shift) | (x.h << (32-shift));
446 | dst.h = (x.h >>> shift) | (x.l << (32-shift));
447 | }
448 |
449 | //Reverses the dwords of the source and then rotates right by shift.
450 | //This is equivalent to rotation by 32+shift
451 | function int64revrrot(dst, x, shift)
452 | {
453 | dst.l = (x.h >>> shift) | (x.l << (32-shift));
454 | dst.h = (x.l >>> shift) | (x.h << (32-shift));
455 | }
456 |
457 | //Bitwise-shifts right a 64-bit number by shift
458 | //Won't handle shift>=32, but it's never needed in SHA512
459 | function int64shr(dst, x, shift)
460 | {
461 | dst.l = (x.l >>> shift) | (x.h << (32-shift));
462 | dst.h = (x.h >>> shift);
463 | }
464 |
465 | //Adds two 64-bit numbers
466 | //Like the original implementation, does not rely on 32-bit operations
467 | function int64add(dst, x, y)
468 | {
469 | var w0 = (x.l & 0xffff) + (y.l & 0xffff);
470 | var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);
471 | var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);
472 | var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);
473 | dst.l = (w0 & 0xffff) | (w1 << 16);
474 | dst.h = (w2 & 0xffff) | (w3 << 16);
475 | }
476 |
477 | //Same, except with 4 addends. Works faster than adding them one by one.
478 | function int64add4(dst, a, b, c, d)
479 | {
480 | var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);
481 | var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);
482 | var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);
483 | var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);
484 | dst.l = (w0 & 0xffff) | (w1 << 16);
485 | dst.h = (w2 & 0xffff) | (w3 << 16);
486 | }
487 |
488 | //Same, except with 5 addends
489 | function int64add5(dst, a, b, c, d, e)
490 | {
491 | var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff);
492 | var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16);
493 | var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16);
494 | var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);
495 | dst.l = (w0 & 0xffff) | (w1 << 16);
496 | dst.h = (w2 & 0xffff) | (w3 << 16);
497 | }
--------------------------------------------------------------------------------
/js/jquery.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v1.7.1 jquery.com | jquery.org/license */
2 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;ca ",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o=""+"",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
3 | f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
4 | {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>$2>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/