kuchuluk,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
#window{
display: none;
background:rgba(0,0,0,0.6);
height:100%;
width:100%;
position:absolute;
z-index: 998;
top: 0;
left: 0;
cursor: pointer;
}
#window-main{
display: none;
background:#f1ecec;
position:absolute;
z-index: 999;
width:240px;
height:151px;
padding:20px;
top: 19%;
left: 50%;
;
margin-top: -75;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function () {
$(".voting-btn").click(function () {
$("#window-main").css("display", "block");
$("#window").css("display", "block")
});
$("#window").click(function (a) {
$(a.target).has("#window-main").length && ($("#window-main").css("display", "none"), $("#window").css("display", "none"))
})
});
</script>
</head>
<body> <input name="" type="button" value="go" class="voting-btn">
<div id="window">
<div id="window-main">
</div>
</div>
</body>
</html>