Merge branch 'dev' into live
[dylansserver.git] / includes / tabs.js
1 $(document).ready(function() {
2 if(document.location.hash){
3 $(document.location.hash + '_').show();
4 }
5 $("ul#portfolio li a.tab").each(function(){
6 if (document.location.href.indexOf($(this).attr("href")) == 0) {
7 $("#" + this.attr("href")).show("slide", 600);
8 }
9 $(this).attr("href", "#" + $(this).attr("href"));
10 });
11 var divs = document.getElementsByTagName('div');
12 var i = 0;
13 $("ul#portfolio li a.tab").click(function() {
14 i++;
15 $(".exhibit").hide();
16 var activeTab = $(this).attr("href") + '_';
17 if (i==1)
18 $(activeTab).show("slide", 600);
19 else
20 $(activeTab).show("puff", 600);
21 $(activeTab).addClass("active_exhibit");
22 });
23 $('#showdivs').click(function() {
24 for(i=0;i<divs.length;i++){
25 divs[i].className += (" shownDiv");
26 }
27 });
28 });