﻿/***************************/
//@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!					
/***************************/

(function($) {
    // $() will work as an alias for jQuery() inside of this function
})(jQuery);

$(document).ready(function(){
	$(".tabsmenu > li").click(function(e){
		switch(e.target.id){
			case "local":
				//change status & style menu
				$("#local").addClass("active");
				$("#national").removeClass("active");
				$("#international").removeClass("active");
				$("#israel").removeClass("active");
				//display selected division, hide others
				$("div.local").fadeIn();
				$("div.national").css("display", "none");
				$("div.international").css("display", "none");
				$("div.israel").css("display", "none");
			break;
			case "national":
				//change status & style menu
				$("#local").removeClass("active");
				$("#national").addClass("active");
				$("#international").removeClass("active");
				$("#israel").removeClass("active");
				//display selected division, hide others
				$("div.national").fadeIn();
				$("div.local").css("display", "none");
				$("div.international").css("display", "none");
				$("div.israel").css("display", "none");
			break;
			case "international":
				//change status & style menu
				$("#local").removeClass("active");
				$("#national").removeClass("active");
				$("#international").addClass("active");
				$("#israel").removeClass("active");
				//display selected division, hide others
				$("div.international").fadeIn();
				$("div.local").css("display", "none");
				$("div.national").css("display", "none");
				$("div.israel").css("display", "none");
			break;
			case "israel":
				//change status & style menu
				$("#local").removeClass("active");
				$("#national").removeClass("active");
				$("#international").removeClass("active");
				$("#israel").addClass("active");
				//display selected division, hide others
				$("div.israel").fadeIn();
				$("div.local").css("display", "none");
				$("div.national").css("display", "none");
				$("div.international").css("display", "none");
			break;
		}
		//alert(e.target.id);
		return false;
	});
});
