1 $(document).ready(function () {
2 // subpage configuration
7 ["Index", "index.html", "images/Index.png"],
8 ["About", "About.html", "images/Calf Studio Gear.jpg"],
9 ["Controls", "Controls.html", "images/Calf - Controls.jpg"],
10 ["Calf Rack", "Calf.html", "images/Calf.jpg"]
17 ["(Organ)", "Organ.html", "images/Calf - Organ - Sound Processor.jpg"],
18 ["(Monosynth)", "Monosynth.html", "images/Calf - Monosynth - Audio Path.jpg"],
20 "icons/synthesizer.png"
25 ["(Multi Chorus)", "Multi Chorus.html", "images/Calf - Multi Chorus.jpg"],
26 ["(Phaser)", "Phaser.html", "images/Calf - Phaser.jpg"],
27 ["(Flanger)", "Flanger.html", "images/Calf - Flanger.jpg"],
28 ["(Rotary Speaker)", "Rotary Speaker.html", "images/Calf - Rotary Speaker.jpg"],
29 ["Pulsator", "Pulsator.html", "images/Calf - Pulsator.jpg"],
30 ["Ring Modulator", "Ring Modulator.html", "images/Calf - Ring Modulator.jpg"],
32 "icons/modulation.png"
37 ["(Reverb)", "Reverb.html", "images/Calf - Reverb.jpg"],
38 ["(Vintage Delay)", "Vintage Delay.html", "images/Calf - Vintage Delay.jpg"],
39 ["Compensation Delay Line", "Compensation Delay Line.html", "images/Calf - Compensation Delay Line.jpg"],
46 ["Compressor", "Compressor.html", "images/Calf - Compressor.jpg"],
47 ["Sidechain Compressor", "Sidechain Compressor.html", "images/Calf - Sidechain Compressor.jpg"],
48 ["Multiband Compressor", "Multiband Compressor.html", "images/Calf - Multiband Compressor.jpg"],
49 ["Mono Compressor", "Mono Compressor.html", "images/Calf - Mono Compressor.jpg"],
50 ["Deesser", "Deesser.html", "images/Calf - Deesser.jpg"],
51 ["Gate", "Gate.html", "images/Calf - Gate.jpg"],
52 ["Sidechain Gate", "Sidechain Gate.html", "images/Calf - Sidechain Gate.jpg"],
53 ["Multiband Gate", "Multiband Gate.html", "images/Calf - Multiband Gate.jpg"],
54 ["Limiter", "Limiter.html", "images/Calf - Limiter.jpg"],
55 ["Multiband Limiter", "Multiband Limiter.html", "images/Calf - Multiband Limiter.jpg"],
56 ["Transient Designer", "Transient Designer.html", "images/Calf - Transient Designer.jpg"]
63 ["Filter", "Filter.html", "images/Calf - Filter.jpg"],
64 ["(Filterclavier)", "Filterclavier.html", "images/Calf - Filterclavier.jpg"],
65 ["Equalizer 5 Band", "Equalizer 5 Band.html", "images/Calf - Equalizer 5 Band.jpg"],
66 ["Equalizer 8 Band", "Equalizer 8 Band.html", "images/Calf - Equalizer 8 Band.jpg"],
67 ["Equalizer 12 Band", "Equalizer 12 Band.html", "images/Calf - Equalizer 12 Band.jpg"],
68 ["(X-Over 2 Band)", "X-Over 2 Band.html", "images/Calf - X-Over 2 Band.jpg"],
69 ["(X-Over 3 Band)", "X-Over 3 Band.html", "images/Calf - X-Over 3 Band.jpg"],
70 ["(X-Over 4 Band)", "X-Over 4 Band.html", "images/Calf - X-Over 4 Band.jpg"],
71 ["(Vocoder)", "Vocoder.html", "images/Calf - Vocoder.jpg"],
78 ["(Saturator)", "Saturator.html", "images/Calf - Saturator.jpg"],
79 ["Exciter", "Exciter.html", "images/Calf - Exciter.jpg"],
80 ["Bass Enhancer", "Bass Enhancer.html", "images/Calf - Bass Enhancer.jpg"],
81 ["Tape Simulator", "Tape Simulator.html", "images/Calf - Tape Simulator.jpg"],
82 ["Crusher", "Crusher.html", "images/Calf - Crusher.jpg"],
84 "icons/distortion.png"
89 ["Mono Input", "Mono Input.html", "images/Calf - Mono Input.jpg"],
90 ["Stereo Tools", "Stereo Tools.html", "images/Calf - Stereo Tools.jpg"],
91 ["Analyzer", "Analyzer.html", "images/Calf - Analyzer.jpg"],
97 // Build menu structure
98 var menu = $("<div class='menu'/>");
99 $("body").prepend(menu);
100 for(var i = 0; i < items.length; i++) {
101 var submenu = $("<ul class='submenu' id='menu_" + items[i][0] + "'/>").appendTo(menu);
102 var icon = $("<img src='images/" + items[i][2] + "' alt='" + items[i][0] + "' class='micon' id='" + items[i][0] + "'/>").appendTo(menu);
103 $("<span>" + items[i][0] + "</span>").appendTo(menu);
104 icon.mouseenter(function (e) {
105 show_menu("#menu_" + $(this).attr("id"));
107 icon.mouseleave(function (e) {
108 hide_menu("#menu_" + $(this).attr("id"));
110 submenu.mouseenter(function (e) {
113 submenu.mouseleave(function (e) {
116 for(var j = 0; j < items[i][1].length; j++) {
118 $("<li><img class='marrow' src='images/marrow.png'/><h3>" + items[i][0] + "</h3></li>").appendTo(submenu);
120 $("<h3><img src='images/" + items[i][2] + "' class='iicon'/>" + items[i][0] + "</h3>").appendTo($("#index"));
121 var iul = $("<ul/>").appendTo($("#index"));
124 var li = $("<li/>").appendTo(submenu);
125 if ($("#index") && items[i][1][j][2]) {
126 var ili = $("<li/>").appendTo(iul);
127 var l = $("<a href='" + items[i][1][j][1] + "'><span>" + items[i][1][j][0] + "</span></a>").appendTo(ili);
128 $("<img src=\"" + items[i][1][j][2] + "\" alt=\"" + items[i][1][j][0] + "\">").prependTo(l);
130 var cl=items[i][1][j][0][0] == "(" ? " class='inactive'" : "";
131 var a = $("<a" + cl + " href=\"" + items[i][1][j][1] + "\" title=\"" + items[i][1][j][0] + "\">" + items[i][1][j][0] + "</a>").appendTo(li);
132 a.click(function (e) {
133 hide_menu("#menu_" + $(this).parent().parent().attr("id"));
135 if (i >= items.length - 1)
136 $("<br clear='all'/>").appendTo($("#index"));
139 top: Math.min(icon.position().top + 5, $(window).height() - submenu.outerHeight())
142 $(".prettyPhoto").prettyPhoto({
143 theme: 'dark_rounded',
147 $(window).resize(resize);
151 var hide_menu = function (id) {
156 }, 300, function () { $(this).css({display: "none"});});
158 var show_menu = function (id) {
168 var resize = function () {
169 var width = $(".wrapper").width();
171 'font-size' : ((width / 1500 + 0.25) * 1.1) + "em",
172 'line-height' : ((width / 1500 + 1) * 1.1) + "em"