(function () { var e = $('#shoutpost').parent(); e.parent().after(""); e.prependTo('#new_shoutpost').css('width', 'auto').find('input[name=shouttext]').attr('size', '99'); e.find('p:first').append(" " + e.find('p:eq(1)').remove().html() + " ").append("(" + $('#shoutopts').remove().html() + ")"); })(); $('input[name=shouttext]').before('
'); $('form[name=shoutpost]').submit(function(event){ event.preventDefault(); var color=$('.shout_colors option:selected').text(); var shout=$('input[name=shouttext]').val(); $('input[name=shouttext]').val('[color='+color+']'+shout+'[/color]'); });