Tizen 2.0 Release 2.0_release
authorHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 06:12:18 +0000 (15:12 +0900)
committerHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 06:12:18 +0000 (15:12 +0900)
165 files changed:
AUTHORS [new file with mode: 0755]
LICENSE.Apache-2.0 [new file with mode: 0755]
NOTICE [new file with mode: 0755]
README.txt [new file with mode: 0755]
_locales/en_US/messages.json [new file with mode: 0755]
_locales/fi/messages.json [new file with mode: 0755]
_locales/locales.json [new file with mode: 0755]
audio/ButtonClick_01_Start.ogg [new file with mode: 0755]
audio/ButtonClick_02_Settings.ogg [new file with mode: 0755]
audio/Intro.ogg [new file with mode: 0755]
audio/MovePiece.ogg [new file with mode: 0755]
audio/Shuffle.ogg [new file with mode: 0755]
audio/Win.ogg [new file with mode: 0755]
audio/cheer.ogg [new file with mode: 0755]
config.xml [new file with mode: 0755]
css/finishscreen.css [new file with mode: 0755]
css/leaderboardpage.css [new file with mode: 0755]
css/license.css [new file with mode: 0755]
css/openscreen.css [new file with mode: 0755]
css/pausescreen.css [new file with mode: 0755]
css/photospage.css [new file with mode: 0755]
css/quickstart.css [new file with mode: 0755]
db/slider-puzzle-schema.sqlite [new file with mode: 0755]
db/slider-puzzle.sqlite [new file with mode: 0755]
fonts/FugazOne-Regular.ttf [new file with mode: 0755]
fonts/Lato-LightItalic.ttf [new file with mode: 0755]
fonts/Molot.otf [new file with mode: 0755]
icon.png [new file with mode: 0755]
icon_128.png [new file with mode: 0755]
images/active-puzzle/active-puzzle-easy-bg.png [new file with mode: 0755]
images/active-puzzle/empty_tile_bg.png [new file with mode: 0755]
images/active-puzzle/new-nav-slider-button.png [new file with mode: 0755]
images/active-puzzle/pause-nav-slider-button.png [new file with mode: 0755]
images/active-puzzle/pointer-down.png [new file with mode: 0755]
images/active-puzzle/pointer-left.png [new file with mode: 0755]
images/active-puzzle/pointer-right.png [new file with mode: 0755]
images/active-puzzle/pointer-up.png [new file with mode: 0755]
images/ajax-loader-transparent.png [new file with mode: 0755]
images/finish-screen/big-finish-graphic.png [new file with mode: 0755]
images/finish-screen/finish-popout-base.png [new file with mode: 0755]
images/finish-screen/input-save-button.png [new file with mode: 0755]
images/finish-screen/input-text-area-box.png [new file with mode: 0755]
images/leaderboard-screen/close-out-button.png [new file with mode: 0755]
images/leaderboard-screen/column-brutal-head.png [new file with mode: 0755]
images/leaderboard-screen/column-easy-head.png [new file with mode: 0755]
images/leaderboard-screen/column-hard-head.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-base.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-header.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-image-frame.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-moves-active.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-moves.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-no1.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-no2.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-no3.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-no4.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-no5.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-no6.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-times-active.png [new file with mode: 0755]
images/leaderboard-screen/leaderboard-times.png [new file with mode: 0755]
images/leaderboard-screen/popup-base.png [new file with mode: 0755]
images/leaderboard-screen/popup-play-button.png [new file with mode: 0755]
images/new-screen/choose-level-header.png [new file with mode: 0755]
images/new-screen/close-popout-icon.png [new file with mode: 0755]
images/new-screen/level-option-brutal-active.png [new file with mode: 0755]
images/new-screen/level-option-brutal.png [new file with mode: 0755]
images/new-screen/level-option-easy (kopio).png [new file with mode: 0755]
images/new-screen/level-option-easy-active.png [new file with mode: 0755]
images/new-screen/level-option-easy.png [new file with mode: 0755]
images/new-screen/level-option-hard-active.png [new file with mode: 0755]
images/new-screen/level-option-hard.png [new file with mode: 0755]
images/new-screen/new-photo-button.png [new file with mode: 0755]
images/new-screen/new-popout-base-right.png [new file with mode: 0755]
images/new-screen/play-again-button.png [new file with mode: 0755]
images/new-screen/pointer-right-new.png [new file with mode: 0755]
images/new-screen/pointer-right.png [new file with mode: 0755]
images/new-screen/pointer-right_active.png [new file with mode: 0755]
images/open-screen/SP_ChoosePhoto-active.png [new file with mode: 0755]
images/open-screen/SP_ChoosePhoto.png [new file with mode: 0755]
images/open-screen/SP_LeaderBoard-active.png [new file with mode: 0755]
images/open-screen/SP_LeaderBoard.png [new file with mode: 0755]
images/open-screen/SP_OpenScreen-base.png [new file with mode: 0755]
images/open-screen/SP_QuickStart-active.png [new file with mode: 0755]
images/open-screen/SP_QuickStart.png [new file with mode: 0755]
images/original_puzzles/banaue-rice-terraces.jpg [new file with mode: 0755]
images/original_puzzles/bass-guitar.jpg [new file with mode: 0755]
images/original_puzzles/butterfly.jpg [new file with mode: 0755]
images/original_puzzles/eiffel-tower-upskirt.jpg [new file with mode: 0755]
images/original_puzzles/fireworks.jpg [new file with mode: 0755]
images/original_puzzles/icecream-and-mango.jpg [new file with mode: 0755]
images/original_puzzles/new-york-city-at-night.jpg [new file with mode: 0755]
images/pause-screen/big-pause-graphic.png [new file with mode: 0755]
images/pause-screen/leader-board-button.png [new file with mode: 0755]
images/pause-screen/new-popout-base-left.png [new file with mode: 0755]
images/pause-screen/pause-place-no1.png [new file with mode: 0755]
images/pause-screen/pause-place-no2.png [new file with mode: 0755]
images/pause-screen/pause-place-no3.png [new file with mode: 0755]
images/photo-screen/photo-game-active.png [new file with mode: 0755]
images/photo-screen/photo-game.png [new file with mode: 0755]
images/photo-screen/photo-header.png [new file with mode: 0755]
images/photo-screen/photo-pc-active.png [new file with mode: 0755]
images/photo-screen/photo-pc.png [new file with mode: 0755]
images/photo-screen/popup-bottom-shadow.png [new file with mode: 0755]
images/photo-screen/popup-crop-frame.png [new file with mode: 0755]
images/photo-screen/popup-scaleable-base.png [new file with mode: 0755]
images/photo-screen/popup-top-shadow.png [new file with mode: 0755]
images/puzzle_photos/Ian_Sane-brick-wall.jpg [new file with mode: 0755]
images/puzzle_photos/Ian_Sane-forest-waterfall.jpg [new file with mode: 0755]
images/puzzle_photos/Ian_Sane-railroad-bridge.jpg [new file with mode: 0755]
images/puzzle_photos/Ian_Sane-red-wall.jpg [new file with mode: 0755]
images/puzzle_photos/Ian_Sane-zoo-lion.jpg [new file with mode: 0755]
images/puzzle_photos/JonoMueller-dirty-truck.jpg [new file with mode: 0755]
images/puzzle_photos/Mason_Masteka-purple-carrots.jpg [new file with mode: 0755]
images/puzzle_photos/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg [new file with mode: 0755]
images/puzzle_photos/Ralphman-train-station.jpg [new file with mode: 0755]
images/puzzle_photos/Sideonecincy-bald-eagle.jpg [new file with mode: 0755]
images/puzzle_photos/StuSeeger-elephant-mother-child.jpg [new file with mode: 0755]
images/puzzle_photos/StuSeeger-fair-ride.jpg [new file with mode: 0755]
images/puzzle_photos/Thomas_Good-zoo-tiger.jpg [new file with mode: 0755]
images/puzzle_photos/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg [new file with mode: 0755]
images/puzzle_photos/kennymatic-rocky-beach.jpg [new file with mode: 0755]
images/puzzle_photos/ktylerconk-water-lily.jpg [new file with mode: 0755]
images/puzzle_photos/mccun934-leaf-water.jpg [new file with mode: 0755]
images/puzzle_photos/mccun934-pumpkin-patch.jpg [new file with mode: 0755]
images/puzzle_photos/pdxjeff-ferris-wheel.jpg [new file with mode: 0755]
images/puzzle_photos/sam_churchill-daylight-train.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Ian_Sane-brick-wall.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Ian_Sane-forest-waterfall.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Ian_Sane-railroad-bridge.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Ian_Sane-red-wall.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Ian_Sane-zoo-lion.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/JonoMueller-dirty-truck.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Mason_Masteka-purple-carrots.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Ralphman-train-station.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Sideonecincy-bald-eagle.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/StuSeeger-elephant-mother-child.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/StuSeeger-fair-ride.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Thomas_Good-zoo-tiger.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/kennymatic-rocky-beach.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/ktylerconk-water-lily.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/mccun934-leaf-water.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/mccun934-pumpkin-patch.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/pdxjeff-ferris-wheel.jpg [new file with mode: 0755]
images/puzzle_photos_thumbs/sam_churchill-daylight-train.jpg [new file with mode: 0755]
index.html [new file with mode: 0755]
js/dbmanager.js [new file with mode: 0755]
js/finishpopout.js [new file with mode: 0755]
js/iscroll-lite.js [new file with mode: 0755]
js/jquery-1.7.2.min.js [new file with mode: 0755]
js/leaderboardpage.js [new file with mode: 0755]
js/license.js [new file with mode: 0755]
js/localizer.js [new file with mode: 0755]
js/main.js [new file with mode: 0755]
js/newpopout.js [new file with mode: 0755]
js/pausebackground.js [new file with mode: 0755]
js/pausepopout.js [new file with mode: 0755]
js/photospage.js [new file with mode: 0755]
js/puzzlepausefullimage.js [new file with mode: 0755]
js/slider-puzzle.js [new file with mode: 0755]
js/spscrollbar.js [new file with mode: 0755]
js/spscroller.js [new file with mode: 0755]
js/sputil.js [new file with mode: 0755]
manifest.json [new file with mode: 0755]
signature1.xml [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100755 (executable)
index 0000000..581fa37
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Sirisha Muppavarapu <sirisha.muppavarapu at intel dot com>
diff --git a/LICENSE.Apache-2.0 b/LICENSE.Apache-2.0
new file mode 100755 (executable)
index 0000000..c968396
--- /dev/null
@@ -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/NOTICE b/NOTICE
new file mode 100755 (executable)
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 (executable)
index 0000000..f6e0876
--- /dev/null
@@ -0,0 +1,139 @@
+
+Slider puzzle application is implemeneted in HTML5/JavaScript
+
+Owner: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
+
+Technical Deatils: This application is written using HTML5/css3/jquery javascript library and is
+distributed under Apache2.0 license.
+
+-------------------------------------------------------------
+PHOTOS
+-------------------------------------------------------------
+Photos for the slider puzzle are taken from the Flickr.
+Photo credits (all licensed under creative commons 2.0):
+
+File: mccun934-pumpkin-patch.jpg
+Author (username): Mike McCune (mccun934)
+
+File: StuSeeger-elephant-mother-child.jpg
+Author (username): Stuart Seeger (StuSeeger)
+
+File: ktylerconk-water-lily.jpg
+Author (username): Kathleen Tyler (Conklin  ktylerconk)
+
+File: Ian_Sane-zoo-lion.jpg
+Author (username): Ian Sane (Ian_Sane)
+
+File: Ian_Sane-railroad-bridge.jpg
+Author (username): Ian Sane (Ian_Sane)
+
+File: Ian_Sane-forest-waterfall.jpg
+Author (username): Ian Sane (Ian_Sane)
+
+File: Ian_Sane-brick-wall.jpg
+Author (username): Ian Sane (Ian_Sane)
+
+File: Ian_Sane-red-wall.jpg
+Author (username): Ian Sane (Ian_Sane)
+
+File: mccun934-leaf-water.jpg
+Author (username): Mike McCune (mccun934)
+
+File: kennymatic-rocky-beach.jpg
+Author (username): Kenny Louie (kennymatic)
+
+File: Ralphman-train-station.jpg
+Author (username): Ralphman (Ralphman)
+
+File: JonoMueller-dirty-truck.jpg
+Author (username): Jonathan Mueller (JonoMueller)
+
+File: Mason_Masteka-purple-carrots.jpg
+Author (username): Mason Masteka (Mason_Masteka)
+
+File: StuSeeger-fair-ride.jpg
+Author (username): Stuart Seeger (StuSeeger)
+
+File: pdxjeff-ferris-wheel.jpg
+Author (username): Jeff Muceus (pdxjeff)
+
+File: Sideonecincy-bald-eagle.jpg
+Author (username): Chris Miller (Sideonecincy)
+
+File: Thomas_Good-zoo-tiger.jpg
+Author (username): Tom Good (Thomas_Good)
+
+File: sam_churchill-daylight-train.jpg
+Author (username): Sam Churchill (sam_churchill)
+
+File: Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg
+Author (username): Ricardo Mangual (RicymarFineArt)
+
+File: Tso_Moriri_Lake_by_Prabhu_B_Doss.jpg
+Author (username): Prabhu B Doss (Prabhu B Doss)
+
+-------------------------------------------------------------
+SOUNDS
+-------------------------------------------------------------
+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/
+
+ButtonClick_01_Start.ogg
+Source: http://www.freesound.org/people/Bram/sounds/7127/
+License: CC BY 3.0
+
+ButtonClick_02_Settings.ogg
+Source: http://www.freesound.org/people/vitriolix/sounds/778/
+License: http://creativecommons.org/licenses/sampling+/1.0/
+
+Shuffle.ogg
+Source: http://www.freesound.org/people/thereelfryboy/sounds/35022/
+License: http://creativecommons.org/licenses/sampling+/1.0/
+
+Intro.ogg
+MovePiece.ogg
+Win.ogg
+cheer.ogg
+
+-------------------------------------------------------------
+IMAGES
+-------------------------------------------------------------
+All images in the images/ folder (excluding images/puzzle_photos/*) are
+created by Intel Corp. they are licensed under the Creative Commons
+Attribution 3.0 license:
+http://creativecommons.org/licenses/by/3.0/us/
+
+These images are a part of jquery-ui:
+images/ajax-loader-transparent.png
+Origin: http://jqueryui.com/
+License: http://jquery.org/license/
+
+-------------------------------------------------------------
+FONTS
+-------------------------------------------------------------
+FugazOne-Regular.ttf
+License:  SIL Open Font License, 1.1
+License link: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
+http://www.google.com/webfonts/specimen/Fugaz+One
+
+Lato-LightItalic.ttf
+Copyright [c] 2010-2011 by tyPoland Lukasz Dziedzic with Reserved Font Name "Lato".
+License: Licensed under the SIL Open Font License, V
+http://www.ffonts.net/Lato-Light-Italic.font
+
+
+Molot.otf
+Author: Jovanny Lemonad
+License: Freeware Free
+http://www.fonts4free.net/molot-font.html
+
+-------------------------------------------------------------
+LIBRARIES
+-------------------------------------------------------------
+jQuery library is used. [MIT license]
+Origin: http://jquery.org/
+License: http://jquery.org/license/
+
+jQuery UI is used [MIT license]
+Origin: http://jqueryui.com/
+License: http://jquery.org/license/
+-------------------------------------------------------------
diff --git a/_locales/en_US/messages.json b/_locales/en_US/messages.json
new file mode 100755 (executable)
index 0000000..723090e
--- /dev/null
@@ -0,0 +1,29 @@
+{
+    "all_moves": {"message": "Moves:"},
+    "all_time": {"message": "Time:"},
+        "all_moves_cap": {"message": "MOVES"},
+    "all_time_cap": {"message": "TIME"},
+        "all_easy": {"message": "EASY"},
+        "all_hard": {"message": "HARD"},
+        "all_brutal": {"message": "BRUTAL"},
+        "all_pause": {"message": "PAUSE"},
+        "all_paused": {"message": "PAUSED"},
+        "all_play": {"message": "PLAY"},
+        "all_level": {"message": "LEVEL"},
+    "pause_your_game": {"message": "Your Game"},
+    "pause_photo_credit": {"message": "Photo Credit:"},
+        "pause_leaderboard": {"message": "LEADER<br/>BOARD"},
+        "finish_your_game": {"message": "Your Game"},
+        "finish_finish": {"message": "FINISH"},
+        "finish_save": {"message": "SAVE"},
+    "new_choose_level": {"message": "CHOOSE LEVEL"},
+        "new_play_again": {"message": "PLAY<br/>AGAIN"},
+        "new_new_photo": {"message": "NEW<br/>PHOTO"},
+        "photos_photos": {"message": "PHOTOS"},
+        "photos_fromgame": {"message": "FROM GAME"},
+        "photos_frompc": {"message": "FROM PC"},
+        "leaderboard_leaderboard": {"message": "LEADERBOARD:"},
+        "open_quickstart": {"message": "QUICK START"},
+        "open_leaderboard": {"message": "LEADERBOARD"},
+        "open_choosephoto": {"message": "CHOOSE PHOTO"}
+}
diff --git a/_locales/fi/messages.json b/_locales/fi/messages.json
new file mode 100755 (executable)
index 0000000..30d3956
--- /dev/null
@@ -0,0 +1,29 @@
+{
+    "all_moves": {"message": "Siirrot:"},
+    "all_time": {"message": "Aika:"},
+        "all_moves_cap": {"message": "SIIRROT"},
+    "all_time_cap": {"message": "AIKA"},
+        "all_easy": {"message": "HELPPO"},
+        "all_hard": {"message": "VAIKEA"},
+        "all_brutal": {"message": "JULMA"},
+        "all_pause": {"message": "TAUKO"},
+        "all_paused": {"message": "KESKEYTETTY"},
+        "all_play": {"message": "PELAA"},
+        "all_level": {"message": "TASO"},
+    "pause_your_game": {"message": "Sinun Peli"},
+    "pause_photo_credit": {"message": "Valokuvan Kunnia:"},
+        "pause_leaderboard": {"message": "ENNÄTYS<br/>TAULUKKO"},
+        "finish_your_game": {"message": "Sinun Peli"},
+        "finish_finish": {"message": "LOPPU"},
+        "finish_save": {"message": "TALLENNA"},
+    "new_choose_level": {"message": "VALITSE TASO"},
+        "new_play_again": {"message": "PELAA<br/>JÄLLEEN"},
+        "new_new_photo": {"message": "UUSI<br/>KUVA"},
+        "photos_photos": {"message": "VALOKUVAT"},
+        "photos_fromgame": {"message": "PELISTA"},
+        "photos_frompc": {"message": "PC:STA"},
+        "leaderboard_leaderboard": {"message": "ENNÄTYSTAULUKKO"},
+        "open_quickstart": {"message": "PIKAPELI"},
+        "open_leaderboard": {"message": "ENNÄTYSTAULUKKO"},
+        "open_choosephoto": {"message": "VALITSE KUVA"}
+}
diff --git a/_locales/locales.json b/_locales/locales.json
new file mode 100755 (executable)
index 0000000..501e578
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "en_US": {
+    "display": "English (North American)",
+    "strings": {}
+  },
+  "fi": {
+    "display": "Suomi",
+    "strings": {}
+  }
+}
diff --git a/audio/ButtonClick_01_Start.ogg b/audio/ButtonClick_01_Start.ogg
new file mode 100755 (executable)
index 0000000..5444b6c
Binary files /dev/null and b/audio/ButtonClick_01_Start.ogg differ
diff --git a/audio/ButtonClick_02_Settings.ogg b/audio/ButtonClick_02_Settings.ogg
new file mode 100755 (executable)
index 0000000..d205c5a
Binary files /dev/null and b/audio/ButtonClick_02_Settings.ogg differ
diff --git a/audio/Intro.ogg b/audio/Intro.ogg
new file mode 100755 (executable)
index 0000000..20ae521
Binary files /dev/null and b/audio/Intro.ogg differ
diff --git a/audio/MovePiece.ogg b/audio/MovePiece.ogg
new file mode 100755 (executable)
index 0000000..9380724
Binary files /dev/null and b/audio/MovePiece.ogg differ
diff --git a/audio/Shuffle.ogg b/audio/Shuffle.ogg
new file mode 100755 (executable)
index 0000000..e0ec0c9
Binary files /dev/null and b/audio/Shuffle.ogg differ
diff --git a/audio/Win.ogg b/audio/Win.ogg
new file mode 100755 (executable)
index 0000000..0a33339
Binary files /dev/null and b/audio/Win.ogg differ
diff --git a/audio/cheer.ogg b/audio/cheer.ogg
new file mode 100755 (executable)
index 0000000..090369b
Binary files /dev/null and b/audio/cheer.ogg differ
diff --git a/config.xml b/config.xml
new file mode 100755 (executable)
index 0000000..3f197e6
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="https://github.com/01org/webapps-slider-puzzle" version="1.0.0" viewmodes="fullscreen">
+       <icon src="icon_128.png"/>
+       <content src="index.html"/>
+       <name>SliderPuzzle</name>
+       <tizen:application id="QGZILHnh6o" required_version="1.0"/>
+       <tizen:setting screen-orientation="landscape" contextmenu="enable"/>
+</widget>
diff --git a/css/finishscreen.css b/css/finishscreen.css
new file mode 100755 (executable)
index 0000000..cb57f58
--- /dev/null
@@ -0,0 +1,299 @@
+/*
+ * 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
+ *
+ */
+
+@font-face {
+    font-family: "MolotCustom";
+    src: local("Molot"), url("../fonts/Molot.otf");
+}
+
+@font-face {
+    font-family: "FugazOneCustom";
+    src: local("Fugaz One"), url("../fonts/FugazOne-Regular.ttf");
+}
+
+
+div#qsFinish {
+  position: relative;
+  margin-left: auto;
+  margin-right: auto;
+  top: -200px;
+  width: auto;
+  height: auto;
+  text-align: center;
+  display: block;
+  visibility: hidden;
+  /*position: relative;
+  margin-left: auto;
+  margin-right: auto;
+  top: -250px;
+  width: 407px;
+  height: 308px;
+  background-image: url("../images/finish-screen/big-finish-graphic.png");
+  background-repeat: no-repeat;
+  display: block;
+  visibility: hidden;*/
+}
+
+span#qsFinishS {
+  font-family: "MolotCustom";
+  font-size: 160px;
+  color: #e1e1e1;
+  text-shadow: 2px 2px 20px #000000;
+  opacity: 0.5;
+}
+
+div#finishScreenPopout {
+  position: absolute;
+  left: 0px;
+  top: 400px;
+  width: 1024px;
+  height: 163px;
+  background-image: url("../images/finish-screen/finish-popout-base.png");
+  background-repeat: no-repeat;
+  display: block;
+  visibility: hidden;
+}
+
+div#qsFpMoves {
+  position: absolute;
+  left: 50px;
+  top: 35px;
+  width: 200px;
+  height: 100px;
+  font-family: "MolotCustom";
+  font-size: 25pt;
+}
+
+div#qsFpTime {
+  position: absolute;
+  left: 240px;
+  top: 35px;
+  width: 200px;
+  height: 100px;
+  font-family: "MolotCustom";
+  font-size: 25pt;
+}
+
+span#qsFpMovesTitleS {
+  font-family: "MolotCustom";
+  font-size: 23pt;
+  color: #000000;
+}
+
+span#qsFpTimeTitleS {
+  font-family: "MolotCustom";
+  font-size: 23pt;
+  color: #000000;
+}
+
+span#qsFpMovesS {
+  color: #2bb9ee;
+  font-family: "";
+}
+
+span#qsFpTimeS {
+  color: #2bb9ee;
+  font-family: "";
+}
+
+div#qsFpMoves1 {
+  position: absolute;
+  left: 520px;
+  top: 25px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 30px;
+  /*background-image: url("../images/pause-screen/pause-place-no1.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsFpMoves1S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsFpMoves2 {
+  position: absolute;
+  left: 520px;
+  top: 65px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 32px;
+  /*background-image: url("../images/pause-screen/pause-place-no2.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsFpMoves2S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsFpMoves3 {
+  position: absolute;
+  left: 520px;
+  top: 105px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 31px;
+  /*background-image: url("../images/pause-screen/pause-place-no3.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsFpMoves3S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsFpTime1 {
+  position: absolute;
+  left: 740px;
+  top: 25px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 30px;
+  /*background-image: url("../images/pause-screen/pause-place-no1.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsFpTime1S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsFpTime2 {
+  position: absolute;
+  left: 740px;
+  top: 65px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 32px;
+  /*background-image: url("../images/pause-screen/pause-place-no2.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsFpTime2S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsFpTime3 {
+  position: absolute;
+  left: 740px;
+  top: 105px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 31px;
+  /*background-image: url("../images/pause-screen/pause-place-no3.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsFpTime3S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsFpNameInput {
+  position: absolute;
+  left: 47px;
+  top: 85px;
+  width: 200px;
+  height: 50px;
+  border-width: 0px;
+  display: block;
+}
+
+input.valueentry
+{
+  position: absolute;
+  /*this trick is needed to fix webkit bug*/
+  left: -2000px;
+  -webkit-transform: translate(2000px, 0px);
+  -webkit-transform: translate(2000px, 0px);
+  -moz-transform: translate(2000px, 0px);
+  font-family: "FugazOneCustom";
+  font-weight: bold;
+  top: 0px;
+  width: 200px;
+  height: 47px;
+  font-size: 20px;
+  border-width: 0px;
+  text-align: center;
+  border: none;
+  outline: #ddd solid thick;
+  background-color: #ccc;
+  padding: 0 0 0 0;
+}
+
+div#qsFpSaveResult {
+  position: absolute;
+  left: 280px;
+  top: 80px;
+  /*width: 80px;
+  height: 58px;
+  background-image: url("../images/finish-screen/input-save-button.png");
+  background-repeat: no-repeat;
+  cursor: pointer; */
+  width: auto;
+  height: auto;
+  display: block;
+}
+
+span#qsFpSaveResultS {
+  font-family: "MolotCustom";
+  font-size: 46px;
+  color: #252525;
+  margin-left: -20px;
+}
+
+span#qsFpSaveResultS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+span#qsFpCloseResultS {
+  font-family: "MolotCustom";
+  font-size: 46px;
+  color: #252525;
+  margin-left: 20px;
+}
+
+span#qsFpCloseResultS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
diff --git a/css/leaderboardpage.css b/css/leaderboardpage.css
new file mode 100755 (executable)
index 0000000..72c8cfe
--- /dev/null
@@ -0,0 +1,566 @@
+/*
+ * 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
+ *
+ */
+
+@font-face {
+    font-family: "MolotCustom";
+    src: local("Molot"), url("../fonts/Molot.otf");
+}
+
+@font-face {
+    font-family: "FugazOneCustom";
+    src: local("Fugaz One"), url("../fonts/FugazOne-Regular.ttf");
+}
+
+#leaderboardPage {
+        background-position: left top;
+    display: -webkit-box;
+    -webkit-box-align: center;
+    -webkit-box-pack: center;
+    -webkit-box-orient: vertical;
+    box-shadow: 5px 5px 20px black;
+
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    -webkit-transform: translate(-50%, -50%);
+        -moz-transform: translate(-50%, -50%);
+    overflow: hidden;
+    cursor: default;
+    width: 1024px;
+    height: 600px;
+
+        visibility: hidden;
+}
+
+div#lbTitle {
+  position: absolute;
+  left: 10px;
+  top: 20px;
+  width: 250px;
+  height: 30px;
+  font-family: "MolotCustom";
+  font-size: 25pt;
+  display: block;
+}
+
+div#lbMoves {
+  position: absolute;
+  left: 370px;
+  top: 15px;
+  width: 133px;
+  height: 42px;
+  color: #ffffff;
+  text-align: center;
+  background-color: #252525;
+  cursor: pointer;
+  display: table;
+
+}
+
+div#lbTimes {
+  position: absolute;
+  left: 503px;
+  top: 15px;
+  width: 133px;
+  height: 42px;
+  color: #ffffff;
+  text-align: center;
+  background-color: #b7b7b7;
+  cursor: pointer;
+  display: table;
+}
+
+span#lbMovesS {
+  position: relative;
+  font-family: "MolotCustom";
+  font-size: 24pt;
+  vertical-align:middle;
+  display: table-cell;
+}
+
+span#lbTimesS {
+  position: relative;
+  font-family: "MolotCustom";
+  font-size: 24pt;
+  vertical-align:middle;
+  display: table-cell;
+}
+
+table#lbscoresTable {
+  position: absolute;
+  left: 0px;
+  top: 60px;
+  width: 1024px;
+  height: 540px;
+
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  table-layout:fixed;
+}
+
+th, td {
+  overflow: hidden;
+  border-width: 0px;
+}
+
+tr#lbscoresTableColumnsRow {
+  height: 17px;
+}
+
+/*table columns*/
+th#lbscoresTableRankCol {
+  padding: 1px;
+  width: 10%;
+}
+th#lbscoresTableEasyCol {
+  padding: 1px;
+  text-align:left;
+  width: 30%;
+}
+th#lbscoresTableHardCol {
+  padding: 1px;
+  text-align:left;
+  width: 30%;
+}
+th#lbscoresTableBrutalCol {
+  padding: 1px;
+  text-align:left;
+  width: 30%;
+}
+
+span#lbscoresTableEasyColS {
+  font-family: "MolotCustom";
+  font-size: 15pt;
+  color: #7fd6f6;
+}
+
+span#lbscoresTableHardColS {
+  font-family: "MolotCustom";
+  font-size: 15pt;
+  color: #7fd6f6;
+}
+
+span#lbscoresTableBrutalColS {
+  font-family: "MolotCustom";
+  font-size: 15pt;
+  color: #7fd6f6;
+}
+
+tr#lbscoresTableRank1Row {
+}
+
+td#lbscoresTableRank1 {
+  padding: 1px;
+  background-image: url("../images/leaderboard-screen/leaderboard-no1.png");
+  background-repeat: no-repeat;
+  width: 10%;
+  background-position: center center;
+  background-color: #f0f9fd;
+  height: 80px;
+}
+
+td#lbscoresTableEasy1 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableHard1 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableBrutal1 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+tr#lbscoresTableRank2Row {
+}
+
+td#lbscoresTableRank2 {
+  padding: 1px;
+  background-image: url("../images/leaderboard-screen/leaderboard-no2.png");
+  background-repeat: no-repeat;
+  width: 10%;
+  background-color: #e3f4fb;
+  background-position: center center;
+  height: 80px;
+}
+
+td#lbscoresTableEasy2 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableHard2 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableBrutal2 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+tr#lbscoresTableRank3Row {
+}
+
+td#lbscoresTableRank3 {
+  padding: 1px;
+  background-image: url("../images/leaderboard-screen/leaderboard-no3.png");
+  background-repeat: no-repeat;
+  width: 10%;
+  background-color: #f0f9fd;
+  background-position: center center;
+  height: 80px;
+}
+
+td#lbscoresTableEasy3 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableHard3 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableBrutal3 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+tr#lbscoresTableRank4Row {
+}
+
+td#lbscoresTableRank4 {
+  padding: 1px;
+  background-image: url("../images/leaderboard-screen/leaderboard-no4.png");
+  background-repeat: no-repeat;
+  width: 10%;
+  background-color: #e3f4fb;
+  background-position: center center;
+  height: 80px;
+}
+
+td#lbscoresTableEasy4 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableHard4 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableBrutal4 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+tr#lbscoresTableRank5Row {
+}
+
+td#lbscoresTableRank5 {
+  padding: 1px;
+  background-image: url("../images/leaderboard-screen/leaderboard-no5.png");
+  background-repeat: no-repeat;
+  width: 10%;
+  background-color: #f0f9fd;
+  background-position: center center;
+  height: 80px;
+}
+
+td#lbscoresTableEasy5 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableHard5 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableBrutal5 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+tr#lbscoresTableRank6Row {
+}
+
+td#lbscoresTableRank6 {
+  padding: 1px;
+  background-color: #e3f4fb;
+  background-image: url("../images/leaderboard-screen/leaderboard-no6.png");
+  background-repeat: no-repeat;
+  width: 10%;
+  background-position: center center;
+  height: 80px;
+}
+
+td#lbscoresTableEasy6 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableHard6 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+td#lbscoresTableBrutal6 {
+  padding: 1px;
+  width: 30%;
+  height: 80px;
+}
+
+div#lbCloseButton {
+  position: absolute;
+  left: 975px;
+  top: 12px;
+  width: 30px;
+  height: 45px;
+  background-image: url("../images/leaderboard-screen/close-out-button.png");
+  background-repeat: no-repeat;
+  display: block;
+  cursor: pointer;
+}
+
+div.tableLbScoreContents {
+  position: relative;
+  left: 0px;
+  top: 0px;
+  width: 100%;
+  height: 100%;
+  display: table;
+}
+
+div.alternateBg1 {
+  background-color: #e3f4fb;
+}
+
+div.alternateBg2 {
+  background-color: #f0f9fd;
+}
+
+span.tableLbScoreContentsText {
+  /*margin-top:50%;    */
+  padding-left: 10px;
+  font-family: "FugazOneCustom";
+  font-size: 15pt;
+  vertical-align: middle;
+  display: table-cell;
+}
+
+span.tableEasy1ContentsText {
+}
+
+canvas.tableLbScoreContentsCanvas {
+  width: 100%;
+  height: 100%;
+  cursor: pointer;
+}
+
+div.tableLbScoreContentsCanvasC {
+  position: absolute;
+  left: 65%;
+  top: 10%;
+  width: 30%;
+  height: 70%;
+  padding: 3px;
+  /*background-color: red;*/
+  box-shadow: 0px 0px 4px #252525
+}
+
+div#lbPopUpBase {
+  position:absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0, 0, 0, 0.7);
+  display: block;
+  visibility: hidden;
+}
+
+div#lbPopUp {
+  position:absolute;
+  width: 350px;
+  height: 390px;
+  top: 50%;
+  left: 50%;
+  -webkit-transform: translate(-50%, -50%);
+  background-color: white;
+  display: block;
+}
+
+div#lbPopUpCloseButton {
+  position:absolute;
+  left: 335px;
+  top: -20px;
+  width: 30px;
+  height: 45px;
+  background-image: url("../images/leaderboard-screen/close-out-button.png");
+  background-repeat: no-repeat;
+  display: block;
+  cursor: pointer;
+}
+
+div#lbPopUpImageContainer {
+  position:absolute;
+  top: 2%;
+  left: 15%;
+  width: 70%;
+  height: 30%;
+  box-shadow: 0px 0px 4px #252525;
+  display: block;
+}
+
+div#lbPopUpImage {
+  position:absolute;
+  height: 100%;
+  width: 100%;
+  background-size: 95% 95%;
+  background-position:center;
+  background-repeat: no-repeat;
+  display: block;
+}
+
+div#lbPopUpLevel {
+  position: absolute;
+  left: 75px;
+  top: 35%;
+  width: 200px;
+  height: 40px;
+  font-family: "MolotCustom";
+  font-size: 15pt;
+  text-align: center;
+}
+
+span#lbPopUpLevelText {
+  position: relative;
+}
+
+span#lbPopupScoresTableRowRecords1S {
+  font-family: "FugazOneCustom";
+  font-size: 10pt;
+  position: relative;
+}
+span#lbPopupScoresTableRowRecords2S {
+  font-family: "FugazOneCustom";
+  font-size: 10pt;
+  position: relative;
+}
+span#lbPopupScoresTableRowRecords3S {
+  font-family: "FugazOneCustom";
+  font-size: 10pt;
+  position: relative;
+}
+
+div#lbPopupScoresTable {
+  position: absolute;
+  left: 15px;
+  top: 50%;
+  width: 320px;
+  height: 100px;
+  display: table;
+}
+
+div#lbPopupScoresTableRow {
+  display:table-row;
+  width:auto;
+}
+
+div#lbPopupScoresTableRowRecords {
+  display:table-row;
+  width:auto;
+}
+
+div.lbPopupScoresTableCell {
+  float: left;
+  display: table-column;
+  width: 33%;
+  height: 32px;
+  text-align: center;
+}
+
+div#lbPopUpLevelNo1 {
+  width: 32px;
+  height: 30px;
+  background-image: url("../images/pause-screen/pause-place-no1.png");
+  background-repeat: no-repeat;
+  display: inline-block;
+}
+
+div#lbPopUpLevelNo2 {
+  width: 32px;
+  height: 32px;
+  background-image: url("../images/pause-screen/pause-place-no2.png");
+  background-repeat: no-repeat;
+  display: inline-block;
+}
+
+div#lbPopUpLevelNo3 {
+  width: 32px;
+  height: 31px;
+  background-image: url("../images/pause-screen/pause-place-no3.png");
+  background-repeat: no-repeat;
+  display: inline-block;
+}
+
+div#lbPopUpPlayButton {
+  position:absolute;
+  /*left: 123px;*/
+  top: 300px;
+  /*width: 103px;
+  height: 74px;
+  background-image: url("../images/leaderboard-screen/popup-play-button.png");
+  background-repeat: no-repeat;
+  cursor: pointer; */
+  text-align: center;
+  width: 100%;
+  height: auto;
+  display: block;
+}
+
+span#lbPopUpPlayButtonS {
+  font-family: "MolotCustom";
+  font-size: 48px;
+  color: #252525;
+}
+
+span#lbPopUpPlayButtonS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
diff --git a/css/license.css b/css/license.css
new file mode 100755 (executable)
index 0000000..fecdedc
--- /dev/null
@@ -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 #bc7f18;
+    opacity: 0.3;
+    color: #bc7f18;
+}
+
+#licensebtnl:hover {
+    opacity: 1.0;
+}
+
+#licensepage {
+    width: 100%;
+    height: 100%;
+    background: -webkit-gradient(linear, left top, right top, from(#342d2b), to(#282220));
+}
+
+#licensetext {
+    width: 99.4%;
+    height: 89%;
+    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFFFFF), color-stop(1, #bc7f18));
+    -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/openscreen.css b/css/openscreen.css
new file mode 100755 (executable)
index 0000000..2ea06df
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * 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
+ *
+ */
+
+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;
+}
+
+
+@font-face {
+    font-family: "MolotCustom";
+    src: local("Molot"), url("../fonts/Molot.otf");
+}
+
+#mainPage {
+    background-position: left top;
+    background-image: url('../images/open-screen/SP_OpenScreen-base.png');
+    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%); }
+}
+
+
+div#mpQuickStart {
+  top: 365px;
+  width: 100%;
+  height: auto;
+  text-align: center;
+  display: block;
+  position: absolute;
+}
+
+span#mpQuickStartS {
+
+  font-family: "MolotCustom";
+  font-size: 37px;
+  color: #bc7f18;
+}
+
+span#mpQuickStartS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+div#mpLeaderBoard {
+  top: 430px;
+  width: 100%;
+  height: auto;
+  text-align: center;
+  display: block;
+  position: absolute;
+}
+
+span#mpLeaderBoardS {
+
+  font-family: "MolotCustom";
+  font-size: 37px;
+  color: #bc7f18;
+}
+
+span#mpLeaderBoardS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+div#mpChoosePhoto {
+  top: 495px;
+  width: 100%;
+  height: auto;
+  text-align: center;
+  display: block;
+  position: absolute;
+}
+
+span#mpChoosePhotoS {
+
+  font-family: "MolotCustom";
+  font-size: 37px;
+  color: #bc7f18;
+}
+
+span#mpChoosePhotoS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+#helpButton {
+  position: absolute;
+  top: 530px;
+  left: 44px;
+  width: 20px;
+  height: 20px;
+  text-align: center;
+  line-height: 20px;
+  cursor: pointer;
+  -webkit-border-radius: 20px;
+  border: solid 1px #bc7f18;
+  opacity: 0.3;
+  color: #bc7f18;
+
+}
+
+#helpButton:hover {
+  opacity: 1.0;
+  cursor: pointer;
+}
+
+#helpDialog {
+  position: absolute;
+  top: 70px;
+  left: 70px;
+  height: 462px;
+  width: 900px;
+  background: #ffffff;
+  box-shadow: inset rgba(143,158,141,0.5) 0px 0px 50px;
+  rgba(0,0,0,0.7) 5px 0px 30px;
+  display: none;
+  z-index: 12;
+}
+
+.helpBorder{
+  position: absolute;
+  height: 422px;
+  width: 860px;
+  top: 20px;
+  left: 20px;
+  border: 1px solid #d3511f;
+  z-index: 2;
+}
+
+.closeButton {
+  position: absolute;
+  height: 10px;
+  width: 10px;
+  top: -8px;
+  text-align: center;
+  left: 832px;
+  border: 1px solid #d3511f;
+  margin: 7px;
+  font-size: 14px;
+  color: #d3511f;
+  padding: 5px;
+  z-index: 2;
+}
+
+.closeButton:hover {
+  cursor: pointer;
+}
+
+.helpDialogInstructions{
+  position: absolute;
+  margin: 0px;
+  width: 845px;
+  height: 380px;
+  top: 60px;
+  left: 10px;
+  word-wrap: break-word;
+  font-size: 18px;
+  font-family: sans-serif;
+  line-height: 18px;
+  color: #477476;
+  z-index: 3;
+  overflow: auto;
+}
+
+#smokeScreen {
+  position: absolute;
+  width: 1024px;
+  height: 600px;
+  left: 50%;
+  top: 50%;
+  background-color: black;
+  opacity: 0.5;
+  z-index: 11;
+  -webkit-transform: translate(-50%, -50%);
+  display: none;
+}
diff --git a/css/pausescreen.css b/css/pausescreen.css
new file mode 100755 (executable)
index 0000000..1a99367
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * 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
+ *
+ */
+
+@font-face {
+    font-family: "MolotCustom";
+    src: local("Molot"), url("../fonts/Molot.otf");
+}
+
+@font-face {
+    font-family: "FugazOneCustom";
+    src: local("Fugaz One"), url("../fonts/FugazOne-Regular.ttf");
+}
+
+div#qsPause {
+  position: absolute;
+  left: 0px;
+  top: 400px;
+  width: 37px;
+  height: 153px;
+  background-image: url("../images/active-puzzle/pause-nav-slider-button.png");
+  background-repeat: no-repeat;
+  cursor: pointer;
+  display: block;
+}
+
+div#pausePopout {
+  position: absolute;
+  left: -949px;
+  top: 400px;
+  width: 986px;
+  height: 163px;
+  background-image: url("../images/pause-screen/new-popout-base-left.png");
+  background-repeat: no-repeat;
+  display: block;
+  visibility: hidden;
+}
+
+div#qsPpMoves {
+  position: absolute;
+  left: 100px;
+  top: 35px;
+  width: 200px;
+  height: 110px;
+  font-size: 23pt;
+}
+
+div#qsPpTime {
+  position: absolute;
+  left: 100px;
+  top: 80px;
+  width: 200px;
+  height: 110px;
+  font-size: 23pt;
+}
+
+span#qsPpMovesTitleS {
+  font-family: "MolotCustom";
+  font-size: 23pt;
+  color: #000000;
+}
+
+span#qsPpTimeTitleS {
+  font-family: "MolotCustom";
+  font-size: 23pt;
+  color: #000000;
+}
+
+span#qsPpMovesS {
+  font-family: "MolotCustom";
+  font-size: 23pt;
+  color: #2bb9ee;
+}
+
+span#qsPpTimeS {
+  font-family: "MolotCustom";
+  font-size: 23pt;
+  color: #2bb9ee;
+}
+
+div#qsPpClose {
+  position: absolute;
+  left: 950px;
+  top: 75px;
+  width: 16px;
+  height: 15px;
+  background-image: url("../images/new-screen/close-popout-icon.png");
+  background-repeat: no-repeat;
+  cursor: pointer;
+  display: block;
+}
+
+div#qsPpMoves1 {
+  position: absolute;
+  left: 320px;
+  top: 25px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 30px;
+  /*background-image: url("../images/pause-screen/pause-place-no1.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpMoves1S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsPpMoves2 {
+  position: absolute;
+  left: 320px;
+  top: 65px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 32px;
+  /*background-image: url("../images/pause-screen/pause-place-no2.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpMoves2S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsPpMoves3 {
+  position: absolute;
+  left: 320px;
+  top: 105px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 31px;
+  /*background-image: url("../images/pause-screen/pause-place-no3.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpMoves3S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsPpTime1 {
+  position: absolute;
+  left: 540px;
+  top: 25px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 30px;
+  /*background-image: url("../images/pause-screen/pause-place-no1.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpTime1S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsPpTime2 {
+  position: absolute;
+  left: 540px;
+  top: 65px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 32px;
+  /*background-image: url("../images/pause-screen/pause-place-no2.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpTime2S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsPpTime3 {
+  position: absolute;
+  left: 540px;
+  top: 105px;
+  /*width: 32px;*/
+  width: 200px;
+  height: 31px;
+  /*background-image: url("../images/pause-screen/pause-place-no3.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpTime3S {
+  position: absolute;
+  font-family: "FugazOneCustom";
+  font-size: 12pt;
+  vertical-align: middle;
+  padding-left: 10px;
+  line-height: 30px;
+}
+
+div#qsPpLeaderBoard {
+  position: absolute;
+  left: 790px;
+  top: 40px;
+  width: auto;
+  height: auto;
+  text-align: center;
+  /*width: 118px;
+  height: 101px;
+  background-image: url("../images/pause-screen/leader-board-button.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsPpLeaderBoardS {
+  font-family: "MolotCustom";
+  font-size: 32px;
+}
+
+span#qsPpLeaderBoardS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+
+div#qsPaused {
+  position: relative;
+  margin-left: auto;
+  margin-right: auto;
+  top: 100px;
+  width: auto;
+  height: auto;
+  text-align: center;
+  display: block;
+  visibility: hidden;
+}
+
+span#qsPausedS {
+  font-family: "MolotCustom";
+  font-size: 160px;
+  color: #e1e1e1;
+  text-shadow: 2px 2px 20px #000000;
+}
+
+div#qsPpCreditStr {
+  position: absolute;
+  left: 100px;
+  top: 120px;
+  width: 200px;
+  height: 15px;
+  font-size: 8pt;
+}
+
+span#qsPpCreditStrS {
+  color: #000000;
+}
+
+
+.pausePopoutAnimClass {
+  -webkit-transition: -webkit-transform 1s ease-in-out;
+  -webkit-transform: translateX(900px);
+}
+
+.closePausePopoutAnimClass {
+  -webkit-transition: -webkit-transform 1s ease-in-out;
+  -webkit-transform: translateX(0px);
+}
+
diff --git a/css/photospage.css b/css/photospage.css
new file mode 100755 (executable)
index 0000000..7283ae0
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * 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
+ *
+ */
+
+@font-face {
+    font-family: "MolotCustom";
+    src: local("Molot"), url("../fonts/Molot.otf");
+}
+
+#photosPage {
+        background-position: left top;
+    display: -webkit-box;
+    -webkit-box-align: center;
+    -webkit-box-pack: center;
+    -webkit-box-orient: vertical;
+    box-shadow: 5px 5px 20px black;
+
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    -webkit-transform: translate(-50%, -50%);
+        -moz-transform: translate(-50%, -50%);
+    overflow: hidden;
+    cursor: default;
+    width: 1024px;
+    height: 600px;
+
+        visibility: hidden;
+}
+
+div#ppHeader {
+  position: absolute;
+  left: 15px;
+  top: 20px;
+  width: 151px;
+  height: 27px;
+  font-family: "MolotCustom";
+  font-size: 25pt;
+  display: block;
+}
+
+div#ppGame {
+  position: absolute;
+  left: 365px;
+  top: 15px;
+  width: 224px;
+  height: 42px;
+  color: #ffffff;
+  background-color:#252525;
+  text-align: center;
+  cursor: pointer;
+  display: table;
+}
+
+div#ppPC {
+  position: absolute;
+  left: 499px;
+  top: 15px;
+  width: 170px;
+  height: 42px;
+  color: #ffffff;
+  background-color: #b7b7b7;
+  text-align: center;
+  cursor: pointer;
+  display: table;
+}
+
+span#ppGameS {
+  position: relative;
+  font-family: "MolotCustom";
+  font-size: 24pt;
+  vertical-align:middle;
+  display: table-cell;
+}
+
+span#ppPCS {
+  position: relative;
+  font-family: "MolotCustom";
+  font-size: 24pt;
+  vertical-align:middle;
+  display: table-cell;
+}
+
+div#ppCloseButton {
+  position: absolute;
+  left: 975px;
+  top: 12px;
+  width: 30px;
+  height: 45px;
+  background-image: url("../images/leaderboard-screen/close-out-button.png");
+  background-repeat: no-repeat;
+  display: block;
+  cursor: pointer;
+}
+
+div#ppGallery {
+  position: absolute;
+  overflow: hidden;
+  left: 0px;
+  top: 60px;
+  width: 1024px;
+  height: 540px;
+  display: block;
+}
+
+div#ppContent {
+  position: relative;
+}
+
+div#ppScrollbarContainer {
+  position: absolute;
+  top: 75px;
+  left: 975px;
+  width: 5px;
+  height: 500px;
+  background-color: #b7b7b7;
+}
+
+div#ppScrollbarHandle {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 5px;
+  height: 40px;
+  background-color: black;
+}
+
+div#ppLoading {
+  position:absolute;
+  top: 50%;
+  left: 50%;
+  width: 200px;
+  height: 200px;
+  -webkit-animation: loaderAnim 2s linear infinite;
+  background-image: url("../images/ajax-loader-transparent.png");
+  background-repeat: no-repeat;
+  display: block;
+}
+
+div#ppBlockInteraction {
+  position:absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  background-color: transparent;
+  visibility: hidden;
+  display: block;
+}
+
+div#ppPopUpBase {
+  position:absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0, 0, 0, 0.7);
+  display: block;
+  visibility: hidden;
+}
+
+div#ppPopUp {
+  position:absolute;
+  top: 50%;
+  left: 50%;
+  -webkit-transform: translate(-50%, -50%);
+  background-color: white;
+  display: block;
+}
+
+div#ppPopUpCloseButton {
+  position:absolute;
+  width: 30px;
+  height: 45px;
+  background-image: url("../images/leaderboard-screen/close-out-button.png");
+  background-repeat: no-repeat;
+  display: block;
+  cursor: pointer;
+}
+
+div#ppPopUpImage {
+  position:absolute;
+  background-size: 100% 100%;
+  background-repeat: no-repeat;
+  display: block;
+}
+
+div#ppPopUpPlayButton {
+  position:absolute;
+  text-align: center;
+  width: 100%;
+  height: auto;
+  display: block;
+}
+
+span#ppPopUpPlayButtonS {
+  font-family: "MolotCustom";
+  font-size: 48px;
+  color: #252525;
+}
+
+span#ppPopUpPlayButtonS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+#photosWrapper {
+        position:absolute;
+        top:0px; bottom:0px; left:0px;
+        width:100%;
+        height: 100%;
+        overflow:auto;
+        border-style: none;
+}
+
+#photosScroller {
+       position: absolute;
+       padding: 0;
+       width: 100%;
+}
+.clear { clear: both; }
+
+@-webkit-keyframes loaderAnim
+{
+  from {
+    -webkit-transform: translate(-50%, -50%) rotate(0deg);
+  }
+  to {
+    -webkit-transform:  translate(-50%, -50%) rotate(360deg);
+  }
+}
diff --git a/css/quickstart.css b/css/quickstart.css
new file mode 100755 (executable)
index 0000000..5cf7afe
--- /dev/null
@@ -0,0 +1,347 @@
+/*
+ * 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
+ *
+ */
+
+#quickStartPage {
+        background-position: left top;
+    display: -webkit-box;
+    -webkit-box-align: center;
+    -webkit-box-pack: center;
+    -webkit-box-orient: vertical;
+    box-shadow: 5px 5px 20px black;
+
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    -webkit-transform: translate(-50%, -50%);
+        -moz-transform: translate(-50%, -50%);
+    overflow: hidden;
+    cursor: default;
+    width: 1024px;
+    height: 600px;
+
+        visibility: hidden;
+}
+
+@font-face {
+    font-family: "MolotCustom";
+    src: local("Molot"), url("../fonts/Molot.otf");
+}
+
+div#puzzlePauseBackground {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  /*background-image: url("../images/active-puzzle/active-puzzle-easy-bg.png");*/
+  background-color: transparent;
+  background-repeat: no-repeat;
+}
+
+div#puzzlePauseFullImage {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  visibility: hidden;
+}
+
+div#puzzleContainer {
+  position: absolute;
+  background-color: transparent;
+  background-size: 100% 100%;
+  background-repeat: no-repeat;
+}
+
+div#qsInfo {
+  position: absolute;
+  left: 975px;
+  top: 400px;
+  width: 55px;
+  height: 153px;
+  background-image: url("../images/active-puzzle/new-nav-slider-button.png");
+  background-repeat: no-repeat;
+  background-position:center;
+  cursor: pointer;
+  display: block;
+}
+
+div#newPopout {
+  position: absolute;
+  left: 985px;
+  top: 400px;
+  width: 986px;
+  height: 163px;
+  background-image: url("../images/new-screen/new-popout-base-right.png");
+  background-repeat: no-repeat;
+  display: block;
+  visibility: hidden;
+}
+
+div#qsNpTitle {
+  position: absolute;
+  left: 250px;
+  top: 40px;
+  width: auto;
+  height: auto;
+  /*background-image: url("../images/new-screen/choose-level-header.png");
+  background-repeat: no-repeat;*/
+  display: block;
+}
+
+span#qsNpTitleS {
+  font-size: 32px;
+  font-family: "MolotCustom";
+  color: #252525;
+}
+
+hr#qsNpTitleLine {
+  position: absolute;
+  left: 90px;
+  top: 70px;
+  background-color: #dddddd;
+  border: 0;
+  height: 1px;
+  width: 520px;
+}
+
+div#qsDifficultiesTable {
+  position: absolute;
+  left: 70px;
+  top: 90px;
+  width: 600px;
+  height: auto;
+  display: table;
+}
+
+div#qsDifficultiesTableRow {
+  display:table-row;
+  width:auto;
+}
+
+div.qsPopupScoresTableCell {
+  float: left;
+  display: table-column;
+  width: 30%;
+  height: auto;
+  vertical-align: middle;
+  text-align: center;
+}
+
+div#qsPopupScoresTableCellEasy {
+}
+div.qsPopupScoresTableCellEasyNotSelected {
+  color: #cccccc;
+  cursor: pointer;
+}
+div.qsPopupScoresTableCellEasySelected {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+div#qsPopupScoresTableCellHard {
+}
+div.qsPopupScoresTableCellHardNotSelected {
+  color: #cccccc;
+  cursor: pointer;
+}
+div.qsPopupScoresTableCellHardSelected {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+div#qsPopupScoresTableCellBrutal {
+}
+div.qsPopupScoresTableCellBrutalNotSelected {
+  color: #cccccc;
+  cursor: pointer;
+}
+div.qsPopupScoresTableCellBrutalSelected {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+img#qsDifficultiesTableImgEasy {
+  vertical-align: middle;
+}
+
+img#qsDifficultiesTableImgHard {
+  vertical-align: middle;
+}
+
+img#qsDifficultiesTableImgBrutal {
+  vertical-align: middle;
+}
+
+span#qsPopupScoresTableCellEasyS {
+  font-size: 32px;
+  font-family: "MolotCustom";
+  vertical-align: middle;
+}
+
+span#qsPopupScoresTableCellHardS {
+  font-size: 32px;
+  font-family: "MolotCustom";
+  vertical-align: middle;
+}
+
+span#qsPopupScoresTableCellBrutalS {
+  font-size: 32px;
+  font-family: "MolotCustom";
+  vertical-align: middle;
+}
+
+div#qsNpEasy {
+  position: absolute;
+  left: 90px;
+  top: 90px;
+  width: 143px;
+  height: 31px;
+  background-repeat: no-repeat;
+  display: block;
+}
+
+div#qsNpEasy:hover
+{
+  /*background-image: url("../images/new-screen/level-option-easy-active.png");*/
+  cursor: pointer;
+}
+
+div.qsNpEasyNotSelected {
+  background-image: url("../images/new-screen/level-option-easy.png");
+}
+
+div.qsNpEasySelected {
+  background-image: url("../images/new-screen/level-option-easy-active.png");
+}
+
+div#qsNpHard {
+  position: absolute;
+  left: 245px;
+  top: 90px;
+  width: 153px;
+  height: 31px;
+  background-repeat: no-repeat;
+  display: block;
+}
+
+div#qsNpHard:hover
+{
+  /*background-image: url("../images/new-screen/level-option-hard-active.png");*/
+  cursor: pointer;
+}
+
+div.qsNpHardNotSelected {
+  background-image: url("../images/new-screen/level-option-hard.png");
+}
+
+div.qsNpHardSelected {
+  background-image: url("../images/new-screen/level-option-hard-active.png");
+}
+
+div#qsNpBrutal {
+  position: absolute;
+  left: 415px;
+  top: 90px;
+  width: 187px;
+  height: 31px;
+  background-repeat: no-repeat;
+  display: block;
+}
+
+div#qsNpBrutal:hover
+{
+  /*background-image: url("../images/new-screen/level-option-brutal-active.png");*/
+  cursor: pointer;
+}
+
+div.qsNpBrutalNotSelected {
+  background-image: url("../images/new-screen/level-option-brutal.png");
+}
+
+div.qsNpBrutalSelected {
+  background-image: url("../images/new-screen/level-option-brutal-active.png");
+}
+
+div#qsNpPlayAgain {
+  position: absolute;
+  left: 650px;
+  top: 35px;
+  /*width: 99px;
+  height: 96px;
+  background-image: url("../images/new-screen/play-again-button.png");
+  background-repeat: no-repeat;*/
+  text-align: center;
+  width: auto;
+  height: auto;
+  display: block;
+}
+
+span#qsNpPlayAgainS {
+  font-size: 32px;
+  font-family: "MolotCustom";
+  color: #252525;
+}
+
+span#qsNpPlayAgainS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+div#qsNpNewPhoto {
+  position: absolute;
+  left: 790px;
+  top: 35px;
+  width: auto;
+  height: auto;
+  /*width: 99px;
+  height: 96px;
+  background-image: url("../images/new-screen/new-photo-button.png");
+  background-repeat: no-repeat;*/
+  text-align: center;
+  display: block;
+}
+
+span#qsNpNewPhotoS {
+  font-size: 32px;
+  font-family: "MolotCustom";
+  color: #252525;
+}
+
+span#qsNpNewPhotoS:hover {
+  color: #00aeef;
+  cursor: pointer;
+}
+
+div#qsNpClose {
+  position: absolute;
+  left: 25px;
+  top: 75px;
+  width: 16px;
+  height: 15px;
+  background-image: url("../images/new-screen/close-popout-icon.png");
+  background-repeat: no-repeat;
+  cursor: pointer;
+  display: block;
+}
+
+.newPopoutAnimClass {
+  -webkit-transition: -webkit-transform 1s ease-in-out;
+  -webkit-transform: translateX(-900px);
+}
+
+.closePopoutAnimClass {
+  -webkit-transition: -webkit-transform 1s ease-in-out;
+  -webkit-transform: translateX(0px);
+}
+
+.ui-loader {
+  visibility: hidden;
+}
diff --git a/db/slider-puzzle-schema.sqlite b/db/slider-puzzle-schema.sqlite
new file mode 100755 (executable)
index 0000000..c03e29d
Binary files /dev/null and b/db/slider-puzzle-schema.sqlite differ
diff --git a/db/slider-puzzle.sqlite b/db/slider-puzzle.sqlite
new file mode 100755 (executable)
index 0000000..c03e29d
Binary files /dev/null and b/db/slider-puzzle.sqlite differ
diff --git a/fonts/FugazOne-Regular.ttf b/fonts/FugazOne-Regular.ttf
new file mode 100755 (executable)
index 0000000..326a098
Binary files /dev/null and b/fonts/FugazOne-Regular.ttf differ
diff --git a/fonts/Lato-LightItalic.ttf b/fonts/Lato-LightItalic.ttf
new file mode 100755 (executable)
index 0000000..b51b380
Binary files /dev/null and b/fonts/Lato-LightItalic.ttf differ
diff --git a/fonts/Molot.otf b/fonts/Molot.otf
new file mode 100755 (executable)
index 0000000..28c3049
Binary files /dev/null and b/fonts/Molot.otf differ
diff --git a/icon.png b/icon.png
new file mode 100755 (executable)
index 0000000..b0979b1
Binary files /dev/null and b/icon.png differ
diff --git a/icon_128.png b/icon_128.png
new file mode 100755 (executable)
index 0000000..4041084
Binary files /dev/null and b/icon_128.png differ
diff --git a/images/active-puzzle/active-puzzle-easy-bg.png b/images/active-puzzle/active-puzzle-easy-bg.png
new file mode 100755 (executable)
index 0000000..d2977b6
Binary files /dev/null and b/images/active-puzzle/active-puzzle-easy-bg.png differ
diff --git a/images/active-puzzle/empty_tile_bg.png b/images/active-puzzle/empty_tile_bg.png
new file mode 100755 (executable)
index 0000000..e22a5f8
Binary files /dev/null and b/images/active-puzzle/empty_tile_bg.png differ
diff --git a/images/active-puzzle/new-nav-slider-button.png b/images/active-puzzle/new-nav-slider-button.png
new file mode 100755 (executable)
index 0000000..3603605
Binary files /dev/null and b/images/active-puzzle/new-nav-slider-button.png differ
diff --git a/images/active-puzzle/pause-nav-slider-button.png b/images/active-puzzle/pause-nav-slider-button.png
new file mode 100755 (executable)
index 0000000..5fb62fc
Binary files /dev/null and b/images/active-puzzle/pause-nav-slider-button.png differ
diff --git a/images/active-puzzle/pointer-down.png b/images/active-puzzle/pointer-down.png
new file mode 100755 (executable)
index 0000000..a07ce8c
Binary files /dev/null and b/images/active-puzzle/pointer-down.png differ
diff --git a/images/active-puzzle/pointer-left.png b/images/active-puzzle/pointer-left.png
new file mode 100755 (executable)
index 0000000..9526729
Binary files /dev/null and b/images/active-puzzle/pointer-left.png differ
diff --git a/images/active-puzzle/pointer-right.png b/images/active-puzzle/pointer-right.png
new file mode 100755 (executable)
index 0000000..5c0396e
Binary files /dev/null and b/images/active-puzzle/pointer-right.png differ
diff --git a/images/active-puzzle/pointer-up.png b/images/active-puzzle/pointer-up.png
new file mode 100755 (executable)
index 0000000..6d01353
Binary files /dev/null and b/images/active-puzzle/pointer-up.png differ
diff --git a/images/ajax-loader-transparent.png b/images/ajax-loader-transparent.png
new file mode 100755 (executable)
index 0000000..10a554d
Binary files /dev/null and b/images/ajax-loader-transparent.png differ
diff --git a/images/finish-screen/big-finish-graphic.png b/images/finish-screen/big-finish-graphic.png
new file mode 100755 (executable)
index 0000000..4e192f4
Binary files /dev/null and b/images/finish-screen/big-finish-graphic.png differ
diff --git a/images/finish-screen/finish-popout-base.png b/images/finish-screen/finish-popout-base.png
new file mode 100755 (executable)
index 0000000..e42c3bf
Binary files /dev/null and b/images/finish-screen/finish-popout-base.png differ
diff --git a/images/finish-screen/input-save-button.png b/images/finish-screen/input-save-button.png
new file mode 100755 (executable)
index 0000000..1d70ccc
Binary files /dev/null and b/images/finish-screen/input-save-button.png differ
diff --git a/images/finish-screen/input-text-area-box.png b/images/finish-screen/input-text-area-box.png
new file mode 100755 (executable)
index 0000000..25d3d39
Binary files /dev/null and b/images/finish-screen/input-text-area-box.png differ
diff --git a/images/leaderboard-screen/close-out-button.png b/images/leaderboard-screen/close-out-button.png
new file mode 100755 (executable)
index 0000000..280f8cf
Binary files /dev/null and b/images/leaderboard-screen/close-out-button.png differ
diff --git a/images/leaderboard-screen/column-brutal-head.png b/images/leaderboard-screen/column-brutal-head.png
new file mode 100755 (executable)
index 0000000..7954182
Binary files /dev/null and b/images/leaderboard-screen/column-brutal-head.png differ
diff --git a/images/leaderboard-screen/column-easy-head.png b/images/leaderboard-screen/column-easy-head.png
new file mode 100755 (executable)
index 0000000..f0a8484
Binary files /dev/null and b/images/leaderboard-screen/column-easy-head.png differ
diff --git a/images/leaderboard-screen/column-hard-head.png b/images/leaderboard-screen/column-hard-head.png
new file mode 100755 (executable)
index 0000000..21a35ec
Binary files /dev/null and b/images/leaderboard-screen/column-hard-head.png differ
diff --git a/images/leaderboard-screen/leaderboard-base.png b/images/leaderboard-screen/leaderboard-base.png
new file mode 100755 (executable)
index 0000000..fd81703
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-base.png differ
diff --git a/images/leaderboard-screen/leaderboard-header.png b/images/leaderboard-screen/leaderboard-header.png
new file mode 100755 (executable)
index 0000000..b2473ce
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-header.png differ
diff --git a/images/leaderboard-screen/leaderboard-image-frame.png b/images/leaderboard-screen/leaderboard-image-frame.png
new file mode 100755 (executable)
index 0000000..96df8ec
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-image-frame.png differ
diff --git a/images/leaderboard-screen/leaderboard-moves-active.png b/images/leaderboard-screen/leaderboard-moves-active.png
new file mode 100755 (executable)
index 0000000..b625979
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-moves-active.png differ
diff --git a/images/leaderboard-screen/leaderboard-moves.png b/images/leaderboard-screen/leaderboard-moves.png
new file mode 100755 (executable)
index 0000000..0c4ee93
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-moves.png differ
diff --git a/images/leaderboard-screen/leaderboard-no1.png b/images/leaderboard-screen/leaderboard-no1.png
new file mode 100755 (executable)
index 0000000..863ea59
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-no1.png differ
diff --git a/images/leaderboard-screen/leaderboard-no2.png b/images/leaderboard-screen/leaderboard-no2.png
new file mode 100755 (executable)
index 0000000..1d34579
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-no2.png differ
diff --git a/images/leaderboard-screen/leaderboard-no3.png b/images/leaderboard-screen/leaderboard-no3.png
new file mode 100755 (executable)
index 0000000..64c091d
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-no3.png differ
diff --git a/images/leaderboard-screen/leaderboard-no4.png b/images/leaderboard-screen/leaderboard-no4.png
new file mode 100755 (executable)
index 0000000..66973ed
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-no4.png differ
diff --git a/images/leaderboard-screen/leaderboard-no5.png b/images/leaderboard-screen/leaderboard-no5.png
new file mode 100755 (executable)
index 0000000..31411b0
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-no5.png differ
diff --git a/images/leaderboard-screen/leaderboard-no6.png b/images/leaderboard-screen/leaderboard-no6.png
new file mode 100755 (executable)
index 0000000..00983b0
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-no6.png differ
diff --git a/images/leaderboard-screen/leaderboard-times-active.png b/images/leaderboard-screen/leaderboard-times-active.png
new file mode 100755 (executable)
index 0000000..7ced734
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-times-active.png differ
diff --git a/images/leaderboard-screen/leaderboard-times.png b/images/leaderboard-screen/leaderboard-times.png
new file mode 100755 (executable)
index 0000000..f2bdd8d
Binary files /dev/null and b/images/leaderboard-screen/leaderboard-times.png differ
diff --git a/images/leaderboard-screen/popup-base.png b/images/leaderboard-screen/popup-base.png
new file mode 100755 (executable)
index 0000000..b034282
Binary files /dev/null and b/images/leaderboard-screen/popup-base.png differ
diff --git a/images/leaderboard-screen/popup-play-button.png b/images/leaderboard-screen/popup-play-button.png
new file mode 100755 (executable)
index 0000000..7355823
Binary files /dev/null and b/images/leaderboard-screen/popup-play-button.png differ
diff --git a/images/new-screen/choose-level-header.png b/images/new-screen/choose-level-header.png
new file mode 100755 (executable)
index 0000000..1065fd2
Binary files /dev/null and b/images/new-screen/choose-level-header.png differ
diff --git a/images/new-screen/close-popout-icon.png b/images/new-screen/close-popout-icon.png
new file mode 100755 (executable)
index 0000000..6b4ca02
Binary files /dev/null and b/images/new-screen/close-popout-icon.png differ
diff --git a/images/new-screen/level-option-brutal-active.png b/images/new-screen/level-option-brutal-active.png
new file mode 100755 (executable)
index 0000000..864bfd7
Binary files /dev/null and b/images/new-screen/level-option-brutal-active.png differ
diff --git a/images/new-screen/level-option-brutal.png b/images/new-screen/level-option-brutal.png
new file mode 100755 (executable)
index 0000000..57b089d
Binary files /dev/null and b/images/new-screen/level-option-brutal.png differ
diff --git a/images/new-screen/level-option-easy (kopio).png b/images/new-screen/level-option-easy (kopio).png
new file mode 100755 (executable)
index 0000000..546005c
Binary files /dev/null and b/images/new-screen/level-option-easy (kopio).png differ
diff --git a/images/new-screen/level-option-easy-active.png b/images/new-screen/level-option-easy-active.png
new file mode 100755 (executable)
index 0000000..bea92d5
Binary files /dev/null and b/images/new-screen/level-option-easy-active.png differ
diff --git a/images/new-screen/level-option-easy.png b/images/new-screen/level-option-easy.png
new file mode 100755 (executable)
index 0000000..546005c
Binary files /dev/null and b/images/new-screen/level-option-easy.png differ
diff --git a/images/new-screen/level-option-hard-active.png b/images/new-screen/level-option-hard-active.png
new file mode 100755 (executable)
index 0000000..f6fce58
Binary files /dev/null and b/images/new-screen/level-option-hard-active.png differ
diff --git a/images/new-screen/level-option-hard.png b/images/new-screen/level-option-hard.png
new file mode 100755 (executable)
index 0000000..58a4741
Binary files /dev/null and b/images/new-screen/level-option-hard.png differ
diff --git a/images/new-screen/new-photo-button.png b/images/new-screen/new-photo-button.png
new file mode 100755 (executable)
index 0000000..c693838
Binary files /dev/null and b/images/new-screen/new-photo-button.png differ
diff --git a/images/new-screen/new-popout-base-right.png b/images/new-screen/new-popout-base-right.png
new file mode 100755 (executable)
index 0000000..7769744
Binary files /dev/null and b/images/new-screen/new-popout-base-right.png differ
diff --git a/images/new-screen/play-again-button.png b/images/new-screen/play-again-button.png
new file mode 100755 (executable)
index 0000000..49f762e
Binary files /dev/null and b/images/new-screen/play-again-button.png differ
diff --git a/images/new-screen/pointer-right-new.png b/images/new-screen/pointer-right-new.png
new file mode 100755 (executable)
index 0000000..3b5e688
Binary files /dev/null and b/images/new-screen/pointer-right-new.png differ
diff --git a/images/new-screen/pointer-right.png b/images/new-screen/pointer-right.png
new file mode 100755 (executable)
index 0000000..f4df33b
Binary files /dev/null and b/images/new-screen/pointer-right.png differ
diff --git a/images/new-screen/pointer-right_active.png b/images/new-screen/pointer-right_active.png
new file mode 100755 (executable)
index 0000000..92383fb
Binary files /dev/null and b/images/new-screen/pointer-right_active.png differ
diff --git a/images/open-screen/SP_ChoosePhoto-active.png b/images/open-screen/SP_ChoosePhoto-active.png
new file mode 100755 (executable)
index 0000000..c8ae476
Binary files /dev/null and b/images/open-screen/SP_ChoosePhoto-active.png differ
diff --git a/images/open-screen/SP_ChoosePhoto.png b/images/open-screen/SP_ChoosePhoto.png
new file mode 100755 (executable)
index 0000000..18ffa1f
Binary files /dev/null and b/images/open-screen/SP_ChoosePhoto.png differ
diff --git a/images/open-screen/SP_LeaderBoard-active.png b/images/open-screen/SP_LeaderBoard-active.png
new file mode 100755 (executable)
index 0000000..24dd19e
Binary files /dev/null and b/images/open-screen/SP_LeaderBoard-active.png differ
diff --git a/images/open-screen/SP_LeaderBoard.png b/images/open-screen/SP_LeaderBoard.png
new file mode 100755 (executable)
index 0000000..ce44b48
Binary files /dev/null and b/images/open-screen/SP_LeaderBoard.png differ
diff --git a/images/open-screen/SP_OpenScreen-base.png b/images/open-screen/SP_OpenScreen-base.png
new file mode 100755 (executable)
index 0000000..8f64ed4
Binary files /dev/null and b/images/open-screen/SP_OpenScreen-base.png differ
diff --git a/images/open-screen/SP_QuickStart-active.png b/images/open-screen/SP_QuickStart-active.png
new file mode 100755 (executable)
index 0000000..32cf901
Binary files /dev/null and b/images/open-screen/SP_QuickStart-active.png differ
diff --git a/images/open-screen/SP_QuickStart.png b/images/open-screen/SP_QuickStart.png
new file mode 100755 (executable)
index 0000000..1f53aef
Binary files /dev/null and b/images/open-screen/SP_QuickStart.png differ
diff --git a/images/original_puzzles/banaue-rice-terraces.jpg b/images/original_puzzles/banaue-rice-terraces.jpg
new file mode 100755 (executable)
index 0000000..ce49c8a
Binary files /dev/null and b/images/original_puzzles/banaue-rice-terraces.jpg differ
diff --git a/images/original_puzzles/bass-guitar.jpg b/images/original_puzzles/bass-guitar.jpg
new file mode 100755 (executable)
index 0000000..f968a27
Binary files /dev/null and b/images/original_puzzles/bass-guitar.jpg differ
diff --git a/images/original_puzzles/butterfly.jpg b/images/original_puzzles/butterfly.jpg
new file mode 100755 (executable)
index 0000000..865dff1
Binary files /dev/null and b/images/original_puzzles/butterfly.jpg differ
diff --git a/images/original_puzzles/eiffel-tower-upskirt.jpg b/images/original_puzzles/eiffel-tower-upskirt.jpg
new file mode 100755 (executable)
index 0000000..7ae9b28
Binary files /dev/null and b/images/original_puzzles/eiffel-tower-upskirt.jpg differ
diff --git a/images/original_puzzles/fireworks.jpg b/images/original_puzzles/fireworks.jpg
new file mode 100755 (executable)
index 0000000..a7d7719
Binary files /dev/null and b/images/original_puzzles/fireworks.jpg differ
diff --git a/images/original_puzzles/icecream-and-mango.jpg b/images/original_puzzles/icecream-and-mango.jpg
new file mode 100755 (executable)
index 0000000..3fc46c9
Binary files /dev/null and b/images/original_puzzles/icecream-and-mango.jpg differ
diff --git a/images/original_puzzles/new-york-city-at-night.jpg b/images/original_puzzles/new-york-city-at-night.jpg
new file mode 100755 (executable)
index 0000000..679c161
Binary files /dev/null and b/images/original_puzzles/new-york-city-at-night.jpg differ
diff --git a/images/pause-screen/big-pause-graphic.png b/images/pause-screen/big-pause-graphic.png
new file mode 100755 (executable)
index 0000000..11a3f06
Binary files /dev/null and b/images/pause-screen/big-pause-graphic.png differ
diff --git a/images/pause-screen/leader-board-button.png b/images/pause-screen/leader-board-button.png
new file mode 100755 (executable)
index 0000000..a2b19b6
Binary files /dev/null and b/images/pause-screen/leader-board-button.png differ
diff --git a/images/pause-screen/new-popout-base-left.png b/images/pause-screen/new-popout-base-left.png
new file mode 100755 (executable)
index 0000000..3dff2e9
Binary files /dev/null and b/images/pause-screen/new-popout-base-left.png differ
diff --git a/images/pause-screen/pause-place-no1.png b/images/pause-screen/pause-place-no1.png
new file mode 100755 (executable)
index 0000000..46c0ade
Binary files /dev/null and b/images/pause-screen/pause-place-no1.png differ
diff --git a/images/pause-screen/pause-place-no2.png b/images/pause-screen/pause-place-no2.png
new file mode 100755 (executable)
index 0000000..4185ffa
Binary files /dev/null and b/images/pause-screen/pause-place-no2.png differ
diff --git a/images/pause-screen/pause-place-no3.png b/images/pause-screen/pause-place-no3.png
new file mode 100755 (executable)
index 0000000..50c6f3e
Binary files /dev/null and b/images/pause-screen/pause-place-no3.png differ
diff --git a/images/photo-screen/photo-game-active.png b/images/photo-screen/photo-game-active.png
new file mode 100755 (executable)
index 0000000..147a2cf
Binary files /dev/null and b/images/photo-screen/photo-game-active.png differ
diff --git a/images/photo-screen/photo-game.png b/images/photo-screen/photo-game.png
new file mode 100755 (executable)
index 0000000..7c6e953
Binary files /dev/null and b/images/photo-screen/photo-game.png differ
diff --git a/images/photo-screen/photo-header.png b/images/photo-screen/photo-header.png
new file mode 100755 (executable)
index 0000000..f0128fa
Binary files /dev/null and b/images/photo-screen/photo-header.png differ
diff --git a/images/photo-screen/photo-pc-active.png b/images/photo-screen/photo-pc-active.png
new file mode 100755 (executable)
index 0000000..a5ca77b
Binary files /dev/null and b/images/photo-screen/photo-pc-active.png differ
diff --git a/images/photo-screen/photo-pc.png b/images/photo-screen/photo-pc.png
new file mode 100755 (executable)
index 0000000..c8c70d4
Binary files /dev/null and b/images/photo-screen/photo-pc.png differ
diff --git a/images/photo-screen/popup-bottom-shadow.png b/images/photo-screen/popup-bottom-shadow.png
new file mode 100755 (executable)
index 0000000..ad08c5a
Binary files /dev/null and b/images/photo-screen/popup-bottom-shadow.png differ
diff --git a/images/photo-screen/popup-crop-frame.png b/images/photo-screen/popup-crop-frame.png
new file mode 100755 (executable)
index 0000000..9c8ec2e
Binary files /dev/null and b/images/photo-screen/popup-crop-frame.png differ
diff --git a/images/photo-screen/popup-scaleable-base.png b/images/photo-screen/popup-scaleable-base.png
new file mode 100755 (executable)
index 0000000..d517e94
Binary files /dev/null and b/images/photo-screen/popup-scaleable-base.png differ
diff --git a/images/photo-screen/popup-top-shadow.png b/images/photo-screen/popup-top-shadow.png
new file mode 100755 (executable)
index 0000000..23e4740
Binary files /dev/null and b/images/photo-screen/popup-top-shadow.png differ
diff --git a/images/puzzle_photos/Ian_Sane-brick-wall.jpg b/images/puzzle_photos/Ian_Sane-brick-wall.jpg
new file mode 100755 (executable)
index 0000000..53f204f
Binary files /dev/null and b/images/puzzle_photos/Ian_Sane-brick-wall.jpg differ
diff --git a/images/puzzle_photos/Ian_Sane-forest-waterfall.jpg b/images/puzzle_photos/Ian_Sane-forest-waterfall.jpg
new file mode 100755 (executable)
index 0000000..6cea2d7
Binary files /dev/null and b/images/puzzle_photos/Ian_Sane-forest-waterfall.jpg differ
diff --git a/images/puzzle_photos/Ian_Sane-railroad-bridge.jpg b/images/puzzle_photos/Ian_Sane-railroad-bridge.jpg
new file mode 100755 (executable)
index 0000000..70b1f61
Binary files /dev/null and b/images/puzzle_photos/Ian_Sane-railroad-bridge.jpg differ
diff --git a/images/puzzle_photos/Ian_Sane-red-wall.jpg b/images/puzzle_photos/Ian_Sane-red-wall.jpg
new file mode 100755 (executable)
index 0000000..83a8fdd
Binary files /dev/null and b/images/puzzle_photos/Ian_Sane-red-wall.jpg differ
diff --git a/images/puzzle_photos/Ian_Sane-zoo-lion.jpg b/images/puzzle_photos/Ian_Sane-zoo-lion.jpg
new file mode 100755 (executable)
index 0000000..90303aa
Binary files /dev/null and b/images/puzzle_photos/Ian_Sane-zoo-lion.jpg differ
diff --git a/images/puzzle_photos/JonoMueller-dirty-truck.jpg b/images/puzzle_photos/JonoMueller-dirty-truck.jpg
new file mode 100755 (executable)
index 0000000..9d97fc5
Binary files /dev/null and b/images/puzzle_photos/JonoMueller-dirty-truck.jpg differ
diff --git a/images/puzzle_photos/Mason_Masteka-purple-carrots.jpg b/images/puzzle_photos/Mason_Masteka-purple-carrots.jpg
new file mode 100755 (executable)
index 0000000..a1e927a
Binary files /dev/null and b/images/puzzle_photos/Mason_Masteka-purple-carrots.jpg differ
diff --git a/images/puzzle_photos/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg b/images/puzzle_photos/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg
new file mode 100755 (executable)
index 0000000..6c14f8d
Binary files /dev/null and b/images/puzzle_photos/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg differ
diff --git a/images/puzzle_photos/Ralphman-train-station.jpg b/images/puzzle_photos/Ralphman-train-station.jpg
new file mode 100755 (executable)
index 0000000..bc91390
Binary files /dev/null and b/images/puzzle_photos/Ralphman-train-station.jpg differ
diff --git a/images/puzzle_photos/Sideonecincy-bald-eagle.jpg b/images/puzzle_photos/Sideonecincy-bald-eagle.jpg
new file mode 100755 (executable)
index 0000000..b5bf3bc
Binary files /dev/null and b/images/puzzle_photos/Sideonecincy-bald-eagle.jpg differ
diff --git a/images/puzzle_photos/StuSeeger-elephant-mother-child.jpg b/images/puzzle_photos/StuSeeger-elephant-mother-child.jpg
new file mode 100755 (executable)
index 0000000..6178430
Binary files /dev/null and b/images/puzzle_photos/StuSeeger-elephant-mother-child.jpg differ
diff --git a/images/puzzle_photos/StuSeeger-fair-ride.jpg b/images/puzzle_photos/StuSeeger-fair-ride.jpg
new file mode 100755 (executable)
index 0000000..05c9e3c
Binary files /dev/null and b/images/puzzle_photos/StuSeeger-fair-ride.jpg differ
diff --git a/images/puzzle_photos/Thomas_Good-zoo-tiger.jpg b/images/puzzle_photos/Thomas_Good-zoo-tiger.jpg
new file mode 100755 (executable)
index 0000000..d6e7d64
Binary files /dev/null and b/images/puzzle_photos/Thomas_Good-zoo-tiger.jpg differ
diff --git a/images/puzzle_photos/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg b/images/puzzle_photos/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg
new file mode 100755 (executable)
index 0000000..579dacf
Binary files /dev/null and b/images/puzzle_photos/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg differ
diff --git a/images/puzzle_photos/kennymatic-rocky-beach.jpg b/images/puzzle_photos/kennymatic-rocky-beach.jpg
new file mode 100755 (executable)
index 0000000..4cc6f34
Binary files /dev/null and b/images/puzzle_photos/kennymatic-rocky-beach.jpg differ
diff --git a/images/puzzle_photos/ktylerconk-water-lily.jpg b/images/puzzle_photos/ktylerconk-water-lily.jpg
new file mode 100755 (executable)
index 0000000..1579148
Binary files /dev/null and b/images/puzzle_photos/ktylerconk-water-lily.jpg differ
diff --git a/images/puzzle_photos/mccun934-leaf-water.jpg b/images/puzzle_photos/mccun934-leaf-water.jpg
new file mode 100755 (executable)
index 0000000..7d4ccac
Binary files /dev/null and b/images/puzzle_photos/mccun934-leaf-water.jpg differ
diff --git a/images/puzzle_photos/mccun934-pumpkin-patch.jpg b/images/puzzle_photos/mccun934-pumpkin-patch.jpg
new file mode 100755 (executable)
index 0000000..1bf8095
Binary files /dev/null and b/images/puzzle_photos/mccun934-pumpkin-patch.jpg differ
diff --git a/images/puzzle_photos/pdxjeff-ferris-wheel.jpg b/images/puzzle_photos/pdxjeff-ferris-wheel.jpg
new file mode 100755 (executable)
index 0000000..a4e97ba
Binary files /dev/null and b/images/puzzle_photos/pdxjeff-ferris-wheel.jpg differ
diff --git a/images/puzzle_photos/sam_churchill-daylight-train.jpg b/images/puzzle_photos/sam_churchill-daylight-train.jpg
new file mode 100755 (executable)
index 0000000..758f960
Binary files /dev/null and b/images/puzzle_photos/sam_churchill-daylight-train.jpg differ
diff --git a/images/puzzle_photos_thumbs/Ian_Sane-brick-wall.jpg b/images/puzzle_photos_thumbs/Ian_Sane-brick-wall.jpg
new file mode 100755 (executable)
index 0000000..351df99
Binary files /dev/null and b/images/puzzle_photos_thumbs/Ian_Sane-brick-wall.jpg differ
diff --git a/images/puzzle_photos_thumbs/Ian_Sane-forest-waterfall.jpg b/images/puzzle_photos_thumbs/Ian_Sane-forest-waterfall.jpg
new file mode 100755 (executable)
index 0000000..948ba60
Binary files /dev/null and b/images/puzzle_photos_thumbs/Ian_Sane-forest-waterfall.jpg differ
diff --git a/images/puzzle_photos_thumbs/Ian_Sane-railroad-bridge.jpg b/images/puzzle_photos_thumbs/Ian_Sane-railroad-bridge.jpg
new file mode 100755 (executable)
index 0000000..7173832
Binary files /dev/null and b/images/puzzle_photos_thumbs/Ian_Sane-railroad-bridge.jpg differ
diff --git a/images/puzzle_photos_thumbs/Ian_Sane-red-wall.jpg b/images/puzzle_photos_thumbs/Ian_Sane-red-wall.jpg
new file mode 100755 (executable)
index 0000000..fc6d11d
Binary files /dev/null and b/images/puzzle_photos_thumbs/Ian_Sane-red-wall.jpg differ
diff --git a/images/puzzle_photos_thumbs/Ian_Sane-zoo-lion.jpg b/images/puzzle_photos_thumbs/Ian_Sane-zoo-lion.jpg
new file mode 100755 (executable)
index 0000000..829b4e0
Binary files /dev/null and b/images/puzzle_photos_thumbs/Ian_Sane-zoo-lion.jpg differ
diff --git a/images/puzzle_photos_thumbs/JonoMueller-dirty-truck.jpg b/images/puzzle_photos_thumbs/JonoMueller-dirty-truck.jpg
new file mode 100755 (executable)
index 0000000..cc36d8a
Binary files /dev/null and b/images/puzzle_photos_thumbs/JonoMueller-dirty-truck.jpg differ
diff --git a/images/puzzle_photos_thumbs/Mason_Masteka-purple-carrots.jpg b/images/puzzle_photos_thumbs/Mason_Masteka-purple-carrots.jpg
new file mode 100755 (executable)
index 0000000..4140883
Binary files /dev/null and b/images/puzzle_photos_thumbs/Mason_Masteka-purple-carrots.jpg differ
diff --git a/images/puzzle_photos_thumbs/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg b/images/puzzle_photos_thumbs/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg
new file mode 100755 (executable)
index 0000000..c4f5906
Binary files /dev/null and b/images/puzzle_photos_thumbs/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg differ
diff --git a/images/puzzle_photos_thumbs/Ralphman-train-station.jpg b/images/puzzle_photos_thumbs/Ralphman-train-station.jpg
new file mode 100755 (executable)
index 0000000..3a5f592
Binary files /dev/null and b/images/puzzle_photos_thumbs/Ralphman-train-station.jpg differ
diff --git a/images/puzzle_photos_thumbs/Sideonecincy-bald-eagle.jpg b/images/puzzle_photos_thumbs/Sideonecincy-bald-eagle.jpg
new file mode 100755 (executable)
index 0000000..87b54fb
Binary files /dev/null and b/images/puzzle_photos_thumbs/Sideonecincy-bald-eagle.jpg differ
diff --git a/images/puzzle_photos_thumbs/StuSeeger-elephant-mother-child.jpg b/images/puzzle_photos_thumbs/StuSeeger-elephant-mother-child.jpg
new file mode 100755 (executable)
index 0000000..aa2b4dd
Binary files /dev/null and b/images/puzzle_photos_thumbs/StuSeeger-elephant-mother-child.jpg differ
diff --git a/images/puzzle_photos_thumbs/StuSeeger-fair-ride.jpg b/images/puzzle_photos_thumbs/StuSeeger-fair-ride.jpg
new file mode 100755 (executable)
index 0000000..88527ca
Binary files /dev/null and b/images/puzzle_photos_thumbs/StuSeeger-fair-ride.jpg differ
diff --git a/images/puzzle_photos_thumbs/Thomas_Good-zoo-tiger.jpg b/images/puzzle_photos_thumbs/Thomas_Good-zoo-tiger.jpg
new file mode 100755 (executable)
index 0000000..8833b9d
Binary files /dev/null and b/images/puzzle_photos_thumbs/Thomas_Good-zoo-tiger.jpg differ
diff --git a/images/puzzle_photos_thumbs/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg b/images/puzzle_photos_thumbs/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg
new file mode 100755 (executable)
index 0000000..6b12c33
Binary files /dev/null and b/images/puzzle_photos_thumbs/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg differ
diff --git a/images/puzzle_photos_thumbs/kennymatic-rocky-beach.jpg b/images/puzzle_photos_thumbs/kennymatic-rocky-beach.jpg
new file mode 100755 (executable)
index 0000000..384d100
Binary files /dev/null and b/images/puzzle_photos_thumbs/kennymatic-rocky-beach.jpg differ
diff --git a/images/puzzle_photos_thumbs/ktylerconk-water-lily.jpg b/images/puzzle_photos_thumbs/ktylerconk-water-lily.jpg
new file mode 100755 (executable)
index 0000000..a6168f0
Binary files /dev/null and b/images/puzzle_photos_thumbs/ktylerconk-water-lily.jpg differ
diff --git a/images/puzzle_photos_thumbs/mccun934-leaf-water.jpg b/images/puzzle_photos_thumbs/mccun934-leaf-water.jpg
new file mode 100755 (executable)
index 0000000..8be7c4e
Binary files /dev/null and b/images/puzzle_photos_thumbs/mccun934-leaf-water.jpg differ
diff --git a/images/puzzle_photos_thumbs/mccun934-pumpkin-patch.jpg b/images/puzzle_photos_thumbs/mccun934-pumpkin-patch.jpg
new file mode 100755 (executable)
index 0000000..fe6af56
Binary files /dev/null and b/images/puzzle_photos_thumbs/mccun934-pumpkin-patch.jpg differ
diff --git a/images/puzzle_photos_thumbs/pdxjeff-ferris-wheel.jpg b/images/puzzle_photos_thumbs/pdxjeff-ferris-wheel.jpg
new file mode 100755 (executable)
index 0000000..d7b8798
Binary files /dev/null and b/images/puzzle_photos_thumbs/pdxjeff-ferris-wheel.jpg differ
diff --git a/images/puzzle_photos_thumbs/sam_churchill-daylight-train.jpg b/images/puzzle_photos_thumbs/sam_churchill-daylight-train.jpg
new file mode 100755 (executable)
index 0000000..6a1415a
Binary files /dev/null and b/images/puzzle_photos_thumbs/sam_churchill-daylight-train.jpg differ
diff --git a/index.html b/index.html
new file mode 100755 (executable)
index 0000000..51152e3
--- /dev/null
@@ -0,0 +1,330 @@
+<!DOCTYPE html>
+<!--
+ * 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
+ *
+-->
+<html>
+<head>
+    <meta id="viewport_meta" name="viewport" content="" />
+    <script type="text/javascript">
+        var viewport_meta = document.getElementById('viewport_meta');
+        var w = screen.availWidth;
+        var h = screen.availHeight;
+        viewport_meta.setAttribute('content','width='+w+', height='+h+',user-scalable=no');
+    </script>
+
+    <link rel="stylesheet" type="text/css" href="css/openscreen.css"/>
+    <link rel="stylesheet" type="text/css" href="css/quickstart.css"/>
+    <link rel="stylesheet" type="text/css" href="css/pausescreen.css"/>
+    <link rel="stylesheet" type="text/css" href="css/leaderboardpage.css"/>
+    <link rel="stylesheet" type="text/css" href="css/photospage.css"/>
+    <link rel="stylesheet" type="text/css" href="css/finishscreen.css"/>
+    <link rel="stylesheet" type="text/css" href="css/license.css"></link>
+    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
+        <script type="text/javascript" src="js/localizer.js"></script>
+        <script type="text/javascript" src="js/sputil.js"></script>
+        <script type="text/javascript" src="js/dbmanager.js"></script>
+        <script type="text/javascript" src="js/spscroller.js"></script>
+        <script type="text/javascript" src="js/spscrollbar.js"></script>
+        <script type="text/javascript" src="js/newpopout.js"></script>
+        <script type="text/javascript" src="js/photospage.js"></script>
+        <script type="text/javascript" src="js/finishpopout.js"></script>
+        <script type="text/javascript" src="js/leaderboardpage.js"></script>
+        <script type="text/javascript" src="js/pausepopout.js"></script>
+        <script type="text/javascript" src="js/pausebackground.js"></script>
+        <script type="text/javascript" src="js/puzzlepausefullimage.js"></script>
+    <script src="js/license.js"></script>
+    <script type="text/javascript" src="js/slider-puzzle.js"></script>
+    <script type="text/javascript" src="js/main.js"></script>
+    <script type="text/javascript" src="js/iscroll-lite.js" type="text/javascript"></script>
+    <title>Slider Puzzle</title>
+  </head>
+  <body>
+
+    <!-- Intro page -->
+    <div id="licensepage" style="display: none">
+        <div id="licensetext"><div id="licensescroll"></div></div>
+        <div id="licensebtnq" class="licensebtn">Back</div>
+    </div>
+    <div id="mainPage">
+                 <div id="mpQuickStart"><span id="mpQuickStartS" onclick="SliderPuzzleApp.startRandomGame();">QUICK START</span></div>
+                 <div id="mpLeaderBoard"><span id="mpLeaderBoardS" onclick="SliderPuzzleApp.leaderBoard();">LEADERBOARD</span></div>
+                 <div id="mpChoosePhoto"><span id="mpChoosePhotoS" onclick="SliderPuzzleApp.photosPage();">CHOOSE PHOTO</span></div>
+        <div id="helpButton" onclick="SliderPuzzleApp.helpClicked();"> ? </div>
+        <div id="licensebtnl" style="top: 530px; left: 954px;"> i </div>
+    </div>
+
+        <!-- Quick start page -->
+        <div id="quickStartPage">
+                 <div id="puzzlePauseBackground"></div>
+                 <div id="puzzleContainer" onclick="SliderPuzzleApp.pausePopout();"></div>
+                 <div id="puzzlePauseFullImage"></div>
+                 <div id="qsPause" onclick="SliderPuzzleApp.pausePopout();"></div>
+                 <div id="qsInfo" onclick="SliderPuzzleApp.newPopout();"></div>
+                 <div id="newPopout">
+                        <div id="qsNpTitle"><span id="qsNpTitleS">CHOOSE LEVEL</span></div>
+                        <hr id="qsNpTitleLine">
+                        <div id="qsDifficultiesTable">
+                               <div id="qsDifficultiesTableRow">
+                                 <div id="qsPopupScoresTableCellEasy" class="qsPopupScoresTableCell qsPopupScoresTableCellEasyNotSelected" onclick="SliderPuzzleApp.newPopoutObj.switchDifficulty('1');">
+                                        <img id="qsDifficultiesTableImgEasy" src="images/new-screen/pointer-right-new.png" />
+                                        <span id="qsPopupScoresTableCellEasyS">EASY</span>
+                                 </div>
+                                 <div id="qsPopupScoresTableCellHard" class="qsPopupScoresTableCell qsPopupScoresTableCellHardNotSelected" onclick="SliderPuzzleApp.newPopoutObj.switchDifficulty('2');">
+                                        <img id="qsDifficultiesTableImgHard"  src="images/new-screen/pointer-right-new.png" />
+                                        <span id="qsPopupScoresTableCellHardS">HARD</span>
+                                 </div>
+                                 <div id="qsPopupScoresTableCellBrutal" class="qsPopupScoresTableCell qsPopupScoresTableCellBrutalNotSelected" onclick="SliderPuzzleApp.newPopoutObj.switchDifficulty('3');">
+                                        <img id="qsDifficultiesTableImgBrutal" src="images/new-screen/pointer-right-new.png" />
+                                        <span id="qsPopupScoresTableCellBrutalS">BRUTAL</span>
+                                 </div>
+                               </div>
+                        </div>
+                        <div id="qsNpPlayAgain" onclick="SliderPuzzleApp.playAgain();"><span id="qsNpPlayAgainS">PLAY<br/>AGAIN</span></div>
+                        <div id="qsNpNewPhoto" onclick="SliderPuzzleApp.newPhoto();"><span id="qsNpNewPhotoS">NEW<br/>PHOTO</span></div>
+                        <div id="qsNpClose" onclick="SliderPuzzleApp.closePopout();"></div>
+                 </div>
+                 <div id="pausePopout">
+                        <div id="qsPpMoves"><span id="qsPpMovesTitleS">Moves: </span><span id="qsPpMovesS">23</span></div>
+                        <div id="qsPpTime"><span id="qsPpTimeTitleS">Time: </span><span id="qsPpTimeS">07:23</span></div>
+                        <div id="qsPpClose" onclick="SliderPuzzleApp.closePausePopout();"></div>
+                        <div id="qsPpMoves1"><img src="images/pause-screen/pause-place-no1.png"/><span id="qsPpMoves1S">23</span></div>
+                        <div id="qsPpMoves2"><img src="images/pause-screen/pause-place-no2.png"/><span id="qsPpMoves2S">23</span></div>
+                        <div id="qsPpMoves3"><img src="images/pause-screen/pause-place-no3.png"/><span id="qsPpMoves3S">23</span></div>
+                        <div id="qsPpTime1"><img src="images/pause-screen/pause-place-no1.png"/><span id="qsPpTime1S">07:23</span></div>
+                        <div id="qsPpTime2"><img src="images/pause-screen/pause-place-no2.png"/><span id="qsPpTime2S">07:23</span></div>
+                        <div id="qsPpTime3"><img src="images/pause-screen/pause-place-no3.png"/><span id="qsPpTime3S">07:23</span></div>
+                        <div id="qsPpLeaderBoard" onclick="SliderPuzzleApp.leaderBoardPause();"><span id="qsPpLeaderBoardS">LEADER<br/>BOARD</span></div>
+                        <div id="qsPpCreditStr"><span id="qsPpCreditStrS"></span></div>
+                 </div>
+                 <div id="qsPaused"><span id="qsPausedS">PAUSED</span></div>
+
+                 <div id="finishScreenPopout">
+                        <div id="qsFpMoves"><span id="qsFpMovesTitleS">Moves: </span><span id="qsFpMovesS">23</span></div>
+                        <div id="qsFpTime"><span id="qsFpTimeTitleS">Time: </span><span id="qsFpTimeS">07:23</span></div>
+                        <div id="qsFpMoves1"><img src="images/pause-screen/pause-place-no1.png"/><span id="qsFpMoves1S">23</span></div>
+                        <div id="qsFpMoves2"><img src="images/pause-screen/pause-place-no2.png"/><span id="qsFpMoves2S">23</span></div>
+                        <div id="qsFpMoves3"><img src="images/pause-screen/pause-place-no3.png"/><span id="qsFpMoves3S">23</span></div>
+                        <div id="qsFpTime1"><img src="images/pause-screen/pause-place-no1.png"/><span id="qsFpTime1S">07:23</span></div>
+                        <div id="qsFpTime2"><img src="images/pause-screen/pause-place-no2.png"/><span id="qsFpTime2S">07:23</span></div>
+                        <div id="qsFpTime3"><img src="images/pause-screen/pause-place-no3.png"/><span id="qsFpTime3S">07:23</span></div>
+                        <div id="qsFpSaveResult"><span id="qsFpSaveResultS" onclick="SliderPuzzleApp.saveResult();">SAVE</span><span id="qsFpCloseResultS" onclick="SliderPuzzleApp.closeFinishNoSave();">END</span></div>
+                        <div id="qsFpNameInput"><input id = "usernameinput" class="valueentry" type="text" name="userNameHiScore" maxlength="10"/></div>
+                 </div>
+                 <div id="qsFinish"><span id="qsFinishS">FINISH</span></div>
+               </div>
+
+        <!-- Leaderboard page -->
+        <div id="leaderboardPage">
+                 <div id="lbTitle">LEADERBOARD:</div>
+                 <div id="lbMoves" onclick="SliderPuzzleApp.leaderBoardPageObj.switchView();return false;"><span id="lbMovesS">MOVES</span></div>
+                 <div id="lbTimes" onclick="SliderPuzzleApp.leaderBoardPageObj.switchView();return false;"><span id="lbTimesS">TIME</span></div>
+                 <table id="lbscoresTable">
+                        <tr id="lbscoresTableColumnsRow">
+                               <th id="lbscoresTableRankCol"></th>
+                               <th id="lbscoresTableEasyCol"><span id="lbscoresTableEasyColS">EASY</span></th>
+                               <th id="lbscoresTableHardCol"><span id="lbscoresTableHardColS">HARD</span></th>
+                               <th id="lbscoresTableBrutalCol"><span id="lbscoresTableBrutalColS">BRUTAL</span></th>
+                        </tr>
+                        <tr id="lbscoresTableRank1Row">
+                               <td id="lbscoresTableRank1"></td>
+                               <td id="lbscoresTableEasy1">
+                                 <div id="tableEasy1Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableEasy1ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableEasy1ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableHard1">
+                                 <div id="tableHard1Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableHard1ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableHard1ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableBrutal1">
+                                 <div id="tableBrutal1Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableBrutal1ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableBrutal1ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                        </tr>
+                        <tr id="lbscoresTableRank2Row">
+                               <td id="lbscoresTableRank2"></td>
+                               <td id="lbscoresTableEasy2">
+                                 <div id="tableEasy2Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableEasy2ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableEasy2ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableHard2">
+                                 <div id="tableHard2Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableHard2ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableHard2ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableBrutal2">
+                                 <div id="tableBrutal2Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableBrutal2ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableBrutal2ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                        </tr>
+                        <tr id="lbscoresTableRank3Row">
+                               <td id="lbscoresTableRank3"></td>
+                               <td id="lbscoresTableEasy3">
+                                 <div id="tableEasy3Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableEasy3ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableEasy3ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableHard3">
+                                 <div id="tableHard3Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableHard3ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableHard3ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableBrutal3">
+                                 <div id="tableBrutal3Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableBrutal3ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableBrutal3ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                        </tr>
+                        <tr id="lbscoresTableRank4Row">
+                               <td id="lbscoresTableRank4"></td>
+                               <td id="lbscoresTableEasy4">
+                                 <div id="tableEasy4Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableEasy4ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableEasy4ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableHard4">
+                                 <div id="tableHard4Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableHard4ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableHard4ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableBrutal4">
+                                 <div id="tableBrutal4Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableBrutal4ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableBrutal4ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                        </tr>
+                        <tr id="lbscoresTableRank5Row">
+                               <td id="lbscoresTableRank5"></td>
+                               <td id="lbscoresTableEasy5">
+                                 <div id="tableEasy5Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableEasy5ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableEasy5ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableHard5">
+                                 <div id="tableHard5Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableHard5ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableHard5ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableBrutal5">
+                                 <div id="tableBrutal5Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableBrutal5ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableBrutal5ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                        </tr>
+                        <tr id="lbscoresTableRank6Row">
+                               <td id="lbscoresTableRank6"></td>
+                               <td id="lbscoresTableEasy6">
+                                 <div id="tableEasy6Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableEasy6ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableEasy6ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableHard6">
+                                 <div id="tableHard6Contents" class="tableLbScoreContents alternateBg1">
+                                        <span id="tableHard6ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableHard6ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                               <td id="lbscoresTableBrutal6">
+                                 <div id="tableBrutal6Contents" class="tableLbScoreContents alternateBg2">
+                                        <span id="tableBrutal6ContentsText" class="tableLbScoreContentsText"></span>
+                                        <div class="tableLbScoreContentsCanvasC"><canvas id="tableBrutal6ContentsCanvas" class="tableLbScoreContentsCanvas"></canvas></div>
+                                 </div>
+                               </td>
+                        </tr>
+                 </table>
+                 <div id="lbCloseButton" onclick="SliderPuzzleApp.closeLeaderBoard();"></div>
+                 <div id="lbPopUpBase">
+                        <div id="lbPopUp">
+                               <div id="lbPopUpImageContainer"><div id="lbPopUpImage"></div></div>
+                               <div id="lbPopUpLevel"><span id="lbPopUpLevelText">LEVEL: EASY</span></div>
+                               <div id="lbPopupScoresTable">
+                                 <div id="lbPopupScoresTableRow">
+                                        <div class="lbPopupScoresTableCell"><div id="lbPopUpLevelNo1"></div></div>
+                                        <div class="lbPopupScoresTableCell"><div id="lbPopUpLevelNo2"></div></div>
+                                        <div class="lbPopupScoresTableCell"><div id="lbPopUpLevelNo3"></div></div>
+                                 </div>
+                                 <div id="lbPopupScoresTableRowRecords">
+                                        <div class="lbPopupScoresTableCell"><span id="lbPopupScoresTableRowRecords1S"></span></div>
+                                        <div class="lbPopupScoresTableCell"><span id="lbPopupScoresTableRowRecords2S"></span></div>
+                                        <div class="lbPopupScoresTableCell"><span id="lbPopupScoresTableRowRecords3S"></span></div>
+                                 </div>
+                               </div>
+                               <div id="lbPopUpPlayButton" onclick="SliderPuzzleApp.startGameLb();"><span id="lbPopUpPlayButtonS">PLAY</span></div>
+                               <div id="lbPopUpCloseButton" onclick="SliderPuzzleApp.closeLeaderBoardPagePopup();"></div>
+                        </div>
+                 </div>
+    </div> <!--leaderboardPage-->
+
+        <!-- Photos page -->
+     <div id="photosPage">
+                 <div id="ppHeader">PHOTOS:</div>
+                 <div id="ppGame" onclick="SliderPuzzleApp.photosPageObj.switchView();return false;"><span id="ppGameS">FROM GAME</span></div>
+                 <!-- <div id="ppPC" onclick="SliderPuzzleApp.photosPageObj.switchView();return false;"><span id="ppPCS">FROM PC</span></div> -->
+
+         <div id="ppGallery">
+          <div id="photosWrapper"><div id="photosScroller">
+             <div id="ppContent"></div>
+             </div></div>
+         </div>
+
+                 <div id="ppScrollbarContainer">
+                        <div id="ppScrollbarHandle"></div>
+                 </div>
+                 <div id="ppCloseButton" onclick="SliderPuzzleApp.closePhotosPage();"></div>
+                 <div id="ppLoading"></div>
+                 <div id="ppPopUpBase">
+                        <div id="ppPopUp">
+                               <div id="ppPopUpImageContainer"><div id="ppPopUpImage"></div></div>
+                               <div id="ppPopUpPlayButton" onclick="SliderPuzzleApp.startGame(2);"><span id="ppPopUpPlayButtonS">PLAY</span></div>
+                               <div id="ppPopUpCloseButton" onclick="SliderPuzzleApp.closePhotosPagePopup();"></div>
+                        </div>
+                 </div>
+                 <div id="ppBlockInteraction"></div>
+        </div><!--photosPage-->
+
+    <!--help-->
+    <div id="smokeScreen"></div>
+      <div id="helpDialog">
+        <div class="helpBorder">
+          <div class="closeButton" onclick="SliderPuzzleApp.closeHelp()">X</div>
+          <div class="helpDialogInstructions">
+The Slider-Puzzle takes a picture from within the app, or from your own pictures, and jumbles it up into pieces. Reassemble the picture in the quickest time, or in as few moves as you can.
+<br><br>
+Click Quick Start to solve a picture from the app or Choose Photo to pick a specific picture. Click on the photo you want, then click Play to begin.
+<br><br>
+Once the puzzle appears, the clock starts ticking. Use the open space to slide the pieces near it around. To pause the game, click the open space, or the Pause button on the side of the screen. To play again, or change difficulty levels, click the + button. Choose your difficulty level (Easy, Hard, or Brutal) and click Play Again. Or, click New Photo to start a new puzzle at the same difficulty level.
+<br><br>
+After you finish a puzzle, if your time or move count qualifies for the Leader Board, you&rsquo;ll be asked to enter your name. Enter a short name (up to 10 characters), then click Save to put your achievement on the Leader Board.
+          </div>
+        </div>
+      </div>
+
+
+  </body>
+
+</html>
diff --git a/js/dbmanager.js b/js/dbmanager.js
new file mode 100755 (executable)
index 0000000..b73114d
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * DBManager class is responsible for communicating with the game's database
+ */
+function DBManager() {
+
+  var self = this;
+
+  //SQL statement used to create users table
+  self.createUsersStatement = "CREATE TABLE IF NOT EXISTS users (_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, username TEXT NOT NULL UNIQUE )";
+  //SQL statement used to create scores table
+  self.createScoresStatement = "CREATE TABLE IF NOT EXISTS scores (_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, " +
+                                                                                "name_id INTEGER, moves INTEGER, time INTEGER, level INTEGER, img_url TEXT, FOREIGN KEY(name_id) REFERENCES users(_id))";
+
+  //SQL statement used to insert new record into the users table
+  self.insertUserStatement = "INSERT INTO users (_id, username) VALUES (NULL, ?)";
+  //SQL statement used to insert new record into the scores table
+  self.insertScoresStatement = "INSERT INTO scores (_id, name_id, moves, time, level, img_url) VALUES (NULL, ?, ?, ?, ?, ?)";
+
+  //SQL statement used to delete the users table
+  self.dropUsersStatement = "DROP TABLE users";
+  //SQL statement used to delete the scores table
+  self.dropScoresStatement = "DROP TABLE scores";
+
+  //SQL statement used to get all records from the users table
+  self.selectAllUsersStatement = "SELECT * FROM users";
+  //SQL statement used to get a specific user from the users table
+  self.selectUserStatement = "SELECT * FROM users WHERE username = ?";
+
+  //SQL statement used to get best results based on the number of moves
+  self.selectLessMovesResultsStatement = "SELECT users.username, scores.moves FROM users, scores WHERE scores.name_id = users._id AND scores.level = ? AND scores.img_url = ? ORDER BY scores.moves ASC LIMIT ?";
+  //SQL statement used to get best results based on time
+  self.selectFastestResultsStatement = "SELECT users.username, scores.time FROM users, scores WHERE scores.name_id = users._id AND scores.level = ? AND scores.img_url = ? ORDER BY scores.time ASC LIMIT ?";
+
+  //SQL statement used to get best results based on the number of moves
+  self.selectLessMovesResultsLbStatement = "SELECT users.username, scores.moves, scores.img_url FROM users, scores WHERE scores.name_id = users._id AND scores.level = ? ORDER BY scores.moves ASC LIMIT ?";
+  //SQL statement used to get best results based on time
+  self.selectFastestResultsLbStatement = "SELECT users.username, scores.time, scores.img_url FROM users, scores WHERE scores.name_id = users._id AND scores.level = ? ORDER BY scores.time ASC LIMIT ?";
+
+  //SQL statement used to get best results based on the number of moves
+  self.selectPictureLessMovesStatement = "SELECT users.username, scores.moves FROM users, scores WHERE scores.img_url = ? AND scores.level = ? ORDER BY scores.moves ASC LIMIT ?";
+  //SQL statement used to get best results based on time
+  self.selectPictureFastestStatement = "SELECT users.username, scores.time FROM users, scores WHERE scores.img_url = ? AND scores.level = ? ORDER BY scores.time ASC LIMIT ?";
+
+  self.db = openDatabase("SliderPuzzleDb", "1.1", "Slider Puzzle DB", 200000);
+
+  /**
+       * DBManager.onError callback is invoked when SQL error occurs
+       */
+  self.onError = function(tx, error) {
+        console.log("[ERR] DBmanager: "+error.message);
+  }
+
+  /**
+       * DBManager.onSuccess callback is invoked when SQL statement is successfully executed
+       */
+  self.onSuccess = function(tx, error) {
+  }
+
+  /**
+       * DBManager.createTables function creates database tables (users and scores)
+       */
+  self.createTables = function() {
+        self.db.transaction(function(tx) {
+               tx.executeSql(self.createUsersStatement, [], self.onSuccess, self.onError);
+               tx.executeSql(self.createScoresStatement, [], self.onSuccess, self.onError);
+        });
+  }
+
+  /**
+       * DBManager.insertUser inserts new user into the users table
+       * @param username user name
+       */
+  self.insertUser = function(username) {
+        self.db.transaction(function(tx) {
+        tx.executeSql(self.insertUserStatement, [username], null, self.onError);
+       });
+  }
+
+  /**
+       * DBManager.insertUserUpdateScores inserts new user into the users table and new score result into the scores table.
+       * @param username user name
+       * @param moves number of moves needed to complete the game
+       * @param time time in seconds needed to complete the game
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.insertUserUpdateScores = function(username, moves, time, level, imageUrl) {
+        self.db.transaction(function(tx) {
+        tx.executeSql(self.insertUserStatement, [username],
+               function(tx, resultSet) {
+                 if(!resultSet.rowsAffected)  {
+                        //insert failed
+                        return false;
+                 }
+                 else {
+                        self.insertScores(resultSet.insertId, moves, time, level, imageUrl);
+                        return true;
+                 }
+               },
+               self.onError);
+       });
+  }
+
+  /**
+       * DBManager.insertScores inserts a new score result into the scores table.
+       * @param userid id of the user taken from the users table
+       * @param moves number of moves needed to complete the game
+       * @param time time in seconds needed to complete the game
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.insertScores = function(userid, moves, time, level, imgUrl) {
+        self.db.transaction(function(tx) {
+        tx.executeSql(self.insertScoresStatement, [userid, moves, time, level, imgUrl], null, self.onError);
+       });
+  }
+
+
+  /**
+       * DBManager.pictureFastestResults gets records from the scores table based on the fastest time
+       * @param callback function that is invoked when the results are retrieved from the database
+       * @param limit limitation on the number of the returned records
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.pictureFastestResults = function(callback, limit, level, imgUrl) {
+        if(imgUrl != "") {
+               self.db.transaction(function(tx) {
+                 tx.executeSql(self.selectPictureFastestStatement, [imgUrl, level, limit], function(tx, result) {
+                        var dataset = result.rows;
+                        callback(dataset);
+                        }) });
+        }
+  }
+
+  /**
+       * DBManager.pictureLessMovesResults gets records from the scores table based on the number of moves
+       * @param callback function that is invoked when the results are retrieved from the database
+       * @param limit limitation on the number of the returned records
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.pictureLessMovesResults = function(callback, limit, level, imgUrl) {
+        if(imgUrl != "") {
+               self.db.transaction(function(tx) {
+                 tx.executeSql(self.selectPictureLessMovesStatement, [imgUrl, level, limit], function(tx, result) {
+                        var dataset = result.rows;
+                        callback(dataset);
+                        }) });
+        }
+  }
+
+  /**
+       * DBManager.fastestResults gets records from the scores table based on the fastest time
+       * @param callback function that is invoked when the results are retrieved from the database
+       * @param limit limitation on the number of the returned records
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.fastestResults = function(callback, limit, level, imgUrl) {
+        if(imgUrl != "") {
+               self.db.transaction(function(tx) {
+                 tx.executeSql(self.selectFastestResultsStatement, [level, imgUrl, limit], function(tx, result) {
+                        var dataset = result.rows;
+                        callback(dataset);
+                        }) });
+        }
+        else {
+               self.db.transaction(function(tx) {
+                 tx.executeSql(self.selectFastestResultsLbStatement, [level, limit], function(tx, result) {
+                        var dataset = result.rows;
+                        callback(dataset, level);
+                        }) });
+        }
+  }
+
+   /**
+       * DBManager.lessMovesResults gets records from the scores table based on the number of moves
+       * @param callback function that is invoked when the results are retrieved from the database
+       * @param limit limitation on the number of the returned records
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.lessMovesResults = function(callback, limit, level, imgUrl) {
+        if(imgUrl != "") {
+               self.db.transaction(function(tx) {
+                 tx.executeSql(self.selectLessMovesResultsStatement, [level, imgUrl, limit], function(tx, result) {
+                        var dataset = result.rows;
+                        callback(dataset);
+                        }) });
+        }
+        else {
+               self.db.transaction(function(tx) {
+                 tx.executeSql(self.selectLessMovesResultsLbStatement, [level, limit], function(tx, result) {
+                        var dataset = result.rows;
+                        callback(dataset, level);
+                        }) });
+        }
+  }
+
+   /**
+       * DBManager.saveUserAndResult function is called to save the game result to the database.
+       * New user is inserted into the users table if a user with the specified username does not exist in the users table.
+       * @param username user name
+       * @param moves number of moves needed to complete the game
+       * @param time time in seconds needed to complete the game
+       * @param level level(difficulty) used to play the game
+       * @param imageUrl url to the image that was used in the game
+       */
+  self.saveUserAndResult = function(username, moves, time, level, imageUrl) {
+        self.db.transaction(function(tx) {
+               tx.executeSql(self.selectUserStatement, [username], function(tx, result) {
+                 var dataset = result.rows;
+
+                 //such user already exists
+                 if(dataset.length > 0)
+                 {
+                        var userid = dataset.item(0)["_id"];
+                        self.insertScores(userid, moves, time, level, imageUrl);
+                 }
+                 else
+                 {
+                        self.insertUserUpdateScores(username, moves, time, level, imageUrl);
+                 }
+        }) });
+  }
+
+  /**
+       * DBManager.dropTableUsers deletes the users table
+       */
+  self.dropTableUsers = function() {
+        db.transaction(function(tx) {
+               tx.executeSql(self.dropUsersStatement, [], null, self.onError);
+        });
+  }
+
+  /**
+       * DBManager.dropTableScores deletes the scores table
+       */
+  self.dropTableScores = function() {
+        db.transaction(function(tx) {
+               tx.executeSql(self.dropScoresStatement, [], null, self.onError);
+        });
+  }
+
+  self.createTables();
+}
diff --git a/js/finishpopout.js b/js/finishpopout.js
new file mode 100755 (executable)
index 0000000..732740e
--- /dev/null
@@ -0,0 +1,218 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * FinishPopout class takes care of the finish popout settings and interaction
+ * constructor parameters:
+ * @param aDbManager reference to a database manager object
+ * @param aLocalizer reference to a localizer object
+ */
+function FinishPopout(aDbManager, aLocalizer) {
+
+  var self = this;
+  self.dbManager = aDbManager;
+  self.localizer = aLocalizer;
+
+  self.RECORDS_LIMIT = 3;
+  self._currMoves;
+  self._currSeconds;
+  self._scoreMovesArr = [];
+  self._scoreSecondsArr = [];
+  self._currMovesPlaced = false;
+  self._currSecondsPlaced = false;
+
+  /*
+   * FinishPopout.localize() function is used to localize all texts on the PhotosPage
+   */
+  self.localize = function() {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               $("#qsFpMovesTitleS").html(self.localizer.getTranslation("all_moves")+" ");
+               $("#qsFpTimeTitleS").html(self.localizer.getTranslation("all_time")+" ");
+               $("#qsFinishS").html(self.localizer.getTranslation("finish_finish"));
+               $("#qsFpSaveResultS").html(self.localizer.getTranslation("finish_save"));
+        }
+  }
+  self.localize();
+
+
+  /**
+       * FinishPopout.updateScoresMovesCallBack() callback gets invoked by the database manager after it retrieves the scores based
+       * on the moves from the database
+       * @param aDataset dataset returned by the database manager
+       */
+  self.updateScoresMovesCallBack = function(aDataset) {
+        if(typeof aDataset != "undefined") {
+
+               var moves1El = document.getElementById("qsFpMoves1S");
+               var moves2El = document.getElementById("qsFpMoves2S");
+               var moves3El = document.getElementById("qsFpMoves3S");
+
+               self._scoreMovesArr = [];
+               //current game result was placed
+               self._currMovesPlaced = false;
+
+               for(var i = 0; i < aDataset.length; i++) {
+                 if((typeof aDataset.item(i)["username"] != "undefined") &&
+                        (typeof aDataset.item(i)["moves"] != "undefined")) {
+
+                       if((self._currMoves < aDataset.item(i)["moves"]) && !self._currMovesPlaced) {
+                        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization)
+                               self._scoreMovesArr.push({"username": self.localizer.getTranslation("finish_your_game"), "moves": self._currMoves, "highlight": true});
+                        else
+                               self._scoreMovesArr.push({"username": "Your Game", "moves": self._currMoves, "highlight": true});
+                        self._currMovesPlaced = true;
+                       }
+                       self._scoreMovesArr.push({"username": aDataset.item(i)["username"], "moves": aDataset.item(i)["moves"], "highlight": false});
+                 }
+               }
+
+               if(aDataset.length < self.RECORDS_LIMIT && !self._currMovesPlaced) {
+                 if(typeof self.localizer != "undefined" && !self.localizer.noLocalization)
+                        self._scoreMovesArr.push({"username": self.localizer.getTranslation("finish_your_game"), "moves": self._currMoves, "highlight": true});
+                 else
+                        self._scoreMovesArr.push({"username": "Your Game", "moves": self._currMoves, "highlight": true})
+               }
+
+               if(self._scoreMovesArr.length > 0) {
+                 moves1El.innerHTML = self._scoreMovesArr[0]["username"]+": "+self._scoreMovesArr[0]["moves"];
+
+                 if(self._scoreMovesArr[0]["highlight"] == true) {
+                        moves1El.style.color = "#2bb9ee";
+                 }
+                 else {
+                        moves1El.style.color = "#000000";
+                 }
+               }
+               else {
+                 moves1El.innerHTML = "-----";
+               }
+
+               if(self._scoreMovesArr.length > 1) {
+                 moves2El.innerHTML = self._scoreMovesArr[1]["username"]+": "+self._scoreMovesArr[1]["moves"];
+
+                 if(self._scoreMovesArr[1]["highlight"] == true) {
+                        moves2El.style.color = "#2bb9ee";
+                 }
+                 else {
+                        moves2El.style.color = "#000000";
+                 }
+               }
+               else {
+                 moves2El.innerHTML = "-----";
+               }
+
+               if(self._scoreMovesArr.length > 2) {
+                 moves3El.innerHTML = self._scoreMovesArr[2]["username"]+": "+self._scoreMovesArr[2]["moves"];
+
+                 if(self._scoreMovesArr[2]["highlight"] == true) {
+                        moves3El.style.color = "#2bb9ee";
+                 }
+                 else {
+                        moves3El.style.color = "#000000";
+                 }
+               }
+               else {
+                 moves3El.innerHTML = "-----";
+               }
+        }
+  }
+
+
+  /**
+       * FinishPopout.updateScoresTimeCallBack() callback gets invoked by the database manager after it retrieves the scores based
+       * on the time from the database
+       * @param aDataset dataset returned by the database manager
+       */
+  self.updateScoresTimeCallBack = function(aDataset) {
+        if(typeof aDataset != "undefined") {
+
+               var time1El = document.getElementById("qsFpTime1S");
+               var time2El = document.getElementById("qsFpTime2S");
+               var time3El = document.getElementById("qsFpTime3S");
+
+               self._scoreSecondsArr = [];
+               //current game result was placed
+               self._currSecondsPlaced = false;
+
+               for(var i = 0; i < aDataset.length; i++) {
+                 if((typeof aDataset.item(i)["username"] != "undefined") &&
+                        (typeof aDataset.item(i)["time"] != "undefined")) {
+
+                       if((self._currSeconds < aDataset.item(i)["time"]) && !self._currSecondsPlaced) {
+                               if(typeof self.localizer != "undefined" && !self.localizer.noLocalization)
+                                 self._scoreMovesArr.push({"username": self.localizer.getTranslation("finish_your_game"), "moves": self._currMoves, "highlight": true});
+                               else
+                                 self._scoreMovesArr.push({"username": "Your Game", "moves": self._currMoves, "highlight": true})
+                               self._currSecondsPlaced = true;
+                       }
+                       self._scoreSecondsArr.push({"username": aDataset.item(i)["username"], "time": aDataset.item(i)["time"], "highlight": false});
+                 }
+               }
+
+               if(aDataset.length < self.RECORDS_LIMIT && !self._currSecondsPlaced) {
+                 if(typeof self.localizer != "undefined" && !self.localizer.noLocalization)
+                        self._scoreMovesArr.push({"username": self.localizer.getTranslation("finish_your_game"), "moves": self._currMoves, "highlight": true});
+                 else
+                        self._scoreMovesArr.push({"username": "Your Game", "moves": self._currMoves, "highlight": true})
+               }
+
+               if(self._scoreSecondsArr.length > 0) {
+                 time1El.innerHTML = self._scoreSecondsArr[0]["username"]+": "+SpUtil.secondsToTime(self._scoreSecondsArr[0]["time"]);
+
+                 if(self._scoreSecondsArr[0]["highlight"] == true) {
+                        time1El.style.color = "#2bb9ee";
+                 }
+                 else {
+                        time1El.style.color = "#000000";
+                 }
+               }
+               else {
+                 time1El.innerHTML = "-----";
+               }
+
+               if(self._scoreSecondsArr.length > 1) {
+                 time2El.innerHTML = self._scoreSecondsArr[1]["username"]+": "+SpUtil.secondsToTime(self._scoreSecondsArr[1]["time"]);
+
+                 if(self._scoreSecondsArr[1]["highlight"] == true) {
+                        time2El.style.color = "#2bb9ee";
+                 }
+                 else {
+                        time2El.style.color = "#000000";
+                 }
+               }
+               else {
+                 time2El.innerHTML = "-----";
+               }
+
+               if(self._scoreSecondsArr.length > 2) {
+                 time3El.innerHTML = self._scoreSecondsArr[2]["username"]+": "+SpUtil.secondsToTime(self._scoreSecondsArr[2]["time"]);
+
+                 if(self._scoreSecondsArr[2]["highlight"] == true) {
+                        time3El.style.color = "#2bb9ee";
+                 }
+                 else {
+                        time3El.style.color = "#000000";
+                 }
+               }
+               else {
+                 time3El.innerHTML = "-----";
+               }
+        }
+  }
+
+  /**
+       * FinishPopout.updateScores() function is called before showing the score table. The score data based on moves and time is retrieved from the database.
+       */
+  self.updateScores = function(level, imgUrl, currMoves, currSeconds) {
+        self._currMoves = currMoves;
+        self._currSeconds = currSeconds;
+        self.dbManager.lessMovesResults(self.updateScoresMovesCallBack, self.RECORDS_LIMIT, level, imgUrl);
+        self.dbManager.fastestResults(self.updateScoresTimeCallBack, self.RECORDS_LIMIT, level, imgUrl);
+  }
+}
diff --git a/js/iscroll-lite.js b/js/iscroll-lite.js
new file mode 100755 (executable)
index 0000000..eeedb5c
--- /dev/null
@@ -0,0 +1,594 @@
+/*!
+ * iScroll Lite base on iScroll v4.1.6 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org
+ * Released under MIT license, http://cubiq.org/license
+ */
+
+(function(){
+var m = Math,
+       mround = function (r) { return r >> 0; },
+       vendor = (/webkit/i).test(navigator.appVersion) ? 'webkit' :
+               (/firefox/i).test(navigator.userAgent) ? 'Moz' :
+               'opera' in window ? 'O' : '',
+
+    // Browser capabilities
+    isAndroid = (/android/gi).test(navigator.appVersion),
+    isIDevice = (/iphone|ipad/gi).test(navigator.appVersion),
+    isPlaybook = (/playbook/gi).test(navigator.appVersion),
+    isTouchPad = (/hp-tablet/gi).test(navigator.appVersion),
+
+    has3d = 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix(),
+    hasTouch = 'ontouchstart' in window && !isTouchPad,
+    hasTransform = vendor + 'Transform' in document.documentElement.style,
+    hasTransitionEnd = isIDevice || isPlaybook,
+
+       nextFrame = (function() {
+           return window.requestAnimationFrame
+                       || window.webkitRequestAnimationFrame
+                       || window.mozRequestAnimationFrame
+                       || window.oRequestAnimationFrame
+                       || window.msRequestAnimationFrame
+                       || function(callback) { return setTimeout(callback, 17); }
+       })(),
+       cancelFrame = (function () {
+           return window.cancelRequestAnimationFrame
+                       || window.webkitCancelAnimationFrame
+                       || window.webkitCancelRequestAnimationFrame
+                       || window.mozCancelRequestAnimationFrame
+                       || window.oCancelRequestAnimationFrame
+                       || window.msCancelRequestAnimationFrame
+                       || clearTimeout
+       })(),
+
+       // Events
+       RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize',
+       START_EV = hasTouch ? 'touchstart' : 'mousedown',
+       MOVE_EV = hasTouch ? 'touchmove' : 'mousemove',
+       END_EV = hasTouch ? 'touchend' : 'mouseup',
+       CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup',
+
+       // Helpers
+       trnOpen = 'translate' + (has3d ? '3d(' : '('),
+       trnClose = has3d ? ',0)' : ')',
+
+       // Constructor
+       iScroll = function (el, options) {
+               var that = this,
+                       doc = document,
+                       i;
+
+               that.wrapper = typeof el == 'object' ? el : doc.getElementById(el);
+               that.wrapper.style.overflow = 'hidden';
+               that.scroller = that.wrapper.children[0];
+
+               // Default options
+               that.options = {
+                       hScroll: true,
+                       vScroll: true,
+                       x: 0,
+                       y: 0,
+                       bounce: true,
+                       bounceLock: false,
+                       momentum: true,
+                       lockDirection: true,
+                       useTransform: true,
+                       useTransition: false,
+
+                       // Events
+                       onRefresh: null,
+                       onBeforeScrollStart: function (e) { e.preventDefault(); },
+                       onScrollStart: null,
+                       onBeforeScrollMove: null,
+                       onScrollMove: null,
+                       onBeforeScrollEnd: null,
+                       onScrollEnd: null,
+                       onTouchEnd: null,
+                       onDestroy: null
+               };
+
+               // User defined options
+               for (i in options) that.options[i] = options[i];
+
+               // Set starting position
+               that.x = that.options.x;
+               that.y = that.options.y;
+
+               // Normalize options
+               that.options.useTransform = hasTransform ? that.options.useTransform : false;
+               that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar;
+               that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar;
+               that.options.useTransition = hasTransitionEnd && that.options.useTransition;
+
+               // Set some default styles
+               that.scroller.style[vendor + 'TransitionProperty'] = that.options.useTransform ? '-' + vendor.toLowerCase() + '-transform' : 'top left';
+               that.scroller.style[vendor + 'TransitionDuration'] = '0';
+               that.scroller.style[vendor + 'TransformOrigin'] = '0 0';
+               if (that.options.useTransition) that.scroller.style[vendor + 'TransitionTimingFunction'] = 'cubic-bezier(0.33,0.66,0.66,1)';
+
+               if (that.options.useTransform) that.scroller.style[vendor + 'Transform'] = trnOpen + that.x + 'px,' + that.y + 'px' + trnClose;
+               else that.scroller.style.cssText += ';position:absolute;top:' + that.y + 'px;left:' + that.x + 'px';
+
+               that.refresh();
+
+               that._bind(RESIZE_EV, window);
+               that._bind(START_EV);
+               if (!hasTouch) that._bind('mouseout', that.wrapper);
+       };
+
+// Prototype
+iScroll.prototype = {
+       enabled: true,
+       x: 0,
+       y: 0,
+       steps: [],
+       scale: 1,
+
+       handleEvent: function (e) {
+               var that = this;
+               switch(e.type) {
+                       case START_EV:
+                               if (!hasTouch && e.button !== 0) return;
+                               that._start(e);
+                               break;
+                       case MOVE_EV: that._move(e); break;
+                       case END_EV:
+                       case CANCEL_EV: that._end(e); break;
+                       case RESIZE_EV: that._resize(); break;
+                       case 'mouseout': that._mouseout(e); break;
+                       case 'webkitTransitionEnd': that._transitionEnd(e); break;
+               }
+       },
+
+       _resize: function () {
+               this.refresh();
+       },
+
+       _pos: function (x, y) {
+               x = this.hScroll ? x : 0;
+               y = this.vScroll ? y : 0;
+
+               if (this.options.useTransform) {
+                       this.scroller.style[vendor + 'Transform'] = trnOpen + x + 'px,' + y + 'px' + trnClose + ' scale(' + this.scale + ')';
+               } else {
+                       x = mround(x);
+                       y = mround(y);
+                       this.scroller.style.left = x + 'px';
+                       this.scroller.style.top = y + 'px';
+               }
+
+               this.x = x;
+               this.y = y;
+       },
+
+       _start: function (e) {
+               var that = this,
+                       point = hasTouch ? e.touches[0] : e,
+                       matrix, x, y;
+
+               if (!that.enabled) return;
+
+               if (that.options.onBeforeScrollStart) that.options.onBeforeScrollStart.call(that, e);
+
+               if (that.options.useTransition) that._transitionTime(0);
+
+               that.moved = false;
+               that.animating = false;
+               that.zoomed = false;
+               that.distX = 0;
+               that.distY = 0;
+               that.absDistX = 0;
+               that.absDistY = 0;
+               that.dirX = 0;
+               that.dirY = 0;
+
+               if (that.options.momentum) {
+                       if (that.options.useTransform) {
+                               // Very lame general purpose alternative to CSSMatrix
+                               matrix = getComputedStyle(that.scroller, null)[vendor + 'Transform'].replace(/[^0-9-.,]/g, '').split(',');
+                               x = matrix[4] * 1;
+                               y = matrix[5] * 1;
+                       } else {
+                               x = getComputedStyle(that.scroller, null).left.replace(/[^0-9-]/g, '') * 1;
+                               y = getComputedStyle(that.scroller, null).top.replace(/[^0-9-]/g, '') * 1;
+                       }
+
+                       if (x != that.x || y != that.y) {
+                               if (that.options.useTransition) that._unbind('webkitTransitionEnd');
+                               else cancelFrame(that.aniTime);
+                               that.steps = [];
+                               that._pos(x, y);
+                       }
+               }
+
+               that.startX = that.x;
+               that.startY = that.y;
+               that.pointX = point.pageX;
+               that.pointY = point.pageY;
+
+               that.startTime = e.timeStamp || Date.now();
+
+               if (that.options.onScrollStart) that.options.onScrollStart.call(that, e);
+
+               that._bind(MOVE_EV);
+               that._bind(END_EV);
+               that._bind(CANCEL_EV);
+       },
+
+       _move: function (e) {
+               var that = this,
+                       point = hasTouch ? e.touches[0] : e,
+                       deltaX = point.pageX - that.pointX,
+                       deltaY = point.pageY - that.pointY,
+                       newX = that.x + deltaX,
+                       newY = that.y + deltaY,
+                       timestamp = e.timeStamp || Date.now();
+
+               if (that.options.onBeforeScrollMove) that.options.onBeforeScrollMove.call(that, e);
+
+               that.pointX = point.pageX;
+               that.pointY = point.pageY;
+
+               // Slow down if outside of the boundaries
+               if (newX > 0 || newX < that.maxScrollX) {
+                       newX = that.options.bounce ? that.x + (deltaX / 2) : newX >= 0 || that.maxScrollX >= 0 ? 0 : that.maxScrollX;
+               }
+               if (newY > 0 || newY < that.maxScrollY) {
+                       newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= 0 || that.maxScrollY >= 0 ? 0 : that.maxScrollY;
+               }
+
+               that.distX += deltaX;
+               that.distY += deltaY;
+               that.absDistX = m.abs(that.distX);
+               that.absDistY = m.abs(that.distY);
+
+               if (that.absDistX < 6 && that.absDistY < 6) {
+                       return;
+               }
+
+               // Lock direction
+               if (that.options.lockDirection) {
+                       if (that.absDistX > that.absDistY + 5) {
+                               newY = that.y;
+                               deltaY = 0;
+                       } else if (that.absDistY > that.absDistX + 5) {
+                               newX = that.x;
+                               deltaX = 0;
+                       }
+               }
+
+               that.moved = true;
+               that._pos(newX, newY);
+               that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
+               that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;
+
+               if (timestamp - that.startTime > 300) {
+                       that.startTime = timestamp;
+                       that.startX = that.x;
+                       that.startY = that.y;
+               }
+
+               if (that.options.onScrollMove) that.options.onScrollMove.call(that, e);
+       },
+
+       _end: function (e) {
+               if (hasTouch && e.touches.length != 0) return;
+
+               var that = this,
+                       point = hasTouch ? e.changedTouches[0] : e,
+                       target, ev,
+                       momentumX = { dist:0, time:0 },
+                       momentumY = { dist:0, time:0 },
+                       duration = (e.timeStamp || Date.now()) - that.startTime,
+                       newPosX = that.x,
+                       newPosY = that.y,
+                       newDuration;
+
+               that._unbind(MOVE_EV);
+               that._unbind(END_EV);
+               that._unbind(CANCEL_EV);
+
+               if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e);
+
+               if (!that.moved) {
+                       if (hasTouch) {
+                               // Find the last touched element
+                               target = point.target;
+                               while (target.nodeType != 1) target = target.parentNode;
+
+                               if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA') {
+                                       ev = document.createEvent('MouseEvents');
+                                       ev.initMouseEvent('click', true, true, e.view, 1,
+                                               point.screenX, point.screenY, point.clientX, point.clientY,
+                                               e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
+                                               0, null);
+                                       ev._fake = true;
+                                       target.dispatchEvent(ev);
+                               }
+                       }
+
+                       that._resetPos(200);
+
+                       if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
+                       return;
+               }
+
+               if (duration < 300 && that.options.momentum) {
+                       momentumX = newPosX ? that._momentum(newPosX - that.startX, duration, -that.x, that.scrollerW - that.wrapperW + that.x, that.options.bounce ? that.wrapperW : 0) : momentumX;
+                       momentumY = newPosY ? that._momentum(newPosY - that.startY, duration, -that.y, (that.maxScrollY < 0 ? that.scrollerH - that.wrapperH + that.y : 0), that.options.bounce ? that.wrapperH : 0) : momentumY;
+
+                       newPosX = that.x + momentumX.dist;
+                       newPosY = that.y + momentumY.dist;
+
+                       if ((that.x > 0 && newPosX > 0) || (that.x < that.maxScrollX && newPosX < that.maxScrollX)) momentumX = { dist:0, time:0 };
+                       if ((that.y > 0 && newPosY > 0) || (that.y < that.maxScrollY && newPosY < that.maxScrollY)) momentumY = { dist:0, time:0 };
+               }
+
+               if (momentumX.dist || momentumY.dist) {
+                       newDuration = m.max(m.max(momentumX.time, momentumY.time), 10);
+
+                       that.scrollTo(mround(newPosX), mround(newPosY), newDuration);
+
+                       if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
+                       return;
+               }
+
+               that._resetPos(200);
+               if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
+       },
+
+       _resetPos: function (time) {
+               var that = this,
+                       resetX = that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x,
+                       resetY = that.y >= 0 || that.maxScrollY > 0 ? 0 : that.y < that.maxScrollY ? that.maxScrollY : that.y;
+
+               if (resetX == that.x && resetY == that.y) {
+                       if (that.moved) {
+                               if (that.options.onScrollEnd) that.options.onScrollEnd.call(that);              // Execute custom code on scroll end
+                               that.moved = false;
+                       }
+
+                       return;
+               }
+
+               that.scrollTo(resetX, resetY, time || 0);
+       },
+
+       _mouseout: function (e) {
+               var t = e.relatedTarget;
+
+               if (!t) {
+                       this._end(e);
+                       return;
+               }
+
+               while (t = t.parentNode) if (t == this.wrapper) return;
+
+               this._end(e);
+       },
+
+       _transitionEnd: function (e) {
+               var that = this;
+
+               if (e.target != that.scroller) return;
+
+               that._unbind('webkitTransitionEnd');
+
+               that._startAni();
+       },
+
+       /**
+        *
+        * Utilities
+        *
+        */
+       _startAni: function () {
+               var that = this,
+                       startX = that.x, startY = that.y,
+                       startTime = Date.now(),
+                       step, easeOut,
+                       animate;
+
+               if (that.animating) return;
+
+               if (!that.steps.length) {
+                       that._resetPos(400);
+                       return;
+               }
+
+               step = that.steps.shift();
+
+               if (step.x == startX && step.y == startY) step.time = 0;
+
+               that.animating = true;
+               that.moved = true;
+
+               if (that.options.useTransition) {
+                       that._transitionTime(step.time);
+                       that._pos(step.x, step.y);
+                       that.animating = false;
+                       if (step.time) that._bind('webkitTransitionEnd');
+                       else that._resetPos(0);
+                       return;
+               }
+
+               animate = function () {
+                       var now = Date.now(),
+                               newX, newY;
+
+                       if (now >= startTime + step.time) {
+                               that._pos(step.x, step.y);
+                               that.animating = false;
+                               if (that.options.onAnimationEnd) that.options.onAnimationEnd.call(that);                        // Execute custom code on animation end
+                               that._startAni();
+                               return;
+                       }
+
+                       now = (now - startTime) / step.time - 1;
+                       easeOut = m.sqrt(1 - now * now);
+                       newX = (step.x - startX) * easeOut + startX;
+                       newY = (step.y - startY) * easeOut + startY;
+                       that._pos(newX, newY);
+                       if (that.animating) that.aniTime = nextFrame(animate);
+               };
+
+               animate();
+       },
+
+       _transitionTime: function (time) {
+               this.scroller.style[vendor + 'TransitionDuration'] = time + 'ms';
+       },
+
+       _momentum: function (dist, time, maxDistUpper, maxDistLower, size) {
+               var deceleration = 0.0006,
+                       speed = m.abs(dist) / time,
+                       newDist = (speed * speed) / (2 * deceleration),
+                       newTime = 0, outsideDist = 0;
+
+               // Proportinally reduce speed if we are outside of the boundaries
+               if (dist > 0 && newDist > maxDistUpper) {
+                       outsideDist = size / (6 / (newDist / speed * deceleration));
+                       maxDistUpper = maxDistUpper + outsideDist;
+                       speed = speed * maxDistUpper / newDist;
+                       newDist = maxDistUpper;
+               } else if (dist < 0 && newDist > maxDistLower) {
+                       outsideDist = size / (6 / (newDist / speed * deceleration));
+                       maxDistLower = maxDistLower + outsideDist;
+                       speed = speed * maxDistLower / newDist;
+                       newDist = maxDistLower;
+               }
+
+               newDist = newDist * (dist < 0 ? -1 : 1);
+               newTime = speed / deceleration;
+
+               return { dist: newDist, time: mround(newTime) };
+       },
+
+       _offset: function (el) {
+               var left = -el.offsetLeft,
+                       top = -el.offsetTop;
+
+               while (el = el.offsetParent) {
+                       left -= el.offsetLeft;
+                       top -= el.offsetTop;
+               }
+
+               return { left: left, top: top };
+       },
+
+       _bind: function (type, el, bubble) {
+               (el || this.scroller).addEventListener(type, this, !!bubble);
+       },
+
+       _unbind: function (type, el, bubble) {
+               (el || this.scroller).removeEventListener(type, this, !!bubble);
+       },
+
+
+       /**
+        *
+        * Public methods
+        *
+        */
+       destroy: function () {
+               var that = this;
+
+               that.scroller.style[vendor + 'Transform'] = '';
+
+               // Remove the event listeners
+               that._unbind(RESIZE_EV, window);
+               that._unbind(START_EV);
+               that._unbind(MOVE_EV);
+               that._unbind(END_EV);
+               that._unbind(CANCEL_EV);
+               that._unbind('mouseout', that.wrapper);
+               if (that.options.useTransition) that._unbind('webkitTransitionEnd');
+
+               if (that.options.onDestroy) that.options.onDestroy.call(that);
+       },
+
+       refresh: function () {
+               var that = this,
+                       offset;
+
+               that.wrapperW = that.wrapper.clientWidth;
+               that.wrapperH = that.wrapper.clientHeight;
+
+               that.scrollerW = that.scroller.offsetWidth;
+               that.scrollerH = that.scroller.offsetHeight;
+               that.maxScrollX = that.wrapperW - that.scrollerW;
+               that.maxScrollY = that.wrapperH - that.scrollerH;
+               that.dirX = 0;
+               that.dirY = 0;
+
+               that.hScroll = that.options.hScroll && that.maxScrollX < 0;
+               that.vScroll = that.options.vScroll && (!that.options.bounceLock && !that.hScroll || that.scrollerH > that.wrapperH);
+
+               offset = that._offset(that.wrapper);
+               that.wrapperOffsetLeft = -offset.left;
+               that.wrapperOffsetTop = -offset.top;
+
+
+               that.scroller.style[vendor + 'TransitionDuration'] = '0';
+
+               that._resetPos(200);
+       },
+
+       scrollTo: function (x, y, time, relative) {
+               var that = this,
+                       step = x,
+                       i, l;
+
+               that.stop();
+
+               if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }];
+
+               for (i=0, l=step.length; i<l; i++) {
+                       if (step[i].relative) { step[i].x = that.x - step[i].x; step[i].y = that.y - step[i].y; }
+                       that.steps.push({ x: step[i].x, y: step[i].y, time: step[i].time || 0 });
+               }
+
+               that._startAni();
+       },
+
+       scrollToElement: function (el, time) {
+               var that = this, pos;
+               el = el.nodeType ? el : that.scroller.querySelector(el);
+               if (!el) return;
+
+               pos = that._offset(el);
+               pos.left += that.wrapperOffsetLeft;
+               pos.top += that.wrapperOffsetTop;
+
+               pos.left = pos.left > 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left;
+               pos.top = pos.top > 0 ? 0 : pos.top < that.maxScrollY ? that.maxScrollY : pos.top;
+               time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time;
+
+               that.scrollTo(pos.left, pos.top, time);
+       },
+
+       disable: function () {
+               this.stop();
+               this._resetPos(0);
+               this.enabled = false;
+
+               // If disabled after touchstart we make sure that there are no left over events
+               this._unbind(MOVE_EV);
+               this._unbind(END_EV);
+               this._unbind(CANCEL_EV);
+       },
+
+       enable: function () {
+               this.enabled = true;
+       },
+
+       stop: function () {
+               cancelFrame(this.aniTime);
+               this.steps = [];
+               this.moved = false;
+               this.animating = false;
+       }
+};
+
+if (typeof exports !== 'undefined') exports.iScroll = iScroll;
+else window.iScroll = iScroll;
+
+})();
diff --git a/js/jquery-1.7.2.min.js b/js/jquery-1.7.2.min.js
new file mode 100755 (executable)
index 0000000..16ad06c
--- /dev/null
@@ -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?"<!doctype html>":"")+"<html><body>"),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;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=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<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\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(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)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(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?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<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",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></: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="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",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="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",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="<div style='width:5px;'></div>",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;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,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.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},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<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-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<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),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<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=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<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=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;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?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;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){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<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\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;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=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 b<c[3]-0},gt:function(a,b,c){return b>c[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<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=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;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",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 href='#'></a>",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="<p class='TEST'></p>";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="<div class='test e'></div><div class='test'></div>";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;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=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<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-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:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_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<div>","</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></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?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></$2>");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]==="<table>"&&!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;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/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("<div>").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<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=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<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-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/leaderboardpage.js b/js/leaderboardpage.js
new file mode 100755 (executable)
index 0000000..07a4515
--- /dev/null
@@ -0,0 +1,361 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * LeaderBoardPage class takes care of the LeaderBoardPage settings and interaction
+ * constructor parameters:
+ * @param aDbManager reference to a database manager object
+ * @param aLocalizer reference to a localizer object
+ */
+function LeaderBoardPage(aDbManager, aLocalizer) {
+  var self = this;
+
+  self.dbManager = aDbManager;
+  self.localizer = aLocalizer;
+
+  //returned records limit for the popup
+  self.PICTURE_RECORDS_LIMIT = 3;
+  //returned records limit for each level of the leaderboard (for each column)
+  self.RECORDS_LIMIT = 6;
+
+  self.HIGHEST_LEVEL = 3;
+
+  // true - moves; false - times.
+  self.view = true;
+
+  self.imageObjsCounter = 0;
+
+  self.currentLevel = 0;
+  self.currentImage = "";
+
+  self.imagesLoading = false;
+
+  self.popUpShown = false;
+
+  self.imageObjs = [];
+
+  /**
+       * LeaderBoardPage.localize() function is used to localize all texts on the LeaderBoardPage
+       */
+  self.localize = function() {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               $("#lbTitle").html(self.localizer.getTranslation("leaderboard_leaderboard")+":");
+               $("#lbscoresTableEasyColS").html(self.localizer.getTranslation("all_easy"));
+               $("#lbscoresTableHardColS").html(self.localizer.getTranslation("all_hard"));
+               $("#lbscoresTableBrutalColS").html(self.localizer.getTranslation("all_brutal"));
+
+               $("#lbMovesS").html(self.localizer.getTranslation("all_moves_cap"));
+               $("#lbTimesS").html(self.localizer.getTranslation("all_time_cap"));
+
+               //popout
+               $("#lbPopUpPlayButtonS").html(self.localizer.getTranslation("all_play"));
+        }
+  }
+  self.localize();
+
+  /**
+       * LeaderBoardPage.initAudio() function is used to initialize all the audio files needed for the LeaderBoardPage
+       */
+  self.initAudio = function() {
+        self.clickAudio = new Audio();
+        self.clickAudio.src = "audio/ButtonClick_02_Settings.ogg";
+  }
+  self.initAudio();
+
+  /**
+       * LeaderBoardPage.switchView() function is used to switch between 2 views (scores according to the number of moves and
+       * scores according to the time needed to complete the game)
+       */
+  self.switchView = function() {
+        if(self.imagesLoading)
+               return;
+
+        //clear canvases
+        for(var i = 0; i < self.RECORDS_LIMIT; i++) {
+               var canvas = document.getElementById("tableEasy"+(i+1).toString()+"ContentsCanvas");
+               if(typeof canvas != "undefined") {
+                 canvas.width = canvas.width;
+               }
+        }
+        for(var i = 0; i < self.RECORDS_LIMIT; i++) {
+               var canvas = document.getElementById("tableHard"+(i+1).toString()+"ContentsCanvas");
+               if(typeof canvas != "undefined") {
+                 canvas.width = canvas.width;
+               }
+        }
+        for(var i = 0; i < self.RECORDS_LIMIT; i++) {
+               var canvas = document.getElementById("tableBrutal"+(i+1).toString()+"ContentsCanvas");
+               if(typeof canvas != "undefined") {
+                 canvas.width = canvas.width;
+               }
+        }
+
+        if(!self.view) {
+               self.updateScores();
+               $("#lbMoves").css("background-color", "#252525");
+               $("#lbTimes").css("background-color", "#b7b7b7");
+        }
+        else {
+               self.updateScoresTime();
+               $("#lbMoves").css("background-color", "#b7b7b7");
+               $("#lbTimes").css("background-color", "#252525");
+        }
+        self.view = !self.view;
+  }
+
+  /**
+       * LeaderBoardPage.drawImage() function is used to draw an image on the canvas (inside the scores table)
+       */
+  self.drawImage = function() {
+        if(typeof self.imageObjs[self.imageObjsCounter] != "undefined" && self.imageObjsCounter < self.imageObjs.length && self.imageObjs[self.imageObjsCounter]["image"] != null) {
+               self.imageObjs[self.imageObjsCounter]["image"].onload = function() {
+                 var canvas = document.getElementById(self.imageObjs[self.imageObjsCounter]["canvasId"]);
+
+                 if(typeof canvas != "undefined" && self.imageObjs[self.imageObjsCounter]["image"] != null) {
+                        self.imageObjs[self.imageObjsCounter]["image"].style.width = canvas.width;
+                        self.imageObjs[self.imageObjsCounter]["image"].style.height = canvas.height;
+
+                        var context = canvas.getContext("2d");
+                        context.drawImage(self.imageObjs[self.imageObjsCounter]["image"], 0, 0, canvas.width, canvas.height);
+                        self.imageObjs[self.imageObjsCounter]["image"] = null;
+                        self.imageObjsCounter++;
+                        self.drawImage();
+                 }
+               }
+
+               self.imageObjs[self.imageObjsCounter]["image"].src = self.imageObjs[self.imageObjsCounter]["imgUrl"];
+        }
+        //loading of images has finished
+        else {
+               self.imagesLoading = false;
+        }
+  }
+
+  /**
+       * LeaderBoardPage.drawImages() function is used to draw all images on the canvases (inside the scores table)
+       */
+  self.drawImages = function() {
+        self.imagesLoading = true;
+        self.imageObjsCounter = 0;
+        self.drawImage();
+  }
+
+  /**
+       * LeaderBoardPage.updateScoresMovesCallBack() callback gets invoked by the database manager after it retrieves the scores based
+       * on the moves from the database
+       * @param aDataset dataset returned by the database manager
+       * @param aLevel dataset is returned for this level (can be 1 - easy, 2 - hard or 3 - brutal)
+       */
+  self.updateScoresMovesCallBack = function(aDataset, aLevel) {
+        self.updateLeaderBoardUI(aLevel, aDataset, true);
+  }
+
+  /**
+       * LeaderBoardPage.updateScoresTimeCallBack() callback gets invoked by the database manager after it retrieves the scores based
+       * on the time from the database
+       * @param aDataset dataset returned by the database manager
+       * @param aLevel dataset is returned for this level (can be 1 - easy, 2 - hard or 3 - brutal)
+       */
+  self.updateScoresTimeCallBack = function(aDataset, aLevel) {
+        self.updateLeaderBoardUI(aLevel, aDataset, false);
+  }
+
+
+  self.updateLeaderBoardUI = function(aLevel, aDataset, aMovesView) {
+        var levelString = "tableEasy";
+        switch(aLevel) {
+               case 1:
+                 levelString = "tableEasy";
+                 break;
+               case 2:
+                 levelString = "tableHard";
+                 break;
+               default:
+                 levelString = "tableBrutal";
+                 break;
+        }
+
+        for(var i = 0; i < aDataset.length; i++) {
+               if(aMovesView && typeof aDataset.item(i)["moves"] == "undefined") {
+                 return;
+               }
+               if(!aMovesView && typeof aDataset.item(i)["time"] == "undefined") {
+                 return;
+               }
+
+               var spanEl = document.getElementById(levelString+(i+1).toString()+"ContentsText");
+               var divEl = document.getElementById(levelString+(i+1).toString()+"Contents");
+
+               if(typeof spanEl != "undefined") {
+                 if(aMovesView)
+                        spanEl.innerHTML = aDataset.item(i)["username"]+": "+aDataset.item(i)["moves"];
+                 else
+                        spanEl.innerHTML = aDataset.item(i)["username"]+": "+SpUtil.secondsToTime(aDataset.item(i)["time"]);
+               }
+
+               var image = new Image();
+               self.imageObjs.push({"image": image, "imgUrl": aDataset.item(i)["img_url"], "canvasId": levelString+(i+1).toString()+"ContentsCanvas"});
+
+               $(divEl).bind("click", { imgPath: aDataset.item(i)["img_url"], level: aLevel },  self.showPopUp );
+
+        }
+
+        if(aDataset.length < self.RECORDS_LIMIT) {
+               for(var i = aDataset.length; i < self.RECORDS_LIMIT;i++) {
+                 var spanEl = document.getElementById(levelString+(i+1).toString()+"ContentsText");
+
+                 if(typeof spanEl != "undefined") {
+                        spanEl.innerHTML = "-----";
+                 }
+               }
+        }
+
+        if(aLevel == self.HIGHEST_LEVEL) {
+               self.drawImages();
+        }
+  }
+
+  /**
+       * LeaderBoardPage.pictureLessMovesCallback() callback gets invoked by the database manager after it retrieves the scores based
+       * on the moves from the database (this function is used for the popup)
+       * @param aDataset dataset returned by the database manager
+       */
+  self.pictureLessMovesCallback = function(aDataset) {
+        self.updateLeaderBoardPopupUI(aDataset, true);
+  }
+
+  /**
+       * LeaderBoardPage.pictureFastestCallback() callback gets invoked by the database manager after it retrieves the scores based
+       * on the time from the database (this function is used for the popup)
+       * @param aDataset dataset returned by the database manager
+       */
+  self.pictureFastestCallback = function(aDataset) {
+        self.updateLeaderBoardPopupUI(aDataset, false);
+  }
+
+  self.updateLeaderBoardPopupUI = function(aDataset, aMovesView) {
+        for(var i = 0; i < aDataset.length; i++) {
+               if(aMovesView && typeof aDataset.item(i)["moves"] == "undefined") {
+                        return;
+               }
+               if(!aMovesView && typeof aDataset.item(i)["time"] == "undefined") {
+                 return;
+               }
+
+               if((typeof aDataset.item(i)["username"] != "undefined")) {
+                 var spanEl = document.getElementById("lbPopupScoresTableRowRecords"+(i+1).toString()+"S");
+
+                 if(typeof spanEl != "undefined" && spanEl != null) {
+                        if(aMovesView)
+                               spanEl.innerHTML = aDataset.item(i)["username"]+": "+aDataset.item(i)["moves"];
+                        else
+                               spanEl.innerHTML = aDataset.item(i)["username"]+": "+SpUtil.secondsToTime(aDataset.item(i)["time"]);
+                 }
+               }
+        }
+
+        if(aDataset.length < self.PICTURE_RECORDS_LIMIT) {
+               for(var i = aDataset.length; i < self.RECORDS_LIMIT; i++) {
+                 var spanEl = document.getElementById("lbPopupScoresTableRowRecords"+(i+1).toString()+"S");
+
+                 if(typeof spanEl != "undefined" && spanEl != null) {
+                        spanEl.innerHTML = "-----";
+                 }
+               }
+        }
+  }
+
+  /**
+       * LeaderBoardPage.showPopUp() callback gets invoked when any of the leaderboard cells is clicked.
+       */
+  self.showPopUp = function(event) {
+        $("#lbPopUpImage").css("background-image", "url('"+ event.data.imgPath +"')");
+        if(event.data.level == 1) {
+               if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+                 $("#lbPopUpLevelText").html(self.localizer.getTranslation("all_level")+": "+self.localizer.getTranslation("all_easy"));
+               }
+               else {
+                 $("#lbPopUpLevelText").html("LEVEL: EASY");
+               }
+        }
+        else if(event.data.level == 2) {
+               if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+                 $("#lbPopUpLevelText").html(self.localizer.getTranslation("all_level")+": "+self.localizer.getTranslation("all_hard"));
+               }
+               else {
+                 $("#lbPopUpLevelText").html("LEVEL: HARD");
+               }
+        }
+        else if(event.data.level == 3) {
+               if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+                 $("#lbPopUpLevelText").html(self.localizer.getTranslation("all_level")+": "+self.localizer.getTranslation("all_brutal"));
+               }
+               else {
+                 $("#lbPopUpLevelText").html("LEVEL: BRUTAL");
+               }
+        }
+
+        self.currentLevel = event.data.level;
+        self.currentImage = event.data.imgPath;
+
+        if(self.view) {
+               self.dbManager.lessMovesResults(self.pictureLessMovesCallback, self.PICTURE_RECORDS_LIMIT, event.data.level, event.data.imgPath);
+        }
+        else {
+               self.dbManager.fastestResults(self.pictureFastestCallback, self.PICTURE_RECORDS_LIMIT, event.data.level, event.data.imgPath);
+        }
+
+        $("#lbPopUpBase").css("visibility", "visible");
+        self.popUpShown = true;
+  }
+
+  /**
+       * LeaderBoardPage.closePopUp() function closes the popup
+       */
+  self.closePopUp = function(event) {
+        $("#lbPopUpBase").css("visibility", "hidden");
+        self.popUpShown = false;
+  }
+
+  /**
+       * LeaderBoardPage.setInvisible() function makes leaderboard page invisible
+       */
+  self.setInvisible = function() {
+        $("#lbPopUpBase").css("visibility", "hidden");
+        $("#leaderboardPage").css("visibility", "hidden");
+  }
+
+  /**
+       * LeaderBoardPage.updateScores() function is called before showing the score table. The score data based on moves is retrieved from the database
+       * and LeaderBoardPage.updateScoresMovesCallBack() callback is called
+       */
+  self.updateScores = function() {
+        self.imageObjs = [];
+        //level 1
+        self.dbManager.lessMovesResults(self.updateScoresMovesCallBack, self.RECORDS_LIMIT, 1, "");
+        //level 2
+        self.dbManager.lessMovesResults(self.updateScoresMovesCallBack, self.RECORDS_LIMIT, 2, "");
+        //level 3
+        self.dbManager.lessMovesResults(self.updateScoresMovesCallBack, self.RECORDS_LIMIT, 3, "");
+  }
+
+  /**
+  * LeaderBoardPage.updateScoresTime() function is called before showing the score table. The score data based on time is retrieved from the database
+  * and LeaderBoardPage.updateScoresTimeCallBack() callback is called
+  */
+  self.updateScoresTime = function() {
+        self.imageObjs = [];
+        //level 1
+        self.dbManager.fastestResults(self.updateScoresTimeCallBack, self.RECORDS_LIMIT, 1, "");
+        //level 2
+        self.dbManager.fastestResults(self.updateScoresTimeCallBack, self.RECORDS_LIMIT, 2, "");
+        //level 3
+        self.dbManager.fastestResults(self.updateScoresTimeCallBack, self.RECORDS_LIMIT, 3, "");
+  }
+}
diff --git a/js/license.js b/js/license.js
new file mode 100755 (executable)
index 0000000..90ddf1a
--- /dev/null
@@ -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,"&lt;");
+        text = text.replace(/>/g,"&gt;");
+        var lines = text.split("\n");
+        lines[0] = "<br><br>"+lines[0];
+        for(var i in lines)
+        {
+            if(lines[i].match(/--------------------/))
+            {
+                lines[i] = "";
+            }
+            else
+            {
+                lines[i] += "<br>";
+            }
+        }
+        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/localizer.js b/js/localizer.js
new file mode 100755 (executable)
index 0000000..fd740cd
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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
+ *
+ */
+
+
+/**
+ * Localizer is an utility that updates the UI strings with localized
+ * strings.
+ */
+Localizer = function() {
+        var self = this;
+
+    self.noLocalization = false; // for disabling localizations temporary
+
+    /**
+         * Localizer.getTranslation gets the translated string based on the key parameter
+         * @param key key used to retrieve the localized string
+         */
+    self.getTranslation = function(key) {
+        var text = "";
+        if (self.noLocalization) {
+            return text;
+        }
+
+        if (window.chrome && window.chrome.i18n) {
+            text = chrome.i18n.getMessage(key);
+        }
+        return text;
+    }
+
+
+    // If localizations cannot be read for some reason, we turn localization off.
+    if (self.getTranslation("all_moves").length == 0) {
+        self.noLocalization = true;
+    }
+    return self;
+}
diff --git a/js/main.js b/js/main.js
new file mode 100755 (executable)
index 0000000..a05fed4
--- /dev/null
@@ -0,0 +1,605 @@
+/*
+ * 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
+ *
+ */
+
+//Slider Puzzle Application object
+SliderPuzzleApp = {};
+
+(function () {
+  /**
+       * quickStart() function is used to show the main screen of the game (screen where the actual puzzle is displayed)
+       */
+  function quickStart() {
+        SliderPuzzleApp.buttonClickStartAudio.play();
+        $("#mainPage").css("visibility", "hidden");
+        $("#leaderboardPage").css("visibility", "hidden");
+        if(SliderPuzzleApp.photosPageObj !== null && SliderPuzzleApp.photosPageObj !== undefined) {
+               SliderPuzzleApp.photosPageObj.setInvisible();
+        }
+        if(SliderPuzzleApp.leaderBoardPageObj !== null && SliderPuzzleApp.leaderBoardPageObj !== undefined) {
+               SliderPuzzleApp.leaderBoardPageObj.setInvisible();
+        }
+        $("#quickStartPage").css("visibility", "visible");
+        return false;
+  }
+
+  /**
+       * closePausePopoutNoAnim() closes the pause popout without sliding animation (just hides it)
+       */
+  function closePausePopoutNoAnim() {
+        SliderPuzzleApp.pauseScreen = false;
+        $("#qsPaused").css("visibility", "hidden");
+        $("#pausePopout").addClass("closePausePopoutAnimClass");
+        $("#pausePopout").css("visibility", "hidden");
+        $("#pausePopout").css("visibility", "hidden");
+        $("#pausePopout").removeClass("pausePopoutAnimClass");
+        $("#pausePopout").removeClass("closePausePopoutAnimClass");
+        $("#puzzlePauseFullImage").css("visibility", "hidden");
+        return false;
+  }
+
+  /**
+       * leaderBoard() function is used to show the leaderboard screen
+       */
+  function leaderBoard() {
+        SliderPuzzleApp.buttonClickAudio.play();
+        $("#mainPage").css("visibility", "hidden");
+        $("#leaderboardPage").css("visibility", "visible");
+        $("#quickStartPage").css("visibility", "hidden");
+        if(SliderPuzzleApp.photosPageObj !== null && typeof SliderPuzzleApp.photosPageObj != "undefined" &&
+               SliderPuzzleApp.leaderBoardPageObj != null && typeof SliderPuzzleApp.leaderBoardPageObj != "undefined") {
+               SliderPuzzleApp.photosPageObj.setInvisible();;
+               SliderPuzzleApp.leaderBoardPageObj.updateScores();
+        }
+        return false;
+  }
+
+  /**
+       * closeLeaderBoard() function is used to hide/close the leaderboard screen
+       */
+  function closeLeaderBoard() {
+        $("#mainPage").css("visibility", "visible");
+        $("#leaderboardPage").css("visibility", "hidden");
+        $("#quickStartPage").css("visibility", "hidden");
+        if(SliderPuzzleApp.photosPageObj !== null && SliderPuzzleApp.photosPageObj !== undefined) {
+               SliderPuzzleApp.photosPageObj.setInvisible();
+        }
+        return false;
+  }
+
+  /**
+       * leaderBoardPause() function is used to show the leaderboard screen when it is requested from the pause
+       * popout. It hides the pause popout.
+       */
+  function leaderBoardPause() {
+        SliderPuzzleApp.buttonClickAudio.play();
+        closePausePopoutNoAnim();
+        $("#mainPage").css("visibility", "hidden");
+        $("#leaderboardPage").css("visibility", "visible");
+        $("#qsPause").css("visibility", "");
+        $("#qsInfo").css("visibility", "");
+        $("#quickStartPage").css("visibility", "hidden");
+
+        if(SliderPuzzleApp.photosPageObj !== null && typeof SliderPuzzleApp.photosPageObj != "undefined" &&
+               SliderPuzzleApp.leaderBoardPageObj != null && typeof SliderPuzzleApp.leaderBoardPageObj != "undefined") {
+               SliderPuzzleApp.photosPageObj.setInvisible();
+               SliderPuzzleApp.leaderBoardPageObj.updateScores();
+        }
+        return false;
+  }
+
+  /**
+       * photosPage() function is used to show the photos selection screen
+       */
+  function photosPage() {
+        SliderPuzzleApp.buttonClickAudio.play();
+        $("#mainPage").css("visibility", "hidden");
+        $("#leaderboardPage").css("visibility", "hidden");
+        $("#quickStartPage").css("visibility", "hidden");
+        $("#photosPage").css("visibility", "visible");
+        SliderPuzzleApp.photosPageObj.initializePage();
+        return false;
+  }
+
+  /**
+       * closePhotosPage() function is used to close/hide the photos selection screen
+       */
+  function closePhotosPage() {
+        $("#mainPage").css("visibility", "visible");
+        $("#leaderboardPage").css("visibility", "hidden");
+        $("#quickStartPage").css("visibility", "hidden");
+        if(SliderPuzzleApp.photosPageObj !== null && SliderPuzzleApp.photosPageObj !== undefined) {
+               SliderPuzzleApp.photosPageObj.setInvisible();
+        }
+        return false;
+  }
+
+  /**
+       * closePhotosPagePopup() function is used to close/hide the popup on the photos selection screen
+       */
+  function closePhotosPagePopup() {
+        if(SliderPuzzleApp.photosPageObj !== null && SliderPuzzleApp.photosPageObj !== undefined) {
+               SliderPuzzleApp.photosPageObj.closePopUp();
+        }
+  }
+
+  /**
+       * closeLeaderBoardPagePopup() function is used to close/hide the popup on the leaderboard screen
+       */
+  function closeLeaderBoardPagePopup() {
+        if(SliderPuzzleApp.leaderBoardPageObj !== null && typeof SliderPuzzleApp.leaderBoardPageObj != "undefined") {
+               SliderPuzzleApp.leaderBoardPageObj.closePopUp();
+        }
+  }
+
+  /**
+       * newPopout() function is used to show the right popout (change difficulty, change photo, restart game, etc)
+       */
+  function newPopout() {
+        //pause screen is opened
+        if( SliderPuzzleApp.pauseScreen || SliderPuzzleApp.startScreen )
+               return false;
+
+        SliderPuzzleApp.startScreen = true;
+
+        SliderPuzzleApp.buttonClickAudio.play();
+
+        $("#qsInfo").css("visibility", "hidden");
+        $("#newPopout").css("visibility", "visible");
+        $("#newPopout").addClass("newPopoutAnimClass");
+
+        if(typeof SliderPuzzleApp.sliderPuzzle != "undefined" && typeof SliderPuzzleApp.newPopoutObj != "undefined") {
+               SliderPuzzleApp.newPopoutObj.setDifficulty(SliderPuzzleApp.sliderPuzzle.level);
+        }
+
+
+        if(SliderPuzzleApp.sliderPuzzle != null && SliderPuzzleApp.sliderPuzzle !== undefined) {
+               $("#puzzlePauseFullImage").css("visibility", "visible");
+
+               //change moves and time; stop game timer;
+               SliderPuzzleApp.sliderPuzzle.stopGameTimerUpdateUi();
+        }
+
+        return false;
+  }
+
+  /**
+       * closePopout() function is used to close/hide the right popout (change difficulty, change photo, restart game, etc)
+       */
+  function closePopout() {
+        var eventName = "webkitTransitionEnd";
+        var onTransitionEnd = function ( e ){
+               $("#qsInfo").css("visibility", "visible");
+               $("#newPopout").css("visibility", "hidden");
+               $("#newPopout").removeClass("newPopoutAnimClass");
+               $("#newPopout").removeClass("closePopoutAnimClass");
+               $("#newPopout").unbind( eventName );
+               SliderPuzzleApp.startScreen = false;
+               }
+
+        SliderPuzzleApp.buttonClickAudio.play();
+
+        $("#newPopout").bind( eventName, onTransitionEnd );
+        $("#newPopout").addClass("closePopoutAnimClass");
+        $("#puzzlePauseFullImage").css("visibility", "hidden");
+
+        //resume game timer
+        SliderPuzzleApp.sliderPuzzle.startGameTimer();
+
+        return false;
+  }
+
+  /**
+       * closePopoutNoAnim() function is used to close/hide the right popout without the sliding animation
+       */
+  function closePopoutNoAnim() {
+               $("#qsInfo").css("visibility", "");
+               $("#newPopout").css("visibility", "hidden");
+               $("#newPopout").removeClass("newPopoutAnimClass");
+               SliderPuzzleApp.startScreen = false;
+        return false;
+  }
+
+  /**
+       * pausePopout() function is used to show the left popout (when game is paused)
+       */
+  function pausePopout() {
+        //new screen is opened
+        if( SliderPuzzleApp.startScreen || SliderPuzzleApp.pauseScreen )
+               return false;
+
+        SliderPuzzleApp.buttonClickAudio.play();
+
+        if( SliderPuzzleApp.pausePopoutObj != null && typeof SliderPuzzleApp.pausePopoutObj != "undefined" &&
+               SliderPuzzleApp.sliderPuzzle != null && typeof SliderPuzzleApp.sliderPuzzle.imageUrl != "undefined") {
+               SliderPuzzleApp.pausePopoutObj.updateScores( SliderPuzzleApp.level, SliderPuzzleApp.sliderPuzzle.imageUrl, SliderPuzzleApp.sliderPuzzle.moves, SliderPuzzleApp.sliderPuzzle.seconds);
+        }
+
+        SliderPuzzleApp.pauseScreen = true;
+        $("#puzzlePauseFullImage").attr("onClick", "SliderPuzzleApp.closePausePopout();");
+        $("#qsPausedS").attr("onClick", "SliderPuzzleApp.closePausePopout();");
+
+        $("#qsPause").css("visibility", "hidden");
+        $("#pausePopout").css("visibility", "visible");
+        $("#qsPaused").css("visibility", "visible");
+        $("#pausePopout").addClass("pausePopoutAnimClass");
+
+        if(SliderPuzzleApp.sliderPuzzle != null && SliderPuzzleApp.sliderPuzzle !== undefined) {
+               $("#puzzlePauseFullImage").css("visibility", "visible");
+
+               //change moves and time; stop game timer;
+               SliderPuzzleApp.sliderPuzzle.stopGameTimerUpdateUi();
+        }
+
+        return false;
+  }
+
+
+  /**
+       * closePausePopout() function is used to close/hide the left popout (when game is resumed)
+       */
+  function closePausePopout() {
+
+        $("#puzzlePauseFullImage").attr("onClick", null);
+        $("#qsPausedS").attr("onClick", null);
+
+        var eventName = "webkitTransitionEnd";
+        var onTransitionEnd = function ( e ){
+               $("#qsPause").css("visibility", "visible");
+               $("#pausePopout").css("visibility", "hidden");
+               $("#pausePopout").removeClass("pausePopoutAnimClass");
+               $("#pausePopout").removeClass("closePausePopoutAnimClass");
+               $("#pausePopout").unbind( eventName );
+               SliderPuzzleApp.pauseScreen = false;
+               }
+
+        SliderPuzzleApp.buttonClickAudio.play();
+
+        $("#qsPaused").css("visibility", "hidden");
+        $("#pausePopout").bind( eventName, onTransitionEnd );
+        $("#pausePopout").addClass("closePausePopoutAnimClass");
+        $("#puzzlePauseFullImage").css("visibility", "hidden");
+
+        //resume game timer
+        SliderPuzzleApp.sliderPuzzle.startGameTimer();
+
+        return false;
+  }
+
+  /**
+       * finishPopout() function is used to show the finish popout (when game is finished)
+       */
+  function finishPopout() {
+        $("#qsInfo").css("visibility", "hidden");
+        $("#qsPause").css("visibility", "hidden");
+        $("#finishScreenPopout").css("visibility", "visible");
+        $("#qsFinish").css("visibility", "visible");
+
+        if(SliderPuzzleApp.sliderPuzzle != null && SliderPuzzleApp.sliderPuzzle !== undefined) {
+               $("#puzzlePauseFullImage").css("visibility", "visible");
+               SliderPuzzleApp.sliderPuzzle.stopGameTimerUpdateUi();
+               SliderPuzzleApp.winAudio.play();
+        }
+
+        if( SliderPuzzleApp.finishPopoutObj != null && typeof SliderPuzzleApp.finishPopoutObj != "undefined" &&
+               SliderPuzzleApp.sliderPuzzle != null && typeof SliderPuzzleApp.sliderPuzzle.imageUrl != "undefined") {
+               SliderPuzzleApp.finishPopoutObj.updateScores( SliderPuzzleApp.level, SliderPuzzleApp.sliderPuzzle.imageUrl, SliderPuzzleApp.sliderPuzzle.moves, SliderPuzzleApp.sliderPuzzle.seconds);
+        }
+  }
+
+  /**
+       * closeFinishPopout() function is used to close/hide the finish popout
+       */
+  function closeFinishPopout() {
+        $("#qsInfo").css("visibility", "");
+        $("#qsPause").css("visibility", "");
+        $("#qsFinish").css("visibility", "");
+        $("#finishScreenPopout").css("visibility", "hidden");
+        if(SliderPuzzleApp.sliderPuzzle != null && SliderPuzzleApp.sliderPuzzle !== undefined) {
+               $("#puzzlePauseFullImage").css("visibility", "hidden");
+        }
+
+        return false;
+  }
+
+  /**
+       * mainPage() function is used to show the initial screen of the game
+       */
+  function mainPage() {
+        $("#mainPage").css("visibility", "visible");
+        $("#leaderboardPage").css("visibility", "hidden");
+        if(SliderPuzzleApp.photosPageObj !== null && SliderPuzzleApp.photosPageObj !== undefined) {
+               SliderPuzzleApp.photosPageObj.setInvisible();
+        }
+        $("#quickStartPage").css("visibility", "hidden");
+  }
+
+  /**
+       * saveResult() function is used to save the game result to the database
+       */
+  function saveResult() {
+        var finishUserInputElem = document.getElementById("usernameinput");
+        //user didn't input a username
+        if(finishUserInputElem.value == "") {
+               return true;
+        }
+        else {
+               SliderPuzzleApp.db.saveUserAndResult(finishUserInputElem.value,
+                       SliderPuzzleApp.sliderPuzzle.moves,
+                       SliderPuzzleApp.sliderPuzzle.seconds,
+                       SliderPuzzleApp.sliderPuzzle.level,
+                       SliderPuzzleApp.sliderPuzzle.imageUrl);
+
+               closeFinishPopout();
+               mainPage();
+
+               return false;
+        }
+  }
+  /**
+       * closeFinishNoSave() function is used to exit finished game wihtout saving results
+       */
+  function closeFinishNoSave() {
+               closeFinishPopout();
+               mainPage();
+  }
+
+  function resize() {
+               // main container size
+               var mwidth = $("#mainPage").width();
+               var mheight = $("#mainPage").height();
+
+               var offsetX = mwidth * 0.05;
+               var offsetY = mheight * 0.05;
+
+               $("#puzzleContainer").width(mwidth - offsetX * 2);
+               $("#puzzleContainer").height(mheight - offsetY * 2);
+               $("#puzzleContainer").css("-webkit-transform", "translate("+offsetX+"px, "+offsetY+"px)");
+
+               $("#puzzlePauseBackground").width(mwidth - offsetX * 2);
+               $("#puzzlePauseBackground").height(mheight - offsetY * 2);
+               $("#puzzlePauseBackground").css("-webkit-transform", "translate("+offsetX+"px, "+offsetY+"px)");
+
+               $("#puzzlePauseFullImage").width(mwidth - offsetX * 2);
+               $("#puzzlePauseFullImage").height(mheight - offsetY * 2);
+               $("#puzzlePauseFullImage").css("-webkit-transform", "translate("+offsetX+"px, "+offsetY+"px)");
+
+               $("#puzzleContainer").width(mwidth - offsetX * 2);
+               $("#puzzleContainer").height(mheight - offsetY * 2);
+       }
+
+       /**
+       * startGame() function is called when the game is started
+       * @param level difficulty level used to play the game (1 - easy, 2 - hard, 3 - brutal)
+       */
+       function startGame(level) {
+         if(SliderPuzzleApp.photosPageObj != null && SliderPuzzleApp.photosPageObj !== undefined) {
+                SliderPuzzleApp.quickStart();
+
+                //set photo credit if any
+                if(SliderPuzzleApp.photosPageObj.selectedPhotoCredit.length != 0) {
+                 SliderPuzzleApp.pausePopoutObj.localizePhotoCredit(SliderPuzzleApp.photosPageObj.selectedPhotoCredit);
+                }
+                else {
+                       $("#qsPpCreditStrS").html("");
+                }
+
+                SliderPuzzleApp.currentImgUrl = SliderPuzzleApp.photosPageObj.selectedPhotoUrl;
+                SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(level, SliderPuzzleApp.photosPageObj.selectedPhotoUrl, SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+         }
+         return false;
+       }
+
+       /**
+       * startGameLb() function is called when the game is started from the leaderboard screen (from the popup)
+       * @param level difficulty level used to play the game (1 - easy, 2 - hard, 3 - brutal)
+       */
+       function startGameLb() {
+         if(SliderPuzzleApp.leaderBoardPageObj != null && typeof SliderPuzzleApp.leaderBoardPageObj != "undefined") {
+                if(SliderPuzzleApp.leaderBoardPageObj.currentLevel != 0 && SliderPuzzleApp.leaderBoardPageObj.currentImage != "") {
+                 SliderPuzzleApp.quickStart();
+                 SliderPuzzleApp.currentImgUrl = SliderPuzzleApp.leaderBoardPageObj.currentImage;
+                 SliderPuzzleApp.level = SliderPuzzleApp.leaderBoardPageObj.currentLevel;
+                 SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(SliderPuzzleApp.leaderBoardPageObj.currentLevel, SliderPuzzleApp.leaderBoardPageObj.currentImage, SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+                }
+         }
+         return false;
+       }
+
+       /**
+       * startRandomGame() function is called when the game is started from the initial screen (quick game); random image is selected for the game
+       * The level of the game is either hard (which is default) or taken from the user preference (last played game level if any).
+       */
+       function startRandomGame() {
+        if(SliderPuzzleApp.photosPageObj != null && typeof SliderPuzzleApp.photosPageObj != "undefined") {
+               SliderPuzzleApp.quickStart();
+               var photosIndex = Math.floor(Math.random()*19);
+
+                if(SliderPuzzleApp.photosPageObj.photos[photosIndex].credit.length != 0) {
+                  SliderPuzzleApp.pausePopoutObj.localizePhotoCredit(SliderPuzzleApp.photosPageObj.photos[photosIndex].credit);
+                }
+                else {
+                       $("#qsPpCreditStrS").html("");
+                }
+
+               SliderPuzzleApp.currentImgUrl = SliderPuzzleApp.photosPageObj.photos[photosIndex].imgUrl;
+               SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(SliderPuzzleApp.level, SliderPuzzleApp.photosPageObj.photos[photosIndex].imgUrl, SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+               return false;
+        }
+       }
+
+  /**
+       * initNewPopout() function creates new object of the NewPopout class
+       */
+  function initNewPopout() {
+        SliderPuzzleApp.newPopoutObj = new NewPopout(SliderPuzzleApp.localizerObj);
+  }
+
+  /**
+       * playAgain() function is called when "Play again" button is pressed on the right popout
+       */
+  function playAgain() {
+        if(SliderPuzzleApp.newPopoutObj != null && SliderPuzzleApp.newPopoutObj !== undefined ) {
+               closePopout();
+               SliderPuzzleApp.quickStart();
+               //save preferred difficulty
+               SliderPuzzleApp.level = SliderPuzzleApp.newPopoutObj.difficulty;
+               SliderPuzzleApp.saveLevel();
+               if(SliderPuzzleApp.currentImgUrl != "") {
+                 SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(SliderPuzzleApp.newPopoutObj.difficulty, SliderPuzzleApp.currentImgUrl, SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+               }
+               else {
+                 SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(SliderPuzzleApp.newPopoutObj.difficulty, "images/puzzle_photos/Ian_Sane-zoo-lion.jpg", SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+               }
+               return false;
+        }
+        else {
+               SliderPuzzleApp.quickStart();
+               if(SliderPuzzleApp.currentImgUrl != "") {
+                 SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(SliderPuzzleApp.newPopoutObj.difficulty, SliderPuzzleApp.currentImgUrl, SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+               }
+               else {
+                 SliderPuzzleApp.sliderPuzzle = new SliderPuzzle(SliderPuzzleApp.level, "images/puzzle_photos/Ian_Sane-zoo-lion.jpg", SliderPuzzleApp.finishPopout, SliderPuzzleApp.localizerObj);
+               }
+               return false;
+        }
+  }
+
+  /**
+       * playAgain() function is called when "New photo" button is pressed on the right popout
+       */
+  function newPhoto() {
+        closePopoutNoAnim();
+        $("#mainPage").css("visibility", "hidden");
+        $("#leaderboardPage").css("visibility", "hidden");
+        $("#quickStartPage").css("visibility", "hidden");
+        $("#puzzlePauseFullImage").css("visibility", "hidden");
+        $("#qsPause").css("visibility", "");
+        $("#qsInfo").css("visibility", "");
+        photosPage();
+  }
+
+  /**
+       * createDB() function creates new object of the DBManager class
+       */
+  function createDB() {
+        SliderPuzzleApp.db = new DBManager();
+  }
+
+  /**
+       * loadLevel() function loads the value of the level property from the local storage.
+       */
+  function loadLevel() {
+        var level = localStorage.getItem("level");
+        if((typeof level != "undefined") &&
+               (level != null) && (level != "NaN")) {
+               return parseInt(level);
+        }
+        else {
+               return 2;
+        }
+  }
+
+  function saveLevel() {
+        localStorage.setItem("level",SliderPuzzleApp.level);
+  }
+
+  function localize() {
+        if(typeof SliderPuzzleApp.localizerObj != "undefined" && !SliderPuzzleApp.localizerObj.noLocalization) {
+               $("#mpQuickStartS").html(SliderPuzzleApp.localizerObj.getTranslation("open_quickstart"));
+               $("#mpLeaderBoardS").html(SliderPuzzleApp.localizerObj.getTranslation("open_leaderboard"));
+               $("#mpChoosePhotoS").html(SliderPuzzleApp.localizerObj.getTranslation("open_choosephoto"));
+        }
+  }
+
+  // void main()
+  function init() {
+        SliderPuzzleApp.startScreen = false;
+        SliderPuzzleApp.pauseScreen = false;
+        SliderPuzzleApp.localizerObj = new Localizer();
+        SliderPuzzleApp.quickStart = quickStart;
+        SliderPuzzleApp.leaderBoard = leaderBoard;
+        SliderPuzzleApp.leaderBoardPause = leaderBoardPause;
+        SliderPuzzleApp.closeLeaderBoard = closeLeaderBoard;
+        SliderPuzzleApp.photosPage = photosPage;
+        SliderPuzzleApp.closePhotosPage = closePhotosPage;
+        SliderPuzzleApp.newPopout = newPopout;
+        SliderPuzzleApp.closePopout = closePopout;
+        SliderPuzzleApp.pausePopout = pausePopout;
+        SliderPuzzleApp.closePausePopout = closePausePopout;
+        SliderPuzzleApp.closePhotosPagePopup = closePhotosPagePopup;
+        SliderPuzzleApp.closeLeaderBoardPagePopup = closeLeaderBoardPagePopup;
+        SliderPuzzleApp.startGame = startGame;
+        SliderPuzzleApp.startGameLb = startGameLb;
+        SliderPuzzleApp.startRandomGame = startRandomGame;
+        SliderPuzzleApp.finishPopout = finishPopout;
+        SliderPuzzleApp.closeFinishPopout = closeFinishPopout;
+        SliderPuzzleApp.saveResult = saveResult;
+        SliderPuzzleApp.closeFinishNoSave = closeFinishNoSave;
+        SliderPuzzleApp.playAgain = playAgain;
+        SliderPuzzleApp.newPhoto = newPhoto;
+        SliderPuzzleApp.createDB = createDB;
+        SliderPuzzleApp.saveLevel = saveLevel;
+        SliderPuzzleApp.loadLevel = loadLevel;
+        SliderPuzzleApp.db = null;
+        SliderPuzzleApp.level = SliderPuzzleApp.loadLevel();
+         SliderPuzzleApp.helpClicked = helpClicked;
+         SliderPuzzleApp.closeHelp = closeHelp;
+
+        SliderPuzzleApp.currentImgUrl = "";
+
+        resize();
+        initNewPopout();
+        createDB();
+
+        SliderPuzzleApp.saveLevel();
+        SliderPuzzleApp.localize = localize;
+        SliderPuzzleApp.localize();
+
+        SliderPuzzleApp.pausePopoutObj = new PausePopout(SliderPuzzleApp.db, SliderPuzzleApp.localizerObj);
+        SliderPuzzleApp.leaderBoardPageObj = new LeaderBoardPage(SliderPuzzleApp.db, SliderPuzzleApp.localizerObj);
+        SliderPuzzleApp.finishPopoutObj = new FinishPopout(SliderPuzzleApp.db, SliderPuzzleApp.localizerObj);
+        SliderPuzzleApp.photosPageObj = new PhotosPage(SliderPuzzleApp.localizerObj);
+        $(window).bind('resize', resize);
+  }
+
+  function initAudio() {
+               SliderPuzzleApp.cheerAudio = new Audio();
+               SliderPuzzleApp.cheerAudio.src = "audio/cheer.ogg";
+               SliderPuzzleApp.introAudio = new Audio();
+               SliderPuzzleApp.introAudio.src = "audio/Intro.ogg";
+               SliderPuzzleApp.buttonClickStartAudio = new Audio();
+               SliderPuzzleApp.buttonClickStartAudio.src = "audio/ButtonClick_01_Start.ogg";
+               SliderPuzzleApp.buttonClickAudio = new Audio();
+               SliderPuzzleApp.buttonClickAudio.src = "audio/ButtonClick_02_Settings.ogg";
+               SliderPuzzleApp.winAudio = new Audio();
+               SliderPuzzleApp.winAudio.src = "audio/Win.ogg";
+
+               SliderPuzzleApp.introAudio.play();
+  }
+
+  window.addEventListener('load', function () {
+        license_init("license", "mainPage");
+        initAudio();
+        init();
+  });
+
+  function helpClicked(){
+    var dialog = document.getElementById("helpDialog").style.opacity= 1;
+    document.getElementById("helpDialog").style.display="inline";
+    document.getElementById("smokeScreen").style.display="inline";
+  }
+
+  function closeHelp()
+  {
+    var dialog = document.getElementById("helpDialog").style.opacity= 0;
+    document.getElementById("helpDialog").style.display="none";
+    document.getElementById("smokeScreen").style.display="none";
+  }
+
+})();
diff --git a/js/newpopout.js b/js/newpopout.js
new file mode 100755 (executable)
index 0000000..8ef8763
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * NewPopout class takes care of the new game popout settings and interaction
+ * constructor parameters:
+ * @param aLocalizer reference to a localizer object
+ */
+function NewPopout(aLocalizer) {
+  var self = this;
+  self.difficulty = 2;
+
+  self.localizer = aLocalizer;
+
+  self.localize = function() {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               $("#qsNpTitleS").html(self.localizer.getTranslation("new_choose_level"));
+               $("#qsPopupScoresTableCellEasyS").html(self.localizer.getTranslation("all_easy"));
+               $("#qsPopupScoresTableCellHardS").html(self.localizer.getTranslation("all_hard"));
+               $("#qsPopupScoresTableCellBrutalS").html(self.localizer.getTranslation("all_brutal"));
+               $("#qsNpPlayAgainS").html(self.localizer.getTranslation("new_play_again"));
+               $("#qsNpNewPhotoS").html(self.localizer.getTranslation("new_new_photo"));
+        }
+  }
+  self.localize();
+
+  self.initAudio = function() {
+        self.clickAudio = new Audio();
+        self.clickAudio.src = "audio/ButtonClick_02_Settings.ogg";
+  }
+  self.initAudio();
+
+  self.setDifficulty = function(aDifficulty) {
+        if(aDifficulty == 1) {
+               $("#qsPopupScoresTableCellEasy").removeClass("qsPopupScoresTableCellEasyNotSelected");
+               $("#qsPopupScoresTableCellEasy").addClass("qsPopupScoresTableCellEasySelected");
+               $("#qsPopupScoresTableCellHard").removeClass("qsPopupScoresTableCellHardSelected");
+               $("#qsPopupScoresTableCellHard").addClass("qsPopupScoresTableCellHardNotSelected");
+               $("#qsPopupScoresTableCellBrutal").removeClass("qsPopupScoresTableCellBrutalSelected");
+               $("#qsPopupScoresTableCellBrutal").addClass("qsPopupScoresTableCellBrutalNotSelected");
+
+               $("#qsDifficultiesTableImgEasy").attr("src","images/new-screen/pointer-right_active.png");
+               $("#qsDifficultiesTableImgHard").attr("src","images/new-screen/pointer-right-new.png");
+               $("#qsDifficultiesTableImgBrutal").attr("src","images/new-screen/pointer-right-new.png");
+
+
+               self.difficulty = 1;
+        }
+        else if(aDifficulty == 2) {
+               $("#qsPopupScoresTableCellEasy").removeClass("qsPopupScoresTableCellEasySelected");
+               $("#qsPopupScoresTableCellEasy").addClass("qsPopupScoresTableCellEasyNotSelected");
+               $("#qsPopupScoresTableCellHard").removeClass("qsPopupScoresTableCellHardNotSelected");
+               $("#qsPopupScoresTableCellHard").addClass("qsPopupScoresTableCellHardSelected");
+               $("#qsPopupScoresTableCellBrutal").removeClass("qsPopupScoresTableCellBrutalSelected");
+               $("#qsPopupScoresTableCellBrutal").addClass("qsPopupScoresTableCellBrutalNotSelected");
+
+               $("#qsDifficultiesTableImgEasy").attr("src","images/new-screen/pointer-right-new.png");
+               $("#qsDifficultiesTableImgHard").attr("src","images/new-screen/pointer-right_active.png");
+               $("#qsDifficultiesTableImgBrutal").attr("src","images/new-screen/pointer-right-new.png");
+
+               self.difficulty = 2;
+        }
+        else {
+               $("#qsPopupScoresTableCellEasy").removeClass("qsPopupScoresTableCellEasySelected");
+               $("#qsPopupScoresTableCellEasy").addClass("qsPopupScoresTableCellEasyNotSelected");
+               $("#qsPopupScoresTableCellHard").removeClass("qsPopupScoresTableCellHardSelected");
+               $("#qsPopupScoresTableCellHard").addClass("qsPopupScoresTableCellHardNotSelected");
+               $("#qsPopupScoresTableCellBrutal").removeClass("qsPopupScoresTableCellBrutalNotSelected");
+               $("#qsPopupScoresTableCellBrutal").addClass("qsPopupScoresTableCellBrutalSelected");
+
+               $("#qsDifficultiesTableImgEasy").attr("src","images/new-screen/pointer-right-new.png");
+               $("#qsDifficultiesTableImgHard").attr("src","images/new-screen/pointer-right-new.png");
+               $("#qsDifficultiesTableImgBrutal").attr("src","images/new-screen/pointer-right_active.png");
+
+               self.difficulty = 3;
+        }
+  }
+
+  self.switchDifficulty = function(aDifficulty) {
+        self.clickAudio.play();
+        self.setDifficulty(aDifficulty);
+  }
+}
diff --git a/js/pausebackground.js b/js/pausebackground.js
new file mode 100755 (executable)
index 0000000..b1d5085
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * PauseBackground class takes care of the active game background creation ("pause" tiles)
+ * constructor parameters:
+ * @param level integer game level (1 - easy; 2 - hard; 3 - brutal)
+ * @param aLocalizer reference to a localizer object
+ */
+function PauseBackground( level, aLocalizer )
+{
+  var self = this;
+
+  self.rows = level * 2;
+  self.columns = level * 2;
+
+  self.level = level;
+  self.img = new Image();
+  self.parent = document.getElementById("puzzlePauseBackground");
+  self.width = $("#puzzlePauseBackground").width();
+  self.height = $("#puzzlePauseBackground").height();
+  self.imageUrl = "images/photo-screen/popup-top-shadow.png";
+
+  self.localizer = aLocalizer;
+  self.localizedString = "";
+
+  self.localize = function() {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               self.localizedString = self.localizer.getTranslation("all_pause");
+        }
+        else {
+               self.localizedString = "PAUSE";
+        }
+  }
+  self.localize();
+
+
+  self.release = function() {
+               while (self.parent.children.length > 0)
+                 self.parent.removeChild(self.parent.lastChild);
+               self.tiles = new Array();
+       }
+
+  self.tiles = null;
+  self.release();
+
+  for (var r = 0; r < self.rows; r++) {
+               self.tiles.push(new Array());
+
+               for (var c = 0; c < self.columns; c++) {
+
+                       var o = new Object();
+                       o.tile = document.createElement('div');
+                       $(o.tile).css('position', 'absolute');
+
+                       o.canvas = document.createElement('canvas');
+                       o.context = o.canvas.getContext('2d');
+
+                       o.size = function(width, height) {
+                               o.canvas.setAttribute('width', width);
+                               o.canvas.setAttribute('height', height);
+                       }
+                       o.size(self.width/self.columns, self.height/self.rows);
+
+                       o.tile.container = o;
+                       o.tile.dragging = false;
+                       o.tile.appendChild(o.canvas);
+
+                       o.parent = self.parent;
+                       o.move = function (row, column) {
+                               this.row = row;
+                               this.column = column;
+
+                               $(this.tile).css('left', this.column * this.canvas.width);
+                               $(this.tile).css('top', this.row * this.canvas.height);
+                       }
+                       o.move(r, c);
+
+                       self.parent.insertBefore(o.tile, self.parent.firstChild);
+                       self.tiles[r].push(o);
+               }
+       }
+
+       self.drawBg = function(aHover) {
+          var scaledWidth, scaledHeight;
+               scaledWidth = self.width;
+               scaledHeight = self.height;
+
+               for (var r = 0; r < self.tiles.length; r++) {
+                       for (var c = 0; c < self.tiles[r].length; c++) {
+                               var tile = self.tiles[r][c];
+                               tile.context.drawImage(self.img, 0, 0, tile.canvas.width, tile.canvas.height);
+                               if(!aHover)
+                                 tile.context.fillStyle = "#e1e1e1";
+                               else
+                                 tile.context.fillStyle = "#00aeef";
+                               tile.context.font         = "37px MolotCustom";
+                               tile.context.textAlign = "center";
+                               tile.context.textBaseline = "middle";
+                               tile.context.fillText(self.localizedString, tile.canvas.width/2, tile.canvas.height/2);
+                       }
+               }
+       }
+
+       self.img.onload = function() {
+          self.drawBg(false);
+       }
+
+       self.img.src = self.imageUrl;
+}
diff --git a/js/pausepopout.js b/js/pausepopout.js
new file mode 100755 (executable)
index 0000000..bd18713
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * PausePopout class takes care of the pause popout creation, setings and interaction
+ * constructor parameters:
+ * @param aDbManager reference to a database manager object
+ * @param aLocalizer reference to a localizer object
+ */
+function PausePopout(aDbManager, aLocalizer) {
+
+  var self = this;
+  self.dbManager = aDbManager;
+  self.localizer = aLocalizer;
+
+  self.RECORDS_LIMIT = 3;
+  self._currMoves;
+  self._currSeconds;
+  self._scoreMovesArr = [];
+  self._scoreSecondsArr = [];
+  self._currMovesPlaced = false;
+  self._currSecondsPlaced = false;
+
+  /*
+       * PausePopout.localize() function is used to localize all texts on the PausePopout
+       */
+  self.localize = function() {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               $("#qsPpMovesTitleS").html(self.localizer.getTranslation("all_moves")+" ");
+               $("#qsPpTimeTitleS").html(self.localizer.getTranslation("all_time")+" ");
+               $("#qsPausedS").html(self.localizer.getTranslation("all_paused"));
+               $("#qsPpLeaderBoardS").html(self.localizer.getTranslation("pause_leaderboard"));
+        }
+  }
+  self.localize();
+
+  /*
+       * PausePopout.localizePhotoCredit() function is used to localize the photo credit string
+       */
+  self.localizePhotoCredit = function(aString) {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               $("#qsPpCreditStrS").html(self.localizer.getTranslation("pause_photo_credit")+" "+aString+", Flickr");
+        }
+        else {
+               $("#qsPpCreditStrS").html("Photo Credit: "+aString+", Flickr");
+        }
+  }
+
+
+  /*
+       * PausePopout.updateScoresMovesCallBack() is a callback that gets invoked after data is retrieved from the database
+       */
+  self.updateScoresMovesCallBack = function(aDataset) {
+        if(typeof aDataset != "undefined") {
+               self.updateScoresUI(aDataset, true);
+        }
+  }
+
+  /*
+       * PausePopout.updateScoresTimeCallBack() is a callback that gets invoked after data is retrieved from the database
+       */
+  self.updateScoresTimeCallBack = function(aDataset) {
+        if(typeof aDataset != "undefined") {
+               self.updateScoresUI(aDataset, false);
+        }
+  }
+
+  /*
+       * PausePopout.formatString() is used to format an output string (seconds to time, e.g. 1 to 00:01)
+       */
+  self.formatString = function(aMoves, aString) {
+        if(aMoves) {
+               return aString;
+        }
+        else {
+               return SpUtil.secondsToTime(aString);
+        }
+  }
+
+   /*
+       * PausePopout.updatePpTableCell() is used to update Pausepopout elements with new data (used as a helper function by PausePopout.updateScoresUI())
+       */
+  self.updatePpTableCell = function(aMoves, aCellInfo, aElement) {
+        if(aElement == null || aCellInfo == null)
+               return;
+
+        aElement.innerHTML = aCellInfo["username"]+": "+self.formatString(aMoves, aCellInfo["score"]);
+
+        if(aCellInfo["highlight"] == true) {
+               aElement.style.color = "#2bb9ee";
+        }
+        else {
+               aElement.style.color = "#000000";
+        }
+  }
+
+  /*
+       * PausePopout.updateScoresUI() is used to update Pausepopout UI with a new data from the database
+       */
+  self.updateScoresUI = function(aDataset, aMoves) {
+        var scoreArr = [];
+        var currPlaced = false;
+        var el1 = null;
+        var el2 = null;
+        var el3 = null;
+        var currIndex = 0;
+
+        if( aMoves ) {
+               el1 = document.getElementById("qsPpMoves1S");
+               el2 = document.getElementById("qsPpMoves2S");
+               el3 = document.getElementById("qsPpMoves3S");
+               currIndex = self._currMoves;
+        }
+        else {
+               el1 = document.getElementById("qsPpTime1S");
+               el2 = document.getElementById("qsPpTime2S");
+               el3 = document.getElementById("qsPpTime3S");
+               currIndex = self._currSeconds;
+        }
+
+        for(var i = 0; i < aDataset.length; i++) {
+               var score = 0;
+               if(aMoves) {
+                 score = aDataset.item(i)["moves"];
+               }
+               else {
+                 score = aDataset.item(i)["time"];
+               }
+
+               if((typeof aDataset.item(i)["username"] != "undefined") &&
+                 (typeof score != "undefined")) {
+
+                 if((currIndex < score) && !currPlaced) {
+                        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization)
+                               scoreArr.push({"username": self.localizer.getTranslation("pause_your_game"), "score": currIndex, "highlight": true});
+                        else
+                               scoreArr.push({"username": "Your Game", "score": currIndex, "highlight": true});
+                        currPlaced = true;
+                 }
+                scoreArr.push({"username": aDataset.item(i)["username"], "score": score, "highlight": false});
+               }
+        }
+
+        if(aDataset.length < self.RECORDS_LIMIT && !currPlaced) {
+               if(typeof self.localizer != "undefined" && !self.localizer.noLocalization)
+                 scoreArr.push({"username": self.localizer.getTranslation("pause_your_game"), "score": currIndex, "highlight": true});
+               else
+                 scoreArr.push({"username": "Your Game", "score": currIndex, "highlight": true});
+        }
+
+        if(scoreArr.length > 0) {
+               self.updatePpTableCell( aMoves, scoreArr[0], el1 );
+        }
+        else {
+               el1.innerHTML = "-----";
+        }
+
+        if(scoreArr.length > 1) {
+               self.updatePpTableCell( aMoves, scoreArr[1], el2 );
+        }
+        else {
+               el2.innerHTML = "-----";
+        }
+
+        if(scoreArr.length > 2) {
+               self.updatePpTableCell( aMoves, scoreArr[2], el3 );
+        }
+        else {
+               el3.innerHTML = "-----";
+        }
+  }
+
+  /**
+       * PausePopout.updateScores is used to get new scores data from the database that is needed to update Pausepopout UI
+       */
+  self.updateScores = function(level, imgUrl, currMoves, currSeconds) {
+        self._currMoves = currMoves;
+        self._currSeconds = currSeconds;
+        self.dbManager.lessMovesResults(self.updateScoresMovesCallBack, self.RECORDS_LIMIT, level, imgUrl);
+        self.dbManager.fastestResults(self.updateScoresTimeCallBack, self.RECORDS_LIMIT, level, imgUrl);
+  }
+}
diff --git a/js/photospage.js b/js/photospage.js
new file mode 100755 (executable)
index 0000000..78170aa
--- /dev/null
@@ -0,0 +1,303 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * Photo class represents a photo in the game
+ */
+function Photo( portrait, imgUrl, credit ) {
+  var self = this;
+  self.portrait = portrait;
+  self.imgUrl = imgUrl;
+  self.credit = credit;
+}
+var thumbnailScroll;
+function loaded() {
+    thumbnailScroll = new iScroll('photosWrapper', { hScrollbar: false, vScrollbar: false });
+}
+document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false)
+/**
+ * PhotosPage class takes care of the LeaderBoardPage settings and interaction
+ * constructor parameters:
+ * @param aLocalizer reference to a localizer object
+ */
+function PhotosPage( aLocalizer ) {
+
+  var LANDSCAPE_WIDTH = 173;
+  var LANDSCAPE_HEIGHT = 153;
+  var PORTRAIT_WIDTH = 120;
+  var PORTRAIT_HEIGHT = 173;
+  var PHOTOS_PADDING = 15;
+  var PHOTO_PADDING = 5;
+  var PHOTOS_MAXCOLS = 5;
+
+  var self = this;
+
+  // true - from game; false - from pc.
+  self.view = true;
+
+  self.popUpShown = false;
+  self.photos = [];
+  //fixed list. TODO: implement dynamic photos loading from the images/puzzle_photos directory
+  self.photos.push(new Photo(false, "images/puzzle_photos/mccun934-pumpkin-patch.jpg", "Mike McCune"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/StuSeeger-elephant-mother-child.jpg", "Stuart Seeger"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/ktylerconk-water-lily.jpg", "Kathleen Tyler Conklin"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Ian_Sane-zoo-lion.jpg", "Ian Sane"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Ian_Sane-railroad-bridge.jpg", "Ian Sane"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Ian_Sane-forest-waterfall.jpg", "Ian Sane"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Ian_Sane-brick-wall.jpg", "Ian Sane"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/mccun934-leaf-water.jpg", "Mike McCune"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Ian_Sane-red-wall.jpg", "Ian Sane"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/kennymatic-rocky-beach.jpg", "Kenny Louie"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Ralphman-train-station.jpg", "Ralphman"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/JonoMueller-dirty-truck.jpg", "Jonathan Mueller"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Mason_Masteka-purple-carrots.jpg", "Mason Masteka"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/StuSeeger-fair-ride.jpg", "Stuart Seeger"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/pdxjeff-ferris-wheel.jpg", "Jeff Muceus"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Sideonecincy-bald-eagle.jpg", "Chris Miller"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Thomas_Good-zoo-tiger.jpg", "Tom Good"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/sam_churchill-daylight-train.jpg", "Sam Churchill"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg", "Ricardo Mangual"));
+  self.photos.push(new Photo(false, "images/puzzle_photos/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg", "Prabhu B Doss"));
+
+  self.thumbs = [];
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/mccun934-pumpkin-patch.jpg", "Mike McCune"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/StuSeeger-elephant-mother-child.jpg", "Stuart Seeger"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/ktylerconk-water-lily.jpg", "Kathleen Tyler Conklin"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Ian_Sane-zoo-lion.jpg", "Ian Sane"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Ian_Sane-railroad-bridge.jpg", "Ian Sane"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Ian_Sane-forest-waterfall.jpg", "Ian Sane"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Ian_Sane-brick-wall.jpg", "Ian Sane"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/mccun934-leaf-water.jpg", "Mike McCune"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Ian_Sane-red-wall.jpg", "Ian Sane"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/kennymatic-rocky-beach.jpg", "Kenny Louie"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Ralphman-train-station.jpg", "Ralphman"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/JonoMueller-dirty-truck.jpg", "Jonathan Mueller"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Mason_Masteka-purple-carrots.jpg", "Mason Masteka"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/StuSeeger-fair-ride.jpg", "Stuart Seeger"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/pdxjeff-ferris-wheel.jpg", "Jeff Muceus"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Sideonecincy-bald-eagle.jpg", "Chris Miller"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Thomas_Good-zoo-tiger.jpg", "Tom Good"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/sam_churchill-daylight-train.jpg", "Sam Churchill"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg", "Ricardo Mangual"));
+  self.thumbs.push(new Photo(false, "images/puzzle_photos_thumbs/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg", "Prabhu B Doss"));
+
+  self.tiles = [];
+  self.tilesCounter = 0;
+
+  self.selectedPhotoUrl = "";
+  self.selectedPhotoCredit = "";
+
+  self.localizer = aLocalizer;
+
+  /*
+       * PhotosPage.localize() function is used to localize all texts on the PhotosPage
+       */
+  self.localize = function() {
+        if(typeof self.localizer != "undefined" && !self.localizer.noLocalization) {
+               $("#ppHeader").html(self.localizer.getTranslation("photos_photos")+":");
+               $("#ppGameS").html(self.localizer.getTranslation("photos_fromgame"));
+               $("#ppPCS").html(self.localizer.getTranslation("photos_frompc"));
+
+               //popout
+               $("#ppPopUpPlayButtonS").html(self.localizer.getTranslation("all_play"));
+        }
+  }
+  self.localize();
+
+  /**
+       * PhotosPage.initAudio() function is used to initialize all the audio files needed for the PhotosPage
+       */
+  self.initAudio = function() {
+        self.clickAudio = new Audio();
+        self.clickAudio.src = "audio/ButtonClick_02_Settings.ogg";
+  }
+  self.initAudio();
+
+  /**
+       * PhotosPage.switchView() function is used to switch between 2 views (photos that come with a game and user's photos from the PC)
+       */
+  self.switchView = function() {
+
+        if(!self.view) {
+               $("#ppGame").css("background-color", "#252525");
+               $("#ppPC").css("background-color", "#b7b7b7");
+        }
+        else {
+               $("#ppPC").css("background-color", "#252525");
+               $("#ppGame").css("background-color", "#b7b7b7");
+        }
+        self.view = !self.view
+  }
+
+  /**
+       * PhotosPage.createScrollBar() function creates a scrollbar that will be used to scroll the photo gallery
+       * if it does not fit to the screen
+       */
+  self.createScrollBar = function() {
+        self.scroller = new SpScroller(document.getElementById("ppContent"), 1024, 540);
+        self.scrollbar = new SpScrollBar(document.getElementById("ppScrollbarContainer"), self.scroller, false);
+  }
+
+
+  /**
+       * PhotosPage.createDivs() function creates divs and canvases for each photo
+       */
+  self.createDivs = function() {
+
+        //photos container
+        self.container = document.getElementById("ppContent");
+
+        for(var i = 0, j = 0; i < self.photos.length; i++) {
+                 var o = new Object();
+                 o.tile = document.createElement('div');
+                 $(o.tile).css('position', 'absolute');
+                 $(o.tile).css('padding', PHOTO_PADDING+'px');
+                 $(o.tile).css('width', 'auto');
+                 $(o.tile).css('box-shadow', '0px 0px 4px #252525');
+
+                 o.canvas = document.createElement('canvas');
+                 o.context = o.canvas.getContext('2d');
+
+                 o.size = function(width, height) {
+                               o.canvas.setAttribute('width', width);
+                               o.canvas.setAttribute('height', height);
+                 }
+
+                 if(self.photos[i].portrait)
+                 {
+                        o.size(PORTRAIT_WIDTH+"px", PORTRAIT_HEIGHT+"px");
+                        $(o.tile).css('height', PORTRAIT_HEIGHT+"px");
+                 }
+                 else
+                 {
+                        o.size(LANDSCAPE_WIDTH+"px", LANDSCAPE_HEIGHT+"px");
+                        $(o.tile).css('height', LANDSCAPE_HEIGHT+"px");
+                 }
+
+                 if(i % PHOTOS_MAXCOLS == 0 && i != 0)
+            j++;
+
+                 o.tile.appendChild(o.canvas);
+
+                 $(o.tile).css("left", (i%PHOTOS_MAXCOLS)*LANDSCAPE_WIDTH + (i%PHOTOS_MAXCOLS + 1)*PHOTOS_PADDING);
+                 $(o.tile).css("top", j*PORTRAIT_HEIGHT + (j + 1)*PHOTOS_PADDING);
+
+                 $(o.tile).bind("click", { imgPath: self.photos[i].imgUrl, isPortrait: self.photos[i].portrait, creditAuth: self.photos[i].credit },  self.showPopUp );
+
+                 self.container.appendChild(o.tile);
+                 self.tiles.push(o);
+                 self.thumbs[i].image = new Image(o.canvas.width, o.canvas.height);
+        }
+
+        $(self.container).height(Math.floor(self.photos.length / PHOTOS_MAXCOLS) * PORTRAIT_HEIGHT + (Math.floor(self.photos.length / PHOTOS_MAXCOLS) + 1) * PHOTOS_PADDING);
+  }
+
+    /**
+       * PhotosPage.drawImage() function draws a photo on a corresponding canvas. It was made recursive deliberately so that images are
+       * drawn one by one in a sequence. In this case the UI is not getting stuck.
+    */
+  self.drawImage = function() {
+      if (self.thumbs[self.tilesCounter] !== undefined) {
+          self.thumbs[self.tilesCounter].image.onload = function () {
+                 self.thumbs[self.tilesCounter].image.style.width = self.tiles[self.tilesCounter].canvas.width;
+                 self.thumbs[self.tilesCounter].image.style.height = self.tiles[self.tilesCounter].canvas.height;
+                 self.tiles[self.tilesCounter].context.drawImage(self.thumbs[self.tilesCounter].image, 0, 0, self.tiles[self.tilesCounter].canvas.width, self.tiles[self.tilesCounter].canvas.height);
+                 self.thumbs[self.tilesCounter].image = null;
+                 self.tilesCounter++;
+                 self.drawImage();
+               }
+          self.thumbs[self.tilesCounter].image.src = self.thumbs[self.tilesCounter].imgUrl;
+
+        }
+        //loading of images has finished
+        else {
+               $("#ppLoading").css("visibility", "hidden");
+               $("#ppBlockInteraction").css("visibility", "hidden");
+               if (thumbnailScroll)
+                   thumbnailScroll.destroy();
+
+               thumbnailScroll = null;
+               thumbnailScroll = new iScroll('photosWrapper', { hScrollbar: false, vScrollbar: false });
+               setTimeout(function () {
+                   console.log("photosWrapper - refresh")
+                   thumbnailScroll.refresh();
+               }, 1000);
+        }
+  }
+
+    /**
+       * PhotosPage.drawImages() invokes a process of drawing each photo on the corresponding canvas.
+       */
+  self.drawImages = function () {
+        //loading of images has started
+        $("#ppLoading").css("visibility", "visible");
+        $("#ppBlockInteraction").css("visibility", "visible");
+        self.tilesCounter = 0;
+        self.drawImage();
+
+  }
+
+  /**
+       * PhotosPage.showPopUp() callback gets invoked when any of the photos is clicked.
+       */
+  self.showPopUp = function(event) {
+        self.selectedPhotoUrl = event.data.imgPath;
+        self.selectedPhotoCredit = event.data.creditAuth;
+
+        if(!event.data.isPortrait) {
+               $("#ppPopUp").css("width", "400px");
+               $("#ppPopUp").css("height", "420px");
+               $("#ppPopUpCloseButton").css("top", "-22px");
+               $("#ppPopUpCloseButton").css("left", "385px");
+
+               //image settings
+               $("#ppPopUpImage").css("top", "10px");
+               $("#ppPopUpImage").css("left", "10px");
+               $("#ppPopUpImage").css("width", "380px");
+               $("#ppPopUpImage").css("height", "300px");
+               $("#ppPopUpImage").css("background-image", "url('"+ event.data.imgPath +"')");
+
+               $("#ppPopUpPlayButton").css("top", "10px");
+               var playBtnLeft = ($("#ppPopUp").width() - $("#ppPopUpPlayButton").width()) /2;
+               $("#ppPopUpPlayButton").css("left", playBtnLeft+"px");
+               var playBtnTop = $("#ppPopUpImage").height() + $("#ppPopUpImage").position().top + 10;
+               $("#ppPopUpPlayButton").css("top", playBtnTop+"px");
+
+        }
+        $("#ppPopUpBase").css("visibility", "visible");
+        self.popUpShown = true;
+  }
+
+  /**
+       * PhotosPage.closePopUp() function closes the popup
+       */
+  self.closePopUp = function(event) {
+        $("#ppPopUpBase").css("visibility", "hidden");
+        self.popUpShown = false;
+  }
+
+  /**
+       * PhotosPage.initializePage function initializes the PhotosPage by creating the divs, canvases and drawing photos/images
+       */
+  self.initializePage = function() {
+        self.createDivs();
+        self.drawImages();
+  }
+
+  /**
+       * PhotosPage.setInvisible() function makes PhotosPage invisible
+       */
+  self.setInvisible = function() {
+        $("#ppLoading").css("visibility", "hidden");
+        $("#ppBlockInteraction").css("visibility", "hidden");
+        $("#ppPopUpBase").css("visibility", "hidden");
+        $("#ppPopUpBase").css("visibility", "hidden");
+        $("#photosPage").css("visibility", "hidden");
+  }
+}
diff --git a/js/puzzlepausefullimage.js b/js/puzzlepausefullimage.js
new file mode 100755 (executable)
index 0000000..81c1a0f
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * PuzzlePauseFullImage class takes care of the displaying full image when the game is paused
+ * constructor parameters
+ * @param aImageUrl url of the currently selected image (image that is currently used in the game)
+ */
+function PuzzlePauseFullImage(aImageUrl) {
+  var self = this;
+  self.img = new Image();
+
+
+  self.parent = document.getElementById("puzzlePauseFullImage");
+  self.width = $("#puzzlePauseFullImage").width();
+  self.height = $("#puzzlePauseFullImage").height();
+
+  self.imageUrl = aImageUrl;
+  self.release = function() {
+               while (self.parent.children.length > 0)
+                 self.parent.removeChild(self.parent.lastChild);
+               self.tile = null;
+       }
+  self.release();
+
+  var o = new Object();
+  o.tile = document.createElement('div');
+  $(o.tile).css('position', 'absolute');
+
+  o.canvas = document.createElement('canvas');
+  o.context = o.canvas.getContext('2d');
+
+  o.size = function(width, height) {
+        o.canvas.setAttribute('width', width);
+        o.canvas.setAttribute('height', height);
+  }
+  o.size(self.width, self.height);
+
+  o.tile.container = o;
+  o.tile.dragging = false;
+  o.tile.appendChild(o.canvas);
+
+  o.parent = self.parent;
+  $(o.tile).css('left', self.parent.offsetLeft);
+  $(o.tile).css('top', self.parent.offsetTop);
+
+
+  self.parent.appendChild(o.tile);
+  self.tile = o;
+
+       self.img.onload = function() {
+               var scaledWidth, scaledHeight;
+               scaledWidth = self.width;
+               scaledHeight = self.height;
+
+               self.tile.context.drawImage(this, 0, 0, self.tile.canvas.width, self.tile.canvas.height);
+       }
+
+       self.img.src = self.imageUrl;
+}
diff --git a/js/slider-puzzle.js b/js/slider-puzzle.js
new file mode 100755 (executable)
index 0000000..6e57407
--- /dev/null
@@ -0,0 +1,327 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * SliderPuzzle class takes care of the game logic and interaction as well as tiles creation and shuffling
+ * constructor parameters
+ * @param level integer game level (1 - easy; 2 - hard; 3 - brutal)
+ * @param aImageUrl url of the currently selected image (image that is currently used in the game)
+ * @param aGameFinishedCallback function pointer to the function that will be invoked when the user completes the game
+ * @param aLocalizer reference to a localizer object
+ */
+function SliderPuzzle(level, aImageUrl, aGameFinishedCallback, aLocalizer )
+{
+  var self = this;
+
+  self.rows = level * 2;
+  self.columns = level * 2;
+  self.imageUrl = aImageUrl;
+  self.level = level;
+  self.moves = 0;
+  self.seconds = 0;
+
+  self.tiles = null;
+  self.cells = null;
+  self.timer = null;
+
+  self.img = new Image();
+  self.parent = document.getElementById("puzzleContainer");
+
+
+  self.width = $("#puzzleContainer").width();
+  self.height = $("#puzzleContainer").height();
+  self.gameFinishedCallback = aGameFinishedCallback;
+
+  self.localizer = aLocalizer;
+
+  /**
+       * SliderPuzzle.release deletes all tiles and cells
+       */
+  self.release = function() {
+               while (self.parent.children.length > 0)
+                 self.parent.removeChild(self.parent.lastChild);
+               self.tiles = new Array();
+               self.cells = new Array();
+
+               if(self.timer != null) {
+                 clearInterval(self.timer);
+               }
+       }
+
+  self.release();
+
+  /**
+       * SliderPuzzle.initAudio function is used to initialize all the audio files needed for the active game
+       */
+  self.initAudio = function() {
+        self.shuffleAudio = new Audio();
+        self.shuffleAudio.src = "audio/Shuffle.ogg";
+        self.moveAudio = new Audio();
+        self.moveAudio.src = "audio/MovePiece.ogg";
+  }
+  self.initAudio();
+
+
+  self.pauseBackground = new PauseBackground(level, self.localizer);
+  self.pauseFullImage = new PuzzlePauseFullImage(aImageUrl);
+
+  self._incrementSeconds = function() {
+        self.seconds++;
+  }
+
+  self._incrementMoves = function() {
+        self.moves++;
+  }
+
+  /**
+       * SliderPuzzle.stopGameTimerUpdateUi function is used to update the UI based on seconds and moves used in the current game.
+       * It also stops the game timer (used when pause is pressed or game is completed)
+       */
+  self.stopGameTimerUpdateUi = function() {
+        clearInterval(self.timer);
+        //update UI
+        document.getElementById("qsPpTimeS").innerHTML = SpUtil.secondsToTime(self.seconds).toString();
+        document.getElementById("qsPpMovesS").innerHTML = self.moves.toString();
+        document.getElementById("qsFpTimeS").innerHTML = SpUtil.secondsToTime(self.seconds).toString();
+        document.getElementById("qsFpMovesS").innerHTML = self.moves.toString();
+  }
+
+  /**
+       * creating the game tiles. Number of tiles depends on the game level
+       */
+  for (var r = 0; r < self.rows; r++) {
+               self.tiles.push(new Array());
+               self.cells.push(new Array());
+               for (var c = 0; c < self.columns; c++) {
+                       if ((self.rows - 1 == r) && (self.columns - 1 == c)) {
+                               this.cells[r].push(false);
+                               continue;
+                       }
+                       this.cells[r].push(true);
+
+                       var o = new Object();
+                       o.tile = document.createElement('div');
+                       $(o.tile).css('position', 'absolute');
+
+                       o.canvas = document.createElement('canvas');
+                       o.context = o.canvas.getContext('2d');
+
+                       o.hoverTile = document.createElement("div");
+                       $(o.hoverTile).css("position", "absolute");
+                       $(o.hoverTile).css("background-image", "url(images/active-puzzle/pointer-right.png)");
+                       $(o.hoverTile).css("background-position", "center");
+                       $(o.hoverTile).css("background-repeat", "no-repeat");
+                       $(o.hoverTile).css("left", "0px");
+                       $(o.hoverTile).css("top", "0px");
+                       $(o.hoverTile).css("visibility", "hidden");
+
+                       o.size = function(width, height) {
+                               o.canvas.setAttribute('width', width);
+                               o.canvas.setAttribute('height', height);
+                               $(o.hoverTile).css("width", width);
+                               $(o.hoverTile).css("height", height);
+                       }
+                       o.size(self.width/self.columns, self.height/self.rows);
+
+                       o.tile.container = o;
+                       o.tile.dragging = false;
+                       //handling click event for each tile
+                       o.tile.addEventListener('click', function(event) {
+                               //make pause "tiles" work!
+                               event.stopPropagation();
+                               self.moveAudio.play();
+
+                               if (this.container.column > 0 && !self.cells[this.container.row][this.container.column - 1]) {
+                                       this.container.move(this.container.row, this.container.column - 1, true);
+                                       self._incrementMoves();
+                               } else if (this.container.column < self.columns - 1 && !self.cells[this.container.row][this.container.column + 1]) {
+                                       this.container.move(this.container.row, this.container.column + 1, true);
+                                       self._incrementMoves();
+                               } else if (this.container.row > 0 && !self.cells[this.container.row - 1][this.container.column]) {
+                                       this.container.move(this.container.row - 1, this.container.column, true);
+                                       self._incrementMoves();
+                               } else if (this.container.row < self.rows - 1 && !self.cells[this.container.row + 1][this.container.column]) {
+                                       this.container.move(this.container.row + 1, this.container.column, true);
+                                       self._incrementMoves();
+                               } else {
+                                       return;
+                               }
+
+                               for (var r = 0; r < self.rows; r++) {
+                                       for (var c = 0; c < self.columns; c++) {
+                                               try {
+                                                       var t = self.tiles[r][c];
+                                                       if (t.row != t.solutionRow || t.column != t.solutionColumn)
+                                                               // found at least one tile that is not in
+                                                               // its solution position
+                                                               return;
+                                               } catch(err) {} // trying to check the empty tile
+                                       }
+                               }
+
+                               // If you get here then the puzzle was solved
+                               self.gameFinishedCallback();
+                       });
+
+                       //handling hover event for each tile
+                       o.tile.addEventListener('mouseover', function(event) {
+                          event.stopPropagation();
+                               if (this.container.column > 0 && !self.cells[this.container.row][this.container.column - 1]) {
+                                       $(this.container.hoverTile).css("background-image", "url(images/active-puzzle/pointer-left.png)");
+                               } else if (this.container.column < self.columns - 1 && !self.cells[this.container.row][this.container.column + 1]) {
+                                       $(this.container.hoverTile).css("background-image", "url(images/active-puzzle/pointer-right.png)");
+                               } else if (this.container.row > 0 && !self.cells[this.container.row - 1][this.container.column]) {
+                                       $(this.container.hoverTile).css("background-image", "url(images/active-puzzle/pointer-up.png)");
+                               } else if (this.container.row < self.rows - 1 && !self.cells[this.container.row + 1][this.container.column]) {
+                                       $(this.container.hoverTile).css("background-image", "url(images/active-puzzle/pointer-down.png)");
+                               } else {
+                                       return;
+                               }
+
+                               $(this.container.hoverTile).css("visibility", "visible");
+
+                       }, false);
+
+                       //handling mouse out event for each tile
+                       o.tile.addEventListener('mouseout', function(event) {
+                               event.stopPropagation();
+                               $(this.container.hoverTile).css("visibility", "hidden");
+
+                       }, false);
+
+                       o.tile.appendChild(o.canvas);
+                       o.tile.appendChild(o.hoverTile);
+
+                       o.parent = self.parent;
+                       o.solutionRow = r;
+                       o.solutionColumn = c;
+                       //moving the tile with an animation
+                       o.move = function (row, column, animate) {
+                               if (this.row != undefined && this.column != undefined)
+                                       self.cells[this.row][this.column] = false;
+                               this.row = row;
+                               this.column = column;
+                               self.cells[row][column] = true;
+
+                               if (animate) {
+                                       $(this.tile).animate({left: this.column * this.canvas.width}, 250, null);
+                                       $(this.tile).animate({top: this.row * this.canvas.height}, 250, null);
+                               } else {
+                                       $(this.tile).css('left', this.column * this.canvas.width);
+                                       $(this.tile).css('top', this.row * this.canvas.height);
+                               }
+                       }
+                       o.move(r, c, false);
+
+                       self.parent.appendChild(o.tile);
+                       self.tiles[r].push(o);
+               }
+       }
+
+       /**
+       * SliderPuzzle.scramble function is used to scramble the tiles
+       */
+       self.scramble = function() {
+               self.shuffleAudio.play();
+               // Half of the possible tile combinations are unsolvable, so instead of
+               // just randomly generating a combination of tiles, actually walk through
+               // a set of valid moves.
+               var lastEmpty = {row: this.rows - 1, column: this.columns - 1};
+               var empty = {row: this.rows - 1, column: this.columns - 1};
+
+               function validMove(m) {
+
+                        // slide in from the left
+                        if (0 == m && (empty.column == 0 || lastEmpty.column == empty.column - 1)) {
+                               return false;
+                        }
+                        // slide in from the right
+                        if (1 == m && (empty.column == self.columns - 1 || lastEmpty.column == empty.column + 1)) {
+                               return false;
+                        }
+                        // slide in from the top
+                        if (2 == m && (empty.row == 0 || lastEmpty.row == empty.row - 1)) {
+                               return false;
+                        }
+
+                        // slide in from the bottom
+                        if (3 == m && (empty.row == self.rows - 1 || lastEmpty.row == empty.row + 1)) {
+                               return false;
+                        }
+
+                        return true;
+               }
+
+               for (var i = 0; i < this.rows * this.columns - 1; i++) {
+                        // There are four possible moves, slide into the empty space from the:
+                        // left, right, top, or bottom
+                        var move;
+
+                        do {
+                               move = Math.floor(Math.random() * 4);
+                        } while (!validMove(move));
+
+                        lastEmpty.row = empty.row;
+                        lastEmpty.column = empty.column;
+                        if (move == 0) {
+                               // left
+                               empty.column = empty.column - 1;
+                        } else if (move == 1) {
+                               // right
+                               empty.column = empty.column + 1;
+                        } else if (move == 2) {
+                               // top
+                               empty.row = empty.row - 1;
+                        } else {
+                               // bottom
+                               empty.row = empty.row + 1;
+                        }
+
+                        for (var row = 0; row < this.rows; row++) {
+                               for (var column = 0; column < this.columns; column++) {
+                                        try {
+                                               var tile = this.tiles[row][column];
+                                               if (tile.row == empty.row && tile.column == empty.column) {
+                                                        tile.move(lastEmpty.row, lastEmpty.column);
+                                                        break;
+                                               }
+                                        } catch (err) {} // ignore empty cell
+                               }
+                        }
+               }
+       }
+
+       self.img.onload = function() {
+         var scaledWidth, scaledHeight;
+               scaledWidth = self.width;
+               scaledHeight = self.height;
+
+               for (var r = 0; r < self.tiles.length; r++) {
+                       for (var c = 0; c < self.tiles[r].length; c++) {
+                               var tile = self.tiles[r][c];
+                               var sx = tile.column * this.width/self.columns;
+                               var sy = Math.floor(tile.row * this.height/self.rows);
+                               tile.context.drawImage(this, sx, sy, this.width/self.columns, this.height/self.rows, 0, 0, tile.canvas.width, tile.canvas.height);
+                               tile.context.strokeStyle = "black";
+                               tile.context.strokeRect(0, 0, tile.canvas.width, tile.canvas.height);
+                       }
+               }
+               self.scramble();
+       }
+
+       self.img.src = self.imageUrl;
+
+       self.startGameTimer = function () {
+         self.timer = setInterval(self._incrementSeconds, 1000);
+       }
+
+       //game timer is started
+       self.startGameTimer();
+
+}
diff --git a/js/spscrollbar.js b/js/spscrollbar.js
new file mode 100755 (executable)
index 0000000..bb72dea
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * SpScrollBar class represents a scrollbar
+ * constructor parameters
+ * @param scrContainer reference to the div element that contains a scroller
+ * @param scroller reference to SpScroller object
+ */
+function SpScrollBar (scrContainer, scroller) {
+       var self = this;
+
+       /**
+        * SpScrollBar.reset - resets the state of the scrollbar.
+        */
+       self.reset = function () {
+               self.parent = scrContainer;
+               self.scroller = scroller;
+               self.scrHandle = document.getElementById("ppScrollbarHandle");
+               self.scrContainer = document.getElementById("ppScrollbarContainer");
+               self.trackHeight  = $(self.scrContainer).height();
+               self.handleHeight = $(self.scrHandle).height();
+               self.x = 0;
+               self.y = 0;
+
+               self.scrollDist  = 3;
+               self.selectFunc  = null;
+               self.grabPoint   = null;
+               self.disabled    = false;
+               self.ratio = (self.scroller.totalHeight - self.scroller.viewableHeight)/(self.trackHeight - self.handleHeight);
+               self.trackTop = self.findOffsetTop(self.scrContainer);
+
+               self.addEvent(self.scroller.content, "mousewheel", self.scrollbarWheel);
+               self.removeEvent(self.parent, "mousedown", self.scrollbarClick);
+               self.addEvent(self.parent, "mousedown", self.scrollbarClick);
+
+               self.scroller.reset();
+               top  = "0px";
+               left = "0px";
+
+               self.moveContent();
+
+               if (self.scroller.totalHeight < self.scroller.viewableHeight) {
+                       self.disabled = true;
+                       self.scrHandle.style.visibility = "hidden";
+               }
+               else {
+                       self.disabled = false;
+                       self.scrHandle.style.visibility = "visible";
+                       this.parent.style.visibility  = "visible";
+               }
+       };
+
+       /**
+        * SpScrollBar.stopScroll - stops scrolling the content
+        */
+       self.stopScroll = function () {
+               self.removeEvent(document, "mousemove", self.scrollbarDrag, false);
+               self.removeEvent(document, "mouseup", self.stopScroll, false);
+
+               if (self.selectFunc) document.onselectstart = self.selectFunc;
+               else document.onselectstart = function () { return true; };
+
+       };
+
+       self.addEvent = function (obj, event, func) {
+               if (obj.addEventListener) obj.addEventListener(event, func, false);
+               else if (obj.attachEvent) obj.attachEvent('on'+ event, func);
+               else obj['on'+ event] = func;
+       };
+
+       self.removeEvent = function (obj, event, func) {
+               if (obj.removeEventListener) obj.removeEventListener(event, func, false);
+               else if (obj.detachEvent) obj.detachEvent('on'+ event, func);
+               else o['on'+ event] = null;
+       };
+
+       /**
+        * SpScrollBar.scrollbarClick - invoked when the scrollbar is clicked
+        */
+       self.scrollbarClick = function (e) {
+               if (self.disabled) return false;
+
+               e = e ? e : event;
+               if (!e.target) e.target = e.srcElement;
+               else if (e.target.id == "ppScrollbarContainer") {
+                 self.scrollTrack(e);
+               }
+               else if (e.target.id == "ppScrollbarHandle") {
+                 self.scrollHandle(e);
+               }
+
+               self.selectFunc = document.onselectstart;
+               document.onselectstart = function () {return false;};
+               self.addEvent(document, "mouseup", self.stopScroll, false);
+
+               return false;
+       };
+
+       self.findOffsetTop = function(obj) {
+               return $(obj).offset().top;
+       };
+
+       self.scrollbarDrag = function (e) {
+               e = e ? e : event;
+               var t = parseInt(self.scrHandle.style.top);
+               var v = e.clientY + document.body.scrollTop - self.trackTop;
+               if (v >= self.trackHeight - self.handleHeight + self.grabPoint)
+                       top = self.trackHeight - self.handleHeight +"px";
+               else if (v <= self.grabPoint) top = "0px";
+               else top = v - self.grabPoint +"px";
+               self.y = parseInt(top);
+
+               self.moveContent();
+       };
+
+       self.scrollbarWheel = function (e) {
+               e = e ? e : event;
+               var dir = 0;
+               if (e.wheelDelta >= 120) dir = -1;
+               if (e.wheelDelta <= -120) dir = 1;
+
+               self.scrollBy(0, dir * 20);
+               e.returnValue = false;
+       };
+
+       self.scrollTrack = function (e) {
+               var curY = e.clientY + document.body.scrollTop;
+               self.scroll(0, curY - self.trackTop - self.handleHeight/2);
+       };
+
+       self.scrollHandle = function (e) {
+               var curY = e.clientY + document.body.scrollTop;
+               self.grabPoint = curY - self.findOffsetTop(self.scrHandle);
+               self.addEvent(document, "mousemove", self.scrollbarDrag, false);
+       };
+
+       self.scroll = function (x, y) {
+               if (y > self.trackHeight - self.handleHeight)
+                       y = self.trackHeight - self.handleHeight;
+               if (y < 0) y = 0;
+
+               self.scrHandle.style.top = y +"px";
+               self.y = y;
+
+               self.moveContent();
+       };
+
+       self.moveContent = function () {
+               self.scroller.scrollTo(0, Math.round(self.y * self.ratio));
+       };
+
+       self.scrollBy = function (x, y) {
+               self.scroll(0, (-self.scroller.y + y)/self.ratio);
+       };
+
+       self.scrollTo = function (x, y) {
+               self.scroll(0, y/self.ratio);
+       };
+
+       this.reset();
+}
diff --git a/js/spscroller.js b/js/spscroller.js
new file mode 100755 (executable)
index 0000000..d652b43
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * SpScroller class represents a scroller
+ * constructor parameters
+ * @param object actual scrollable content
+ * @param width width of the actual scrollable content
+ * @param height height of the actual scrollable content
+ */
+function SpScroller(object, width, height) {
+  var self = this;
+
+  /**
+       * SpScroller.setPosition - sets the position of the scrollable content
+       */
+  self.setPosition = function (x, y) {
+               if (x < self.viewableWidth - self.totalWidth)
+                       x = self.viewableWidth - self.totalWidth;
+               if (x > 0) x = 0;
+               if (y < self.viewableHeight - self.totalHeight)
+                       y = self.viewableHeight - self.totalHeight;
+               if (y > 0) y = 0;
+               self.x = x;
+               self.y = y;
+               left = self.x +"px";
+               top  = self.y +"px";
+       };
+
+  /**
+       * SpScroller.setPosition - resets the position of the scrollable content to (0,0)
+       */
+       self.reset = function () {
+               self.content = object;
+               self.totalHeight = object.scrollHeight;
+               self.totalWidth = object.scrollHeight;
+               self.x = 0;
+               self.y = 0;
+
+               left = "0px";
+               top  = "0px";
+       };
+
+       self.scrollBy = function (x, y) {
+               self.setPosition(self.x + x, self.y + y);
+       };
+
+       self.scrollTo = function (x, y) {
+               self.setPosition( -x, -y );
+       };
+
+       self.content = object;
+       self.viewableWidth = width;
+       self.viewableHeight = height;
+       self.totalWidth = object.scrollHeight;
+       self.totalHeight = object.scrollHeight;
+       self.reset();
+}
diff --git a/js/sputil.js b/js/sputil.js
new file mode 100755 (executable)
index 0000000..7f179ae
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * 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
+ *
+ */
+
+/**
+ * SpUtil is a static utility class which contains useful utility functions that can be used application-wide
+ */
+function SpUtil() {}
+
+SpUtil._pad = function(number) {
+       return (number < 10 ? '0' : '') + number
+}
+
+/**
+ * SpUtil.secondsToTime is used to format second to minutes and seconds string (e.g. 1000 seconds is 16:40)
+ * @param seconds number of seconds
+ * @return minutes:seconds formatted string
+ */
+SpUtil.secondsToTime = function(seconds) {
+  var minutes = Math.floor(seconds / 60);
+  var seconds = seconds % 60;
+  return SpUtil._pad(minutes)+":"+ SpUtil._pad(seconds);
+}
diff --git a/manifest.json b/manifest.json
new file mode 100755 (executable)
index 0000000..11edead
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name": "Slider-Puzzle",
+  "default_locale": "en_US",
+  "description": "Simple HTML based tile sliding puzzle",
+  "version": "1",
+  "app": {
+    "launch": {
+      "container": "panel",
+      "local_path": "index.html"
+    }
+  },
+  "icons": {
+    "128": "icon_128.png"
+  }
+}
diff --git a/signature1.xml b/signature1.xml
new file mode 100644 (file)
index 0000000..c62ea8e
--- /dev/null
@@ -0,0 +1,687 @@
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="db/slider-puzzle-schema.sqlite">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>xnhEOwDcWJvuFt5K3+xa20104g5RmK6zLX0jURvxit4=</DigestValue>
+</Reference>
+<Reference URI="db/slider-puzzle.sqlite">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>xnhEOwDcWJvuFt5K3+xa20104g5RmK6zLX0jURvxit4=</DigestValue>
+</Reference>
+<Reference URI="css/photospage.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0FEMaYarqTvd484jgwSq2DIBb3/j7bbfleMKHFdGY/Q=</DigestValue>
+</Reference>
+<Reference URI="css/quickstart.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>cTSVs7UTSPYhXbVdPoy5faoPmTd+1amcx/96MoVbC2k=</DigestValue>
+</Reference>
+<Reference URI="css/finishscreen.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>7Z+NNMskSi021wPMxeXGdhRJ/ZUPn8hScnrPok0xdw8=</DigestValue>
+</Reference>
+<Reference URI="css/leaderboardpage.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/2e1aGzHvvAUg40pZoNZRN5SEa4yNKPBBQjiz5y1/14=</DigestValue>
+</Reference>
+<Reference URI="css/openscreen.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>jqXzTCHZUbDFe2o0VKQEbg5O3bP/Bpj3VqYtv7jmJJk=</DigestValue>
+</Reference>
+<Reference URI="css/license.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>DK9zIVODwU5/BKOjrsiC3HrwntxJetxUXqihTE2W/Zs=</DigestValue>
+</Reference>
+<Reference URI="css/pausescreen.css">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>FdehmYJji/z0TO95stw6lm9Ub+B2lSm4AoJ9OfWqeiM=</DigestValue>
+</Reference>
+<Reference URI="icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>wfwuPIJiNBXrBw5Nl4NE8B7X1QpT3UVtFoiOoAiJsnU=</DigestValue>
+</Reference>
+<Reference URI="js/puzzlepausefullimage.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>33b7YY1YCMV4dkh6ymLEaqdV6XT0K2o1XTa4SwMLq+4=</DigestValue>
+</Reference>
+<Reference URI="js/slider-puzzle.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>37ETHCJ06IMZINsK8IwsKXXh/IRNfGqD4UKS3dWg1cA=</DigestValue>
+</Reference>
+<Reference URI="js/photospage.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>52Tnue++UWPvoLxfcodRTLLKz0oBL0FdJ3epI7UQqiQ=</DigestValue>
+</Reference>
+<Reference URI="js/jquery-1.7.2.min.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R7aNzoy2gFrVs+pNJ6+SokH04ppcEqJ0yFLkNGoFALQ=</DigestValue>
+</Reference>
+<Reference URI="js/dbmanager.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Jw6BJNqM2+3LyvdarQ+t1Lsv6s1J6sAxjWjMsZDl3sk=</DigestValue>
+</Reference>
+<Reference URI="js/leaderboardpage.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>XAgXSdcmqRbkKCKTKakhyIv0TTBs6mibG4SMHe2IOXA=</DigestValue>
+</Reference>
+<Reference URI="js/pausebackground.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ncS6iWDEt2QoAPEgNrJWYtaD+5zjg5xUSQk/DO7GGpY=</DigestValue>
+</Reference>
+<Reference URI="js/newpopout.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>N5tW/dpiKlNy+uTjRIJI2Jnj2jyF1dtNgH2Sld/tAtE=</DigestValue>
+</Reference>
+<Reference URI="js/localizer.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>24Qpq68UXSMKmZrpDgCiOWMGeInrdpa3NP1fqtUM3T0=</DigestValue>
+</Reference>
+<Reference URI="js/main.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>yaAu5j61KUgINyCuFq/U6T4/HXoOKRlSjJCVdneIP2c=</DigestValue>
+</Reference>
+<Reference URI="js/pausepopout.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>GHnw6yua3nqNvpWXadPiqEIOWqFDFe6rL/q7hDaEU2c=</DigestValue>
+</Reference>
+<Reference URI="js/iscroll-lite.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>x0ep5Bjc4NhyevcRPmOtwqTXYXUax1fchFxRjOh9cuQ=</DigestValue>
+</Reference>
+<Reference URI="js/sputil.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>bWTR6da8O58EDUPWylsIe+EZWUTuKGWh819TeTLP10A=</DigestValue>
+</Reference>
+<Reference URI="js/finishpopout.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>4DWwU800cUs1f3mMUDpRyXS1A/FSy5oV/6OkPm5clyw=</DigestValue>
+</Reference>
+<Reference URI="js/spscrollbar.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>10JnDkox+vB5arNPuc0F0c/q7YyyziaYbI/DlHRKSWs=</DigestValue>
+</Reference>
+<Reference URI="js/license.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>wpfT8nF4zYoC1X7VZWfYGXLOdXs+meoayLeLCe83P4w=</DigestValue>
+</Reference>
+<Reference URI="js/spscroller.js">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>eiDU7o2Tt2h+bVeJo+FcW905S6qhQfsKF4OLKL3hSF8=</DigestValue>
+</Reference>
+<Reference URI="fonts/Lato-LightItalic.ttf">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>iAzo3M6viBd3YqGqPHhGAYTjH6R2p3f7f2O4PFzhDi8=</DigestValue>
+</Reference>
+<Reference URI="fonts/Molot.otf">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>s4NwvsRg5pgjhJCnGP15275s5bw25HHnqmS/fQU5+rI=</DigestValue>
+</Reference>
+<Reference URI="fonts/FugazOne-Regular.ttf">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>FP1b7M6LCumH5Es/n6nj5sh0Y+lYWsFdtsgnFGIGimI=</DigestValue>
+</Reference>
+<Reference URI="config.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2RXTSow5MBks9NHIf5ZjlPLxoh/+uQVsKCEA97neobg=</DigestValue>
+</Reference>
+<Reference URI="manifest.json">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>b8JV+/WOf3mz2xsBCJbxIjaHSCDfRUcmMbsPyrSj8po=</DigestValue>
+</Reference>
+<Reference URI="index.html">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>rjCKook89Trqy1oHVm2fH4svHySp8z7J8164F5oWzhs=</DigestValue>
+</Reference>
+<Reference URI="audio/cheer.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KSgQqsPghimK7QUNJ1V2FvR7iNQAhvuJBHJLM48PKSk=</DigestValue>
+</Reference>
+<Reference URI="audio/Shuffle.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>YtDsMfg8NoADMq0dQydE4pXTThU7no+CnfrkDW6qrYo=</DigestValue>
+</Reference>
+<Reference URI="audio/ButtonClick_01_Start.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>bjcE5cc5cBTQgsznwvB1S0dmIU1qmzCgqIYm461oiK4=</DigestValue>
+</Reference>
+<Reference URI="audio/Intro.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>wdW5Ma6H8gTbtW6ubPi3b0nrwwv2/fx5/R+egTtBxe8=</DigestValue>
+</Reference>
+<Reference URI="audio/MovePiece.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>DHZIuqmnVaHVSWRt/lcS22uVmVecOdJe2mJyDTwOzRY=</DigestValue>
+</Reference>
+<Reference URI="audio/ButtonClick_02_Settings.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>uI9Kqrkcf9FRsYLxpJ/vjZH8GErRfYseh4glMq6ROzA=</DigestValue>
+</Reference>
+<Reference URI="audio/Win.ogg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>qOCaU41wSWL6fpPXe8B2+ikpMwwbWnpqujFDgKSQhjU=</DigestValue>
+</Reference>
+<Reference URI="README.txt">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ajCPZ7GJ0TdhIxNgHRlSnpwOvdJjJfYAUk916BP+q1A=</DigestValue>
+</Reference>
+<Reference URI="_locales/fi/messages.json">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WpFfmwnu4f2wqFw6TroyGd8KNueKjBy0m051u4qYRVM=</DigestValue>
+</Reference>
+<Reference URI="_locales/locales.json">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>N1sx3QtUsWAuoNxODI29E+TKnnY4feWBTvQ3AZdkWC8=</DigestValue>
+</Reference>
+<Reference URI="_locales/en_US/messages.json">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>wq2213Ab1/KPH1P9ZZNy+7borq1twAnNn/yqLQ+YV8Y=</DigestValue>
+</Reference>
+<Reference URI=".project">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>g35Q1dx7R2Bwq+5U3CJFqsyWSmMhVbVZoHJyTu08YfM=</DigestValue>
+</Reference>
+<Reference URI="LICENSE">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>3jgy5gvY4LqAccKoG5D3fLTuqTn/Zb7ZAugn6AMj5uw=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/pointer-right.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>NbBAwvmYoMwT4sM1I1QyZMqs2bVtIhfn4Xj3X9RQwWU=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/pointer-up.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>cdWoFvEJZEaoG2M9WCEGRte4BfMGlOVyj/mYCkuvKoU=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/pause-nav-slider-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>A31fTFo3iJQ5Lx2rv0URE5fpyq1irznz/9iRXQo3pvo=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/empty_tile_bg.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SjZBQh4zrqoq7hMfdR5TvDsGeyWLUZQlw3wAAylYb/A=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/pointer-down.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>vU53MC8VTQL81RpZkzprsFDkdJWqX8KgU7EC1OY/h+U=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/new-nav-slider-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>7fuDWJ5KJ5gjlI8qmwObWE66uOHAIY0uK4tbTamOVqQ=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/pointer-left.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>k+4OdyaShErSktYsq8UD3hOw5iuqqn2BaWAn6+Y4AZc=</DigestValue>
+</Reference>
+<Reference URI="images/active-puzzle/active-puzzle-easy-bg.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pBsWIGdXj/N7goX8xPNBkSiU6rx+Pm6nm7ZFgXttyic=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/pointer-right-new.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pyXEtReS+IpJXS/L6Mjqotnj99TbmkWpXafi11Qx6bc=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/pointer-right.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Vl17GLUMO4OaPDf3DvhOW2Uw+YWZBI03kaFmNgOGHLs=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-hard.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>NTFysRUhOsBb4THfZ/dnhiFEvgUdZtsAimSKc+5472g=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/new-popout-base-right.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>X20eF95ra0D/k0vMpkLAqGlI11B2zNJ0lcnfyKW5cx4=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/pointer-right_active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WyQq4zWA8xLLPGQUZpyfSzGM9saSmvfYwUHkAzzq/54=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/play-again-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>9LgR8J0+kisNHE4ddcJQiK8ets/UkLpuRn9chvHao+s=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/new-photo-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6c+ooEfAECpTC8dM6OUH+hpaED/Z8T8vNehtmFygF8A=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/close-popout-icon.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>o1/D4UMFtYca9w1ChUP2DDRk+Qu42ndn6FtnR9sdI7Y=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-easy%20(kopio).png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>zQajHq4YdYTOw832jK9UehrEUIia3nx5pcg+e52vPZ0=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/choose-level-header.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>rZl1QtpdW5Kg+MioRTmgNlIxUvFSojauRMzRTLMzniI=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-easy-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>70DaPRBfxfHFY6onppSM46rOmgmJ95E+2u25t82v6Ws=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-brutal-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>7A0yngVxE4iVQusn1f2gA+x1zepRusJaPjz+OvdulvM=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-easy.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>zQajHq4YdYTOw832jK9UehrEUIia3nx5pcg+e52vPZ0=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-hard-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>3Zepso73/m+stJJ9bjYiI0KIGiCdlVNGHxNXAm5Kzr0=</DigestValue>
+</Reference>
+<Reference URI="images/new-screen/level-option-brutal.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>kM48iVg9u40IMHyAsOy7u81gpnMdS98PcTkWlbctZ08=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/photo-game.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>izZexY4pvrWGt8x6dFLib9gnw77D1z+iz0WRzQ9mAg0=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/popup-bottom-shadow.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Yb3kJf8hs2hOWOBDhb/1spkeyvnW9wx9u8QlwM5ccgw=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/photo-game-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>xvFGqDDlrOG4nrThBt4NX7mNtSe9HPfgr0+g4FOul3s=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/popup-top-shadow.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lDz4XYqZeomAWCirM70A/s90FdnT0SwktwpOdjT1IEw=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/photo-header.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>3MfPr+T5BBLyfstFvuTpstnfHDXDfG4VBHd6kvmWHQ8=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/photo-pc-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>usssNwOI13TZD1aV3EVCwUGWIavW9aeGBW+DsHqyMBg=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/photo-pc.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>LDSqZ7oqsnSoLvxrKn7xPnK6hlhR00Azdg6spH9mLvk=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/popup-scaleable-base.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KoEIY5F7msvvryQY13OF3uaNUvP+ZnCvFkfYYXy3izI=</DigestValue>
+</Reference>
+<Reference URI="images/photo-screen/popup-crop-frame.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>q2dV98kzYXl8W+xKfE+498vir4HtbD/i8uTa8CTZsWM=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/eiffel-tower-upskirt.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>XvLoK2tGhD53U6mRxNP2RfZ4FONkKT+WsLAz8s+CluM=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/new-york-city-at-night.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WlluLtNTRJYoHxjQ0r8OPiOEs5dEQyC1kerCh7htBOI=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/icecream-and-mango.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>V0xIarak+/dBpG7QH45sPHJ6NWVZ8TlCxnPCEi4Al9w=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/butterfly.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>AQcVMRbSkPNZb8zR3MIAogN1PhEuYaZ0RXKCw3wuKHw=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/fireworks.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lzqJK8PlAbNwaoUiEEzyzd8Mnu4VgMst7aDQjOFxj+8=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/bass-guitar.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>rzPPTd2tBdvUZuaFoJP1acM37lHsIpmiGDYb8l2CyVU=</DigestValue>
+</Reference>
+<Reference URI="images/original_puzzles/banaue-rice-terraces.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>XRK7Hq9we5QhNi6z/m7NTtYdnHDU6HE4ZTNtCQXxDMc=</DigestValue>
+</Reference>
+<Reference URI="images/ajax-loader-transparent.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>tl283eZxuOuMTok0JG0vLIEGzw7sutP1Gf9vxzpcQE4=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_QuickStart-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>DyIKi9YvHDFcdZmWwkr5qJXb665j7LhAZG1VAp2exP8=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_QuickStart.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>JToZhoN5XJGnQAZgozryLtVuq5yR8Pf4o3zkzGAF2Jw=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_ChoosePhoto.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>mvWOhqcB8dS+qkwDbMQV67KwYsk+FWLchLEXvHXvcJk=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_LeaderBoard-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>xJj+5dL+uxxGgeARyCXd442dMLvtREyxei6fGsA34JA=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_OpenScreen-base.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>VIUVSLFkn+92Fzf8IMFOGt0xnOGtSA4CwfTRZ2bvMjI=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_LeaderBoard.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>Nf2n5nyIaz4M+k+oQfpNhAgmzwE3Rda1/5Hrus7zGXg=</DigestValue>
+</Reference>
+<Reference URI="images/open-screen/SP_ChoosePhoto-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>UCvONMgsW0CMOgcovE8Wriqzrm/bOboz+bBRV9g5kOc=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ZhVmueWB6h2auleQ8v2xRHy6Az/2bvXNvjoNGEv8oaw=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/kennymatic-rocky-beach.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>4N74eyTrmO3w0TBROPhiBksl+RumYU2oq5XPAz790Xc=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/pdxjeff-ferris-wheel.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>gBo9wJMWpGnygmmHgxjxFQPKLogINNiZhwmiGF8JRqk=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/mccun934-leaf-water.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>imL7oBNOLGxHU4cNYaP6h5eR6Eqnp2kczgdoaTylFq4=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Sideonecincy-bald-eagle.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>LO/PqRUT+U69ONWwjA42K/OHpK6zUgQycp/52t6PUn4=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/StuSeeger-fair-ride.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>+LtMO467VloFqXedM1v5kGzSBDxjA5/GGTXvI+/+qiE=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>EGkMQd5reWai9MOK4AcX06dFDAYzf8D14aA7BO1IJ1c=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Mason_Masteka-purple-carrots.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>qYfOvXcLEqz308H3duvqjPlB21/+4tfK5RpoDARptXI=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/JonoMueller-dirty-truck.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>t0ZzSAGU6wBmgzwEG/0SGreJANRCegd98sQSCza/KBE=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/mccun934-pumpkin-patch.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>5tI2OoiYltAdndSNexM0HCo3NlSp3dePD0ksjhjbHVI=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Ian_Sane-railroad-bridge.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>nqJ/4oe48PV4ESgNtKUpvwDteB36YVlyza5542FPK2I=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Ralphman-train-station.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>wp/dY/FQIqwXhWI+LWTIZwGQMtQlF9fNeYBpTgT/MTg=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/StuSeeger-elephant-mother-child.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>DRAI9JQ0KxtRNWhqciDtL1bK0vV0+ep+sll3BFoXYC0=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/sam_churchill-daylight-train.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>IKQKXCJk0yOCV5zVtAGcg6t45dIDrAfOJUoGvnh/kAw=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Ian_Sane-red-wall.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SYMfB8p9W5n1tACSlUQTMGjt2WrbXHVW5ROEbu0L6d8=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Ian_Sane-forest-waterfall.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>bzu3SgMXfRI7Lp/r1yXW+efOGj8pPKmCPFP5iflVt7U=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Ian_Sane-zoo-lion.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>UjN/2fLoo3JViFoBygxcnZW6yaBEfFKBOb0UJC2ESRM=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/ktylerconk-water-lily.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ZJL8RZAIhTuOoxYpXifRWOt+uq/Pxb9fxcvD3IFZUik=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Thomas_Good-zoo-tiger.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/BFpqZej83zc2ap6NFQ/gjv68McMimnO/xNEb421g88=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos/Ian_Sane-brick-wall.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>NHNd8BEMqzKr9qJUT2cICef4UIqg4Luv3qTMYIm/HcM=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Tso_Moriri_Lake_by_Probhu_B_Doss.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>h6T3U30xmxzRHz8q4sv9wFqKZck2mX2Z1YyqKQwbw0c=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/kennymatic-rocky-beach.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>4GVZPBUUF5YVVHKkuN+p650V4Rsknj8RvzgeVM3UcN4=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/pdxjeff-ferris-wheel.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0hBDEmJJ//XZQbcOGmBLePEdoU0k9WyTlReBXiq4Rao=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/mccun934-leaf-water.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>fzicqZZz3V9u1nNMvlRnmqZKc+fD2v3+pZYyRt0FoMs=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Sideonecincy-bald-eagle.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WxHGQXhXLqBxcdnul+I7IptacXSikPgl4BnMpEGEmiA=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/StuSeeger-fair-ride.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>zXrLU5jPryUkSPZgU/prW8V0ZkrCzhUwoiQAYfYvtJw=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Puerto_Rico_Vega_Baja_by_Ricardo_Mangual.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ksiU9Jt4pRxtZ4c1pSsUexc8+LdI1KOyuP3zMKi7esM=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Mason_Masteka-purple-carrots.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>9LL8TOqUzJvrnxkvSbutdahyNH32PhyCClW0NYlAFo4=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/JonoMueller-dirty-truck.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>rNyu194+qj99RXw7YFZlJrEwlsdnvpeUo6iUC4oS+yQ=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/mccun934-pumpkin-patch.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>iylrvNdSvGF7h1ggIGEaop2udTiEyJdvBDHYEqc4zjY=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Ian_Sane-railroad-bridge.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WuB2w40FSC0CgY5PqGyj6J3+A5MH09PJ5jsVLzJU984=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Ralphman-train-station.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>PBN0QqasmWTHpiqVSoFdf5y5Tct6E2dkTetMEhFIRJU=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/StuSeeger-elephant-mother-child.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0JwfyEK7TkYExc6o2t9gnWeSaMxUbrCnNKCK9Bd0L40=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/sam_churchill-daylight-train.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>RAkV2PNfrH3pPBJZ+JrHgrRumR2MUtUk+f+Bt4+Iax8=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Ian_Sane-red-wall.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>BYVNR055+Y4aWIjJUMb1TfsxvQBO3b+/jhpmE+CzaxU=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Ian_Sane-forest-waterfall.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>JusBymhImYDgD0fMNH33u/ndiNk5QJ+MKGUROMGCUtY=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Ian_Sane-zoo-lion.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ljab5AwV3FaFtSrGlCBvrcHKMUMHYko86us4JkomhRw=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/ktylerconk-water-lily.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>qfbtbw2LUNRHDXHvKNIa3as47OQQgYsx/ht8iHCJLLs=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Thomas_Good-zoo-tiger.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>LDtwB8w8p0gK4BHguehUlwwOAgygrHx0VP1oIgjhGSI=</DigestValue>
+</Reference>
+<Reference URI="images/puzzle_photos_thumbs/Ian_Sane-brick-wall.jpg">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>pDZ0z/KJS0qxB9z+ioxoTVvU/aWLqHreSXPWZja1q7E=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-header.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>7fN6rUYi3geEzYpqE1vjoZ2PPam3nCCM6d7XEM+Xp6I=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-no5.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>I/DUR0gd/M3TILm43f49+jUuhkcvoXbKCVzgSDhwNgw=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-no2.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>QuZ0giDzJGpW0mzRhGJCHcDXTsBvQ2lEgBLatkO1IUI=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-no4.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>uZC0GbX72bwtmWbLqsFwRYdzv6VSbSUOGZLWju30n+g=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-times-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/nQRQQiljFAU5EaongPbMTTdVrjIRz/TokZJUApdx/E=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-image-frame.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1fvAcYwneL7l24hBFMKqPlQfjbgcanmUYALl0Aup5dI=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-base.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>DiYhwH2WVMCFJljTTUzwcidTC0asZfLwEPT7/ln4caw=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/popup-play-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>b5sBQW3c48cb+11iGKdLJYiymNQsx2OOOcw3rMP1l6w=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-no3.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>beC7ALSLcNfbPE7Es0zlg3mC6DFOHCe2Y465nVRLFfE=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/column-easy-head.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>foCPoHJ81K4kRm4TTqE5DmL9uNbOGCRVeG7Jt6x+Sog=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-no6.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WHjdFe+qTBTg4N9g8J4pGuIF6bUTtNe0+puD/0AYCIc=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/popup-base.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ukFPZUzA6fMqg/+eAK1kQomkFFVfBoZSKDak9+JHhAc=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/column-brutal-head.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>LWc7Eom54Qlyxceo6MMJw1yHpNbPhus/3BJ1QuPQmhc=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/close-out-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>AB0sTWiRdsM58VX9jjP0PMt0UUlRMRYzuYubPBz+87A=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-moves.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D74b2mwnNxIdwz2UdRDv758DmKCp8dQdHPcB2SHjQiU=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/column-hard-head.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>ilByic2p2j2TsXk+djoKPB5xvH7Owej++jJglzeE2rY=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-moves-active.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>YQp0tIIb6hionNCQBfEqvFd9b9JS1wMSNo41F98Xd2E=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-times.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>dT1LR0zgbx0pzO7p6CXVeGdph4hLKd40s8jHP3BW3NY=</DigestValue>
+</Reference>
+<Reference URI="images/leaderboard-screen/leaderboard-no1.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>UfCyPCx/3CQ32eg6HNL2tpwQcnsbS4w1XrOg/UhwJYo=</DigestValue>
+</Reference>
+<Reference URI="images/pause-screen/pause-place-no3.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>mzK7/XJ6/qw79gkPM4kqaH2K2VTjaXh3/hMUPfEcZT0=</DigestValue>
+</Reference>
+<Reference URI="images/pause-screen/pause-place-no2.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>N+kKfgIpSBLzLC+jn/1xX1Qsjqdwy/zhZWy1RWJZ7Zc=</DigestValue>
+</Reference>
+<Reference URI="images/pause-screen/pause-place-no1.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>clyDajbLGroMu8SsF8pve2UcI4l5tbgp8mRydLPcvs0=</DigestValue>
+</Reference>
+<Reference URI="images/pause-screen/big-pause-graphic.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lQDQEMgDc19mUkDvY+8gSEFqb4UpvwYbUi8yeQKCW2Q=</DigestValue>
+</Reference>
+<Reference URI="images/pause-screen/leader-board-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>VBdK1HGF8GPgDNv5S8INax6+1pARGjGu5OBXGuvao3o=</DigestValue>
+</Reference>
+<Reference URI="images/pause-screen/new-popout-base-left.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>0BabPpoxiNvJgRcvuxiHKy3lxL05y+e6bRZNg6VWyzk=</DigestValue>
+</Reference>
+<Reference URI="images/finish-screen/finish-popout-base.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>azZfuo0EZwvYq0VetCo3SASoxqEbfg8TQ46V1Vg3T/U=</DigestValue>
+</Reference>
+<Reference URI="images/finish-screen/big-finish-graphic.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>DEfNRt90elWiNK6rzs23rzNs5CbXm9FtodEL1EKfWRU=</DigestValue>
+</Reference>
+<Reference URI="images/finish-screen/input-text-area-box.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>wZqC6Uh4s/Mqh1iVod+QKSY63pn0tnPuw0xVJRfvjy0=</DigestValue>
+</Reference>
+<Reference URI="images/finish-screen/input-save-button.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>WpASR1iHCgbWE4b+NIOqWEFhGbJ+rTN0xZp+HO+D2L8=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+KAkoTcjVG8ynWlHb+7StmTPp1m0lEK08U4S5YbI4lsfVXSwnWx0D/UwamgRcf3LlUHozoyFsJjbN
+ZheMwBLsis3bVHehWWMlMK5mYv1wPAr1w7lnk9V4AMDKHkqiCBTk91rP+4T5jxgjA+Yl+HzNH/JU
+8FiN67mIV4J7Q97pEa4=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+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=
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file