<?
 $image = getimagesize( substr( $this -> banner['languages']['src'], 1, strlen( $this -> banner['languages']['src'] ) ) );
?>
<div id="popup-bg" onClick="popup_close(); return false;">
  <div id="popup-content"
    <? if ( $this -> banner['languages']['url'] ):?>onClick="document.location.href='<?= $this -> banner['languages']['url'];?>'; return false;"<? endif;?>">
    <? if ( $this -> banner['languages']['src'] ):?>
      <img src="<?= $this -> banner['languages']['src'];?>" style="<? if ( $image[0] ):?> max-width: height: <?= $image[0];?>px;<? endif;?>;<? if ( $image[1] ):?>max-height: <?= $image[1];?>px;<? endif;?>">
    <? endif;?>
    <? if ( $this -> banner['languages']['html'] ): echo $this -> banner['languages']['html']; endif;?>
    <? if ( $this -> banner['languages']['text'] ): echo $this -> banner['languages']['text']; endif;?>
  </div>
</div>
<script class="footer" type="text/javascript">
  $( function()
  {
    $( 'body' ).addClass( 'no-scroll' );
  });

  function popup_close()
  {
    $.ajax(
    {
      type: 'POST',
      cache: false,
      url: 'ajax.php',
      data:
      {
        a: 'banner_close'
      },
      success: function( data )
      {
        jQuery( "#popup-bg" ).remove();
        $( 'body' ).removeClass( 'no-scroll' );
      }
    });
  }
</script>