$(document).ready(function(){
        tabs("zakladki");      
  });

function tabs(id) {
          if (GetCookie('ciacho')!=null) {
          $("#"+GetCookie('ciacho')!='').addClass("active");
          $("#"+id+" div").not("#"+GetCookie('ciacho')).hide();
                                       }
          else {
         $("#"+id+" h2:first a").addClass("active");
         $("#"+id+" div").not(":first").hide();
               }                           
                
               
                $("#"+id+" h2 a").click(function() {
                        var licznik = $("#"+id+" h2 *").index(this);                                             
                                                                                 
                        $("#"+id+" h2 a").removeClass("active");
                        $(this).addClass("active");
                        $("#"+id+" div:visible").hide();
                        
                        $("#"+id+" div").eq(licznik).show();
                        return false;
                }); 
 }
