1
var icms = icms || {};
2
3
$(document).ready(function(){
4
5
for(module in icms){
6
if ( typeof(icms[module].onDocumentReady) == 'function' ) {
7
icms[module].onDocumentReady();
8
}
9
}
10
11
renderHtmlAvatar();
12
13
$('.widget_tabbed').each(function(){
14
15
$('.tabs .tab a', $(this)).click(function(){
16
var wid = $(this).data('id');
17
var block = $(this).parent('li').parent('ul').parent('.tabs').parent('.widget_tabbed');
18
$('.body', block).hide();
19
$('.links-wrap', block).hide();
20
$('#widget-'+wid, block).show();
21
$('#widget-links-'+wid, block).show();
22
$('.tabs a', block).removeClass('active');
23
$(this).addClass('active');
24
return false;
25
});
26
27
});
28
29
var dropdown = $("<select>").appendTo("nav");
30
$("<option value='/'></option>").appendTo(dropdown);
31
32
$("nav .menu li > a").each(function() {
33
var el = $(this);
34
var nav_level = $("nav .menu").parents().length;
35
var el_level = $(this).parents().length - nav_level;
36
var pad = new Array(el_level-2 + 1).join('-') + ' ';
37
var attr = {
38
value : el.attr('href'),
39
text : pad + el.text()
40
};
...
</html>