(function(window,$){function Photo(){var photo={};photo.init=function(){photo.blueimp();};photo.blueimp=function(){if(!$('#links').length)return true;document.getElementById('links').onclick=function(event){event=event||window.event;var target=event.target||event.srcElement,link=target.src?target.parentNode:target,options={index:link,event:event,onslide:function(index,slide){var text=this.list[index].getAttribute('data-description'),node=this.container.find('.description');node.empty();if(text){node[0].appendChild(document.createTextNode(text));}var text=this.list[index].getAttribute('data-date'),node=this.container.find('.date');node.empty();if(text){node[0].appendChild(document.createTextNode(text));}}},links=this.getElementsByTagName('a');blueimp.Gallery(links,options);};};return photo;};$(document).ready(function(){var photo=Photo();photo.init();});$(document).ajaxStop(function(){var photo=Photo();photo.init();});}(window,jQuery));