diff --git a/wp-content/themes/foundry0/js/main.js b/wp-content/themes/foundry0/js/main.js
index d5c2aa7ef9c174c0612803c6e2946c1b833171db..6034594fd6d07cf23586d16acaa97e0bdf446069 100644
--- a/wp-content/themes/foundry0/js/main.js
+++ b/wp-content/themes/foundry0/js/main.js
@@ -1,16 +1,22 @@
-$('video').on('ended', function () {
+console.log("hi there?");
+window.jquery = $;
+$(document).ready(function () {
+  $('#splash').on('ended', function () {
+    console.log("Video ends.");
     $(this).css("opacity", "0");
     setTimeout(function () {
-        // $('#splash').css("display", "none");
-        $('#splash').css("border", "2px solid yellow");
+      console.log("Trying to hide the video.");
+      $('#splash').css("display", "none");
     }, 500);
 });
+}); // End of document.ready
+
 
 var video = document.querySelector("#splash");
 window.video=video;
 //video.autoplay = true;
 // video.load();
-console.log("hi there");
+
 
 $(document).ready(function () {
     setTimeout(function () {