﻿/***************************/
//@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(){
	$(".accord_menu > li").click(function(e){
		switch(e.target.id){
			case "accord_news":
				//change status & style menu
				$("#accord_news").addClass("active");
				$("#accord_tutorials").removeClass("active");
				$("#accord_links").removeClass("active");
				$("#accord_petitions").removeClass("active");
				//display selected division, hide others
				$("div.accord_news").fadeIn();
				$("div.accord_tutorials").css("display", "none");
				$("div.accord_links").css("display", "none");
				$("div.accord_petitions").css("display", "none");
			break;
			case "accord_tutorials":
				//change status & style menu
				$("#accord_news").removeClass("active");
				$("#accord_tutorials").addClass("active");
				$("#accord_links").removeClass("active");
				$("#accord_petitions").removeClass("active");
				//display selected division, hide others
				$("div.accord_tutorials").fadeIn();
				$("div.accord_news").css("display", "none");
				$("div.accord_links").css("display", "none");
				$("div.accord_petitions").css("display", "none");
			break;
			case "accord_links":
				//change status & style menu
				$("#accord_news").removeClass("active");
				$("#accord_tutorials").removeClass("active");
				$("#accord_links").addClass("active");
				$("#accord_petitions").removeClass("active");
				//display selected division, hide others
				$("div.accord_links").fadeIn();
				$("div.accord_news").css("display", "none");
				$("div.accord_tutorials").css("display", "none");
				$("div.accord_petitions").css("display", "none");
			break;
			case "accord_petitions":
				//change status & style menu
				$("#accord_news").removeClass("active");
				$("#accord_tutorials").removeClass("active");
				$("#accord_links").removeClass("active");
				$("#accord_petitions").addClass("active");
				//display selected division, hide others
				$("div.accord_petitions").fadeIn();
				$("div.accord_news").css("display", "none");
				$("div.accord_tutorials").css("display", "none");
				$("div.accord_links").css("display", "none");
			break;
			
			
			
			case "accord_feature_listings":
				//change status & style menu
				$("#accord_feature_listings").addClass("active");
				$("#accord_Sales_of_Assets").removeClass("active");
				//display selected division, hide others
				$("div.accord_feature_listings").fadeIn();
				$("div.accord_Sales_of_Assets").css("display", "none");
			break;
			case "accord_Sales_of_Assets":
				//change status & style menu
				$("#accord_feature_listings").removeClass("active");
				$("#accord_Sales_of_Assets").addClass("active");
				//display selected division, hide others
				$("div.accord_Sales_of_Assets").fadeIn();
				$("div.accord_feature_listings").css("display", "none");
			break;
			
		}
		//alert(e.target.id);
		return false;
	});
});
