$(document).ready(function() {

  //var $j = jQuery.noConflict();

  //Intital fades
  //Required for IE since opacity not supported
  $('.overlay').css('filter', 'alpha(opacity=0)'); 

  $("h1").fadeTo(1000, 1, function() {
    $(".metadata").fadeTo(1000, 1, function() {
      $(".description").fadeTo(1000, 1);
    });
  });
    

  $(".card").mouseenter(function() {
    $(this).find(".overlay").fadeTo("fast", 0.9);
    // This sets the opacity to 100% on hover
  }).mouseleave(function() {
    $(this).find(".overlay").fadeTo("fast", 0.0);
    // This sets the opacity back to 60% on mouseout
  });
  //Scroll to top of page
  $('a[href=#top]').click(function() {
    $j('html, body').animate({
      scrollTop : 0
    }, 'slow');
    return false;
  });
  //li with fade class
  $(".fade").fadeTo("fast", 0);

  $(".fade").mouseenter(function() {
    $(this).fadeTo("fast", 0.4);
  }).mouseleave(function() {
    $(this).fadeTo("fast", 0);
  });
});

