$(document).ready(function () {
	$('img._popup').each(function () {
		var rel = '';
		
		var arel = '';
		if ($(this).attr('rel'))
			arel = $(this).attr('rel'); 
			
		if (arel.length > 0)
			rel = ' rel="'+arel+'"';
		
		var html = '<a href="'+$(this).attr('src')+'" largesrc="'+$(this).attr('largesrc')+'" class="lightbox"'+rel+' title="'+$(this).attr('alt')+'"></a>';
		$(this).wrap(html);
	});

	$(".lightbox").lightbox();
});


/*function image_open (path, width, height) {
	var base;
	$('base').each(function () {
		base = this.href;
	});

	if (path.indexOf('http://') == -1) {
		path = base+path;
	}

	window.open(path, '', 'fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width='+width+',height='+height);
}*/
