/*
 * jquery.geekSkypeRemover.js - jQuery plugin to remove Skype Call buttons
 * 
 * Version 1.0
 * 
 * This plugin extends jQuery with a new function:
 * 
 *   - jQuery.geekSkypeRemover(10000)
 *       Check for Skype Call buttons for a maximum of 20 seconds.
 * 
 * This function checks for 'Skype Call' buttons dynamically created by the
 * Skype Browser Plugin for a defined period of time and replaces any such
 * buttons it finds with the original textual telephone number content.
 * 
 * The predefined period is time is required since the Skype Browser Plugin
 * might take a few seconds to add the Skype Call buttons after loading of
 * the page completes.
 * 
 * Simply replacing the elements dynamically added by the Skype Browser Plugin
 * with the original textual telephone number will cause Skype to recreate
 * the Skype buttons, so this plugin inserts the original textual telephone
 * numbers with hidden underscores ("_") as the second characters.
 * 
 * The following metatag is supposed to perform the same function, but it works
 * inconsistently across browsers and DOCTYPES:
 * 
 *   <meta name="SKYPE_TOOLBAR" CONTENT="SKYPE_TOOLBAR_PARSER_COMPATIBLE">
 *
 *   <!-- sphoneid telnr="+27210000000" fileas="Willem van Zyl" -->021 000 0000<!-- sphoneid -->
 * 
 * 
 * This code is in the public domain.
 * 
 * Willem van Zyl
 * willem@geekology.co.za
 * http://www.geekology.co.za/blog/
 */

(function(jQuery){jQuery.geekSkypeRemover=function(microsecondsLeft){if(microsecondsLeft==0){return false;}
microsecondsLeft=microsecondsLeft-500;if(jQuery('span.skype_pnh_container').length==0){setTimeout('jQuery.geekSkypeRemover('+microsecondsLeft+')',500);}else{var originalText='';jQuery('span.skype_pnh_print_container').each(function(){originalText=jQuery(this).html();originalText=originalText.substring(0,1)+'<span style="display: none;">_</span>'+originalText.substring(1);jQuery(this).after(originalText);});jQuery('span.skype_pnh_container').remove();jQuery('span.skype_pnh_print_container').remove();}
return true;};})(jQuery);
