$(function(){
      $("#events-feed").hide();
      var state = function(name, state){
          $("#"+name+"-feed").css("display", state ? "block" : "none");
          $("#"+name+"-infohead a").css({"background-position": (state ? "-0px -50px" : "0px 0px"),
                                         "padding": "10px 10px "+(state ? "12" : "11")+"px 10px"
                                        });
      };
      $("#events-infohead").click(function(){
                                      state("news", false);
                                      state("events", true);
                                  });
      $("#news-infohead").click(function(){
                                    state("events", false);
                                    state("news", true);
                                });
      $("#news-infohead").click();
});
