﻿$(document).ready(function() {
	$("#ATPCAgipStations .ATPCAgipStationsRow, #ATPCAgipShop .ATPCASbox").hide();
	$("#ATPCAgipStations h3, , #ATPCAgipShop h3").css({"cursor":"pointer"});
	
	$("#ATPCAgipStations h3").click(function(){
		if ($(this).hasClass("opened")) {
			$(this).removeClass('opened').next(".ATPCAgipStationsRow").slideUp();
		} else {
			$("#ATPCAgipStations h3.opened").next(".ATPCAgipStationsRow").slideUp();
			$("#ATPCAgipStations h3").removeClass('opened')
			$(this).addClass('opened').next(".ATPCAgipStationsRow").slideDown();
		}
	});
	
	$("#ATPCAgipShop h3").click(function(){
		if ($(this).hasClass("opened")) {
			$(this).removeClass('opened').next(".ATPCASbox").slideUp().removeClass('opened');
		} else {
			$("#ATPCAgipShop h3.opened").next(".ATPCASbox").slideUp('slow');
			$("#ATPCAgipShop h3").removeClass('opened')
			$(this).addClass('opened').next(".ATPCASbox").slideDown('slow');
		}
	});
});

