HAAS Stereo Enhancer
[calf.git] / doc / manuals / scripts / manual.js
bloba34d32ceb748050e31196b801c7e015e6991e378
1 $(document).ready(function () {
2     // subpage configuration
3     var items = [
4         [
5             "Index",
6             [
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"]
11             ],
12             "icons/index.png"
13         ],
14         [
15             "Synthesizer",
16             [
17                 ["(Organ)", "Organ.html", "images/Calf - Organ - Sound Processor.jpg"],
18                 ["(Monosynth)", "Monosynth.html", "images/Calf - Monosynth - Audio Path.jpg"],
19             ],
20             "icons/synthesizer.png"
21         ],
22         [
23             "Modulation",
24             [
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"],
31             ],
32             "icons/modulation.png"
33         ],
34         [
35             "Delay",
36             [
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"],
40             ],
41             "icons/delay.png"
42         ],
43         [
44             "Dynamics",
45             [
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"]
57             ],
58             "icons/dynamics.png"
59         ],
60         [
61             "Filters",
62             [
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"],
72             ],
73             "icons/filters.png"
74         ],
75         [
76             "Distortion",
77             [
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"],
83             ],
84             "icons/distortion.png"
85         ],
86         [
87             "Tools",
88             [
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"],
92             ],
93             "icons/tools.png"
94         ]
95     ];
96     
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"));
106         });
107         icon.mouseleave(function (e) {
108             hide_menu("#menu_" + $(this).attr("id"));
109         });
110         submenu.mouseenter(function (e) {
111             show_menu(this);
112         });
113         submenu.mouseleave(function (e) {
114             hide_menu(this);
115         });
116         for(var j = 0; j < items[i][1].length; j++) {
117             if (!j) {
118                 $("<li><img class='marrow' src='images/marrow.png'/><h3>" + items[i][0] + "</h3></li>").appendTo(submenu);
119                 if ($("#index")) {
120                     $("<h3><img src='images/" + items[i][2] + "' class='iicon'/>" + items[i][0] + "</h3>").appendTo($("#index"));
121                     var iul = $("<ul/>").appendTo($("#index"));
122                 }
123             }
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);
129             }
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"));
134             });
135             if (i >= items.length - 1)
136                 $("<br clear='all'/>").appendTo($("#index"));
137         }
138         submenu.css({
139             top: Math.min(icon.position().top + 5, $(window).height() - submenu.outerHeight())
140         });
141     }
142     $(".prettyPhoto").prettyPhoto({
143         theme: 'dark_rounded',
144         social_tools: '',
145         show_title: false,
146     });
147     $(window).resize(resize);
148     resize();
151 var hide_menu = function (id) {
152     $(id).clearQueue();
153     $(id).stop();
154     $(id).animate({
155         opacity: 0
156     }, 300, function () { $(this).css({display: "none"});});
158 var show_menu = function (id) {
159     $(id).clearQueue();
160     $(id).stop();
161     $(id).css({
162         display: "block"
163     });
164     $(id).animate({
165         opacity: 1.0
166     }, 300);
168 var resize = function () {
169     var width = $(".wrapper").width();
170     $("body").css({
171         'font-size'   : ((width / 1500 + 0.25) * 1.1) + "em",
172         'line-height' : ((width / 1500 + 1) * 1.1) + "em"
173     });