function changeVideo(path) {
                        var video = document.getElementById("player");
                var videoSrc = video.currentSrc;
-               var ext = videoSrc.substr(videoSrc.lastIndexOf(".")); // figure the correct extension
-               video.src = path + ext; // set up the new src  
-               video.load(); // load the new video  
-               video.play(); // play the new video  
+               var ext = videoSrc.substr(videoSrc.lastIndexOf("."));
+               video.src = path + ext;
+               video.load();
+               video.play();
                video.loop = true;
                        video.controls=false;   
                }