Still trying to figure out idiomatic jQuery - here's some jQuery for setting a variable base on the class of a div - is there a jQuery way of doing this more compactly, given that the div in question may have more than one class ...
var currentType = 'component';
// text_component, image_component, tagged_component
if ($(my_div).hasClass('.text_component')) { currentType = 'text_component' };
if ($(my_div).hasClass('.image_component')) { currentType = 'image_component' };
if ($(my_div).hasClass('.tagged_component')) { currentType = 'tagged_component' };
var dialog_box = $('div[id^='+currentType+'_dialog]');