opacity: 1;
 }
 
-img.camera.error {
+img.camera.error,
+img.camera.loading {
     opacity: 0;
 }
 
     right: 0px;
     bottom: 0px;
     left: 0px;
-    background-color: #555;
     text-align: center;
     transition: opacity 0.2s linear;
 }
     opacity: 0;
     transition: all 0.2s linear;
     text-align: center;
-    background-color: rgba(0, 0, 0, 1);
     cursor: pointer;
 }
 
 img.camera-progress {
-    margin-top: 28%;
+    margin-top: 20%;
     border: 10px solid white;
     border-radius: 10px;
 }
 
         doFullScreenCamera(cameraId);
     });
     
+    //if (inProgress) { TODO
+        cameraProgress.css('opacity', '0.5');
+        cameraPlaceholder.css('opacity', '0');
+//    }
+    
     /* insert the new camera frame at the right position,
      * with respect to the camera id */
     var cameraFrames = pageContainer.find('div.camera-frame');
         this.error = true;
         this.loading = false;
         
-        cameraImg.addClass('error');
+        cameraImg.addClass('error').removeClass('loading');
         cameraImg.height(Math.round(cameraImg.width() * 0.75));
         cameraPlaceholder.css('opacity', 1);
     });
         this.error = false;
         this.loading = false;
         
-        cameraImg.removeClass('error');
+        cameraImg.removeClass('error').removeClass('loading');
         cameraImg.css('height', '');
         cameraPlaceholder.css('opacity', 0);
         cameraProgress.css('opacity', 0);
         }
     });
     
-    cameraImg.error();
+    cameraImg.addClass('loading');
+    cameraImg.height(Math.round(cameraImg.width() * 0.75));
 }
 
 function remCameraFrameUi(cameraId) {
     var cameraFrames = $('div.page-container').find('img.camera');
     
     cameraFrames.each(function () {
-        if (this.complete === true && this.naturalWidth === 0 && !this.error) {
+        if (this.complete === true && this.naturalWidth === 0 && !this.error && this.src) {
             $(this).error();
         }
     });