﻿$(document).ready(function() {
    // Start executing our function when the user clicks the element with the id 'link'
    $("#loadlink").ready(function () {
      // Create a variable that holds the timeout
      var t;

      // Slide down the notification div
      //$("#notification").slideDown();

      // Slide the notification up again after 4 seconds
      $(function() {
        t = setTimeout(function() {
          $("#notification").slideDown();
        }, 5000);
      });

      // If the user clicks the notification div
      $("#closeBtn").click(function () {
        // Slide it up right away
        $("#notification").slideUp();
        // Stop the timeout that was running
        clearTimeout(t);
      });
    });
  });