Almost-ready.
[static.git] / content / media / js / base.js
diff --git a/content/media/js/base.js b/content/media/js/base.js
new file mode 100644 (file)
index 0000000..6c48960
--- /dev/null
@@ -0,0 +1,31 @@
+(function($){
+
+
+function activate(tag) {
+    if (tag != 'author') {
+        $(".p-author").hide();
+        $("#b-author").removeClass('active');
+    }
+    if (tag != 'user') {
+        $(".p-user").hide();
+        $("#b-user").removeClass('active');
+    }
+    if (tag != 'inter') {
+        $(".p-inter").hide();
+        $("#b-inter").removeClass('active');
+    }
+    if ($("#b-" + tag).hasClass('active')) {
+        $(".p-" + tag).hide();
+        $("#b-" + tag).removeClass('active');
+    } else {
+        $(".p-" + tag).show();
+        $("#b-" + tag).addClass('active');
+    }
+}
+
+$("#b-author").click(function() {activate('author')});
+$("#b-user").click(function() {activate('user')});
+$("#b-inter").click(function() {activate('inter')});
+
+
+})(jQuery);
\ No newline at end of file