title: I need to show fancybox banner only once per browser session
body: <p>I have two banner one page one which is top one on page i show this one as slide down banner and i can show this banner once per browser session using following script</p>
  
  <pre><code>&lt;div class="welcome"&gt;
      &lt;div&gt;
      &lt;h1&gt;Hello..!&lt;br&gt; Welcome to ABC
      &lt;br&gt;
      &lt;/h1&gt;
      &lt;h2&gt;We wish you a Great Day..!&lt;/h2&gt;
      &lt;br&gt;
  
      &lt;h2&gt;&lt;a id="close-welcome" href="#"&gt;Thank you.. and please take me to the     website&lt;/a&gt; &lt;/h2&gt;
      &lt;/div&gt;
     &lt;/div&gt;
  &lt;script type="text/javascript" src="https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js"&gt;&lt;/script&gt;
     &lt;script&gt;
  $(document).ready(function() {
      if ($.cookie('noShowWelcome')) $('.welcome').hide();
      else {
          $("#close-welcome").click(function() {
              $(".welcome").fadeOut(1000);
              $.cookie('noShowWelcome', true);    
          });
      }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>This works fine but i have another Fancy-Box banner which shown an Image Banner </p>
  
  <pre><code>&lt;a href="#" class="fancybox-messageboard" style="display:block;"&gt;&lt;img src"http://upload.wikimedia.org/wikipedia/commons/1/1a/Bachalpseeflowers.jpg"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I want to do same for the above fancy-box banner it should also show only once per browser session.</p>
  
  <p><strong>UPDATE</strong>: </p>
  
  <p>I have modified my code to make it work with jQuery.Cookie</p>
  
  <p>This code below is intend to show Fancybox only once per browser session and this code works fine in firefox Private mode only.</p>
  
  <pre><code> if (window.showMessage) {
              alert('1');
              var visited = $.cookie('visited2');
              if (visited == 'yes') {
                  alert('a');
                  return false;
              } else {
                  alert('b');
                  //openFancybox();
                  $("a.fancybox-messageboard").fancybox({
                      width: 600,
                      height: 440,
                      closeClick: false,
                      hideOnOverlayClick: false,
                      href: imgPath,
                      helpers: {
                          overlay: { closeClick: false} // prevents closing when clicking OUTSIDE fancybox 
                      }
                  }).trigger('click');
                  $.cookie('visited2', 'yes', { expires: 7 });
              }
  
          }
  </code></pre>
  
  <p>Problem with the above code is that it works only in Firefox Private mode only it downt show popup in IE or Chrome not event in private mode also.</p>
  
  <p>I am not sure what it behaves like that.</p>