/*
 * Word Breaker - jQuery plugin
 *
 * Copyright (c) 2009 bushimichi bushimichi@gmail.com
 *
 * Dual licensed under
 * the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.gnu.org/licenses/gpl.html) licenses.
 *
 * Version: 0.1
 *
 */
  jQuery(function($){
 
    $.wb = {
      
      version: 0.1
         
     ,sep: String.fromCharCode(8203)
      
     ,remake: function(elm, nflg){
       h = elm.contents();
           elm.html('');
       $(h).each(function(){
         if(this.nodeType == 3){
           elm.append(this.textContent.split('').join($.wb.sep));
         }else{
           elm.append($.wb.remake($(this)));
         }
       });
       return elm;
     }
    }
    
    $.fn.wb = function(){
      if($.browser.mozilla){
        $(this).each(function(){ $.wb.remake($(this));});
      }
    }
  });
