$(document).ready(function() {
	
	$(".lightbox a").lightBox();
	
	var boxen = [];
	//find all links w/ rel=lightbox[...
	$('a[rel*=lightbox\\[]').each(function() {
			//push only unique lightbox[gallery_name] into boxen array
			if ($.inArray($(this).attr('rel'),boxen)) boxen.push($(this).attr('rel'));
	});
	//for each unique lightbox group, apply the lightBox
	$(boxen).each(function(i,val) { $('a[rel='+val+']').lightBox(); });
});
