User:Robbiemuffin/common.js

function urlencode (str) { str = (str + '').toString; return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').     replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+'); }

var jQueryScriptOutputted = false; function initJQuery { //if the jQuery object isn't available if (typeof(jQuery) == 'undefined') { if (! jQueryScriptOutputted) { //only output the script once.. jQueryScriptOutputted = true; //output the script (load it from google api) document.write(""); }     setTimeout("initJQuery", 50); } else { $(function {         //do anything that needs to be done on document.ready        target=urlencode($("#firstHeading span").text);        $("#firstHeading").append("");      }); }           } initJQuery;