function TinkoffPay(){this.inProgress=!1}function TinkoffWidget(){var t=this;this.iframeId="pay-form-iframe",this.containerId="pay-form-container",this.tinkoffPay=new TinkoffPay,this.onSuccessInit=function(e){var r=jQuery('
',{id:t.containerId,style:'z-index: 9996; height: 100%; width: 100%; position: fixed; left: 0px; top: 0px'}),n=jQuery('',{style:'z-index: 9997; opacity: 0.6; position: fixed; left: 0px; top: 0px; bottom: 0px; right: 0px; border: 0px; overflow: visible; background: rgb(0, 0, 0);'}),i=jQuery('',{id:'div_frame',style:'height: '+TinkoffWidgetConstants.HEIGHT+"; width: 1000px; max-width: 1200px;left: 50%; top: "+TinkoffWidgetConstants.TOP+'; position: absolute; z-index: 9998; border: 0px;'}),a=jQuery('',{type:'button',value:'',style:"top: 16px; width: "+TinkoffWidgetConstants.CLOSE_BUTTON_WIDTH+'; height: '+TinkoffWidgetConstants.CLOSE_BUTTON_HEIGHT+"; right: 50%; background: url(\""+TinkoffWidgetConstants.CLOSE_BUTTON_PIC_URL+"\") no-repeat; position:absolute; z-index: 9999; cursor:pointer; border: none;"}).appendTo(i);a.bind('click',function(){jQuery('#'+t.containerId).remove()}),a.hide();var o=jQuery('',{name:t.iframeId,id:t.iframeId,src:e[TinkoffParameters.PAYMENT_URL],style:'width:100%; height:100%;left: -50%;position:relative;background-color: white;'}).appendTo(i);jQuery('').appendTo('body'),o.load(function(){a.show()}),r.append(n),r.append(i),r.appendTo('body')},this.pay=function(t){t.data||(t.data={}),t.orderId||(t.orderId=(new Date).getTime()),this.tinkoffPay.setMerchantSideParameters(t),this.tinkoffPay.init(this.onSuccessInit)},this.setOnErrorCallback=function(t){this.tinkoffPay.onError=t},this.setOnFailCallback=function(t){this.tinkoffPay.onFail=t}}function initJQuery(){'undefined'==typeof jQuery?(jQueryScriptOutputted||(jQueryScriptOutputted=!0,document.write("