rss layout now fully separated m/v/c
[dylansserver.git] / includes / tabs.js
index 511d314..346b76b 100644 (file)
@@ -1,19 +1,28 @@
 $(document).ready(function() {
-       $(".tabs").hide();
+       if(document.location.hash){
+               $(document.location.hash + '_').show();
+       }
+       $("ul#portfolio li a.tab").each(function(){
+               if (document.location.href.indexOf($(this).attr("href")) == 0) {
+                       $("#" + this.attr("href")).show("slide", 600);
+               }
+               $(this).attr("href", "#" + $(this).attr("href"));
+       });
+       var divs = document.getElementsByTagName('div');
        var i = 0;
-       $("ul.portfolio li").click(function() {
+       $("ul#portfolio li a.tab").click(function() {
                i++;
-               $(".tabs").hide();
-               $("ul.portfolio li").removeClass("active");
-               $(this).addClass("active_project");
-
-               var activeTab = $(this).find("a").attr("href");
+               $(".exhibit").hide();
+               var activeTab = $(this).attr("href") + '_';
                if (i==1)
-                       $(activeTab).show("fold", 400);
+                       $(activeTab).show("slide", 600);
                else
                        $(activeTab).show("puff", 600);
-               $(activeTab).addClass("active_tab");
-               return false;
+               $(activeTab).addClass("active_exhibit");
+       });
+       $('#showdivs').click(function() {
+               for(i=0;i<divs.length;i++){
+                       divs[i].className += (" shownDiv");
+               }
        });
-
 });