(function(b){function p(c,a){var e=c==window,d=a&&a.message!==undefined?a.message:undefined;a=b.extend({},b.blockUI.defaults,a||{});a.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,a.overlayCSS||{});var g=b.extend({},b.blockUI.defaults.css,a.css||{}),j=b.extend({},b.blockUI.defaults.themedCSS,a.themedCSS||{});d=d===undefined?a.message:d;e&&l&&n(window,{fadeOut:0});if(d&&typeof d!="string"&&(d.parentNode||d.jquery)){var h=d.jquery?d[0]:d,i={};b(c).data("blockUI.history",i);i.el=h;i.parent=h.parentNode;
i.display=h.style.display;i.position=h.style.position;i.parent&&i.parent.removeChild(h)}var f=a.baseZ;h=b.browser.msie||a.forceIframe?b('<iframe class="blockUI" style="z-index:'+f++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+a.iframeSrc+'"></iframe>'):b('<div class="blockUI" style="display:none"></div>');i=b('<div class="blockUI blockOverlay" style="z-index:'+f++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
f=a.theme&&e?b('<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+f+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(a.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'):e?b('<div class="blockUI blockMsg blockPage" style="z-index:'+f+';display:none;position:fixed"></div>'):b('<div class="blockUI blockMsg blockElement" style="z-index:'+f+';display:none;position:absolute"></div>');
if(d)if(a.theme){f.css(j);f.addClass("ui-widget-content")}else f.css(g);if(!a.applyPlatformOpacityRules||!(b.browser.mozilla&&/Linux/.test(navigator.platform)))i.css(a.overlayCSS);i.css("position",e?"fixed":"absolute");if(b.browser.msie||a.forceIframe)h.css("opacity",0);b([h[0],i[0],f[0]]).appendTo(e?"body":c);a.theme&&a.draggable&&b.fn.draggable&&f.draggable({handle:".ui-dialog-titlebar",cancel:"li"});g=x&&(!b.boxModel||b("object,embed",e?null:c).length>0);if(q||g){e&&a.allowBodyStretch&&b.boxModel&&
b("html,body").css("height","100%");if((q||!b.boxModel)&&!e){g=parseInt(b.css(c,"borderTopWidth"))||0;j=parseInt(b.css(c,"borderLeftWidth"))||0;var r=g?"(0 - "+g+")":0,s=j?"(0 - "+j+")":0}b.each([h,i,f],function(y,z){var k=z[0].style;k.position="absolute";if(y<2){e?k.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+a.quirksmodeOffsetHack+') + "px"'):k.setExpression("height",'this.parentNode.offsetHeight + "px"');e?k.setExpression("width",
'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):k.setExpression("width",'this.parentNode.offsetWidth + "px"');s&&k.setExpression("left",s);r&&k.setExpression("top",r)}else if(a.centerY){e&&k.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');k.marginTop=0}else if(!a.centerY&&
e){var A="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(a.css&&a.css.top?parseInt(a.css.top):0)+') + "px"';k.setExpression("top",A)}})}if(d){a.theme?f.find(".ui-widget-content").append(d):f.append(d);if(d.jquery||d.nodeType)b(d).show()}if((b.browser.msie||a.forceIframe)&&a.showOverlay)h.show();if(a.fadeIn){a.showOverlay&&i._fadeIn(a.fadeIn);d&&f.fadeIn(a.fadeIn)}else{a.showOverlay&&i.show();d&&f.show()}t(1,c,a);if(e){l=f[0];m=b(":input:enabled:visible",
l);a.focusInput&&setTimeout(u,20)}else B(f[0],a.centerX,a.centerY);if(a.timeout){d=setTimeout(function(){e?b.unblockUI(a):b(c).unblock(a)},a.timeout);b(c).data("blockUI.timeout",d)}}function n(c,a){var e=c==window,d=b(c),g=d.data("blockUI.history"),j=d.data("blockUI.timeout");if(j){clearTimeout(j);d.removeData("blockUI.timeout")}a=b.extend({},b.blockUI.defaults,a||{});t(0,c,a);var h;h=e?b("body").children().filter(".blockUI").add("body > .blockUI"):b(".blockUI",c);if(e)l=m=null;if(a.fadeOut){h.fadeOut(a.fadeOut);
setTimeout(function(){v(h,g,a,c)},a.fadeOut)}else v(h,g,a,c)}function v(c,a,e,d){c.each(function(){this.parentNode&&this.parentNode.removeChild(this)});if(a&&a.el){a.el.style.display=a.display;a.el.style.position=a.position;a.parent&&a.parent.appendChild(a.el);b(a.el).removeData("blockUI.history")}typeof e.onUnblock=="function"&&e.onUnblock(d,e)}function t(c,a,e){var d=a==window;a=b(a);if(!(!c&&(d&&!l||!d&&!a.data("blockUI.isBlocked")))){d||a.data("blockUI.isBlocked",c);!e.bindEvents||c&&!e.showOverlay||
(c?b(document).bind("mousedown mouseup keydown keypress",e,w):b(document).unbind("mousedown mouseup keydown keypress",w))}}function w(c){if(c.keyCode&&c.keyCode==9)if(l&&c.data.constrainTabKey){var a=m,e=c.shiftKey&&c.target==a[0];if(!c.shiftKey&&c.target==a[a.length-1]||e){setTimeout(function(){u(e)},10);return false}}if(b(c.target).parents("div.blockMsg").length>0)return true;return b(c.target).parents().children().filter("div.blockUI").length==0}function u(c){if(m)(c=m[c===true?m.length-1:0])&&
c.focus()}function B(c,a,e){var d=c.parentNode,g=c.style,j=(d.offsetWidth-c.offsetWidth)/2-(parseInt(b.css(d,"borderLeftWidth"))||0);c=(d.offsetHeight-c.offsetHeight)/2-(parseInt(b.css(d,"borderTopWidth"))||0);if(a)g.left=j>0?j+"px":"0";if(e)g.top=c>0?c+"px":"0"}if(/1\.(0|1|2)\.(0|1|2)/.test(b.fn.jquery)||/^1.1/.test(b.fn.jquery))alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+b.fn.jquery);else{b.fn._fadeIn=b.fn.fadeIn;var o=document.documentMode||0,x=b.browser.msie&&(b.browser.version<
8&&!o||o<8),q=b.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!o;b.blockUI=function(c){p(window,c)};b.unblockUI=function(c){n(window,c)};b.growlUI=function(c,a,e,d){var g=b('<div class="growlUI"></div>');c&&g.append("<h1>"+c+"</h1>");a&&g.append("<h2>"+a+"</h2>");if(e==undefined)e=3E3;b.blockUI({message:g,fadeIn:700,fadeOut:1E3,centerY:false,timeout:e,showOverlay:false,onUnblock:d,css:b.blockUI.defaults.growlCSS})};b.fn.block=function(c){return this.unblock({fadeOut:0}).each(function(){if(b.css(this,
"position")=="static")this.style.position="relative";if(b.browser.msie)this.style.zoom=1;p(this,c)})};b.fn.unblock=function(c){return this.each(function(){n(this,c)})};b.blockUI.version=2.26;b.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:"2px 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:"default",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:1E3,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 l=null,m=[]}})(jQuery);
