Cufon.replace('#navi li:not(.active, #first)', { hover: true, fontSize: '14px', textShadow: '#223a54 -1px -1px' });
Cufon.replace('#navi li.active:not(#first)', { hover: true, fontSize: '14px' });
Cufon.replace('.cuf, h2, .btn, .mainCol h4', { hover: true });

function formInputCheck() {
  if($('#mapDetail form #street').val()=='') {
    $('#mapDetail form .street').show();
  } else {
    $('#mapDetail form .street').hide();
  }
}

/*
function callbackFunction(vals, select){
	$("#the_value").html(vals.value);
}
*/

$(document).ready(function(){

  $('body').addClass('js');

  if($('#hpCarousel').length) {
		$("#hpCarousel").simplyScroll({
			autoMode: 'loop',
			speed: '2'
		});
  }

  /* zobrazeni labelu v hlavicce */
  formInputCheck();
  $('#mapDetail form .street, #header form #street').click(function(){
    $('#mapDetail form .street').hide().parent().find('input').focus();
  });
  $('#mapDetail form #street').blur(function(){
    formInputCheck();
  });
  $('#mapDetail form #street').focus(function(){
    $('#mapDetail form .street').hide();
  })

/*  if($('.nice').length) {
  	var options = {selectCallback: callbackFunction};
  	$('select.nice').niceSelect(options);
  }*/

  /* partneri */
  if($('.partners').length) {
    var p = $(this);
    
    p.find('.text').each(function(){
      if($(this).height()>14) {
        $(this).css({'height' : '14px'}).append('<span class="more"><span class="dots">...</span>  <a href="" class="more">více</a></span>')
      }
    })
    
    p.find('.text span.more a').click(function(){
      if($(this).parent().hasClass('less')) {
        $(this).html('více').parent().removeClass('less').parent().css({'height' : '14px'});
        $(this).parent().find('span.dots').show();
      } else {
        $(this).html('méně').parent().addClass('less').parent().css({'height' : 'auto'});
        $(this).parent().find('span.dots').hide();
      }
      return false;
    })    
    
  }  

})

