!function(t){var e;t.fn.printThis=function(n){e=t.extend({},t.fn.printThis.defaults,n);var i=this instanceof jQuery?this:t(this),a="printThis-"+(new Date).getTime();if(window.location.hostname!==document.domain&&navigator.userAgent.match(/msie/i)){var o='javascript:document.write("<head><script>document.domain=\\"'+document.domain+'\\";<\/script></head><body></body>")',r=document.createElement("iframe");r.name="printIframe",r.id=a,r.className="MSIE",document.body.appendChild(r),r.src=o}else{t("<iframe id='"+a+"' name='printIframe' />").appendTo("body")}var s=t("#"+a);e.debug||s.css({position:"absolute",width:"0px",height:"0px",left:"-600px",top:"-600px"}),setTimeout((function(){function n(t,e){e&&t.append(e.jquery?e.clone():e)}e.doctypeString&&function(t,e){var n,i;(i=(n=(n=t.get(0)).contentWindow||n.contentDocument||n).document||n.contentDocument||n).open(),i.write(e),i.close()}(s,e.doctypeString);var a,o=s.contents(),r=o.find("head"),c=o.find("body"),d=t("base");if(a=!0===e.base&&d.length>0?d.attr("href"):"string"==typeof e.base?e.base:document.location.protocol+"//"+document.location.host,r.append('<base href="'+a+'">'),e.importCSS&&t("link[rel=stylesheet]").each((function(){var e=t(this).attr("href");if(e){var n=t(this).attr("media")||"all";r.append("<link type='text/css' rel='stylesheet' href='"+e+"' media='"+n+"'>")}})),e.importStyle&&t("style").each((function(){t(this).clone().appendTo(r)})),e.pageTitle&&r.append("<title>"+e.pageTitle+"</title>"),e.loadCSS&&(t.isArray(e.loadCSS)?jQuery.each(e.loadCSS,(function(t,e){r.append("<link type='text/css' rel='stylesheet' href='"+this+"'>")})):r.append("<link type='text/css' rel='stylesheet' href='"+e.loadCSS+"'>")),n(c,e.header),e.canvas){var l=0;i.find("canvas").each((function(){t(this).attr("data-printthis",l++)}))}if(e.printContainer?c.append(i.outer()):i.each((function(){c.append(t(this).html())})),e.canvas&&c.find("canvas").each((function(){var e=t(this).data("printthis"),n=t('[data-printthis="'+e+'"]');this.getContext("2d").drawImage(n[0],0,0),n.removeData("printthis")})),e.formValues){var p=i.find("input");p.length&&p.each((function(){var e=t(this),n=t(this).attr("name"),i=e.is(":checkbox")||e.is(":radio"),a=o.find('input[name="'+n+'"]'),r=e.val();i?e.is(":checked")&&(e.is(":checkbox")?a.attr("checked","checked"):e.is(":radio")&&o.find('input[name="'+n+'"][value="'+r+'"]').attr("checked","checked")):a.val(r)}));var h=i.find("select");h.length&&h.each((function(){var e=t(this),n=t(this).attr("name"),i=e.val();o.find('select[name="'+n+'"]').val(i)}));var m=i.find("textarea");m.length&&m.each((function(){var e=t(this),n=t(this).attr("name"),i=e.val();o.find('textarea[name="'+n+'"]').val(i)}))}e.removeInline&&(t.isFunction(t.removeAttr)?o.find("body *").removeAttr("style"):o.find("body *").attr("style","")),n(c,e.footer),setTimeout((function(){s.hasClass("MSIE")?(window.frames.printIframe.focus(),r.append("<script>  window.print(); <\/script>")):document.queryCommandSupported("print")?s[0].contentWindow.document.execCommand("print",!1,null):(s[0].contentWindow.focus(),s[0].contentWindow.print()),e.debug||setTimeout((function(){s.remove()}),1e3)}),e.printDelay)}),333)},t.fn.printThis.defaults={debug:!1,importCSS:!0,importStyle:!1,printContainer:!0,loadCSS:"",pageTitle:"",removeInline:!1,printDelay:333,header:null,footer:null,formValues:!0,canvas:!1,base:!1,doctypeString:"<!DOCTYPE html>"},jQuery.fn.outer=function(){return t(t("<div></div>").html(this.clone())).html()}}(jQuery);