/*
 jQuery blockUI plugin
 Version 2.70.0-2014.11.23
 Requires jQuery v1.7 or later

 Examples at: http://malsup.com/jquery/block/
 Copyright (c) 2007-2013 M. Alsup
 Dual licensed under the MIT and GPL licenses:
 http://www.opensource.org/licenses/mit-license.php
 http://www.gnu.org/licenses/gpl.html

 Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
(function(){function v(b){function w(c,a){var e=c==window,d=a&&void 0!==a.message?a.message:void 0;a=b.extend({},b.blockUI.defaults,a||{});if(!a.ignoreIfBlocked||!b(c).data("blockUI.isBlocked")){a.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,a.overlayCSS||{});var h=b.extend({},b.blockUI.defaults.css,a.css||{});a.onOverlayClick&&(a.overlayCSS.cursor="pointer");var k=b.extend({},b.blockUI.defaults.themedCSS,a.themedCSS||{});d=void 0===d?a.message:d;e&&m&&q(window,{fadeOut:0});if(d&&"string"!=
typeof d&&(d.parentNode||d.jquery)){var g=d.jquery?d[0]:d,f={};b(c).data("blockUI.history",f);f.el=g;f.parent=g.parentNode;f.display=g.style.display;f.position=g.style.position;f.parent&&f.parent.removeChild(g)}b(c).data("blockUI.onUnblock",a.onUnblock);f=a.baseZ;var p=r||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>');
g=a.theme?b('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+f++ +';display:none"></div>'):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>');a.theme&&e?(f='<div class="blockUI '+a.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(f+10)+';display:none;position:fixed">',a.title&&(f+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+
(a.title||"&nbsp;")+"</div>"),f+='<div class="ui-widget-content ui-dialog-content"></div></div>'):a.theme?(f='<div class="blockUI '+a.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(f+10)+';display:none;position:absolute">',a.title&&(f+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(a.title||"&nbsp;")+"</div>"),f+='<div class="ui-widget-content ui-dialog-content"></div></div>'):f=e?'<div class="blockUI '+a.blockMsgClass+' blockPage" style="z-index:'+
(f+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+a.blockMsgClass+' blockElement" style="z-index:'+(f+10)+';display:none;position:absolute"></div>';f=b(f);d&&(a.theme?(f.css(k),f.addClass("ui-widget-content")):f.css(h));a.theme||g.css(a.overlayCSS);g.css("position",e?"fixed":"absolute");(r||a.forceIframe)&&p.css("opacity",0);h=[p,g,f];var F=e?b("body"):b(c);b.each(h,function(){this.appendTo(F)});a.theme&&a.draggable&&b.fn.draggable&&f.draggable({handle:".ui-dialog-titlebar",cancel:"li"});
k=G&&(!b.support.boxModel||0<b("object,embed",e?null:c).length);if(x||k){e&&a.allowBodyStretch&&b.support.boxModel&&b("html,body").css("height","100%");if((x||!b.support.boxModel)&&!e){k=parseInt(b.css(c,"borderTopWidth"),10)||0;var y=parseInt(b.css(c,"borderLeftWidth"),10)||0,z=k?"(0 - "+k+")":0,A=y?"(0 - "+y+")":0}b.each(h,function(t,l){l=l[0].style;l.position="absolute";2>t?(e?l.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+
a.quirksmodeOffsetHack+') + "px"'):l.setExpression("height",'this.parentNode.offsetHeight + "px"'),e?l.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):l.setExpression("width",'this.parentNode.offsetWidth + "px"'),A&&l.setExpression("left",A),z&&l.setExpression("top",z)):a.centerY?(e&&l.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),
l.marginTop=0):!a.centerY&&e&&(t=a.css&&a.css.top?parseInt(a.css.top,10):0,l.setExpression("top","((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+t+') + "px"'))})}d&&(a.theme?f.find(".ui-widget-content").append(d):f.append(d),(d.jquery||d.nodeType)&&b(d).show());(r||a.forceIframe)&&a.showOverlay&&p.show();a.fadeIn?(h=a.onBlock?a.onBlock:u,p=a.showOverlay&&!d?h:u,h=d?h:u,a.showOverlay&&g._fadeIn(a.fadeIn,p),d&&f._fadeIn(a.fadeIn,h)):(a.showOverlay&&
g.show(),d&&f.show(),a.onBlock&&a.onBlock.on(f)());B(1,c,a);e?(m=f[0],n=b(a.focusableElements,m),a.focusInput&&setTimeout(C,20)):H(f[0],a.centerX,a.centerY);a.timeout&&(d=setTimeout(function(){e?b.unblockUI(a):b(c).unblock(a)},a.timeout),b(c).data("blockUI.timeout",d))}}function q(c,a){var e=c==window,d=b(c),h=d.data("blockUI.history"),k=d.data("blockUI.timeout");k&&(clearTimeout(k),d.removeData("blockUI.timeout"));a=b.extend({},b.blockUI.defaults,a||{});B(0,c,a);null===a.onUnblock&&(a.onUnblock=
d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var g=e?b("body").children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI");a.cursorReset&&(1<g.length&&(g[1].style.cursor=a.cursorReset),2<g.length&&(g[2].style.cursor=a.cursorReset));e&&(m=n=null);if(a.fadeOut){var f=g.length;g.stop().fadeOut(a.fadeOut,function(){0===--f&&D(g,h,a,c)})}else D(g,h,a,c)}function D(c,a,e,d){var h=b(d);if(!h.data("blockUI.isBlocked")){c.each(function(k,g){this.parentNode&&this.parentNode.removeChild(this)});
a&&a.el&&(a.el.style.display=a.display,a.el.style.position=a.position,a.el.style.cursor="default",a.parent&&a.parent.appendChild(a.el),h.removeData("blockUI.history"));h.data("blockUI.static")&&h.css("position","static");if("function"==typeof e.onUnblock)e.onUnblock(d,e);c=b(document.body);a=c.width();e=c[0].style.width;c.width(a-1).width(a);c[0].style.width=e}}function B(c,a,e){var d=a==window;a=b(a);if(c||(!d||m)&&(d||a.data("blockUI.isBlocked")))if(a.data("blockUI.isBlocked",c),d&&e.bindEvents&&
(!c||e.showOverlay))if(c)b(document).on("mousedown mouseup keydown keypress keyup touchstart touchend touchmove",e,E);else b(document).off("mousedown mouseup keydown keypress keyup touchstart touchend touchmove",E)}function E(c){if("keydown"===c.type&&c.keyCode&&9==c.keyCode&&m&&c.data.constrainTabKey){var a=n,e=c.shiftKey&&c.target===a[0];if(!c.shiftKey&&c.target===a[a.length-1]||e)return setTimeout(function(){C(e)},10),!1}a=c.data;var d=b(c.target);if(d.hasClass("blockOverlay")&&a.onOverlayClick)a.onOverlayClick(c);
return 0<d.parents("div."+a.blockMsgClass).length?!0:0===d.parents().children().filter("div.blockUI").length}function C(c){n&&(c=n[!0===c?n.length-1:0])&&c.focus()}function H(c,a,e){var d=c.parentNode,h=c.style,k=(d.offsetWidth-c.offsetWidth)/2-(parseInt(b.css(d,"borderLeftWidth"),10)||0);c=(d.offsetHeight-c.offsetHeight)/2-(parseInt(b.css(d,"borderTopWidth"),10)||0);a&&(h.left=0<k?k+"px":"0");e&&(h.top=0<c?c+"px":"0")}b.fn._fadeIn=b.fn.fadeIn;var u=b.noop||function(){},r=/MSIE/.test(navigator.userAgent),
x=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),G="function"===typeof document.createElement("div").style.setExpression;b.blockUI=function(c){w(window,c)};b.unblockUI=function(c){q(window,c)};b.growlUI=function(c,a,e,d){var h=b('<div class="growlUI"></div>');c&&h.append("<h1>"+c+"</h1>");a&&h.append("<h2>"+a+"</h2>");void 0===e&&(e=3E3);var k=function(g){g=g||{};b.blockUI({message:h,fadeIn:"undefined"!==typeof g.fadeIn?g.fadeIn:700,fadeOut:"undefined"!==typeof g.fadeOut?
g.fadeOut:1E3,timeout:"undefined"!==typeof g.timeout?g.timeout:e,centerY:!1,showOverlay:!1,onUnblock:d,css:b.blockUI.defaults.growlCSS})};k();h.css("opacity");h.mouseover(function(){k({fadeIn:0,timeout:3E4});var g=b(".blockMsg");g.stop();g.fadeTo(300,1)}).mouseout(function(){b(".blockMsg").fadeOut(1E3)})};b.fn.block=function(c){if(this[0]===window)return b.blockUI(c),this;var a=b.extend({},b.blockUI.defaults,c||{});this.each(function(){var e=b(this);a.ignoreIfBlocked&&e.data("blockUI.isBlocked")||
e.unblock({fadeOut:0})});return this.each(function(){"static"==b.css(this,"position")&&(this.style.position="relative",b(this).data("blockUI.static",!0));this.style.zoom=1;w(this,c)})};b.fn.unblock=function(c){return this[0]===window?(b.unblockUI(c),this):this.each(function(){q(this,c)})};b.blockUI.version=2.7;b.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,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:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1E3,
centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var m=null,n=[]}"function"===typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],v):v(jQuery)})();
