Javascript печать в popup окне

Пример печати купонов. ХТМЛ:

<p><a class="btnPrint" href="/images/coupon/coupon_new1.png"><img src="/images/coupon/coupon_new1.png" alt="coupon new1" /></a></p>
<p><a class="btnPrint" href="/images/coupon/coupon_new2.png"><img src="/images/coupon/coupon_new2.png" alt="coupon new2" /></a></p>
<p><a class="btnPrint" href="/images/coupon/coupon_new3.png"><img src="/images/coupon/coupon_new3.png" alt="coupon new3" /></a></p>
<p><a class="btnPrint" href="/images/coupon/coupon_new4.png"><img src="/images/coupon/coupon_new4.png" alt="coupon new4" /></a></p>
<p><a class="btnPrint" href="/images/coupon/coupon_new5.png"><img src="/images/coupon/coupon_new5.png" alt="coupon new5" /></a></p>

и в конце страницы добавляем код:

  <script type="text/javascript">
  // <!--
  /*
   * See: http://blog.dynom.nl/archives/Javascript-printing-a-popup-window_20091029_52.html
   */

  /**
   * To put it in jQuery terms:
   */
  Popup = {

    init : function () {
      $('a.btnPrint').bind('click', Popup.printIt);
    },

    printIt : function () {
      var win = window.open('', 'Image', 'resizable=yes,...');
      if (win.document) {
        win.document.writeln('<img src="'+ $(this).attr('href') +'" alt="image" />');
        win.document.close();
        win.focus();
        win.print();
        win.close();
      }

      return false;
    }
  }

  $(document).ready(function () {
    Popup.init();
  });

  // -->
  </script>