.centermodal{
	position:absolute;
	width:auto;
	max-height:600px;
	top:50%;
	left:50%;
	margin-left:-350px;
	margin-top:-250px;	

}
.modalmask {
	position: fixed;
	font-family: Arial, sans-serif;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0,0,0,0.8);
	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.modalmask:target {
	opacity:1;
	pointer-events: auto;
}
.modalbox{
	width: 50%;
	position: relative;
	padding: 5px 20px 13px 20px;
	background: transparent;
	border-radius:3px;
	-webkit-transition: all 500ms ease-in;
	-moz-transition: all 500ms ease-in;
	transition: all 500ms ease-in;
	
}

.movedown {
	margin: 0 auto;
}
.rotate {
	margin: 10% auto;
	-webkit-transform: scale(-5,-5); 
	transform: scale(-5,-5);
}
.resize {
	margin: 10% auto;
	width:0;
	height:0;

}
.modalmask:target .movedown{		
	margin:5% auto;
}
.modalmask:target .rotate{		
	transform: rotate(360deg) scale(1,1);
    -webkit-transform: rotate(360deg) scale(1,1);
}

.modalmask:target .resize{
	width:400px;
	height:200px;
}



.close {
	background: red;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: 1px;
	text-align: center;
	top: 1px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	border-radius:5px;
	font-size:16px;
}

.close:hover {
    background: #0ea227;
    color: #fff;
}

div#avisonovag img {
    width: 100%;
    border-radius: 5px; 
}

.nsc{
	position:absolute;
	bottom:40%;
	right:0;
}
.modalbox a {color:#fff !important;}
@media (max-width: 1024px) {
  .modalbox{
	width: 90%;
    
  }
  .centermodal{margin-left: 0 !important;margin-right: 0 !important;}
}