title: How to change link colour with each session
body: <p>Im trying to work out a way to change the hover link color for a site on each session. </p>
  
  <p>Ive got some javascript that can change the hover color on each hover... </p>
  
  <pre><code>&lt;script&gt;
      var colors = Array("#A3F8EF", "#FF7275", "#CBB6E7", "#FF9D74", "#FDF874"),
          idx;
      $("div a").hover(function() {
          idx = Math.floor(Math.random() * colors.length); // Pick random index
          $(this).css("background-color", colors[idx]);
      }, function() {
          $(this).css("background-color", "transparent");
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But im not sure how to only do this one each session? Thinking possibly using this javascript <a href="https://github.com/js-cookie/js-cookie" rel="nofollow">https://github.com/js-cookie/js-cookie</a></p>
  
  <p>with something like</p>
  
  <pre><code> if($.cookie("visited")){ //hover color set } else { //set hover color
   }
  </code></pre>
  
  <p>but any other suggestions would be great</p>
  
  <p>---MORE INFO---</p>
  
  <p>just found this website that does pretty much what I want, but changes each day rather than on refresh. <a href="http://www.intworks.com/" rel="nofollow">http://www.intworks.com/</a> Not quite sure how its been done though?</p>