﻿/***************************/
//@Author: Adrian "yEnS" Mato Gondelle & Ivan Guardado Castro
//@website: www.yensdesign.com
//@email: yensamg@gmail.com
//@license: Feel free to use it, but keep this credits please!
/***************************/

$(document).ready(function() {
    $("#menu > li").click(function(e) {
        switch (e.target.id) {
            case "mostRead":
                //change status & style menu
                $("#mostRead").addClass("active");
                $("#mostComments").removeClass("active");
                $("#mostRecommended").removeClass("active");
                 //display selected division, hide others
                $("div.mostRead").fadeIn();

                $("div.mostComments").css("display", "none");
                $("div.mostRecommended").css("display", "none");
                
                
                
                break;
            
            case "mostComments":
                //change status & style menu
                $("#mostComments").addClass("active");
                $("#mostRead").removeClass("active");
                $("#mostRecommended").removeClass("active");
                 //display selected division, hide others
                $("div.mostComments").fadeIn();

                $("div.mostRead").css("display", "none");
                $("div.mostRecommended").css("display", "none");
               
 
                
                
                break;

            case "mostRecommended":
                //change status & style menu
                $("#mostRecommended").addClass("active");
                $("#mostRead").removeClass("active");
                $("#mostComments").removeClass("active");
                 //display selected division, hide others
                $("div.mostRecommended").fadeIn();

                $("div.mostRead").css("display", "none");
                $("div.mostComments").css("display", "none");
                 
                break;

           
        }
        //alert(e.target.id);
        return false;
    });
});
