function showMe(r){
$("#subcontent").css("height","auto");
$.ajax({ url: 'content/'+r+'.html', context: document.body, success: function(data){
var x = data.split("<separate>");
  $('#subcontent').html(x[0]);
  $('#conttitle').html(x[1]);
  if($("#subcontent").height() < 300) { $("#subcontent").css("height","300px");
     
  }
}});

return false;
}

$(document).ready(function(){
  $(".showme").click(function(){
    $(this).parent().next().slideToggle();
    return false;
  });
   $(".showme").toggle(function(){
      $(this).html("zwiń &raquo;")
  }, function(){
      $(this).html("rozwiń &raquo;")
  });
  
  
  
  $(".submenu a").click(function(){
  
  showMe($(this).attr("rel"));
  
  var y;
  if(y=$(this).attr("rev")){
  
  $("#icon").removeClass();
  switch(y){
  case "0":
  $("#icon").addClass("iconbook");   
  break;
  case "1":
  $("#icon").addClass("iconbookbig");
  break;
  case "2":
  $("#icon").addClass("iconbookbig2");
  break;
  }
  }
  
  
  return false;
  });
});


