 var actual = 1;

 function homepage2(id, what){
    if(what == 1){   
    $("#h" + id).attr("src", "/images/home_" + id + "_hover.png");
   } else { 
    $("#h" + id).attr("src", "/images/home_" + id + ".png");
   } 
 }
 
 function homepage(id,where, what){
    if(what == 1){
      $(id).attr("src", "/images/home_"+where+"_hover.png");
    }
    else {
      $(id).attr("src", "/images/home_"+where+".png");
    }
 }
 
function slideit(where){
     if(where == 1){        
        will  = actual + 4;
        will2 = actual - 1;
        $("#part" + will).hide();
        $("#part" + will2).fadeIn(); 
        actual--;
     } 
     else if(where == 2){
        will  = actual + 5;
        $("#part" + actual).hide();
        $("#part" + will).fadeIn(); 
        actual++;
     }
   if((actual + 5) > pocet){
      $("#aright").fadeOut();
   }
   else {
      $("#aright").fadeIn();
   }
   if(actual == 1){
      $("#aleft").fadeOut();
   }
   if(actual == 2){
       $("#aleft").fadeIn();
   }


 }
 
function changepicture(what, where, action){
  if(action == 1){
    $(what).attr("src", "/files/2" + where);

  } else {  
    $(what).attr("src", "/files/" + where);

  }
}
