A couple things.
1) Your #posts
container is floated and therefore is only as wide as the content within it. Even if Packery was working it would just line them all up in a single column. You'll need to apply it a width. If you're not concerned with IE8, you can do something like this:
#posts {
width: -webkit-calc(100% - 180px);
width: -moz-calc(100% - 180px);
width: calc(100% - 180px);
}
2) The Packery error is odd, I'm not entirely sure what's causing it. But by butting this simple bit of JS through the Console, I was able to get it running:
var container = document.querySelector('#posts');
var pckry = new Packery( container, {
// options
itemSelector: '.container',
gutter: 10
});
Make sure this code comes at the end of your document, right before the closing </body>
.
3) Since your posts are images, you'll need to make sure you're providing them a width and height so that Packery knows how big each post is. Unfortunately, since you're not using a standard Tumblr width, you'll need to include the imagesLoaded plugin and place your code inside its callback.
Easy way using jQuery:
var container = document.querySelector('#posts');
container.imagesLoaded( function() {
var pckry = new Packery( container, {
// options
itemSelector: '.container',
gutter: 10
});
});
If you were using a standard Tumblr size (like 250px) you'd be able to simply add a width and height attribute to each image and not need to worry about using imagesLoaded, like this:
<img alt="" src="{PhotoURL-250)" height="{PhotoHeight-250}" width="{PhotoWidth-250}" />