Masonry gallery style

is it posible to have a image gallery with masonry look?
something like this

i have tried whit this example http://devgirl.org/tag/phonegap-masonry/ but i have this result