﻿/***************************/
//@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 "unozerouno":
				//change status & style menu
				$("#unozerouno").addClass("active");
				$("#privati").removeClass("active");
				$("#aziende").removeClass("active");
				$("#web").removeClass("active");
				//display selected division, hide others
				$("div.unozerouno").fadeIn();
				$("div.privati").css("display", "none");
				$("div.aziende").css("display", "none");
				$("div.web").css("display", "none");
			break;
			case "privati":
				//change status & style menu
				$("#unozerouno").removeClass("active");
				$("#privati").addClass("active");
				$("#aziende").removeClass("active");
				$("#web").removeClass("active");
				//display selected division, hide others
				$("div.privati").fadeIn();
				$("div.unozerouno").css("display", "none");
				$("div.aziende").css("display", "none");
				$("div.web").css("display", "none");
			break;
			case "aziende":
				//change status & style menu
				$("#unozerouno").removeClass("active");
				$("#privati").removeClass("active");
				$("#aziende").addClass("active");
				$("#web").removeClass("active");
				//display selected division, hide others
				$("div.aziende").fadeIn();
				$("div.unozerouno").css("display", "none");
				$("div.privati").css("display", "none");
				$("div.web").css("display", "none");
			break;
			case "web":
				//change status & style menu
				$("#unozerouno").removeClass("active");
				$("#privati").removeClass("active");
				$("#aziende").removeClass("active");
				$("#web").addClass("active");
				//display selected division, hide others
				$("div.web").fadeIn();
				$("div.unozerouno").css("display", "none");
				$("div.privati").css("display", "none");
				$("div.aziende").css("display", "none");
			break;
		}
		//alert(e.target.id);
		return false;
	});
});
