

//When the DOM tree is loaded
$(document).ready(function() {
  
    //Add pointer class to .photo .item
    $(".photo .item").addClass("pointer");

    //Hover over photo fade in hidden span
    $(".photo .item").hover(
        function() {
            $(this).find("span").fadeIn();
        },
        function() {
            $(this).find("span").fadeOut();
        }
    );

  
  

    // Equalize height of divs
    var maxHeight = 0;
        // Newsposts
        $("div.newspost").each(function(){
           if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
        });    
        $("div.newspost").height(maxHeight);
        $("div.newspost:even").css("margin-left","0px");

  
        // photopost
        $("div.photopost").each(function(){
           if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
        });    
        $("div.photopost").height(maxHeight);
  
});




