Detect the screen size and set the canvas size
diff --git a/index.html b/index.html
index 6a52856..1ce3305 100755
--- a/index.html
+++ b/index.html
@@ -10,7 +10,7 @@
 <body id="index">
     <img src="Images/Arrow.png" id="backArrow" onclick="javascript:goBack()"/>

-    <canvas id="canJigsaw" width="1024" height="768"></canvas>
+    <canvas id="canJigsaw" width="1" height="1"></canvas>

     <div id="indexScreen">
     <img src="Images/Pig.png" width="300" style="position:absolute; top:430px; left:10px;" onclick="SelectAnimal('pig')" />
@@ -76,6 +76,8 @@
             var canvas = document.getElementById("canJigsaw");

             var ctx = canvas.getContext('2d');
+            ctx.canvas.width  = window.innerWidth;
+            ctx.canvas.height = window.innerHeight;
             ctx.drawImage(background_image, 0, 0);
             ctx.restore();
         }
Added sound (preloaded via the xdk and not the html5 audio tag)
diff --git a/Script/jigsawScript.js b/Script/jigsawScript.js
index 2d6ad8e..5b0163b 100755
--- a/Script/jigsawScript.js
+++ b/Script/jigsawScript.js
@@ -169,6 +169,8 @@ function jigsaw(canvasID, animal, rows, columns) {
         //audioElement.setAttribute('src', 'Audio/finish.mp3');
         //audioElement.play();

+        intel.xdk.player.startAudio("Audio/finish.mp3",false);
+
         remove_width = this.BLOCK_WIDTH;
         remove_height = this.BLOCK_HEIGHT;
         // Clear Board
diff --git a/index.html b/index.html
index 1ce3305..e93d3f4 100755
--- a/index.html
+++ b/index.html
@@ -43,6 +43,9 @@

         function init() {
+            // Preload the mp3
+            intel.xdk.player.loadSound("Audio/finish.mp3");
+
             intel.xdk.device.setRotateOrientation('landscape');

             intel.xdk.device.hideSplashScreen();
@@ -77,12 +80,11 @@

             var ctx = canvas.getContext('2d');
             ctx.canvas.width  = window.innerWidth;
-            ctx.canvas.height = window.innerHeight;
+            ctx.canvas.height = window.innerHeight;
             ctx.drawImage(background_image, 0, 0);
             ctx.restore();
         }
         function goBack() {
-
             drawBackground();
             showIndexScreen();
         }
Reset the 3 global vars when player goes back (hack)