extends ../layout

block content
  script(src='http://masonry.desandro.com/jquery.masonry.min.js')
  script
    $(function() {
      var $container = $('.thumbnails');
      $container.imagesLoaded(function(){
        $container.masonry({
          itemSelector : '.thumbnails > li',
        });
      });
    });
  div.page-header.profile_page-header
    h1 
      #{connection}
  div#backlink 
      a(href='../connections') « Connections

  ul.thumbnails
    each thumbnail in thumbnails
      li.span2
        a.thumbnail(href='/profile/'+connection+'/'+encodeURIComponent(thumbnail.nick))
          div.imgwrap
            img(src="#{thumbnail.avatar}", alt="#{thumbnail.nick}'s photo")
            span.nicks #{thumbnail.nick}