// http://www.techtuts.com/forums/index.php?showtopic=74 function ClearInput(value, id){ // This calls our function ClearInput, and the two variables we will need for it to function the original value and the id. var input = document.getElementById(id); // Gets the input field based on its id. if(value == input.value){ // If the default value is equal to the current value. input.value = ''; // Empty It. }else{ // Else the value is not equal to the current input field value. input.value = input.value; // Leave it the same. } // End Else. } // Close Function. drawSocialLinks = function(oContainers){ var l,i,socialList = [], socialHtm=''; var t = $('h1').eq(0).text(); /* adjust this to select the title of your article */ var u = window.location.href; /* this selects the link to your article */ var iconDirectory = 'images/icons/'; /* this is the director containing your icons */ // alert(t+"\n"+u+"\n") var socialMedia = [ {linkText: 'Del-icio-us', icon:'delicious.png',href:'http://del.icio.us/post?url='+u+'&title='+t}, {linkText: 'Stumbleupon', icon:'stumbleupon.png',href:'http://www.stumbleupon.com/submit?url='+u}, {linkText: 'Facebook', icon:'facebook.png',href:'http://www.facebook.com/share.php?u='+u}, {linkText: 'Digg', icon:'digg.png',href:'http://digg.com/submit?phase=2&url='+u+'&title='+t}, {linkText: 'Twitter', icon:'twitter.png',href:'http://twitter.com/home?status='+u}, {linkText: 'Google', icon:'google.png',href:'http://www.google.com/bookmarks/mark?op=edit&bkmk='+u} ]; l = socialMedia.length; for (i=0; i'+socialMedia[i].linkText+''); // this.webRoot+ } socialHtm = ''; oContainers.append('
'+socialHtm+'
'); }