(function(G){if(/1\.(0|1|2)\.(0|1|2)/.test(G.fn.jquery)||/^1.1/.test(G.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+G.fn.jquery);return }G.fn._fadeIn=G.fn.fadeIn;var I=document.documentMode||0;var D=G.browser.msie&&((G.browser.version<8&&!I)||I<8);var E=G.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!I;G.blockUI=function(O){C(window,O)};G.unblockUI=function(O){H(window,O)};G.growlUI=function(S,Q,R,O){var P=G('<div class="growlUI"></div>');if(S){P.append("<h1>"+S+"</h1>")}if(Q){P.append("<h2>"+Q+"</h2>")}if(R==undefined){R=3000}G.blockUI({message:P,fadeIn:700,fadeOut:1000,centerY:false,timeout:R,showOverlay:false,onUnblock:O,css:G.blockUI.defaults.growlCSS})};G.fn.block=function(O){return this.unblock({fadeOut:0}).each(function(){if(G.css(this,"position")=="static"){this.style.position="relative"}if(G.browser.msie){this.style.zoom=1}C(this,O)})};G.fn.unblock=function(O){return this.each(function(){H(this,O)})};G.blockUI.version=2.25;G.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var B=null;var F=[];function C(O,Y){var T=(O==window);var R=Y&&Y.message!==undefined?Y.message:undefined;Y=G.extend({},G.blockUI.defaults,Y||{});Y.overlayCSS=G.extend({},G.blockUI.defaults.overlayCSS,Y.overlayCSS||{});var V=G.extend({},G.blockUI.defaults.css,Y.css||{});var f=G.extend({},G.blockUI.defaults.themedCSS,Y.themedCSS||{});R=R===undefined?Y.message:R;if(T&&B){H(window,{fadeOut:0})}if(R&&typeof R!="string"&&(R.parentNode||R.jquery)){var a=R.jquery?R[0]:R;var g={};G(O).data("blockUI.history",g);g.el=a;g.parent=a.parentNode;g.display=a.style.display;g.position=a.style.position;if(g.parent){g.parent.removeChild(a)}}var U=Y.baseZ;var e=(G.browser.msie||Y.forceIframe)?G('<iframe class="blockUI" style="z-index:'+(U++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+Y.iframeSrc+'"></iframe>'):G('<div class="blockUI" style="display:none"></div>');var d=G('<div class="blockUI blockOverlay" style="z-index:'+(U++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var c;if(Y.theme&&T){var Z='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+U+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(Y.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';c=G(Z)}else{c=T?G('<div class="blockUI blockMsg blockPage" style="z-index:'+U+';display:none;position:fixed"></div>'):G('<div class="blockUI blockMsg blockElement" style="z-index:'+U+';display:none;position:absolute"></div>')}if(R){if(Y.theme){c.css(f);c.addClass("ui-widget-content")}else{c.css(V)}}if(!Y.applyPlatformOpacityRules||!(G.browser.mozilla&&/Linux/.test(navigator.platform))){d.css(Y.overlayCSS)}d.css("position",T?"fixed":"absolute");if(G.browser.msie||Y.forceIframe){e.css("opacity",0)}G([e[0],d[0],c[0]]).appendTo(T?"body":O);if(Y.theme&&Y.draggable&&G.fn.draggable){c.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var Q=D&&(!G.boxModel||G("object,embed",T?null:O).length>0);if(E||Q){if(T&&Y.allowBodyStretch&&G.boxModel){G("html,body").css("height","100%")}if((E||!G.boxModel)&&!T){var X=L(O,"borderTopWidth"),b=L(O,"borderLeftWidth");var S=X?"(0 - "+X+")":0;var W=b?"(0 - "+b+")":0}G.each([e,d,c],function(h,m){var j=m[0].style;j.position="absolute";if(h<2){T?j.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+Y.quirksmodeOffsetHack+') + "px"'):j.setExpression("height",'this.parentNode.offsetHeight + "px"');T?j.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):j.setExpression("width",'this.parentNode.offsetWidth + "px"');if(W){j.setExpression("left",W)}if(S){j.setExpression("top",S)}}else{if(Y.centerY){if(T){j.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}j.marginTop=0}else{if(!Y.centerY&&T){var k=(Y.css&&Y.css.top)?parseInt(Y.css.top):0;var l="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+k+') + "px"';j.setExpression("top",l)}}}})}if(R){if(Y.theme){c.find(".ui-widget-content").append(R)}else{c.append(R)}if(R.jquery||R.nodeType){G(R).show()}}if((G.browser.msie||Y.forceIframe)&&Y.showOverlay){e.show()}if(Y.fadeIn){if(Y.showOverlay){d._fadeIn(Y.fadeIn)}if(R){c.fadeIn(Y.fadeIn)}}else{if(Y.showOverlay){d.show()}if(R){c.show()}}K(1,O,Y);if(T){B=c[0];F=G(":input:enabled:visible",B);if(Y.focusInput){setTimeout(N,20)}}else{A(c[0],Y.centerX,Y.centerY)}if(Y.timeout){var P=setTimeout(function(){T?G.unblockUI(Y):G(O).unblock(Y)},Y.timeout);G(O).data("blockUI.timeout",P)}}function H(R,S){var Q=(R==window);var P=G(R);var T=P.data("blockUI.history");var U=P.data("blockUI.timeout");if(U){clearTimeout(U);P.removeData("blockUI.timeout")}S=G.extend({},G.blockUI.defaults,S||{});K(0,R,S);var O;if(Q){O=G("body").children().filter(".blockUI").add("body > .blockUI")}else{O=G(".blockUI",R)}if(Q){B=F=null}if(S.fadeOut){O.fadeOut(S.fadeOut);setTimeout(function(){J(O,T,S,R)},S.fadeOut)}else{J(O,T,S,R)}}function J(O,R,Q,P){O.each(function(S,T){if(this.parentNode){this.parentNode.removeChild(this)}});if(R&&R.el){R.el.style.display=R.display;R.el.style.position=R.position;if(R.parent){R.parent.appendChild(R.el)}G(R.el).removeData("blockUI.history")}if(typeof Q.onUnblock=="function"){Q.onUnblock(P,Q)}}function K(O,S,T){var R=S==window,Q=G(S);if(!O&&(R&&!B||!R&&!Q.data("blockUI.isBlocked"))){return }if(!R){Q.data("blockUI.isBlocked",O)}if(!T.bindEvents||(O&&!T.showOverlay)){return }var P="mousedown mouseup keydown keypress";O?G(document).bind(P,T,M):G(document).unbind(P,M)}function M(R){if(R.keyCode&&R.keyCode==9){if(B&&R.data.constrainTabKey){var Q=F;var P=!R.shiftKey&&R.target==Q[Q.length-1];var O=R.shiftKey&&R.target==Q[0];if(P||O){setTimeout(function(){N(O)},10);return false}}}if(G(R.target).parents("div.blockMsg").length>0){return true}return G(R.target).parents().children().filter("div.blockUI").length==0}function N(O){if(!F){return }var P=F[O===true?F.length-1:0];if(P){P.focus()}}function A(S,O,U){var T=S.parentNode,R=S.style;var P=((T.offsetWidth-S.offsetWidth)/2)-L(T,"borderLeftWidth");var Q=((T.offsetHeight-S.offsetHeight)/2)-L(T,"borderTopWidth");if(O){R.left=P>0?(P+"px"):"0"}if(U){R.top=Q>0?(Q+"px"):"0"}}function L(O,P){return parseInt(G.css(O,P))||0}})(jQuery);
