$(document).ready(function() {
   $('.infobox a').click(function(){
      $('.infobox').hide('slow');  
    })
    
    $('a.login-close').click(function(){
      $('.popup-login').fadeOut('slow');  
    })
    
    $('#phone').focus(function(){
		$('.predvolba').fadeIn('slow');
	});
	$('.close').click(function(){
		$('.popup').css('display','none');
		$('.opacity').css('display','none');
	})
	$('.close-rezidents').click(function(){
    $('.popup-rezidents').css('display','none');
  })
  
  $('#vypis_cenik tr').hover(function(){        
        $(this).addClass('table-back');
       }, function(){
       $(this).removeClass('table-back'); 
       });
	
	var banner3d = $('#banner3d').html();
	$('.detail-right-td').prepend(banner3d);
	$('.flat-detail-table .banner3d-in').show();
  $('td.detail-right-td').css('vertical-align','top');
  

  
  /*setTimeout("initSnow('snow-right', 100)", 100);
  setTimeout("initSnow('snow-left', 100)", 100);
  setTimeout("initSnow('snow-right',250)", 500);
  setTimeout("initSnow('snow-left',250)", 500);
  setTimeout("initSnow('snow-right',420)", 700);
  setTimeout("initSnow('snow-left',420)", 700);
  setTimeout("initSnow('snow-right',0)", 1500);
  setTimeout("initSnow('snow-left',0)", 1500);
  setInterval("initSnow('snow-right',0)", 5000 );
  setInterval("initSnow('snow-left',0)", 5000 );*/ 
});

 

  




function showPopup(referer) {
    //window.open(url,'albertov','width=490,height=390');
    $('.popup-rezidents').show('fast');
    $('#rezident_referer').attr('value',referer);
  }

function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
  return false;
return true;
}

function isAllowedPass(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122))
  return false;
return true;

}

function darkBack(id) {
	document.getElementById (id).className = "katalog_item_dark";
}
function lightBack(id) {
	document.getElementById (id).className = "katalog_item";
}
function darkBackRight(id) {
	document.getElementById (id).className = "katalog_item_right_dark";
}
function lightBackRight(id) {
	document.getElementById (id).className = "katalog_item_right";
}



