(function(){"use strict";function e(b){b.fn._fadeIn=b.fn.fadeIn;var p=b.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),y=(document.documentMode,b.isFunction(document.createElement("div").style.setExpression)),m=(b.blockUI=function(e){t(window,e)},b.unblockUI=function(e){v(window,e)},b.growlUI=function(e,o,t,n){function i(e){b.blockUI({message:s,fadeIn:void 0!==(e=e||{}).fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:t,centerY:!1,showOverlay:!1,onUnblock:n,css:b.blockUI.defaults.growlCSS})}var s=b('<div class="growlUI"></div>');e&&s.append("<h1>"+e+"</h1>"),o&&s.append("<h2>"+o+"</h2>"),void 0===t&&(t=3e3),i(),s.css("opacity");s.mouseover(function(){i({fadeIn:0,timeout:3e4});var e=b(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){b(".blockMsg").fadeOut(1e3)})},b.fn.block=function(e){var o;return this[0]===window?(b.blockUI(e),this):(o=b.extend({},b.blockUI.defaults,e||{}),this.each(function(){var e=b(this);o.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==b.css(this,"position")&&(this.style.position="relative",b(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,e)}))},b.fn.unblock=function(e){return this[0]===window?(b.unblockUI(e),this):this.each(function(){v(this,e)})},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},null),g=[];function t(e,t){var n=e==window,o=t&&void 0!==t.message?t.message:void 0;if(!(t=b.extend({},b.blockUI.defaults,t||{})).ignoreIfBlocked||!b(e).data("blockUI.isBlocked")){t.overlayCSS=b.extend({},b.blockUI.defaults.overlayCSS,t.overlayCSS||{}),f=b.extend({},b.blockUI.defaults.css,t.css||{}),t.onOverlayClick&&(t.overlayCSS.cursor="pointer"),u=b.extend({},b.blockUI.defaults.themedCSS,t.themedCSS||{}),o=void 0===o?t.message:o,n&&m&&v(window,{fadeOut:0}),o&&"string"!=typeof o&&(o.parentNode||o.jquery)&&(d=o.jquery?o[0]:o,l={},b(e).data("blockUI.history",l),l.el=d,l.parent=d.parentNode,l.display=d.style.display,l.position=d.style.position,l.parent)&&l.parent.removeChild(d),b(e).data("blockUI.onUnblock",t.onUnblock);var i,s,l=t.baseZ,d=h||t.forceIframe?b('<iframe class="blockUI" style="z-index:'+l+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+t.iframeSrc+'"></iframe>'):b('<div class="blockUI" style="display:none"></div>'),a=t.theme?b('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+l+++';display:none"></div>'):b('<div class="blockUI blockOverlay" style="z-index:'+l+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c=(t.theme&&n?(c='<div class="blockUI '+t.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(l+10)+';display:none;position:fixed">',t.title&&(c+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(t.title||"&nbsp;")+"</div>"),c+='<div class="ui-widget-content ui-dialog-content"></div></div>'):t.theme?(c='<div class="blockUI '+t.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(l+10)+';display:none;position:absolute">',t.title&&(c+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(t.title||"&nbsp;")+"</div>"),c+='<div class="ui-widget-content ui-dialog-content"></div></div>'):c=n?'<div class="blockUI '+t.blockMsgClass+' blockPage" style="z-index:'+(l+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+t.blockMsgClass+' blockElement" style="z-index:'+(l+10)+';display:none;position:absolute"></div>',l=b(c),o&&(t.theme?(l.css(u),l.addClass("ui-widget-content")):l.css(f)),t.theme||a.css(t.overlayCSS),a.css("position",n?"fixed":"absolute"),(h||t.forceIframe)&&d.css("opacity",0),[d,a,l]),r=b(n?"body":e),u=(b.each(c,function(){this.appendTo(r)}),t.theme&&t.draggable&&b.fn.draggable&&l.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),y&&(!b.support.boxModel||0<b("object,embed",n?null:e).length));if((k||u)&&(n&&t.allowBodyStretch&&b.support.boxModel&&b("html,body").css("height","100%"),!k&&b.support.boxModel||n||(f=U(e,"borderTopWidth"),u=U(e,"borderLeftWidth"),i=f?"(0 - "+f+")":0,s=u?"(0 - "+u+")":0),b.each(c,function(e,o){o=o[0].style;o.position="absolute",e<2?(n?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+t.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),n?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),s&&o.setExpression("left",s),i&&o.setExpression("top",i)):t.centerY?(n&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0):!t.centerY&&n&&(e=t.css&&t.css.top?parseInt(t.css.top,10):0,o.setExpression("top","((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+e+') + "px"'))})),o&&((t.theme?l.find(".ui-widget-content"):l).append(o),o.jquery||o.nodeType)&&b(o).show(),(h||t.forceIframe)&&t.showOverlay&&d.show(),t.fadeIn?(f=t.onBlock||p,u=t.showOverlay&&!o?f:p,c=o?f:p,t.showOverlay&&a._fadeIn(t.fadeIn,u),o&&l._fadeIn(t.fadeIn,c)):(t.showOverlay&&a.show(),o&&l.show(),t.onBlock&&t.onBlock.bind(l)()),I(1,e,t),n)m=l[0],g=b(t.focusableElements,m),t.focusInput&&setTimeout(w,20);else{var d=l[0],f=t.centerX,u=t.centerY,c=d.parentNode,a=d.style,o=(c.offsetWidth-d.offsetWidth)/2-U(c,"borderLeftWidth"),d=(c.offsetHeight-d.offsetHeight)/2-U(c,"borderTopWidth");f&&(a.left=0<o?o+"px":"0"),u&&(a.top=0<d?d+"px":"0")}t.timeout&&(l=setTimeout(function(){n?b.unblockUI(t):b(e).unblock(t)},t.timeout),b(e).data("blockUI.timeout",l))}}function v(e,o){var t,n,i=e==window,s=b(e),l=s.data("blockUI.history"),d=s.data("blockUI.timeout");d&&(clearTimeout(d),s.removeData("blockUI.timeout")),o=b.extend({},b.blockUI.defaults,o||{}),I(0,e,o),null===o.onUnblock&&(o.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),n=i?b("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),o.cursorReset&&(1<n.length&&(n[1].style.cursor=o.cursorReset),2<n.length)&&(n[2].style.cursor=o.cursorReset),i&&(m=g=null),o.fadeOut?(t=n.length,n.stop().fadeOut(o.fadeOut,function(){0==--t&&a(n,l,o,e)})):a(n,l,o,e)}function a(e,o,t,n){var i=b(n);i.data("blockUI.isBlocked")||(e.each(function(e,o){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),i.removeData("blockUI.history")),i.data("blockUI.static")&&i.css("position","static"),"function"==typeof t.onUnblock&&t.onUnblock(n,t),o=(e=b(document.body)).width(),i=e[0].style.width,e.width(o-1).width(o),e[0].style.width=i)}function I(e,o,t){var n=o==window,o=b(o);!e&&(n&&!m||!n&&!o.data("blockUI.isBlocked"))||(o.data("blockUI.isBlocked",e),!n)||!t.bindEvents||e&&!t.showOverlay||(o="mousedown mouseup keydown keypress keyup touchstart touchend touchmove",e?b(document).bind(o,t,i):b(document).unbind(o,i))}function i(e){if("keydown"===e.type&&e.keyCode&&9==e.keyCode&&m&&e.data.constrainTabKey){var o=g,t=!e.shiftKey&&e.target===o[o.length-1],n=e.shiftKey&&e.target===o[0];if(t||n)return setTimeout(function(){w(n)},10),!1}o=e.data,t=b(e.target);return t.hasClass("blockOverlay")&&o.onOverlayClick&&o.onOverlayClick(e),0<t.parents("div."+o.blockMsgClass).length||0===t.parents().children().filter("div.blockUI").length}function w(e){g&&(e=g[!0===e?g.length-1:0])&&e.focus()}function U(e,o){return parseInt(b.css(e,o),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)})();