 <!-- begin popup.php -->
 
 
<script type="text/javascript">

  function hide(){
   $("#shade").remove();
   $("#window").remove();
  }

 $(document).ready(function() {

    var okno="<div id=\"shade\" style=\"position:absolute; left:0px; top:0px; width:100%; height:100%; background-image:url('images/shade.png'); background-repeat:repeat;\"></div>          \
                     <div id=\"window\" style=\"position:absolute; left:100px; top:300px; background-color:#FFFFFF;\">                                                                    \
                     <div id=\"bar\" style=\"position:relative; left:5px; top:5px; width:490px; height:16px; background-color:#DDDDDD;>\">Nový snímač!</div>                                                   \
                     <div id=\"exit\" style=\"position:relative; left:474px; top:-11px; width:16px; height:16px; background-color:#FF0000; color:#FFFFFF; font-weight:bold; text-align:center; \"><a href=\"#\" onclick=\"hide()\" style=\"color:white;\">X</a></div>        ";             
    
    $.ajax({
      url: "include/popup_asociace.php",
      cache: false,
      async: false
     }).done(function(data) {
       
       okno=okno+data;
       okno=okno+"</div>";
    
       $(".post").before(okno);
    
       var sirka=$(document).width();
       var sirka_okna=$("#window").width();
       $("#window").css({"left": (sirka/2)-(sirka_okna/2)});    
     
       var vyska=$(document).height();
       var vyska_okna=$("#window").height();
       $("#window").css({"top": (vyska/2)-(vyska_okna/2)});  
     
     });
                    
});

</script>
 <!-- end popup.php -->