Almost-ready.
[static.git] / content / media / js / base.js
1 (function($){
2
3
4 function activate(tag) {
5     if (tag != 'author') {
6         $(".p-author").hide();
7         $("#b-author").removeClass('active');
8     }
9     if (tag != 'user') {
10         $(".p-user").hide();
11         $("#b-user").removeClass('active');
12     }
13     if (tag != 'inter') {
14         $(".p-inter").hide();
15         $("#b-inter").removeClass('active');
16     }
17     if ($("#b-" + tag).hasClass('active')) {
18         $(".p-" + tag).hide();
19         $("#b-" + tag).removeClass('active');
20     } else {
21         $(".p-" + tag).show();
22         $("#b-" + tag).addClass('active');
23     }
24 }
25
26 $("#b-author").click(function() {activate('author')});
27 $("#b-user").click(function() {activate('user')});
28 $("#b-inter").click(function() {activate('inter')});
29
30
31 })(jQuery);