(function(a,b,c){function h(a,c){var e=a.html(),f=[];f.push("<!DOCTYPE html><html><head><title>"+c.pageTitle+"</title>");if(c.importStylesheets){b("link",d).filter(function(){var a=false;var d=this.rel.toLowerCase()==="stylesheet";if(d&&c.stylesheetsToExclude){var e=this.href;b.each(c.stylesheetsToExclude,function(b,c){if(e.indexOf(c)>-1){a=false;return false}else{a=true}})}else if(d){a=true}return a}).each(function(){var a=this.media?'media="'+this.media+'"':"";f.push('<link type="text/css" rel="stylesheet" href="'+this.href+'" '+a+" >")})}if(c.stylesheets){b.each(c.stylesheets,function(a,b){f.push('<link type="text/css" rel="stylesheet" href="'+b+'" media="print" >')})}f.push('<base href="'+g()+'" />');f.push('</head><body onload="printPage()" style="'+c.printBodyOptions.styleToAdd+'" class="'+c.printBodyOptions.classNameToAdd+'">');f.push('<div class="'+a.attr("class")+'">'+e+"</div>");f.push('<script type="text/javascript">function printPage(){window.focus();try {document.execCommand("print", false, null);}catch(e){};window.print();'+(!c["leaveOpen"]&&c["printMode"].toLowerCase()=="popup"?"close();":"")+"}</script>");f.push("</body></html>");return f.join("")}function g(){var b=a.location.port?":"+a.location.port:"";return a.location.protocol+"//"+a.location.hostname+b+a.location.pathname}function f(c,e){var f=h(c,e),g=null,i=null;if(e.printMode.toLowerCase()=="popup"){if(g){g.close()}g=a.open("about:blank","printElementWindow","width=1000,height=600,scrollbars=yes");i=g.document}else{var j="printElement_"+Math.round(Math.random()*99999).toString(),k=b('<iframe id="'+j+'" '+'src="about:blank" '+'scrolling="no" '+'frameBorder="0" '+'class="'+e["iframeElementOptions"]["classNameToAdd"]+'" '+'style="'+e["iframeElementOptions"]["styleToAdd"]+'" />').appendTo(d.body)[0];i=k.contentWindow||k.contentDocument;i.document&&(i=i.document);g=k.contentWindow||k}i.write(f);i.close();g.focus()}var d=a.document,e={printMode:b.browser.opera?"popup":"iframe",pageTitle:"",importStylesheets:true,printBodyOptions:{styleToAdd:"padding:10px;margin:10px;",classNameToAdd:""},stylesheets:null,stylesheetsToExclude:null,leaveOpen:false,iframeElementOptions:{styleToAdd:"border:none;position:absolute;width:0px;height:0px;bottom:0px;left:0px;",classNameToAdd:""}};b.fn.printElement=function(a){var c=b.extend({},e,a);b("iframe[id^='printElement_']").remove();return this.each(function(){f(b(this),c)})};})(window,jQuery)
