var rescope = function(scope, method){
        if(!method){ method = scope; scope = null; }
        if(typeof method == "string"){
                scope = scope || window;
                if(!scope[method]){ throw(['method not found']); }
                return function(){ return scope[method].apply(scope, arguments || []); };
        }
        return !scope ? method : function(){ return method.apply(scope,
arguments || []); };

}

var tagFirstLetter = function(str, bTag, eTag){
		str= str.toLowerCase().replace(/([-\.']) */g,'$1 ');
    		
		var rx= /\b([a-z'-\.]+)\b/ig;
		
    str= str.replace(rx,function(w){
		  return bTag+w.charAt(0)+eTag+w.substring(1);
		});
		
		return str.replace(/^ *|(\-|') *| *$/g,'$1');
		
}


