$(function(){
  $("#LayerContentsBody").masonry({
    columnWidth: 210,
    isAnimated: true,
    animationOptions: {
      duration: 750,
      queue: false
    }
  });
  
  function infoline() {
    setTimeout(function() {
      infoline();
      $("#InformationBar li").not(":first").css("display","none");
      $("#InformationBar li:first").fadeTo("normal",0, function() {
        $(this).next().fadeTo("normal",1);
        $(this).clone().appendTo("#InformationBar ul");
        $(this).remove();
      });
      
      
    },5000);
  }
  var next_size = $("#InformationBar li").size();
  if(next_size > 1) {
    infoline();
  }
  
  $(".main-box").mouseover(function(){
    $(this).css("background-color","#d2e9f7");
    //console.log ($("a",this).attr("href"));
    $(this).mouseout(function(){
      $(this).css("background-color","#FFFFFF");
    });
  });
  
  $(".main-box").click(function(){
    //window.location = $(this).find("a").attr("href");
    window.location = $("a",this).attr("href");
    return false;
  });
/* 
  var speedTime = 5000;
  //console.log ($(".large-box a").attr("href"));
  setInterval(function(){
    //console.log ($(".large-box a").attr("href"));
    var slid_first = $(".large-slid .large-box:first");
      slid_first.animate({
        marginLeft:"-395px"
      },"slow","linear",function(){
          slid_first.clone().appendTo($(".large-slid"));
          $(".large-slid .large-box:last").css("marginLeft","0px");
          $(this).remove();
        });
  }, speedTime);
*/
});
