function wpsymbols_add_symbols(tag){var myField;tag=' '+tag+' ';if(document.getElementById(wpsymbolsCommentFormId)&&document.getElementById(wpsymbolsCommentFormId).type=='textarea'){myField=document.getElementById(wpsymbolsCommentFormId);}else{return 0;}if(document.selection){myField.focus();sel=document.selection.createRange();sel.text=tag;myField.focus();}else if(myField.selectionStart||myField.selectionStart=='0'){var startPos=myField.selectionStart;var endPos=myField.selectionEnd;var cursorPos=endPos;myField.value=myField.value.substring(0,startPos)+tag+myField.value.substring(endPos,myField.value.length);cursorPos+=tag.length;myField.focus();myField.selectionStart=cursorPos;myField.selectionEnd=cursorPos;}else{myField.value+=tag;myField.focus();}}jQuery(document).ready(function(){jQuery("#wpsymbols-select-symbol").click(function(){if(jQuery(".wp_symbols-content").is(":hidden"))jQuery(".wp_symbols-content").show("slow");else jQuery(".wp_symbols-content").hide("slow");});jQuery(".wp_symbols_select").click(function(){jQuery(".wp_symbols-content").hide("slow");});jQuery("#wp_symbols_toggle").click(function(){if(jQuery("#wpsymbols_add_moresymbols").css("display")=="none"){jQuery("#wpsymbols_add_moresymbols").css("display","inline");jQuery("#wp_symbols_toggle").html(wpsymbols_less_symbols);}else{jQuery("#wpsymbols_add_moresymbols").css("display","none");jQuery("#wp_symbols_toggle").html(wpsymbols_more_symbols);}})});