$(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');
  })
	
    
    
});

 

  




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";
}



