Added initial support for notes (aka tags) on images, done completely (including initial load of metadata) with AJAX. They're not fixed at 100x100 like on Facebook either.
/*
* Misc functions for Snapr.
*/
function gal_toggle(elem, img, img_open, img_close)
{
if ( !img_close || !img_open )
{
img_close = scriptPath + '/plugins/gallery/toggle-closed.png';
img_open = scriptPath + '/plugins/gallery/toggle-open.png';
}
if ( elem.style.display == 'none' || !elem.style.display )
{
elem.style.display = 'block';
try {
img.src = img_open;
} catch(e) {};
}
else
{
elem.style.display = 'none';
try {
img.src = img_close;
} catch(e) {};
}
}