var scnDialogHelper = { needsPreview: false, setUpButtons: function () { var a = this; jQuery("#scn-btn-cancel").click(function () { a.closeDialog() }); jQuery("#scn-btn-insert").click(function () { a.insertAction() }); jQuery("#scn-btn-preview").click(function () { a.previewAction() }) }, loadShortcodeDetails: function () { if (scnSelectedShortcodeType) { var a = this; jQuery.getScript(avia_framework_globals.frameworkUrl + "php/avia_shortcodes/sc/" + scnSelectedShortcodeType + ".js", function () { a.initializeDialog() }) } }, initializeDialog: function () { if (typeof scnShortcodeMeta == "undefined") jQuery("#scn-options").append("

Error loading details for shortcode: " + scnSelectedShortcodeType + "

"); else { if (scnShortcodeMeta.disablePreview) { jQuery("#scn-preview").remove(); jQuery("#scn-btn-preview").remove() } var a = scnShortcodeMeta.attributes, b = jQuery("#scn-options-table"); for (var c in a) { var f = "scn-value-" + a[c].id, d = a[c].isRequired ? "scn-required" : "", g = jQuery(''); jQuery("