Holmesian Random Names

A quick implementation of the Holmesian Random Name concept described by Zenopus Archives at http://zenopusarchives.blogspot.com/2013/06/holmesian-random-names.html

by flightcommandersolitude

HTML

<div id="page">
    	<h1></h1>

    	<h2 id="btn" class="no-select" title="Click for another Holmesian random name">Another Holmesian Random Name</h1>
	<h3>via<br/><a href="http://zenopusarchives.blogspot.com/2013/06/holmesian-random-names.html">{ Zenopus Archives }</a></h2>

</div>

CSS

@import url(http://fonts.googleapis.com/css?family=IM+Fell+English);
body {
    margin:0.5in;
    color:#333;
    font-family:'IM Fell English', serif;
    font-size:16pt;
}
#page {
    margin:0 auto;
    width:8in;
    text-align:center;
}
h1 {
    margin:0;
    font-weight:400;
}
h2 {
    margin:0;
    font-weight:400;
}
h3 {
    margin:0;
    font-weight:400;
}
h3:last-child {
    margin-top:1in;
}
a {
    color:inherit;
    text-decoration:none;
}
.no-select {
    -webkit-user-select:none;
    -moz-user-select:none;
    -ms-user-select:none;
    user-select:none;
    cursor:pointer;
}

JavaScript

$(function () {
    var z = (function () {

        String.prototype.capitalize = function () {
            return this.charAt(0).toUpperCase() + this.slice(1);
        }

        function d(n) {
            return Math.ceil(n * Math.random());
        }

        function n() {
            var x = d(100);
            if (x > 90) return 4;
            if (x > 70) return 3;
            if (x > 10) return 2;
            return 1;
        }

        var ts = [
            ['af'],
            ['al', 'ael'],
            ['baf'],
            ['bel'],
            ['ber', 'berd'],
            ['bes'],
            ['bo'],
            ['bor'],
            ['bran'],
            ['bru'],
            ['car'],
            ['chor'],
            ['cig'],
            ['cla'],
            ['da'],
            ['do', 'doh'],
            ['don'],
            ['dor'],
            ['dre', 'dreb'],
            ['eg', 'feg'],
            ['er'],
            ['es'],
            ['ev'],
            ['fal', 'ful'],
            ['fan', 'fen'],
            ['far'],
            ['fum'],
            ['ga', 'gahn'],
            ['gaith'],
            ['gar'],
            ['gen', 'glen'],
            ['go'],
            ['gram'],
            ['ha'],
            ['hag', 'harg'],
            ['ho'],
            ['ig'],
            ['ka'],
            ['kar'],
            ['kra', 'krac'],
            ['ky'],
            ['lag'],
            ['lap'],
            ['le'],
            ['lef'],
            ['lis'],
            ['lo'],
            ['lu'],
            ['mal'],
            ['mar'],
            ['me'],
            ['mez'],
            ['mich'],
            ['mil', 'mul'],
            ['mo'],
            ['mun'],
            ['mus'],
            ['ned'],
            ['nic'],
            ['no'],
            ['nor'],
            ['nu'],
            ['os'],
            ['pal'],
            ['pen'],
            ['phil'],
            ['po', 'poy'],
            ['pos', 'pus'],
            ['pres'],
...