$(document).ready(function(){
  $('#ost').css('border-right','2px solid #ff9900')  ;
  $('.zmiana_typu').parent().attr("id","li" + $(this).attr("id"));
  $('.zmiana_typu').click(function(){
    var nowytyp=$(this).attr("rel");
    if(nowytyp != '1'){
      $('.filtry_wyniki').hide();
    }else if( $('input[name=przefiltrowane]').val()=='1' ){
      $('.filtry_wyniki').show();
    }
    var starytyp=$('#gazetki_top_s').attr("rel");
    $('#gazetki_top_s').attr("rel",nowytyp);
    $('#gazetki_top_s').removeClass('gazetki_top_s' + starytyp).addClass('gazetki_top_s' + nowytyp);
    $('.active').removeClass('active').addClass('normal');
    $(this).parent().addClass('active');
    $('#typ'+starytyp).hide();
    $('#typ'+nowytyp).show();
    return false;
  });
})