
function init_gallery(id){
  $(function() {
     $("#gallery_"+id+" .scroll_gallery").jCarouselLite({
        speed: 1000,
        visible: 1,
        btnNext: "#gallery_"+id+" .gallery_next",
        btnPrev: "#gallery_"+id+" .gallery_pref",
        vertical: false
    });
  });
}

$(function() {
     $("#galleryPhotoList .galleryListElement").jCarouselLite({
        speed: 1000,
        visible: 4,
        btnNext: ".next",
        btnPrev: ".prev",
        vertical: false
    });
    
    
  $('.scroll_gallery a').lightBox();
});
function insertBigPhoto(name){ 
  document.getElementById('galleryBigPhoto').innerHTML = '<img src="upLoad/img/gallery/b_'+name+'" alt="" />';
}

$(document).ready(function(){

	$("ul.menuSlide").treeview({
		animated: "slow",
		collapsed: true,
		unique: false
	});
	
	$(".formAccount").validate({
	rules: {
			formEmailKoordynator: {
				required: true,
	      email: true
			},
			formEmail: {
				required: true,
	      email: true
			}
		}
	});	
	
	

  $('#printPageButton').click(function () {window.print()});
  
  $('a.targetBlank').attr('target', '_blank');
  
  $("ul#pccListUser div").hide();
  $("ul#pccListUser b").css('cursor', 'pointer');
  $("ul#pccListUser b").click(function () {
    var nextDiv = $(this).next("div");
    
    if(nextDiv.is(":visible")){
      nextDiv.hide();
    }else{
      nextDiv.show();
    }
  });
  
  
 $("input[name='formTyp[specialist_hospital]']").click(function () {
  
  if($("input[id='formStatus[specialist_hospital]']:checked").length){
      $("#specialistHospitalList").show();
    }else{
      $("#specialistHospitalList").hide();
    }

  });
  
 $("input[name='formTyp[other]']").click(function () {
    
  if($("input[id='formStatus[other]']:checked").length){
      $("#specialistHospitalOther").show();
    }else{
      $("#specialistHospitalOther").hide();
    }

  });

});
