﻿$(document).ready(function (){

    // hide all the tabs initially
    // $("#content_finder div.article_center").css("display", "none");
    // $("#content_finder div.activity_center").css("display", "none");
    // $("#content_finder div.questions_center").css("display", "none");
    // $("#content_finder div.video_center").css("display", "none");
    // $("#content_finder div.other_center").css("display", "none");

    
    // show the results
    $("#content_finder").css("display","block");
   
  
    $("div.articletab").click(function () {
	    if ($(this).hasClass('showing')) {
			    $(this).removeClass('showing');
			    $(this).siblings("div.article_center").hide("fast");
	    } else {
			    $(this).addClass('showing');
			    $(this).siblings("div.article_center").show("fast");
	    }
    });
    
    $("div.activitytab").click(function () {
	    if ($(this).hasClass('showing')) {
			    $(this).removeClass('showing');
			    $(this).siblings("div.activity_center").hide("fast");
	    } else {
			    $(this).addClass('showing');
			    $(this).siblings("div.activity_center").show("fast");
	    }
    });
    
    $("div.questionstab").click(function () {
	    if ($(this).hasClass('showing')) {
			    $(this).removeClass('showing');
			    $(this).siblings("div.questions_center").hide("fast");
	    } else {
			    $(this).addClass('showing');
			    $(this).siblings("div.questions_center").show("fast");
	    }
    });
    
    $("div.videotab").click(function () {
	    if ($(this).hasClass('showing')) {
			    $(this).removeClass('showing');
			    $(this).siblings("div.video_center").hide("fast");
	    } else {
			    $(this).addClass('showing');
			    $(this).siblings("div.video_center").show("fast");
	    }
    });
    
    $("div.othertab").click(function () {
	    if ($(this).hasClass('showing')) {
			    $(this).removeClass('showing');
			    $(this).siblings("div.other_center").hide("fast");
	    } else {
			    $(this).addClass('showing');
			    $(this).siblings("div.other_center").show("fast");
	    }
    });
    
});
