
$(function(){$('#media-insert-cancel').click(function(){window.close();});$('#media-insert-ok').click(function(){sendClose();window.close();});$('#supported_media').prev().toggleWithLegend($('#supported_media'));function sendClose(){var insert_form=$('#media-insert-form').get(0);if(insert_form==undefined){return;}
var tb=window.opener.the_toolbar;var data=tb.elements.extmedia.data;data.alignment=$('input[name="alignment"]:checked',insert_form).val();data.title=insert_form.m_title.value;data.url=insert_form.m_url.value;data.m_object=insert_form.m_object.value;tb.elements.extmedia.fncall[tb.mode].call(tb);};});