title: How come my Javascript is not updating time correctly?
body: <p>Okay, I'm having the strangest issue. I created a code based off of one that I found on codepen. It works perfectly in Codepen changing the image every hour. I tested it by changing my clock. However, when uploaded on my website it does not update correctly.</p>
  
  <p>Here is my local html:</p>
  
  <pre><code> &lt;div class="table"&gt;    
      &lt;div id="plate"&gt;
      &lt;div id="hour1"&gt; &lt;/div&gt;
      &lt;/div&gt;      
  &lt;/div&gt;
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>html,body { margin:0px; padding:0px; background-color : #fff; }
  
  #plate{
  width: 465px;
  height: 465px;
  background-repeat: no-repeat;
  background-image:url(http://www.cassietodd.me/gra423/clockapp/images/Pieclock_plate.png);
  }
  
  #hour1{
  float:left;
  width: 320px;
  height: 520px;
  background-repeat: no-repeat;
  background-image: url(http://www.cassietodd.me/gra423/clockapp/images/strawberry_01.png);
  background-size: 104%;
  }
  
  .table{
  margin: 0px auto;
  margin-top: 30px;
  width:320px;
  height: 568px;  
  background-image: url(http://www.cassietodd.me/gra423/clockapp/images/Pieclock_table.png);
  background-repeat: no-repeat;
  
  }
  </code></pre>
  
  <p>my javascript:</p>
  
  <pre><code> window.onload = function () {
    var updateView = (function() {
    var sec;
    return function () {
     var now = new Date();
     if (now.getSeconds() == sec) return;
  
  var second = now.getSeconds();
  var minute = now.getMinutes();
  var hour = now.getHours();
  
  
  var hour1;
  if(hour &lt; 12){
    hour1 = 0;
  }else{
    hour1 = Math.floor(hour / 2);
  }
  var hour1 = hour%12;
  
    _updateView(hour1);
  }
   })();
  
  setInterval(updateView, 500);
  
  function _updateView(h1) {
  
  var _url = "http://www.cassietodd.me/gra423/clockapp/images/";
   $('#hour1').css("background-image", "url("+_url+"h" + h1 + ".png)");
   }
  }
  </code></pre>
  
  <p>You can see the one that works on Codepen.
  <a href="http://codepen.io/cmtodd3/pen/mzibu" rel="nofollow">http://codepen.io/cmtodd3/pen/mzibu</a></p>
  
  <p>Its the exact same code but it works on codepen but on my website the time is all wrong? Here is my test website just in case</p>
  
  <p><a href="http://www.cassietodd.me/gra423/clockapp" rel="nofollow">http://www.cassietodd.me/gra423/clockapp</a></p>