2010-01-26 08:49:53 +00:00
|
|
|
jQuery(function () {
|
2011-05-04 21:23:39 +00:00
|
|
|
var image_template = Handlebars.compile($('#image-template').html());
|
2010-02-25 21:08:49 +00:00
|
|
|
|
2010-01-26 08:49:53 +00:00
|
|
|
function populate_flickr(data, text_status) {
|
2010-06-24 08:37:48 +00:00
|
|
|
var ul = $("#flickr ul");
|
2010-02-28 20:37:38 +00:00
|
|
|
ul.empty();
|
2010-02-25 21:08:49 +00:00
|
|
|
jQuery.each($('photo', data), function(i, obj) {
|
|
|
|
var photo = $(obj);
|
|
|
|
var image = {
|
2011-01-26 15:55:03 +00:00
|
|
|
href: photo.attr('url_z'),
|
2012-01-21 06:15:42 +00:00
|
|
|
src: '/images/photos.jpg?20120121',
|
2010-07-15 02:58:52 +00:00
|
|
|
alt: photo.attr('title')
|
2010-02-25 21:08:49 +00:00
|
|
|
};
|
2011-05-04 21:23:39 +00:00
|
|
|
var li = $(image_template(image));
|
2010-07-07 07:58:40 +00:00
|
|
|
$('img', li).css('left', (i * -75) + 'px');
|
|
|
|
li.css("background-position", (i * -75) + 'px -75px');
|
2010-01-26 08:49:53 +00:00
|
|
|
ul.append(li);
|
|
|
|
});
|
2010-08-18 10:28:23 +00:00
|
|
|
$("a[rel^='prettyPhoto']").prettyPhoto({theme: "facebook"});
|
2010-01-26 08:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Populate Flickr
|
2011-12-08 08:45:11 +00:00
|
|
|
jQuery.get("/photos.xml?20111208", {}, populate_flickr);
|
2010-01-26 08:49:53 +00:00
|
|
|
});
|