From: HyungKyu Song Date: Fri, 15 Feb 2013 06:12:08 +0000 (+0900) Subject: Tizen 2.0 Release X-Git-Tag: 2.0_release X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2F2.0_release;p=samples%2Fweb%2FMemoryMatch.git Tizen 2.0 Release --- diff --git a/AUTHORS b/AUTHORS new file mode 100755 index 0000000..08153b6 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Todd Brandt diff --git a/LICENSE.Apache-2.0 b/LICENSE.Apache-2.0 new file mode 100755 index 0000000..d645695 --- /dev/null +++ b/LICENSE.Apache-2.0 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..c3f9394 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +APPNAME=memory-match + +all: + @echo "Nothing to build" + +install: + mkdir -p ${DESTDIR}/usr/share/${APPNAME} + cp -a audio ${DESTDIR}/usr/share/${APPNAME}/ + cp -a css ${DESTDIR}/usr/share/${APPNAME}/ + cp -a font ${DESTDIR}/usr/share/${APPNAME}/ + cp -a img ${DESTDIR}/usr/share/${APPNAME}/ + cp -a js ${DESTDIR}/usr/share/${APPNAME}/ + cp -a _locales ${DESTDIR}/usr/share/${APPNAME}/ + cp ${APPNAME}-icon.png ${DESTDIR}/usr/share/${APPNAME}/ + cp *.html ${DESTDIR}/usr/share/${APPNAME}/ + cp manifest.json ${DESTDIR}/usr/share/${APPNAME}/ + cp license.txt ${DESTDIR}/usr/share/${APPNAME}/ + mkdir -p ${DESTDIR}/usr/share/applications + cp ${APPNAME}.desktop ${DESTDIR}/usr/share/applications/ + mkdir -p ${DESTDIR}/usr/share/pixmaps + cp ${APPNAME}-icon.png ${DESTDIR}/usr/share/pixmaps/${APPNAME}.png diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..79aca6c --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +Copyright (c) 2012, Intel Corporation. + +This program is licensed under the terms and conditions of the Apache License, version 2.0. +The full text of the Apache License is at http://www.apache.org/licenses/LICENSE-2.0 diff --git a/README.txt b/README.txt new file mode 100755 index 0000000..5c65d32 --- /dev/null +++ b/README.txt @@ -0,0 +1,64 @@ + +Memory Match + +Author/Owner: Todd Brandt + +Technical Details: This application is written using HTML5/css3/jquery javascript +library and is distributed under Apache2.0 license. + +IMAGES +----------------------------------------------------------------------------- + +all images in the img folder are created by Intel Corp. +they are licensed under the Creative Commons Attribution 3.0 license +http://creativecommons.org/licenses/by/3.0/us/ + +FONTS +------------------------------------------------------------------------------------------------------------------------------------------- + +These files are a part of a group from the same source +AmaticSC-Bold.ttf +AmaticSC-Regular.ttf +Origin: http://www.google.com/webfonts +License: fonts/OFL.txt + +SOUNDS +------------------------------------------------------------------------------------------------------------------------------------------- + +FlipCard.wav +Origin: http://www.freesound.org/people/themfish/sounds/45816/ + +Kitchen.wav (made from multiple sounds) +Origin: http://www.freesound.org/people/RHumphries/sounds/1016/ +Origin: http://www.freesound.org/people/Hell_quote_s%20Sound%20Guy/sounds/15287/ +Origin: http://www.freesound.org/people/gallagho/sounds/27367/ +Origin: http://www.freesound.org/people/dobroide/sounds/39982/ +Origin: http://www.freesound.org/people/reinsamba/sounds/47245/ + +Nightsky.wav (made from multiple sounds) +Origin: http://www.freesound.org/people/DJ%20Chronos/sounds/31600/ +Origin: http://www.freesound.org/people/dobroide/sounds/20575/ + +Ocean.wav (made from multiple sounds) +Origin: http://www.freesound.org/people/3bagbrew/sounds/59564/ +Origin: http://www.freesound.org/people/laurent/sounds/15472/ + +NavClick.wav +Origin: http://www.freesound.org/people/junggle/sounds/29301/ + +WrongLose.wav +Origin: http://www.freesound.org/people/cameronmusic/sounds/138413/ + +These files were created by Intel Corp. and are licensed under +the Creative Commons Attribution 3.0 license http://creativecommons.org/licenses/by/3.0/us/ +GetMatch.wav, +WinLevel.wav + +LIBRARIES +------------------------------------------------------------------------------------------------------------------------------------------- + +jQuery JavaScript Library v1.7.2 +Copyright 2011, John Resig +Dual licensed under the MIT or GPL Version 2 licenses. +http://jquery.org/license + diff --git a/_locales/en_US/messages.json b/_locales/en_US/messages.json new file mode 100755 index 0000000..1b355a6 --- /dev/null +++ b/_locales/en_US/messages.json @@ -0,0 +1,34 @@ +{ + "level1": {"message": "Level 1"}, + "level2": {"message": "Level 2"}, + "level3": {"message": "Level 3"}, + "quit": {"message": "Quit"}, + "hint": {"message": "Hint"}, + "matches": {"message": "Matches"}, + "num0": {"message": "0"}, + "num1": {"message": "1"}, + "num2": {"message": "2"}, + "num3": {"message": "3"}, + "num4": {"message": "4"}, + "num5": {"message": "5"}, + "num6": {"message": "6"}, + "num7": {"message": "7"}, + "num8": {"message": "8"}, + "win_replay" : {"message": "REPLAY"}, + "win_quit" : {"message": "QUIT"}, + "win_backtostart" : {"message": "BACK TO START"}, + "win_nextlevel" : {"message": "NEXT LEVEL"}, + "win_text" : {"message": "CONGRATULATIONS! YOU WIN!"}, + "help_text" : {"message": "Can you find all the matching pictures?

+ First, choose a level. The higher the level, the more picture cards + you’ll get.

+ Then click a face-down card to peek at it. Click another to see if + you’ve found a match. If not, they’ll flip back over and you can try + again. If they do match, they’ll remain face up, and you’re getting + closer to winning! If you get stuck, click Hint to uncover a match. +

+ When you finish a game, you can click:
+
  • Replay to play that level again
  • +
  • Next Level to move up to more picture cards
  • +
  • Quit to go back to the beginning
"} +} diff --git a/_locales/locales.json b/_locales/locales.json new file mode 100755 index 0000000..cd5ef9a --- /dev/null +++ b/_locales/locales.json @@ -0,0 +1,6 @@ +{ + "en_US": { + "display": "English (North American)", + "strings": {} + } +} diff --git a/audio/FlipCard.wav b/audio/FlipCard.wav new file mode 100755 index 0000000..9f127c5 Binary files /dev/null and b/audio/FlipCard.wav differ diff --git a/audio/GetMatch.wav b/audio/GetMatch.wav new file mode 100755 index 0000000..628b1f3 Binary files /dev/null and b/audio/GetMatch.wav differ diff --git a/audio/Kitchen.wav b/audio/Kitchen.wav new file mode 100755 index 0000000..84897ee Binary files /dev/null and b/audio/Kitchen.wav differ diff --git a/audio/NavClick.wav b/audio/NavClick.wav new file mode 100755 index 0000000..3a5c2dd Binary files /dev/null and b/audio/NavClick.wav differ diff --git a/audio/Nightsky.wav b/audio/Nightsky.wav new file mode 100755 index 0000000..214d9e6 Binary files /dev/null and b/audio/Nightsky.wav differ diff --git a/audio/Ocean.wav b/audio/Ocean.wav new file mode 100755 index 0000000..4b55661 Binary files /dev/null and b/audio/Ocean.wav differ diff --git a/audio/WinLevel.wav b/audio/WinLevel.wav new file mode 100755 index 0000000..4450d07 Binary files /dev/null and b/audio/WinLevel.wav differ diff --git a/audio/WrongLose.wav b/audio/WrongLose.wav new file mode 100755 index 0000000..076069d Binary files /dev/null and b/audio/WrongLose.wav differ diff --git a/config.xml b/config.xml new file mode 100755 index 0000000..d85337c --- /dev/null +++ b/config.xml @@ -0,0 +1,8 @@ + + + + + MemoryMatch + + + diff --git a/css/help.css b/css/help.css new file mode 100755 index 0000000..0a07cc5 --- /dev/null +++ b/css/help.css @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2012, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Apache License, version 2.0. The full text of the Apache License is at + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +.helpdialog { + position: absolute; + top: 0%; + left: 0%; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0); + color: white; + font-family: Sans; + visibility: hidden; +} + +.helpdialog.shown { + visibility: visible; + -webkit-transition: background-color 0.5s; + background-color: rgba(0,0,0,.33); + z-index: 99; +} + +.helpdialog .inner { + position: absolute; + top: 17%; + left : 21%; + height: 60%; + width: 58%; + border: 20px solid #12649e; + background-color: #1a3542; + padding: 10px; + opacity: 0; +} + +.helpdialog.shown .inner { + -webkit-transition: opacity 0.5s; + opacity: 1; +} + +.helpdialog .inner .contents { + font-family: Arial; + font-size: 20px; + color: #ffffff; + cursor: default; +} + +.helpdialog .inner .close { + position: absolute; + width: 30px; + height: 30px; + top: -10%; + left: 98%; + font-family: Sans; + font-weight: 900; + font-size: 50px; + text-align: center; + border: solid 10px #12649e; + background-color: #12649e; + -webkit-border-radius: 60px; + line-height: 24px; + cursor: pointer; + color: #dddddd; +} + +.helplaunch { + position: absolute; + width: 30px; + height: 30px; + top: 545px; + left: 950px; + text-align: center; + line-height: 30px; + cursor: pointer; + -webkit-border-radius: 40px; + font-family: Arial; + font-size: 30px; +} + +#lvl1_help { + border: solid 4px #f3d174; + color: #f3d174; +} + +#lvl1_help:hover { + border: solid 4px #ffffff; + color: #ffffff; +} + +#lvl2_help { + border: solid 4px #ffffff; + color: #ffffff; +} + +#lvl2_help:hover { + border: solid 4px #f3d174; + color: #f3d174; +} + +#lvl3_help { + border: solid 4px #1b97ed; + color: #1b97ed; +} + +#lvl3_help:hover { + border: solid 4px #f3d174; + color: #f3d174; +} + +#main_help { + border: solid 4px #ffffff; + color: #ffffff; + top: 545px; + left: 30px; +} + +#main_help:hover { + border: solid 4px #dddddd; + color: #dddddd; +} + diff --git a/css/license.css b/css/license.css new file mode 100755 index 0000000..655c1e5 --- /dev/null +++ b/css/license.css @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2012, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Apache License, version 2.0. The full text of the Apache License is at + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +#licensebtnl { + position: absolute; + width: 20px; + height: 20px; + text-align: center; + line-height: 20px; + cursor: pointer; + -webkit-border-radius: 20px; + border: solid 1px #000000; + opacity: 0.3; + color: black; +} + +#licensebtnl:hover { + opacity: 1.0; +} + +#licensepage { + width: 100%; + height: 100%; + background: -webkit-gradient(linear, left top, right top, from(#62c0d9), to(#2b4855)); +} + +#licensetext { + width: 99.8%; + height: 90%; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFFFFF), color-stop(1, #fdda37)); + -webkit-border-radius: 12px; + border-radius: 12px; + box-shadow: inset 1px 1px 2px 1px black; + margin-bottom: 2px; + padding-left: 10px; + padding-bottom: 10px; + overflow: hidden; + cursor: move; +} + +#licensescroll { + position: relative; + font: 25px/100% Arial, Helvetica, sans-serif; + text-align: center; +} + +.licensebtn { + position: absolute; + color: #d7d7d7; + border: solid 1px #333; + text-align: center; + text-decoration: none; + font: 30px/100% Arial, Helvetica, sans-serif; + text-shadow: 0 1px 1px rgba(0,0,0,.3); + -webkit-border-radius: 12px; + border-radius: 12px; + background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#000)); + height: 52px; + line-height: 48px; + cursor: pointer; + box-shadow: 2px 2px 14px #000; +} + +.licensebtn:hover { + background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#000)); +} + +.licensebtn:active { + color: #666; + background: -webkit-gradient(linear, left top, left bottom, from(#000), to(#444)); +} + +#licensebtnq { + left: 412px; + width: 200px; +} diff --git a/css/main.css b/css/main.css new file mode 100755 index 0000000..a54f0a7 --- /dev/null +++ b/css/main.css @@ -0,0 +1,1039 @@ +/* + * Copyright (c) 2012, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Apache License, version 2.0. The full text of the Apache License is at + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +/* -------------------------------- main page ----------------------------- */ + +body { + margin: 0px; + -webkit-user-select: none; + background-color: "white"; + box-shadow: 5px 5px 20px black; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + position: absolute; + width: 1024px; + height: 600px; + -webkit-box-align: center; + -webkit-box-pack: center; + -webkit-box-orient: vertical; + display: -webkit-box; +} + +.game_page { + background-position: left top; + + position: absolute; + overflow: hidden; + cursor: default; + width: 1024px; + height: 600px; +} + +/* 800 x 480 */ +@media (orientation: landscape) { + body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(0.78125, 0.8); } +} +/* 1024 x 600 */ +@media (min-width: 1024px) and (min-height: 600px) and (orientation: landscape) { + body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); } +} +/* 1280 x 720 */ +@media (min-width: 1280px) and (min-height: 720px) and (orientation: landscape) { + body { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) scale(1.25, 1.199); } +} + +/* 480 x 800 */ +@media (orientation: portrait) { + body { top: 0%; left: 0%; -webkit-transform: translate(-50%, -50%) rotate(90deg) scale(0.8, 0.78125) translate(50%, -50%); } +} +/* 600 x 989 */ +@media (min-width: 600px) and (min-height: 989px) and (orientation: portrait) { + body { top: 0%; left: 0%; -webkit-transform: translate(-50%, -50%) rotate(90deg) scale(0.9658, 1.0) translate(50%, -50%); } +} +/* 600 x 1024 */ +@media (min-width: 600px) and (min-height: 1024px) and (orientation: portrait) { + body { top: 0%; left: 0%; -webkit-transform: translate(-50%, -50%) rotate(90deg) translate(50%, -50%); } +} +/* 720 x 1230 */ +@media (min-width: 720px) and (min-height: 1230px) and (orientation: portrait) { + body { top: 0%; left: 0%; -webkit-transform: translate(-50%, -50%) rotate(90deg) scale(1.2, 1.199) translate(50%, -50%); } +} +/* 720 x 1280 */ +@media (min-width: 720px) and (min-height: 1280px) and (orientation: portrait) { + body { top: 0%; left: 0%; -webkit-transform: translate(-50%, -50%) rotate(90deg) scale(1.25, 1.199) translate(50%, -50%); } +} + +#main_bg { + background:url(../img/bg.png) no-repeat; + width: 100%; + height: 100%; + z:1; +} + +#main_title { + position: absolute; + top: 220px; + left: 47px; + width: 569px; + height: 137px; + background:url(../img/memory-title.png) no-repeat; + display: block; + z:2; +} + +.main_btn_text { + font-size: 72pt; + font-family: AmaticSC-Bold; + color: black; + -webkit-text-stroke: 2px white; + text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; + text-align: center; + line-height: 194px; +} + +#main_lvl1btn { + position: absolute; + width: 344px; + height: 194px; + background-position: right bottom; +} + +.main_lvl1btn_off:hover { + background:url(../img/opening-lvl1-rollover.png) no-repeat; + top: 8px; + left: 677px; +} + +.main_lvl1btn_off { + background:url(../img/opening-lvl1.png) no-repeat; + top: 8px; + left: 677px; +} + +.main_lvl1btn_on:hover { + background:url(../img/opening-lvl1.png) no-repeat; + top: 12px; + left: 681px; +} + +.main_lvl1btn_on { + background:url(../img/opening-lvl1.png) no-repeat; + top: 12px; + left: 681px; +} + +#main_lvl2btn { + position: absolute; + width: 344px; + height: 194px; + background-position: right bottom; +} + +.main_lvl2btn_off:hover { + background:url(../img/opening-lvl2-rollover.png) no-repeat; + top: 205px; + left: 677px; +} + +.main_lvl2btn_off { + background:url(../img/opening-lvl2.png) no-repeat; + top: 205px; + left: 677px; +} + +.main_lvl2btn_on:hover { + background:url(../img/opening-lvl2.png) no-repeat; + top: 209px; + left: 681px; +} + +.main_lvl2btn_on { + background:url(../img/opening-lvl2.png) no-repeat; + top: 209px; + left: 681px; +} + +#main_lvl3btn { + position: absolute; + width: 344px; + height: 194px; + background-position: right bottom; +} + +.main_lvl3btn_off:hover { + background:url(../img/opening-lvl3-rollover.png) no-repeat; + top: 402px; + left: 677px; +} + +.main_lvl3btn_off { + background:url(../img/opening-lvl3.png) no-repeat; + top: 402px; + left: 677px; +} + +.main_lvl3btn_on:hover { + background:url(../img/opening-lvl3.png) no-repeat; + top: 406px; + left: 681px; +} + +.main_lvl3btn_on { + background:url(../img/opening-lvl3.png) no-repeat; + top: 406px; + left: 681px; +} + +.quit { + cursor: pointer; + position: absolute; + top: 10px; + left: 11px; + height: 28px; + width: 80px; + line-height: 28px; + font-family: 'AmaticSC-Bold'; + font-size: 24pt; + text-align: left; + background-position: top left; + display: block; +} + +.matches { + position: absolute; + top: 528px; + left: 31px; + height: 60px; + width: 600px; + line-height: 60px; + font-family: 'AmaticSC-Bold'; + font-size: 60px; + text-align: left; + display: block; +} + +.hint { + cursor: pointer; + position: absolute; + top: 528px; + left: 857px; + height: 60px; + width: 90px; + line-height: 60px; + font-family: 'AmaticSC-Bold'; + font-size: 60px; + text-align: left; + display: block; +} + +.hintrays { + cursor: pointer; + position: absolute; + top: 504px; + left: 815px; + height: 105px; + width: 162px; + display: block; +} + +#win_dlg_page { + background-position: left top; + display: -webkit-box; + -webkit-box-align: center; + -webkit-box-pack: center; + -webkit-box-orient: vertical; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + overflow: hidden; + cursor: default; + width: 1024px; + height: 600px; +} + +#win_dlg { + position: absolute; + top: 192px; + left: 233px; + height: 216px; + width: 558px; + background:url(../img/window.png) no-repeat; + font-size: 60px; + font-family: AmaticSC-Bold; + color: black; + text-align: center; + line-height: 150px; +} + +#win_dlg_text { + font-size: 60px; + font-family: AmaticSC-Bold; + color: black; +} + +#win_dlg_text b { + text-shadow: -2px -2px 0 #fff; +} + +#win_btn1 { + cursor: pointer; + position: absolute; + width: 129px; + height: 50px; + background-position: right bottom; + font-size: 27px; + font-family: AmaticSC-Bold; + color: black; + text-shadow: -2px -2px 0 #c6bee4; + text-align: center; + line-height: 50px; +} + +.win_btn1_off:hover { + background:url(../img/btn-purple-rollover.png) no-repeat; + top: 120px; + left: 70px; +} + +.win_btn1_off { + background:url(../img/btn-purple.png) no-repeat; + top: 120px; + left: 70px; +} + +.win_btn1_on:hover { + background:url(../img/btn-purple.png) no-repeat; + top: 122px; + left: 72px; +} + +.win_btn1_on { + background:url(../img/btn-purple.png) no-repeat; + top: 122px; + left: 72px; +} + +#win_btn2 { + cursor: pointer; + position: absolute; + width: 150px; + height: 56px; + background-position: right bottom; + font-size: 27px; + font-family: AmaticSC-Bold; + color: black; + text-shadow: -2px -2px 0 #7ee0dc; + text-align: center; + line-height: 56px; +} + +.win_btn2_off:hover { + background:url(../img/btn-teal-rollover.png) no-repeat; + top: 117px; + left: 210px; +} + +.win_btn2_off { + background:url(../img/btn-teal.png) no-repeat; + top: 117px; + left: 210px; +} + +.win_btn2_on:hover { + background:url(../img/btn-teal.png) no-repeat; + top: 119px; + left: 212px; +} + +.win_btn2_on { + background:url(../img/btn-teal.png) no-repeat; + top: 119px; + left: 212px; +} + +#win_btn3 { + cursor: pointer; + position: absolute; + width: 129px; + height: 50px; + background-position: right bottom; + font-size: 27px; + font-family: AmaticSC-Bold; + color: black; + text-shadow: -2px -2px 0 #c6bee4; + text-align: center; + line-height: 50px; +} + +.win_btn3_off:hover { + background:url(../img/btn-purple-rollover.png) no-repeat; + top: 120px; + left: 370px; +} + +.win_btn3_off { + background:url(../img/btn-purple.png) no-repeat; + top: 120px; + left: 370px; +} + +.win_btn3_on:hover { + background:url(../img/btn-purple.png) no-repeat; + top: 122px; + left: 372px; +} + +.win_btn3_on { + background:url(../img/btn-purple.png) no-repeat; + top: 122px; + left: 372px; +} + +@-webkit-keyframes rock_rotate_left { + 0%, 100% { -webkit-transform: rotate(5deg); } + 50% { -webkit-transform: rotate(-5deg); } +} + +@-webkit-keyframes rock_rotate_right { + 0%, 100% { -webkit-transform: rotate(-5deg); } + 50% { -webkit-transform: rotate(5deg); } +} + +@-webkit-keyframes rock_horiz { + 0%, 100% { left:0px; } + 50% { left:-50px; } +} + +/* -------------------------------- lvl1 page ----------------------------- */ + +#lvl1_bg { + background:url(../img/lvl1-bg.png) no-repeat; + width: 100%; + height: 100%; + z:1; +} + +#lvl1_bg_mtn1 { + position: absolute; + background:url(../img/lvl1-mtn-1.png) no-repeat; + top: 88px; + left: 0px; + width: 298px; + height: 512px; +} + +#lvl1_bg_mtn2 { + position: absolute; + background:url(../img/lvl1-mtn-2.png) no-repeat; + top: 220px; + left: 81px; + width: 313px; + height: 380px; +} + +#lvl1_bg_mtn3 { + position: absolute; + background:url(../img/lvl1-mtn-3.png) no-repeat; + top: 319px; + left: 869px; + width: 155px; + height: 281px; +} + +@-webkit-keyframes lvl1_cloud_float1 { + 0% { left:-95px; } + 100% { left:1024px; } +} + +@-webkit-keyframes lvl1_cloud_float2 { + 0% { left:-57px; } + 100% { left:1024px; } +} + +.lvl1_cloud1_class { + position: absolute; + left: 0px; + width: 95px; + height: 55px; + display: block; + background:url(../img/lvl1-cloud-1.png) no-repeat; +} + +.lvl1_cloud2_class { + position: absolute; + left: 0px; + width: 64px; + height: 44px; + display: block; + background:url(../img/lvl1-cloud-2.png) no-repeat; +} + + +#lvl1_moon { + position: absolute; + top: 40px; + left: 830px; + width: 121px; + height: 121px; + display: block; + background:url(../img/lvl1-moon.png) no-repeat; +} + +#lvl1_quit { color: #f3d174; background:url(../img/lvl1-quit-x.png) no-repeat; } +#lvl1_matches { color: #f3d174; } +#lvl1_hint { color: #f3d174; } +#lvl1_hintrays:hover { background:url(../img/lvl1-hint-rays.png) no-repeat; } + +.lvl1_card { width: 160px; height: 162px; } +.lvl1_card_back { background:url(../img/lvl1-card-back.png) no-repeat; } +.lvl1_card_type1 { background:url(../img/lvl1-card-fish.png) no-repeat; } +.lvl1_card_type2 { background:url(../img/lvl1-card-acorn.png) no-repeat; } +.lvl1_card_type3 { background:url(../img/lvl1-card-teepee.png) no-repeat; } +.lvl1_card_type4 { background:url(../img/lvl1-card-tree.png) no-repeat; } +#lvl1_card1 { top: 143px; left: 188px; } +#lvl1_card2 { top: 143px; left: 353px; } +#lvl1_card3 { top: 143px; left: 519px; } +#lvl1_card4 { top: 143px; left: 686px; } +#lvl1_card5 { top: 308px; left: 188px; } +#lvl1_card6 { top: 308px; left: 353px; } +#lvl1_card7 { top: 308px; left: 519px; } +#lvl1_card8 { top: 308px; left: 686px; } + +/* -------------------------------- lvl2 page ----------------------------- */ + +#lvl2_bg { + background:url(../img/lvl2-bg.png) no-repeat; + width: 100%; + height: 100%; + z:1; +} + +#lvl2_waves { + position: absolute; + top: 335px; + left: 0px; + width: 1300px; + height: 265px; + display: block; + background:url(../img/lvl2-waves.png) no-repeat; +} + +#lvl2_tree { + position: absolute; + top: 148px; + left: 74px; + width: 166px; + height: 155px; + display: block; + background:url(../img/lvl2-tree.png) no-repeat; + -webkit-transform-origin: 50% 100%; +} + +#lvl2_boat { + position: absolute; + top: 202px; + left: 786px; + width: 190px; + height: 163px; + display: block; + background:url(../img/lvl2-boat.png) no-repeat; + -webkit-transform-origin: 50% 100%; +} + +@-webkit-keyframes lvl2_bfish_swim { + 0%, 65%, 100% { background-position: 0px 0px; } + 1% { -webkit-transform: rotate(-3deg); } + 2% { -webkit-transform: rotate(1deg); } + 3% { -webkit-transform: rotate(0deg); } + 75%, 90% { background-position: 100px 0px; } +} + +@-webkit-keyframes swim1 { + 0%, 100% { + -webkit-transform: rotateY(0deg); + } 45% { + -webkit-transform: rotateY(0deg); + } 50% { + -webkit-transform: rotateY(180deg); + left: 220px; + } 95% { + -webkit-transform: rotateY(180deg); + } +} + +@-webkit-keyframes swim2 { + 0%, 100% { + -webkit-transform: rotateY(180deg); + } 45% { + -webkit-transform: rotateY(180deg); + } 50% { + -webkit-transform: rotateY(0deg); + left: 950px; + } 95% { + -webkit-transform: rotateY(0deg); + } +} + +@-webkit-keyframes swim3 { + 0%, 100% { + -webkit-transform: rotateY(180deg); + } 45% { + -webkit-transform: rotateY(180deg); + } 50% { + -webkit-transform: rotateY(0deg); + left: 960px; + } 95% { + -webkit-transform: rotateY(0deg); + } +} + +#lvl2_bfish { + position: absolute; + top: 481px; + left: 33px; + width: 61px; + height: 28px; + display: block; + background:url(../img/lvl2-fish-2.png) no-repeat; +} + +#lvl2_pfish1 { + position: absolute; + top: 436px; + left: 746px; + width: 30px; + height: 22px; + display: block; + background:url(../img/lvl2-fish-1.png) no-repeat; +} + +#lvl2_pfish2 { + position: absolute; + top: 458px; + left: 799px; + width: 30px; + height: 22px; + display: block; + background:url(../img/lvl2-fish-1.png) no-repeat; +} + +@-webkit-keyframes lvl2_droplet_left1 { + 0%, 100% { opacity: 1.0; left: 136px; top: 345px; -webkit-transform: rotate(0deg); } + 1% { left: 121px; top: 330px; -webkit-transform: rotate(-20deg); } + 2% { left: 106px; top: 319px; -webkit-transform: rotate(-40deg); } + 3% { left: 91px; top: 315px; -webkit-transform: rotate(-60deg); } + 4% { left: 76px; top: 319px; -webkit-transform: rotate(-80deg); } + 5% { left: 61px; top: 330px; -webkit-transform: rotate(-100deg); } + 6% { opacity: 1.0; left: 46px; top: 345px; -webkit-transform: rotate(-120deg); } + 7% { opacity: 0.0; left: 31px; top: 358px; -webkit-transform: rotate(-140deg); } + 8% { opacity: 0.0; left: 136px; top: 345px; } + 99% { opacity: 0.0; left: 136px; top: 345px; } +} + +#lvl2_drop1 { + position: absolute; + top: 345px; + left: 136px; + width: 6px; + height: 9px; + display: block; + background:url(../img/lvl2-drop-1.png) no-repeat; +} + +@-webkit-keyframes lvl2_droplet_right { + 0%, 100% { opacity: 1.0; left: 834px; top: 341px; -webkit-transform: rotate(0deg); } + 1% { left: 849px; top: 326px; -webkit-transform: rotate(20deg); } + 2% { left: 864px; top: 315px; -webkit-transform: rotate(40deg); } + 3% { left: 879px; top: 311px; -webkit-transform: rotate(60deg); } + 4% { left: 894px; top: 315px; -webkit-transform: rotate(80deg); } + 5% { left: 909px; top: 326px; -webkit-transform: rotate(100deg); } + 6% { opacity: 1.0; left: 924px; top: 341px; -webkit-transform: rotate(120deg); } + 7% { opacity: 0.0; left: 939px; top: 354px; -webkit-transform: rotate(140deg); } + 8% { opacity: 0.0; left: 834px; top: 341px; } + 99% { opacity: 0.0; left: 834px; top: 341px; } +} + +#lvl2_drop2 { + position: absolute; + top: 341px; + left: 834px; + width: 10px; + height: 13px; + display: block; + background:url(../img/lvl2-drop-2.png) no-repeat; +} + +@-webkit-keyframes lvl2_droplet_left2 { + 0%, 100% { opacity: 1.0; left: 1009px; top: 291px; -webkit-transform: rotate(0deg); } + 1% { left: 994px; top: 276px; -webkit-transform: rotate(-20deg); } + 2% { left: 979px; top: 265px; -webkit-transform: rotate(-40deg); } + 3% { left: 964px; top: 261px; -webkit-transform: rotate(-60deg); } + 4% { left: 949px; top: 265px; -webkit-transform: rotate(-80deg); } + 5% { left: 934px; top: 276px; -webkit-transform: rotate(-100deg); } + 6% { opacity: 1.0; left: 919px; top: 291px; -webkit-transform: rotate(-120deg); } + 7% { opacity: 0.0; left: 904px; top: 304px; -webkit-transform: rotate(-140deg); } + 8% { opacity: 0.0; left: 1009px; top: 291px; } + 99% { opacity: 0.0; left: 1009px; top: 291px; } +} + +#lvl2_drop3 { + position: absolute; + top: 291px; + left: 1009px; + width: 10px; + height: 13px; + display: block; + background:url(../img/lvl2-drop-3.png) no-repeat; +} + +@-webkit-keyframes lvl2_cloud_float1 { + 0% { left:-93px; } + 100% { left:1024px; } +} + +@-webkit-keyframes lvl2_cloud_float2 { + 0% { left:-57px; } + 100% { left:1024px; } +} + +#lvl2_cloud1 { + position: absolute; + top: 70px; + left: 46px; + width: 57px; + height: 34px; + display: block; + background:url(../img/lvl2-cloud-2.png) no-repeat; +} + +#lvl2_cloud2 { + position: absolute; + top: 119px; + left: 196px; + width: 93px; + height: 57px; + display: block; + background:url(../img/lvl2-cloud-1.png) no-repeat; +} + +#lvl2_cloud3 { + position: absolute; + top: 166px; + left: 658px; + width: 93px; + height: 57px; + display: block; + background:url(../img/lvl2-cloud-1.png) no-repeat; +} + +#lvl2_cloud4 { + position: absolute; + top: 42px; + left: 807px; + width: 57px; + height: 34px; + display: block; + background:url(../img/lvl2-cloud-2.png) no-repeat; +} + +#lvl2_cloud5 { + position: absolute; + top: 176px; + left: 934px; + width: 57px; + height: 34px; + display: block; + background:url(../img/lvl2-cloud-2.png) no-repeat; +} + +#lvl2_cloud6 { + position: absolute; + top: 50px; + left: 998px; + width: 93px; + height: 57px; + display: block; + background:url(../img/lvl2-cloud-1.png) no-repeat; +} + +#lvl2_quit { color: #59a7c4; background:url(../img/lvl2-quit-x.png) no-repeat; } +#lvl2_matches { color: #ffffff; } +#lvl2_hint { color: #ffffff; } +#lvl2_hintrays:hover { background:url(../img/lvl2-hint-rays.png) no-repeat; } + +.lvl2_card { width: 131px; height: 131px; } +.lvl2_card_back { background:url(../img/lvl2-card-back.png) no-repeat; } +.lvl2_card_type1 { background:url(../img/lvl2-card-fan.png) no-repeat; } +.lvl2_card_type2 { background:url(../img/lvl2-card-lifevest.png) no-repeat; } +.lvl2_card_type3 { background:url(../img/lvl2-card-lighthouse.png) no-repeat; } +.lvl2_card_type4 { background:url(../img/lvl2-card-melon.png) no-repeat; } +.lvl2_card_type5 { background:url(../img/lvl2-card-octopus.png) no-repeat; } +.lvl2_card_type6 { background:url(../img/lvl2-card-whale.png) no-repeat; } +#lvl2_card1 { top: 44px; left: 318px; } +#lvl2_card2 { top: 44px; left: 451px; } +#lvl2_card3 { top: 44px; left: 585px; } +#lvl2_card4 { top: 175px; left: 318px; } +#lvl2_card5 { top: 175px; left: 451px; } +#lvl2_card6 { top: 175px; left: 585px; } +#lvl2_card7 { top: 308px; left: 318px; } +#lvl2_card8 { top: 308px; left: 451px; } +#lvl2_card9 { top: 308px; left: 585px; } +#lvl2_card10 { top: 438px; left: 318px; } +#lvl2_card11 { top: 438px; left: 451px; } +#lvl2_card12 { top: 438px; left: 585px; } + +/* -------------------------------- lvl3 page ----------------------------- */ + +#lvl3_bg { + background:url(../img/lvl3-bg.png) no-repeat; + width: 100%; + height: 100%; + z:1; +} + +@-webkit-keyframes lvl3_micro_blink { + 0% { background-position: -1000px 0px; } + 49% { background-position: -1000px 0px; } + 50% { background: 0px 0px; } + 51% { background-position: -1000px 0px; } + 100% { background-position: -1000px 0px; } +} + +@-webkit-keyframes lvl3_blink { + 0%, 49% { opacity: 1.0; } + 51%, 100% { opacity: 0.0; } +} + +#lvl3_micro_light { + position: absolute; + top: 146px; + left: 43px; + width: 156px; + height: 90px; + display: block; + background:url(../img/lvl3-micro-light.png) no-repeat; +} + +#lvl3_micro_time { + position: absolute; + top: 135px; + left: 237px; + width: 24px; + height: 9px; + display: block; + background:url(../img/lvl3-micro-time.png) no-repeat; +} + +@-webkit-keyframes lvl3_peek { + 0%, 65%, 100% { background-position: 0px 0px; } + 1% { -webkit-transform: rotate(-3deg); } + 2% { -webkit-transform: rotate(1deg); } + 3% { -webkit-transform: rotate(0deg); } + 75%, 90% { background-position: 100px 0px; } +} + +#lvl3_mouse { + position: absolute; + top: 243px; + left: 981px; + width: 43px; + height: 30px; + display: block; + background:url(../img/lvl3-mouse.png) no-repeat; +} + +@-webkit-keyframes lvl3_droplet_right { + 0%, 100% { opacity: 1.0; left: 860px; top: 262px; -webkit-transform: rotate(0deg); } + 3.3% { left: 875px; top: 247px; -webkit-transform: rotate(20deg); } + 6.7% { left: 890px; top: 236px; -webkit-transform: rotate(40deg); } + 10% { left: 905px; top: 232px; -webkit-transform: rotate(60deg); } + 13.3% { left: 920px; top: 236px; -webkit-transform: rotate(80deg); } + 16.7% { left: 935px; top: 247px; -webkit-transform: rotate(100deg); } + 20% { opacity: 1.0; left: 950px; top: 262px; -webkit-transform: rotate(120deg); } + 23.3% { opacity: 0.0; left: 965px; top: 275px; -webkit-transform: rotate(140deg); } + 24% { opacity: 0.0; left: 860px; top: 262px; } + 99% { opacity: 0.0; left: 860px; top: 262px; } +} + +@-webkit-keyframes lvl3_droplet_left { + 0%, 100% { opacity: 1.0; left: 860px; top: 262px; -webkit-transform: rotate(0deg); } + 3.3% { left: 845px; top: 247px; -webkit-transform: rotate(-20deg); } + 6.7% { left: 830px; top: 236px; -webkit-transform: rotate(-40deg); } + 10% { left: 815px; top: 232px; -webkit-transform: rotate(-60deg); } + 13.3% { left: 800px; top: 236px; -webkit-transform: rotate(-80deg); } + 16.7% { left: 785px; top: 247px; -webkit-transform: rotate(-100deg); } + 20% { opacity: 1.0; left: 770px; top: 262px; -webkit-transform: rotate(-120deg); } + 23.3% { opacity: 0.0; left: 755px; top: 275px; -webkit-transform: rotate(-140deg); } + 24% { opacity: 0.0; left: 860px; top: 262px; } + 99% { opacity: 0.0; left: 860px; top: 262px; } +} + +#lvl3_drop1 { + position: absolute; + top: 262px; + left: 844px; + width: 6px; + height: 9px; + display: block; + background:url(../img/lvl3-drop-1.png) no-repeat; +} + +#lvl3_drop2 { + position: absolute; + top: 262px; + left: 870px; + width: 6px; + height: 9px; + display: block; + background:url(../img/lvl3-drop-3.png) no-repeat; +} + +@-webkit-keyframes lvl3_pullcord { + 0%, 30%, 100% { background-position: 0px -80px; } + 25% { background-position: 0px -10px; } + 29% { -webkit-transform: rotate(0deg); } + 35% { -webkit-transform: rotate(-5deg); } + 45% { -webkit-transform: rotate(5deg); } + 55% { -webkit-transform: rotate(-3deg); } + 65% { -webkit-transform: rotate(3deg); } + 75% { -webkit-transform: rotate(-1deg); } + 85% { -webkit-transform: rotate(1deg); } + 95% { -webkit-transform: rotate(0deg); } +} + +#lvl3_blinds { + position: absolute; + top: 0px; + left: 967px; + width: 10px; + height: 146px; + display: block; + background:url(../img/lvl3-blinds.png) no-repeat; + -webkit-transform-origin: 50% 0%; +} + +@-webkit-keyframes lvl3_cloud_float { + 0% { background-position: -80px 0px; } + 100% { background-position: 220px 0px; } +} + +#lvl3_cloud1 { + position: absolute; + top: 56px; + left: 716px; + width: 220px; + height: 50px; + display: block; + background:url(../img/lvl3-cloud.png) no-repeat; +} + +#lvl3_cloud2 { + position: absolute; + top: 40px; + left: 716px; + width: 220px; + height: 50px; + display: block; + background:url(../img/lvl3-cloud.png) no-repeat; +} + +#lvl3_quit { color: #e0371b; background:url(../img/lvl3-quit-x.png) no-repeat; } +#lvl3_matches { color: #1b97ed; } +#lvl3_hint { color: #1b97ed; } +#lvl3_hintrays:hover { background:url(../img/lvl3-hint-rays.png) no-repeat; } + +.lvl3_card { width: 131px; height: 131px; } +.lvl3_card_back { background:url(../img/lvl3-card-back.png) no-repeat; } +.lvl3_card_type1 { background:url(../img/lvl3-card-cupcake.png) no-repeat; } +.lvl3_card_type2 { background:url(../img/lvl3-card-cup.png) no-repeat; } +.lvl3_card_type3 { background:url(../img/lvl3-card-donut.png) no-repeat; } +.lvl3_card_type4 { background:url(../img/lvl3-card-hotdog.png) no-repeat; } +.lvl3_card_type5 { background:url(../img/lvl3-card-kettle.png) no-repeat; } +.lvl3_card_type6 { background:url(../img/lvl3-card-measure.png) no-repeat; } +.lvl3_card_type7 { background:url(../img/lvl3-card-pepper.png) no-repeat; } +.lvl3_card_type8 { background:url(../img/lvl3-card-whisk.png) no-repeat; } +#lvl3_card1 { top: 44px; left: 252px; } +#lvl3_card2 { top: 44px; left: 384px; } +#lvl3_card3 { top: 44px; left: 518px; } +#lvl3_card4 { top: 44px; left: 651px; } +#lvl3_card5 { top: 176px; left: 252px; } +#lvl3_card6 { top: 176px; left: 384px; } +#lvl3_card7 { top: 176px; left: 518px; } +#lvl3_card8 { top: 176px; left: 651px; } +#lvl3_card9 { top: 308px; left: 252px; } +#lvl3_card10 { top: 308px; left: 384px; } +#lvl3_card11 { top: 308px; left: 518px; } +#lvl3_card12 { top: 308px; left: 651px; } +#lvl3_card13 { top: 439px; left: 252px; } +#lvl3_card14 { top: 439px; left: 384px; } +#lvl3_card15 { top: 439px; left: 518px; } +#lvl3_card16 { top: 439px; left: 651px; } + +/* -------------------------------- card animations ----------------------- */ + +.card { + position: absolute; + -webkit-perspective: 600px; +} + +.front { + cursor: pointer; + float: none; + position: absolute; + top: 0; + left: 0; + z-index: 800; + width: inherit; + height: inherit; + -webkit-transform: rotateY(-180deg); + -webkit-transform-style: preserve-3d; + -webkit-backface-visibility: hidden; + -webkit-transition: all .4s ease-in-out; + transition: all .4s ease-in-out; +} + +.flip .front { + z-index: 1000; + -webkit-transform: rotateY(0deg); +} + +.back { + cursor: pointer; + float: none; + position: absolute; + top: 0; + left: 0; + z-index: 900; + width: inherit; + height: inherit; + -webkit-transform: rotateY(0deg); + -webkit-transform-style: preserve-3d; + -webkit-backface-visibility: hidden; + -webkit-transition: all .4s ease-in-out; + transition: all .4s ease-in-out; +} + +.flip .back { + z-index: 900; + -webkit-transform: rotateY(180deg); +} + +/* -------------------------------- fonts ----------------------------- */ + +@font-face { + font-family: 'AmaticSC-Bold'; + src: url('../font/AmaticSC-Bold.ttf'); +} + +@font-face { + font-family: 'AmaticSC-Regular'; + src: url('../font/AmaticSC-Regular.ttf'); +} diff --git a/font/AmaticSC-Bold.ttf b/font/AmaticSC-Bold.ttf new file mode 100755 index 0000000..71789ab Binary files /dev/null and b/font/AmaticSC-Bold.ttf differ diff --git a/font/AmaticSC-Regular.ttf b/font/AmaticSC-Regular.ttf new file mode 100755 index 0000000..90b86df Binary files /dev/null and b/font/AmaticSC-Regular.ttf differ diff --git a/font/OFL.txt b/font/OFL.txt new file mode 100755 index 0000000..2f39600 --- /dev/null +++ b/font/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2011 by vernon adams (vern@newtypography.co.uk), +with Reserved Font Names "Amatic" "Amatic Bold" and "Amatic Regular" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/icon.png b/icon.png new file mode 100755 index 0000000..b0979b1 Binary files /dev/null and b/icon.png differ diff --git a/img/bg-teal.png b/img/bg-teal.png new file mode 100755 index 0000000..933a260 Binary files /dev/null and b/img/bg-teal.png differ diff --git a/img/bg-yellow.png b/img/bg-yellow.png new file mode 100755 index 0000000..af7e351 Binary files /dev/null and b/img/bg-yellow.png differ diff --git a/img/bg.png b/img/bg.png new file mode 100755 index 0000000..6c6ea52 Binary files /dev/null and b/img/bg.png differ diff --git a/img/btn-purple-click.png b/img/btn-purple-click.png new file mode 100755 index 0000000..629368b Binary files /dev/null and b/img/btn-purple-click.png differ diff --git a/img/btn-purple-rollover.png b/img/btn-purple-rollover.png new file mode 100755 index 0000000..223fc9a Binary files /dev/null and b/img/btn-purple-rollover.png differ diff --git a/img/btn-purple.png b/img/btn-purple.png new file mode 100755 index 0000000..4b30ca6 Binary files /dev/null and b/img/btn-purple.png differ diff --git a/img/btn-teal-click.png b/img/btn-teal-click.png new file mode 100755 index 0000000..d540340 Binary files /dev/null and b/img/btn-teal-click.png differ diff --git a/img/btn-teal-rollover.png b/img/btn-teal-rollover.png new file mode 100755 index 0000000..8a97c25 Binary files /dev/null and b/img/btn-teal-rollover.png differ diff --git a/img/btn-teal.png b/img/btn-teal.png new file mode 100755 index 0000000..0484f99 Binary files /dev/null and b/img/btn-teal.png differ diff --git a/img/lvl1-bg.png b/img/lvl1-bg.png new file mode 100755 index 0000000..265716e Binary files /dev/null and b/img/lvl1-bg.png differ diff --git a/img/lvl1-card-acorn.png b/img/lvl1-card-acorn.png new file mode 100755 index 0000000..378a3a1 Binary files /dev/null and b/img/lvl1-card-acorn.png differ diff --git a/img/lvl1-card-back.png b/img/lvl1-card-back.png new file mode 100755 index 0000000..b26e70f Binary files /dev/null and b/img/lvl1-card-back.png differ diff --git a/img/lvl1-card-fish.png b/img/lvl1-card-fish.png new file mode 100755 index 0000000..6319019 Binary files /dev/null and b/img/lvl1-card-fish.png differ diff --git a/img/lvl1-card-moon.png b/img/lvl1-card-moon.png new file mode 100755 index 0000000..fa215e6 Binary files /dev/null and b/img/lvl1-card-moon.png differ diff --git a/img/lvl1-card-teepee.png b/img/lvl1-card-teepee.png new file mode 100755 index 0000000..1d74b77 Binary files /dev/null and b/img/lvl1-card-teepee.png differ diff --git a/img/lvl1-card-tree.png b/img/lvl1-card-tree.png new file mode 100755 index 0000000..db289cc Binary files /dev/null and b/img/lvl1-card-tree.png differ diff --git a/img/lvl1-cloud-1.png b/img/lvl1-cloud-1.png new file mode 100755 index 0000000..be803a7 Binary files /dev/null and b/img/lvl1-cloud-1.png differ diff --git a/img/lvl1-cloud-2.png b/img/lvl1-cloud-2.png new file mode 100755 index 0000000..97015ad Binary files /dev/null and b/img/lvl1-cloud-2.png differ diff --git a/img/lvl1-hint-rays.png b/img/lvl1-hint-rays.png new file mode 100755 index 0000000..a250458 Binary files /dev/null and b/img/lvl1-hint-rays.png differ diff --git a/img/lvl1-moon.png b/img/lvl1-moon.png new file mode 100755 index 0000000..d65ab44 Binary files /dev/null and b/img/lvl1-moon.png differ diff --git a/img/lvl1-mtn-1.png b/img/lvl1-mtn-1.png new file mode 100755 index 0000000..f8867e1 Binary files /dev/null and b/img/lvl1-mtn-1.png differ diff --git a/img/lvl1-mtn-2.png b/img/lvl1-mtn-2.png new file mode 100755 index 0000000..838574e Binary files /dev/null and b/img/lvl1-mtn-2.png differ diff --git a/img/lvl1-mtn-3.png b/img/lvl1-mtn-3.png new file mode 100755 index 0000000..163cff8 Binary files /dev/null and b/img/lvl1-mtn-3.png differ diff --git a/img/lvl1-quit-x.png b/img/lvl1-quit-x.png new file mode 100755 index 0000000..75fc26c Binary files /dev/null and b/img/lvl1-quit-x.png differ diff --git a/img/lvl2-bg.png b/img/lvl2-bg.png new file mode 100755 index 0000000..6d5d06b Binary files /dev/null and b/img/lvl2-bg.png differ diff --git a/img/lvl2-boat.png b/img/lvl2-boat.png new file mode 100755 index 0000000..93b9b61 Binary files /dev/null and b/img/lvl2-boat.png differ diff --git a/img/lvl2-card-back.png b/img/lvl2-card-back.png new file mode 100755 index 0000000..ada9b1c Binary files /dev/null and b/img/lvl2-card-back.png differ diff --git a/img/lvl2-card-fan.png b/img/lvl2-card-fan.png new file mode 100755 index 0000000..49a90ef Binary files /dev/null and b/img/lvl2-card-fan.png differ diff --git a/img/lvl2-card-lifevest.png b/img/lvl2-card-lifevest.png new file mode 100755 index 0000000..d96b5df Binary files /dev/null and b/img/lvl2-card-lifevest.png differ diff --git a/img/lvl2-card-lighthouse.png b/img/lvl2-card-lighthouse.png new file mode 100755 index 0000000..a7d791a Binary files /dev/null and b/img/lvl2-card-lighthouse.png differ diff --git a/img/lvl2-card-melon.png b/img/lvl2-card-melon.png new file mode 100755 index 0000000..b5ab538 Binary files /dev/null and b/img/lvl2-card-melon.png differ diff --git a/img/lvl2-card-octopus.png b/img/lvl2-card-octopus.png new file mode 100755 index 0000000..8ff5dd4 Binary files /dev/null and b/img/lvl2-card-octopus.png differ diff --git a/img/lvl2-card-whale.png b/img/lvl2-card-whale.png new file mode 100755 index 0000000..5766084 Binary files /dev/null and b/img/lvl2-card-whale.png differ diff --git a/img/lvl2-cloud-1.png b/img/lvl2-cloud-1.png new file mode 100755 index 0000000..582f3bc Binary files /dev/null and b/img/lvl2-cloud-1.png differ diff --git a/img/lvl2-cloud-2.png b/img/lvl2-cloud-2.png new file mode 100755 index 0000000..8b6271f Binary files /dev/null and b/img/lvl2-cloud-2.png differ diff --git a/img/lvl2-cloud-3.png b/img/lvl2-cloud-3.png new file mode 100755 index 0000000..7dc0c7f Binary files /dev/null and b/img/lvl2-cloud-3.png differ diff --git a/img/lvl2-drop-1.png b/img/lvl2-drop-1.png new file mode 100755 index 0000000..0f779b1 Binary files /dev/null and b/img/lvl2-drop-1.png differ diff --git a/img/lvl2-drop-2.png b/img/lvl2-drop-2.png new file mode 100755 index 0000000..0236db3 Binary files /dev/null and b/img/lvl2-drop-2.png differ diff --git a/img/lvl2-drop-3.png b/img/lvl2-drop-3.png new file mode 100755 index 0000000..bd95854 Binary files /dev/null and b/img/lvl2-drop-3.png differ diff --git a/img/lvl2-fish-1.png b/img/lvl2-fish-1.png new file mode 100755 index 0000000..94e1ce1 Binary files /dev/null and b/img/lvl2-fish-1.png differ diff --git a/img/lvl2-fish-2.png b/img/lvl2-fish-2.png new file mode 100755 index 0000000..8d8a14c Binary files /dev/null and b/img/lvl2-fish-2.png differ diff --git a/img/lvl2-hint-rays.png b/img/lvl2-hint-rays.png new file mode 100755 index 0000000..9b91435 Binary files /dev/null and b/img/lvl2-hint-rays.png differ diff --git a/img/lvl2-quit-x.png b/img/lvl2-quit-x.png new file mode 100755 index 0000000..4e9f3a0 Binary files /dev/null and b/img/lvl2-quit-x.png differ diff --git a/img/lvl2-tree.png b/img/lvl2-tree.png new file mode 100755 index 0000000..a3452ea Binary files /dev/null and b/img/lvl2-tree.png differ diff --git a/img/lvl2-waves.png b/img/lvl2-waves.png new file mode 100755 index 0000000..6933ac8 Binary files /dev/null and b/img/lvl2-waves.png differ diff --git a/img/lvl3-bg.png b/img/lvl3-bg.png new file mode 100755 index 0000000..b8b25b6 Binary files /dev/null and b/img/lvl3-bg.png differ diff --git a/img/lvl3-blinds.png b/img/lvl3-blinds.png new file mode 100755 index 0000000..6029ae7 Binary files /dev/null and b/img/lvl3-blinds.png differ diff --git a/img/lvl3-card-back.png b/img/lvl3-card-back.png new file mode 100755 index 0000000..0d32255 Binary files /dev/null and b/img/lvl3-card-back.png differ diff --git a/img/lvl3-card-cup.png b/img/lvl3-card-cup.png new file mode 100755 index 0000000..8b218d3 Binary files /dev/null and b/img/lvl3-card-cup.png differ diff --git a/img/lvl3-card-cupcake.png b/img/lvl3-card-cupcake.png new file mode 100755 index 0000000..90f7383 Binary files /dev/null and b/img/lvl3-card-cupcake.png differ diff --git a/img/lvl3-card-donut.png b/img/lvl3-card-donut.png new file mode 100755 index 0000000..d919da4 Binary files /dev/null and b/img/lvl3-card-donut.png differ diff --git a/img/lvl3-card-hotdog.png b/img/lvl3-card-hotdog.png new file mode 100755 index 0000000..e2d8145 Binary files /dev/null and b/img/lvl3-card-hotdog.png differ diff --git a/img/lvl3-card-kettle.png b/img/lvl3-card-kettle.png new file mode 100755 index 0000000..f94221c Binary files /dev/null and b/img/lvl3-card-kettle.png differ diff --git a/img/lvl3-card-measure.png b/img/lvl3-card-measure.png new file mode 100755 index 0000000..62ba4b3 Binary files /dev/null and b/img/lvl3-card-measure.png differ diff --git a/img/lvl3-card-pepper.png b/img/lvl3-card-pepper.png new file mode 100755 index 0000000..0fb7105 Binary files /dev/null and b/img/lvl3-card-pepper.png differ diff --git a/img/lvl3-card-whisk.png b/img/lvl3-card-whisk.png new file mode 100755 index 0000000..7b4c12b Binary files /dev/null and b/img/lvl3-card-whisk.png differ diff --git a/img/lvl3-cloud.png b/img/lvl3-cloud.png new file mode 100755 index 0000000..97ce055 Binary files /dev/null and b/img/lvl3-cloud.png differ diff --git a/img/lvl3-drop-1.png b/img/lvl3-drop-1.png new file mode 100755 index 0000000..dfd9b66 Binary files /dev/null and b/img/lvl3-drop-1.png differ diff --git a/img/lvl3-drop-3.png b/img/lvl3-drop-3.png new file mode 100755 index 0000000..da0a1c6 Binary files /dev/null and b/img/lvl3-drop-3.png differ diff --git a/img/lvl3-hint-rays.png b/img/lvl3-hint-rays.png new file mode 100755 index 0000000..33707e1 Binary files /dev/null and b/img/lvl3-hint-rays.png differ diff --git a/img/lvl3-micro-light.png b/img/lvl3-micro-light.png new file mode 100755 index 0000000..efcd0fa Binary files /dev/null and b/img/lvl3-micro-light.png differ diff --git a/img/lvl3-micro-time.png b/img/lvl3-micro-time.png new file mode 100755 index 0000000..9fcbcd9 Binary files /dev/null and b/img/lvl3-micro-time.png differ diff --git a/img/lvl3-mouse.png b/img/lvl3-mouse.png new file mode 100755 index 0000000..ed433ce Binary files /dev/null and b/img/lvl3-mouse.png differ diff --git a/img/lvl3-quit-x.png b/img/lvl3-quit-x.png new file mode 100755 index 0000000..b8f90f1 Binary files /dev/null and b/img/lvl3-quit-x.png differ diff --git a/img/memory-title.png b/img/memory-title.png new file mode 100755 index 0000000..a40a6c0 Binary files /dev/null and b/img/memory-title.png differ diff --git a/img/opening-lvl1-click.png b/img/opening-lvl1-click.png new file mode 100755 index 0000000..7f83396 Binary files /dev/null and b/img/opening-lvl1-click.png differ diff --git a/img/opening-lvl1-rollover.png b/img/opening-lvl1-rollover.png new file mode 100755 index 0000000..3c67023 Binary files /dev/null and b/img/opening-lvl1-rollover.png differ diff --git a/img/opening-lvl1.png b/img/opening-lvl1.png new file mode 100755 index 0000000..3c4f7fc Binary files /dev/null and b/img/opening-lvl1.png differ diff --git a/img/opening-lvl2-click.png b/img/opening-lvl2-click.png new file mode 100755 index 0000000..f9020a9 Binary files /dev/null and b/img/opening-lvl2-click.png differ diff --git a/img/opening-lvl2-rollover.png b/img/opening-lvl2-rollover.png new file mode 100755 index 0000000..e7aeda9 Binary files /dev/null and b/img/opening-lvl2-rollover.png differ diff --git a/img/opening-lvl2.png b/img/opening-lvl2.png new file mode 100755 index 0000000..a73c3a7 Binary files /dev/null and b/img/opening-lvl2.png differ diff --git a/img/opening-lvl3-click.png b/img/opening-lvl3-click.png new file mode 100755 index 0000000..f3e5034 Binary files /dev/null and b/img/opening-lvl3-click.png differ diff --git a/img/opening-lvl3-rollover.png b/img/opening-lvl3-rollover.png new file mode 100755 index 0000000..95adbce Binary files /dev/null and b/img/opening-lvl3-rollover.png differ diff --git a/img/opening-lvl3.png b/img/opening-lvl3.png new file mode 100755 index 0000000..29b7be5 Binary files /dev/null and b/img/opening-lvl3.png differ diff --git a/img/window.png b/img/window.png new file mode 100755 index 0000000..59875f2 Binary files /dev/null and b/img/window.png differ diff --git a/index.html b/index.html new file mode 100755 index 0000000..7d019ca --- /dev/null +++ b/index.html @@ -0,0 +1,312 @@ + + + + + + + +Memory Cards + + + + + + + + + +
+
+
+
i
+
Level + 1
+
Level + 2
+
Level + 3
+
?
+
+
+
+
x
+
+ Can you find all the matching pictures?
+ First, choose a level. The higher the level, the more + picture cards you’ll get.
+ Then click a face-down card to peek at it. Click another + to see if you’ve found a match. If not, they’ll flip back over and + you can try again. If they do match, they’ll remain face up, and + you’re getting closer to winning! If you get stuck, click Hint to + uncover a match.
+ When you finish a game, you can click:
+
    +
  • Replay to play that level again
  • +
  • Next Level to move up to more picture cards
  • +
  • Quit to go back to the beginning
  • +
+
+
+
+ + + + + + + + + + + + + + + + diff --git a/js/help.js b/js/help.js new file mode 100755 index 0000000..0bc6b11 --- /dev/null +++ b/js/help.js @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2012, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Apache License, version 2.0. The full text of the Apache License is at + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +function help_init(btnid, prefix) +{ + var btn = document.getElementById(btnid); + var dialog = document.getElementById(prefix+"dialog"); + var close = document.getElementById(prefix+"close"); + var title = document.getElementById(prefix+"title"); + var contents = document.getElementById(prefix+"contents"); + + btn.addEventListener('click', function() { + dialog.className = "helpdialog shown"; + }); + + close.addEventListener('click', function() { + dialog.className = "helpdialog"; + }); +} + diff --git a/js/jquery-1.7.2.min.js b/js/jquery-1.7.2.min.js new file mode 100755 index 0000000..16ad06c --- /dev/null +++ b/js/jquery-1.7.2.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(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(;e=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)?+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.2",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!=null&&a==a.window},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){if(typeof c!="string"||!c)return null;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(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.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:p.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,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});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;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-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.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];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,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\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")};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,g=p.selector),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&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?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));o.match.globalPOS=p;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|bdi|canvas|data|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:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],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){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},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(){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){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.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>");try{for(;d1&&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||f.isXMLDoc(a)||!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,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$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))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=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)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.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(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),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)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/js/license.js b/js/license.js new file mode 100755 index 0000000..90ddf1a --- /dev/null +++ b/js/license.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2012, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Apache License, version 2.0. The full text of the Apache License is at + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +function license_init(id, hpageid) +{ + var lbtn = document.getElementById(id+"btnl"); + var qbtn = document.getElementById(id+"btnq"); + var lpage = document.getElementById(id+"page"); + var hpage = document.getElementById(hpageid); + var ltext = document.getElementById(id+"text"); + var lscroll = document.getElementById(id+"scroll"); + var timer; + + var request = new XMLHttpRequest(); + request.open("GET", "README.txt", false); + request.onload = function(e) { + var text = this.responseText; + text = text.replace(//g,">"); + var lines = text.split("\n"); + lines[0] = "

"+lines[0]; + for(var i in lines) + { + if(lines[i].match(/--------------------/)) + { + lines[i] = ""; + } + else + { + lines[i] += "
"; + } + } + lscroll.innerHTML = lines.join("\n"); + } + request.send(); + + lbtn.onclick = function() { + /* initialize scroll rate */ + var dY = 2; + var t0 = 0; + var delay = 1000; + + /* set the scroller to the top position */ + lscroll.style.top = "0px"; + + /* display the license page, hide its parent */ + hpage.style.display="none"; + lpage.style.display="block"; + + /* calculate the scroll length when the window is shown */ + var maxY = lscroll.clientHeight - ltext.clientHeight; + + /* start the autoscroll interval */ + timer = setInterval(function() { + /* get the actual interval, in case performance slows us down */ + var t1 = (new Date()).getTime(); + var dT = (t0 == 0)?20:(t1-t0); + t0 = t1; + + /* delay specific number of milliseconds */ + delay -= dT; + if(delay > 0) + return; + + /* calculate the new top position using dY and dT */ + var newY = Math.abs(parseInt(lscroll.style.top)) + ((dT/40)*dY); + if(newY > 0) + lscroll.style.top = (-1 * newY) + "px"; + else + lscroll.style.top = "0px"; + + /* if the lscroll has hit the limit, delay and swing */ + /* the other way */ + if(newY >= maxY) + { + delay = 5000; + dY = -20; + } + else if(newY <= 0) + { + delay = 5000; + dY = 2; + } + }, 40); + }; + + qbtn.onclick = function() { + hpage.style.display="block"; + lpage.style.display="none"; + clearInterval(timer); + }; +} + diff --git a/js/main.js b/js/main.js new file mode 100755 index 0000000..41166c3 --- /dev/null +++ b/js/main.js @@ -0,0 +1,448 @@ +/* + * Copyright (c) 2012, Intel Corporation. + * + * This program is licensed under the terms and conditions of the + * Apache License, version 2.0. The full text of the Apache License is at + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +Game = {}; + +(function () { + var infocus = true; + var fliptime = 400; + var ignore = false; + var matchcard = undefined; + var win_level = 0; + var game_level = -1; + var lvl_bg_sound; + var flip_sound; + var match_sound; + var mismatch_sound; + var click_sound; + var win_sound; + + function gamesound(file) { + this.file = file; + this.soundobj = new Array(); + this.soundobj.push(new Audio(file)); + this.soundobj.push(new Audio(file)); + this.idx = 0; + this.play = function play() { + if(!infocus) + return; + + /* create two instances of the file to play sequentially if calls */ + /* come too fast, otherwise the second call will be ignored */ + this.soundobj[this.idx].play(); + this.idx = (this.idx + 1)%2; + }; + } + + function stop_bg_sounds() { + for(var i = 0; i < 3; i++) + { + lvl_bg_sound[i].pause(); + if(lvl_bg_sound[i].currentTime > 0) + lvl_bg_sound[i].currentTime = 0; + } + } + + var gamedata = [ + { + cardcount : 8 + }, + { + cardcount : 12 + }, + { + cardcount : 16 + } + ]; + + function input_on() { + ignore = false; + } + + function input_off() { + ignore = true; + } + + function cardEntry(classname) { + this.classname = classname; + this.flipped = false; + } + + function win_dlg(lvl) { + win_level = lvl; + + if (window.chrome&&window.chrome.i18n) + { + if(lvl < 3) + $("#win_btn2").text(chrome.i18n.getMessage("win_nextlevel")); + else + $("#win_btn2").text(chrome.i18n.getMessage("win_backtostart")); + $("#win_btn1").text(chrome.i18n.getMessage("win_replay")); + $("#win_btn3").text(chrome.i18n.getMessage("win_quit")); + $("#win_dlg_text").html(chrome.i18n.getMessage("win_text")); + } + else + { + if(lvl < 3) + $("#win_btn2").text("NEXT LEVEL"); + else + $("#win_btn2").text("BACK TO START"); + } + + win_sound.play(); + $("#win_dlg_page").show(); + } + + function update_matches(lvl) { + var flipcount = 0; + var cardcount = gamedata[lvl-1].cardcount; + $(".flip").each(function() { flipcount++; }); + var matches = (flipcount/2)|0; + var possible_matches = (cardcount/2)|0; + + /* set the match text */ + if (window.chrome&&window.chrome.i18n) + { + $("#lvl"+lvl+"_matches").text(chrome.i18n.getMessage("matches")+" "+ + chrome.i18n.getMessage("num"+matches)+"/"+ + chrome.i18n.getMessage("num"+possible_matches)); + } + else + { + $("#lvl"+lvl+"_matches").text("Matches "+matches+"/"+possible_matches); + } + + return (flipcount >= cardcount); + } + + function card_flipped(elem) { + var newcard = $(elem).attr("id"); + var lvl = parseInt(newcard.substring(3, 4)); + + if(matchcard != undefined) + { + var newclass = $("#"+newcard+" .front").attr("class"); + var matchclass = $("#"+matchcard+" .front").attr("class"); + + if(newclass == matchclass) + { + /* good match */ + if(update_matches(lvl)) + { + win_dlg(lvl); + } + else + { + match_sound.play(); + input_on(); + } + } + else + { + /* bad match */ + mismatch_sound.play(); + $("#"+newcard).removeClass('flip'); + $("#"+matchcard).removeClass('flip'); + + /* keep ignoring input til the cards are flipped back */ + window.setTimeout("Game.input_on()", fliptime); + } + + /* reset the match card */ + matchcard = undefined; + } + else + { + /* first card in match attempt, set it and wait */ + matchcard = newcard; + input_on(); + } + } + + function generate_hint(lvl) { + if(matchcard != undefined) + { + var matchclass = $("#"+matchcard+" .front").attr("class"); + $(".lvl"+lvl+"_card").each(function() { + var newcard = $(this).attr("id"); + var newclass = $("#"+newcard+" .front").attr("class"); + if((matchclass == newclass)&&(matchcard != newcard)) + { + /* ignore clicks while hint is generated */ + input_off(); + + /* flip the card's match for the poor child */ + flip_sound.play(); + $("#"+newcard).addClass('flip'); + + if(update_matches(lvl)) + { + match_sound.play(); + window.setTimeout("Game.win_dlg("+lvl+")", fliptime); + } + else + { + match_sound.play(); + window.setTimeout("Game.input_on()", fliptime); + } + } + }); + matchcard = undefined; + } + else + { + var cardlist = new Array(); + $(".lvl"+lvl+"_card").each(function() { + if(!$(this).hasClass('flip')) + cardlist.push($(this).attr("id")); + }); + + /* if all cards are flipped, return */ + if(cardlist.length <= 0) + return; + + var target = (Math.random() * cardlist.length)|0; + var tgtcard = cardlist[target]; + var tgtclass = $("#"+tgtcard+" .front").attr("class"); + + $(".lvl"+lvl+"_card").each(function() { + var newcard = $(this).attr("id"); + var newclass = $("#"+newcard+" .front").attr("class"); + if((tgtclass == newclass)&&(tgtcard != newcard)) + { + /* ignore clicks while hint is generated */ + input_off(); + + /* flip two cards for the poor child */ + flip_sound.play(); + $("#"+tgtcard).addClass('flip'); + $("#"+newcard).addClass('flip'); + + if(update_matches(lvl)) + { + match_sound.play(); + window.setTimeout("Game.win_dlg("+lvl+")", fliptime); + } + else + { + match_sound.play(); + window.setTimeout("Game.input_on()", fliptime); + } + } + }); + } + } + + function start_game(lvl) { + game_level = lvl; + + /* reset all the cards */ + $(".card").removeClass('flip'); + + var types = new Array(); + var cardcount = gamedata[lvl].cardcount; + var cardtypes = gamedata[lvl].cardcount/2; + var i, j; + + if (window.chrome&&window.chrome.i18n) + { + $("#lvl"+(lvl+1)+"_matches").text(chrome.i18n.getMessage("matches")+" "+ + chrome.i18n.getMessage("num0")+"/"+ + chrome.i18n.getMessage("num"+cardtypes)); + } + else + { + $("#lvl"+(lvl+1)+"_matches").text("Matches 0/"+cardtypes); + } + + /* create a list of cards by index */ + for(i = 0; i < cardcount; i++) + types.push((i%cardtypes)+1); + + /* randomly fill out the deck */ + for(i = 0; i < cardcount; i++) + { + var card_id = "#lvl"+(lvl+1)+"_card"+(i+1)+" .front"; + var target = (Math.random() * types.length)|0; + var idx = types.splice(target, 1); + var card_class = "front lvl"+(lvl+1)+"_card_type"+idx; + $(card_id).attr('class', card_class); + } + + input_on(); + } + + $(document).ready(function() + { + license_init("license", "main_page"); + help_init("main_help", "help_"); + help_init("lvl1_help", "help_"); + help_init("lvl2_help", "help_"); + help_init("lvl3_help", "help_"); + if (window.chrome&&window.chrome.i18n) + { + $("#lvl1_quit").html("   "+chrome.i18n.getMessage("quit")); + $("#lvl2_quit").html("   "+chrome.i18n.getMessage("quit")); + $("#lvl3_quit").html("   "+chrome.i18n.getMessage("quit")); + $("#lvl1_hint").text(chrome.i18n.getMessage("hint")); + $("#lvl2_hint").text(chrome.i18n.getMessage("hint")); + $("#lvl3_hint").text(chrome.i18n.getMessage("hint")); + $("#main_lvl1btn").text(chrome.i18n.getMessage("level1")); + $("#main_lvl2btn").text(chrome.i18n.getMessage("level2")); + $("#main_lvl3btn").text(chrome.i18n.getMessage("level3")); + $("#help_contents").html(chrome.i18n.getMessage("help_text")); + } + + Game.card_flipped = card_flipped; + Game.input_on = input_on; + Game.input_off = input_off; + Game.win_dlg = win_dlg; + Game.start_game = start_game; + + lvl_bg_sound = new Array(); + lvl_bg_sound.push(document.querySelector("audio.lvl1_bg_sound")); + lvl_bg_sound.push(document.querySelector("audio.lvl2_bg_sound")); + lvl_bg_sound.push(document.querySelector("audio.lvl3_bg_sound")); + flip_sound = new gamesound("audio/FlipCard.wav"); + match_sound = new gamesound("audio/GetMatch.wav"); + mismatch_sound = new gamesound("audio/WrongLose.wav"); + click_sound = new gamesound("audio/NavClick.wav"); + win_sound = new gamesound("audio/WinLevel.wav"); + + + /* if a mouseup happens reset the buttons, this is to maintain */ + /* the original page state if a button is only half clicked */ + $("body").mouseup(function() { + $('#main_lvl1btn').removeClass("main_lvl1btn_on"); + $('#main_lvl1btn').addClass("main_lvl1btn_off"); + $('#main_lvl2btn').removeClass("main_lvl2btn_on"); + $('#main_lvl2btn').addClass("main_lvl2btn_off"); + $('#main_lvl3btn').removeClass("main_lvl3btn_on"); + $('#main_lvl3btn').addClass("main_lvl3btn_off"); + }); + + $('#win_dlg_page').mouseup(function() { + $('#win_btn1').removeClass("win_btn1_on"); + $('#win_btn1').addClass("win_btn1_off"); + $('#win_btn2').removeClass("win_btn2_on"); + $('#win_btn2').addClass("win_btn2_off"); + $('#win_btn3').removeClass("win_btn3_on"); + $('#win_btn3').addClass("win_btn3_off"); + }); + + /* game launch buttons */ + $('#main_lvl1btn').click(function() { + click_sound.play(); + $("#main_page").hide(); + $("#lvl1_page").show(); + lvl_bg_sound[0].play(); + start_game(0); + }); + + $('#main_lvl2btn').click(function() { + click_sound.play(); + $("#main_page").hide(); + $("#lvl2_page").show(); + lvl_bg_sound[1].play(); + start_game(1); + }); + + $('#main_lvl3btn').click(function() { + click_sound.play(); + $("#main_page").hide(); + $("#lvl3_page").show(); + lvl_bg_sound[2].play(); + start_game(2); + }); + + /* setup for game pages */ + $('.quit').click(function() { + if(!ignore) + { + stop_bg_sounds(); + click_sound.play(); + $("#lvl1_page").hide(); + $("#lvl2_page").hide(); + $("#lvl3_page").hide(); + $("#main_page").show(); + game_level = -1; + } + }); + + $('.hintrays').click(function() { + if(!ignore) + { + var id = $(this).attr("id"); + generate_hint(parseInt(id.substring(3, 4))); + } + }); + + $('.card').click(function(){ + if(!ignore&&!($(this).hasClass('flip'))) + { + /* start the flip animation */ + flip_sound.play(); + $(this).addClass('flip'); + + /* ignore clicks during flip */ + input_off(); + + /* set the function to be called after the animation has done */ + window.setTimeout("Game.card_flipped("+($(this).attr("id"))+")", fliptime); + } + }); + + $("#win_btn1").click(function() { + click_sound.play(); + $("#win_dlg_page").hide(); + $(".card").removeClass('flip'); + window.setTimeout("Game.start_game("+(win_level-1)+")", fliptime); + }); + + $("#win_btn2").click(function() { + click_sound.play(); + var next_level = ((win_level)%3)+1; + $("#win_dlg_page").hide(); + $("#lvl"+win_level+"_page").hide(); + $("#lvl"+next_level+"_page").fadeIn("fast"); + stop_bg_sounds(); + lvl_bg_sound[next_level-1].play(); + start_game(next_level-1); + }); + + $("#win_btn3").click(function() { + stop_bg_sounds(); + click_sound.play(); + $("#win_dlg_page").hide(); + $("#lvl1_page").hide(); + $("#lvl2_page").hide(); + $("#lvl3_page").hide(); + $("#main_page").show(); + game_level = -1; + }); + + window.onblur = function() { + if(infocus) + { + infocus = false; + if(game_level >= 0) + lvl_bg_sound[game_level].pause(); + } + }; + + window.onfocus = function() { + if(!infocus) + { + infocus = true; + if(game_level >= 0) + lvl_bg_sound[game_level].play(); + } + }; + }); +})() diff --git a/manifest.json b/manifest.json new file mode 100755 index 0000000..69576ba --- /dev/null +++ b/manifest.json @@ -0,0 +1,22 @@ +{ + "app": { + "launch": { + "local_path": "index.html", + "container": "panel", + "width":1024, + "height":600 + } + }, + "default_locale": "en_US", + "description": "A memory card matching game", + "icons": { + "128": "memory-match-icon.png", + "48": "memory-match-icon_48.png", + "16": "memory-match-icon_16.png" + }, + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwWMRzFhL0Rs0hfWaY8Fg1xd22IydehFmbj7G48NEgZZafotoAhNs9RKG6ji9STc6VUCkELozi66LfZMei6UEAtRUCSDTYYtel2YsP4BaJRh0+jXvhB8yJWZpr3dcn4Q50JAu72QUjgJ7UKVsSUuqSsxbrPVIhPLhyehSrn0iR6QIDAQAB", + "name": "Memory Match", + "version": "1.0.0", + "homepage_url" : "https://01.org/webapps/content/memory-match", + "update_url" : "https://01.org/webapps/content/memory-match/update.xml" +} diff --git a/memory-match-icon.png b/memory-match-icon.png new file mode 100755 index 0000000..1a22ada Binary files /dev/null and b/memory-match-icon.png differ diff --git a/memory-match-icon_16.png b/memory-match-icon_16.png new file mode 100755 index 0000000..b1d5bb0 Binary files /dev/null and b/memory-match-icon_16.png differ diff --git a/memory-match-icon_48.png b/memory-match-icon_48.png new file mode 100755 index 0000000..120a21c Binary files /dev/null and b/memory-match-icon_48.png differ diff --git a/memory-match.desktop b/memory-match.desktop new file mode 100755 index 0000000..0e01788 --- /dev/null +++ b/memory-match.desktop @@ -0,0 +1,14 @@ + +[Desktop Entry] +Version=1.0 +Name=Memory Match +Comment=A HTML5-based Card matching game +GenericName=Memory Match +Exec=chromium-browser --enable-plugins --enable-extensions --enable-user-scripts --enable-printing --enable-sync --use-gl=egl --ignore-gpu-blacklist --auto-ssl-client-auth %U --app-id=djfbielnigpphgljmaciejpbbdcmfikm --load-extension=/usr/share/memory-match/ --no-first-run +Terminal=false +X-MultipleArgs=false +Type=Application +Icon=memory-match +Categories=Game; +StartupWMClass=Chromium +StartupNotify=true diff --git a/signature1.xml b/signature1.xml new file mode 100644 index 0000000..e934be0 --- /dev/null +++ b/signature1.xml @@ -0,0 +1,451 @@ + + + + + + +F/lDDldEL69f3k4ZpZ2/pyXNFj9gQ2ohn0QQChm+oFY= + + + +hoFGvi/pCP+yukgTnZuCe4yCb0dlkEM3A3UG30Vz518= + + + +8FB0qDJ4y54WQh7XmqvHqd3jiTrh2XZ5Gp9/DSoJO6A= + + + +wfwuPIJiNBXrBw5Nl4NE8B7X1QpT3UVtFoiOoAiJsnU= + + + +R7aNzoy2gFrVs+pNJ6+SokH04ppcEqJ0yFLkNGoFALQ= + + + +Dm+z0SGFUPtCq1jurWr1k052sfEMpXrtL6xlesNp8yo= + + + +wpfT8nF4zYoC1X7VZWfYGXLOdXs+meoayLeLCe83P4w= + + + +OkeTMDmcklbZDqEy1vbokzShpLTQiguYupP0/s/zb8M= + + + +GQl/eaEnKPcsRRMkIs3dmweiFN/TRZ1zLtryJQVNYcg= + + + +QdPCLXbLHvjshmZd6L0o0+BnLIzLF6nWIDn8+FouYZw= + + + +8C6F9G3nSlxJBxsR7vYATfwlycc/Wff4G3ejYfUZslM= + + + +HKkvoPgVKEYm3/TIFdyFd1SJzYG+FiEvsee6zLhH6iQ= + + + +CASv0MNX9ftUJPMcBaTCMX3Zr1DzTrtqsUXZHMB9wso= + + + +WoKCVEfB5NhikoUjqsVMYEcnC5J+mzH2a/H2YrGQ09M= + + + +zuhxLUr4TAmfZYbly6EelDnZta78Cp75yK9NrrHJ2hU= + + + +c01NsqfD9/wZcmT1KXCNArzuy1gX7A9Isw0cibbKxEQ= + + + +Kq4TzZApaFd/J3dHGBmnJRWDpV/NCnOqhzh8SINAmxs= + + + +ZfPI38USgxqkrynnv+zhwxKiH+Urq0i2td1FrpichQ0= + + + +ChKmd4iNSf5amSowZ5OgFWLIco/1b8CHEqIC/EAiAAM= + + + +9ZBph+6mxMGhT2kAM9GXfx8lxfp4gZaA0MwcHD/gu9w= + + + +4U0KDdl0KrlJ6Ioq5dH0ah6q7fUyWLoakkulaGDGz/g= + + + +1UIRHzVmJsmwbpFkhfSXkMlvgJj5F/PzJweLS/eO3g8= + + + +Oqzfl78eFpI03kT+auOwohdETf41Lw4xoAXAQ8ybLlk= + + + +lKRSAozcvM/wzkm3sKW3jNP0Xok5FMjnT9RkYCrJLPI= + + + +Dr5HIXMKVwAIv+4Q3zE1g8+RE5ihesSOCDxYxeu+VCs= + + + +EPUIYkFHaASuvp0TP2pPY7nA7AxrToemmf/4WbO5fKw= + + + +gZWD4BCMdDFBtp25ekwS0T+d4HYv73MZDj8sMhrKMUI= + + + +bkXQqt+Z1+UYGVUOJouC1i52MsDOh4NNrt5lpgXP+F0= + + + +UKMKyOSKR7cJ7PvVfpjMKKTWQ2jwpKFFLguIJ935kUo= + + + +xYTibbG5nfXeYwQO8ZvEwva52hMx//GTWbuDFEUQJqM= + + + +kE3U3qdJK2bKUZpEVQrHAMl1E5aNW/2jwnB8nMfAqMg= + + + +AUCKzBspk4DJ5zlUYaaPXt/rQ6o7CV0uqztqSD24+qA= + + + +gttKmcU0Cj1Jku943UdcoN1MfPCBJrjYVYA/htAKiOU= + + + +MTEbEesuhwC623TaTe4E+Z0jaKohdOCzB9A+BJxnyW0= + + + +DOpulrLdVedTl4MeN/7fwC10nvkIhmIVRn6kRHf4AWw= + + + +3MBhlo++NYhsDF/1nWGwXvCQ+oI8+amFCsKfHImo7X4= + + + +8BBKr4MZU2Vj0RbqAh4At4IwGimMo1i/VIQFYSuD/TQ= + + + +dI88XfptGavZXmRrWYsHcV7klm7C5xgZ8HDyGWCtVRA= + + + +zmjudxY/3W0h0bJ7xPGHYCxil7K6dTknBNUiqvobCWI= + + + +zgaZm/bTMHl4A6hCl+z5KlQY1DdDrruj60nd8MQIe9Q= + + + +Cu4P7Mrp9N67vcQvPfrxmzAmCm04tWFM5daYIXODBqQ= + + + +GFQOovWCfrXPHLpncFdxGYSB9ZDc7uO0KT5JiU/4EFY= + + + +8p1GywZd9lHRklY0K/yE5IA4Cf4v5fJfqRRl5KZtFvo= + + + +7B72bgS/VMLHO2WjkVmZd67vgpr4vr1Y8OKlJitChcQ= + + + +6Zyy8mmZ2QKG1b54G41yyuMdJgoQx27e9HfATsUchLE= + + + +gI11YP6tE42hhrSJItJ+0K+NHw72Z20eMfYi0Sd8u4c= + + + +T+MoJU6WUdR8PFtZh8QAouKMhYYfrkSWsWutNd946Dk= + + + +Mc3UMCQWotBvN7bdt/cUNqLlk2pKEUdKx5ak/HbtYbw= + + + +SZ4MXliH9xdG6Oco2uwuFnL4JDL+ZLv+AmWFXnn6kLU= + + + +aD45KlCdpLm8XNR1Yua43TiQzW/BXCL7PhxGU5xFYgM= + + + +mj44CQYnxAjr6AIAWfGk6dr7dBaptrs1O9KhyMMOvz0= + + + +UvDVOcLLlpC4HioRbWY676muvgOgBeM7mTqxLChz7ME= + + + +RijGmEESZnce20dwepJWrYsKjoE3TNPKeJJvt0hFbI8= + + + +z6NZgmVl1/xAQRuZdQIBouZLm0z7TD8TiLsPMmjN3Y0= + + + +6dLib67/mXrFxtquAAegVVVvp6xGfUyWDGgCeNdL1Fg= + + + +Ja6JhwfEN8VpAx5LPdq1l7LQUHEU1o378xGBPFziDVk= + + + +KFbtvc8VAEB0TL95Xc4W9ByCNrVtEnzQAW+iWvFLkbk= + + + +kOtm2JCIXz8gVZPmzoA9zBQI+Yaxei6aqhYxONTgkiM= + + + +ZfQ9KNdbjyysZNvs1+blzU9rgtqC1V9/cOcewIY1H34= + + + +Bv1vcKKMVJxzCG1T3shMcL9zESTVERV3glh/WUWEHrE= + + + +O0UuexkDktSv961KtQEUQuXJQaD3fVrOAi642+P75Os= + + + +E9P/sg8MWZaFXP7ntyOoykT4urldLUaV3hLLqk24C/A= + + + +S7n+MfgpEMX+qxh5bdEXDf3AvZFa3SX7ViWTyOWWH7M= + + + +2vG8nRt9rRP9Ir5Z3HXYEPhjEk97CC8nwY3mWObznzY= + + + +EdR7OJbEh/0YXhd+gq9hUVzZ1QzM+8XKkyvSK/NGFxw= + + + +h2blIKO/r28bTnFi0JT+uESam63I5Y5udqJImP9ulDc= + + + +kui/JgzEGn3Dv5rp9zpqTXk7MihwllgalYU/cBlUXNs= + + + +TDzkmOZsh8EpmZEQF2ijlYIpMpuNBYW4EB2IqCwtQVo= + + + +QLRz1v/tbUYNB8PIkEvwpAiR29W+5JSPN7cvhXf3T6A= + + + +GUMJYOBB79UrKx63VDkdZjxzAjfthVB53KVn6rptTdE= + + + +P52+aLSL6R0cTqbbUSkSGBMCHJU+u3oyVQxqPS6PU2k= + + + +OIogsKN2AD5wV8xihMa63X9x6msrzhPP+k6mwFCx6BY= + + + +7VWR6RMmhJ7zA2E4rpcREVej65Dnui/5Ues9Ny5Cyws= + + + +5b1uAPnavStbWsFu4R+dLib+w1gNhEdVfaPodlD7ic4= + + + +pr4TjfU2L5m6NkmruE4b2JK+7Gm4iwMzvTyC+do4QyU= + + + +b2sW3l6S+wS2QNSHctPfC+DXG/k7GdLvSkF79NXUE6w= + + + +77Fk+IJiZEBLf8acd2CYvlYt2kGg4H6xns5r8u9BFLE= + + + +yf+I17cqJOi1PKaSEq4kYGIEt4Zqn0VPz/q2qCW+Vmc= + + + +EWvj8DNHtApfBw0NYqkpvU7+yjdilpaFfTBMOiU436g= + + + +BDgUuZfiafCr3/8H1e1obMnO/eFz3/1IMvb3DWfdF40= + + + +yNqF2gY/JfePnS9W8Y124ynQuUGMoCLXXz07cdo71ME= + + + +Juyud5BSezR0Z6ocZgtdeYA8AKyZFgtjOm5tg8jF1SQ= + + + +6rQbY1y7TzEXsqw11RvbI3grRWmVYQbzukn/r5whZIE= + + + +y+oxjqs+yRe4DUZw4euLLOvWnmdOZ8S1OzjrToD82Io= + + + +Nq8c9O+67w+JWP39kng89nvLS7n0G5gB131KJTD+hOU= + + + +98GeygRCxQE/ua66xGs0e7/2ggGRKrUoXYVNQ6lXJ9I= + + + +JeEX23LxXw3RPGZvn6MvNK2rw7794NOqlIP2/2t/tXk= + + + +YWs9OQ9ZB2AaaY4WwQ1LDqLKIoS0HrxeL3UrfKKdG/k= + + + +iXUNsun472dD9xlbJ6Knr255xuB+HXsodvjfuGtvDZY= + + + +DBQrIAupabU+jIwh5sSA96yhjPYc2TB5SUclrG892no= + + + +vu7V3zSEm7t02a3HmbkBlAiXtfk4p7l7C9tbCfH2Okc= + + + +NrPlQBVhlNTKuRXvgHDgV9GxTge8fr283hxrMnqVxao= + + + +/UeCrgo8RWEBr3h7uULfb++Ajx6/R1/xiqKw8xijm/A= + + + +nXFrZQIaoWpqSUs0nCNncDASV7CADvt/J/w7bVbe0OA= + + + +f5544biTo03F4XldCry/a88M0i6fdopO9TEe4uvlKZw= + + + +HFshD1xVyzkAd5zqsRLGZsQom03yk6BFQQ2DA0Tv0ng= + + + +m2fXmX2tXuWCKKM4nceBC3TnH988iHsEx9EJOUD9p/s= + + + +3At3C53gHb50RBNvIu/Gl9S/ERy6YkceLwTchehxzAk= + + + +z8d0m5b2O9McPEK1xHG/dWgUBT6EfBDz6wA0F7xSPTA= + + + +vEPGlBWj65sJLThGbT+S4fAUhggOE/NuFPL9WcL5FkM= + + + +O6eDBdWRXHmf/wq5fZxuExxheD5nDZtRaTDf+c54Tvw= + + + +HTzZ72BMeca064IQ1+CgpYpHTUFbVI8QnByuz/UI+7Q= + + + +QbC9dHxReuGxVb9OqYYxo1+uOfmu8QNdm1OffOBXfqE= + + + + + + +u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4= + + + +Hl35O15uKweft4ra6+u3DfBU2I46FT7cinxZ85bgCV1/W700rz3qqQh63N0qzXMFL9qCYc69zFTp +ZopvPzmmdLMzTj2XsLLGnjFhWLR0MJdSZAG53C7lFpkh/WWxFb+En2QsWzxZOzu6MBO0kvyldnQL +2gFba9j+LFhnjpc2rpQ= + + + + +MIIC+DCCAmGgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UEBhMCS1IxDjAMBgNVBAgM +BVN1d29uMRwwGgYDVQQKDBNTYW1zdW5nIEVsZWN0cm9uaWNzMQwwCgYDVQQLDANTTFAxIDAeBgNV +BAMMF1NMUCBXZWJBcHAgVGVtcG9yYXJ5IENBMSYwJAYJKoZIhvcNAQkBFhd5dW5jaGFuLmNob0Bz +YW1zdW5nLmNvbTAeFw0xMTEyMDgwMTMxMDBaFw0yMTExMzAwMTMxMDBaMHMxCzAJBgNVBAYTAktS +MQ4wDAYDVQQIEwVTdXdvbjEcMBoGA1UEChMTU2Ftc3VuZyBFbGVjdHJvbmljczEMMAoGA1UECxMD +U0xQMSgwJgYDVQQDEx9TTFAgV2ViQXBwIFRlbXBvcmFyeSBDQSBmb3IgU0RLMIGfMA0GCSqGSIb3 +DQEBAQUAA4GNADCBiQKBgQClQyI7k1NTkEoWsrIl8qWSEhvnfc77AvEUvPuYJSU+9BsQf16grM1w +NCGdbmf/uM869FgeRMFjhT2xsHKpbXdQv8nV4LZhUevyLouE8auCkdewmQJUwujCE/fgAA+TEzAt +bN+4Kl8T5fSYB7qqeLWEyDtvNoxTQuivEBlv31AMmwIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCG +SAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQU3iIuHrLj +UZjHgtS1fkzpFei8fGYwHwYDVR0jBBgwFoAUR6iPzR8iummFE1UhLcIZLV//3AMwDQYJKoZIhvcN +AQEFBQADgYEAj0da5fhxEcgnDMZGOp07YWeIFdUmx7eGQANtHqWm7jdbG2j0vS3kGCFgqqPift8a +pos8llZq3N65mqfLvgjdanC/cP7gR7AC3oCiE9lOSeEYxU5I/UGDjjTRCa+eJfE3UmAz8sVbrWG/ +S5WLPBgd4IQpQ0tNiGd2NLyCqaZXL7U= + + + + + \ No newline at end of file