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