/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* This was heavily modified to make use of the new jQuery apis and remove deprecated code.
*
* 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(){"use strict";function e(e){e.fn._fadeIn=e.fn.fadeIn;var o=e.noop||function(){},t=/MSIE/.test(navigator.userAgent),i=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),n=(document.documentMode,"function"==typeof document.createElement("div").style.setExpression);e.blockUI=function(e){a(window,e)},e.unblockUI=function(e){d(window,e)},e.growlUI=function(o,t,i,n){var l=e('
');o&&l.append(""+o+"
"),t&&l.append(""+t+"
"),void 0===i&&(i=3e3);var s=function(o){o=o||{},e.blockUI({message:l,fadeIn:void 0!==o.fadeIn?o.fadeIn:700,fadeOut:void 0!==o.fadeOut?o.fadeOut:1e3,timeout:void 0!==o.timeout?o.timeout:i,centerY:!1,showOverlay:!1,onUnblock:n,css:e.blockUI.defaults.growlCSS})};s();l.css("opacity");l.mouseover((function(){s({fadeIn:0,timeout:3e4});var o=e(".blockMsg");o.stop(),o.fadeTo(300,1)})).mouseout((function(){e(".blockMsg").fadeOut(1e3)}))},e.fn.wu_block=function(o){if(this[0]===window)return e.blockUI(o),this;var t=e.extend({},e.blockUI.defaults,o||{});return this.each((function(){var o=e(this);t.ignoreIfBlocked&&o.data("blockUI.isBlocked")||o.wu_unblock({fadeOut:0})})),this.each((function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,a(this,o)}))},e.fn.wu_unblock=function(o){return this[0]===window?(e.unblockUI(o),this):this.each((function(){d(this,o)}))},e.blockUI.version=2.7,e.blockUI.defaults={message:"Please wait...
",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 l=null,s=[];function a(a,c){var u,p,h=a==window,k=c&&void 0!==c.message?c.message:void 0;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(a).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),u=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),p=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),k=void 0===k?c.message:k,h&&l&&d(window,{fadeOut:0}),k&&"string"!=typeof k&&(k.parentNode||k.jquery)){var y=k.jquery?k[0]:k,v={};e(a).data("blockUI.history",v),v.el=y,v.parent=y.parentNode,v.display=y.style.display,v.position=y.style.position,v.parent&&v.parent.removeChild(y)}e(a).data("blockUI.onUnblock",c.onUnblock);var m,g,w,I,U=c.baseZ;m=t||c.forceIframe?e(''):e(''),g=c.theme?e(''):e(''),c.theme&&h?(I='',c.title&&(I+='"),I+='
',I+="
"):c.theme?(I='"):I=h?'':'',w=e(I),k&&(c.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(u)),c.theme||g.css(c.overlayCSS),g.css("position",h?"fixed":"absolute"),(t||c.forceIframe)&&m.css("opacity",0);var x=[m,g,w],C=e(h?"body":a);e.each(x,(function(){this.appendTo(C)})),c.theme&&c.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var S=n&&(!e.support.boxModel||e("object,embed",h?null:a).length>0);if(i||S){if(h&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(i||!e.support.boxModel)&&!h)var O=b(a,"borderTopWidth"),E=b(a,"borderLeftWidth"),T=O?"(0 - "+O+")":0,M=E?"(0 - "+E+")":0;e.each(x,(function(e,o){var t=o[0].style;if(t.position="absolute",e<2)h?t.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):t.setExpression("height",'this.parentNode.offsetHeight + "px"'),h?t.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):t.setExpression("width",'this.parentNode.offsetWidth + "px"'),M&&t.setExpression("left",M),T&&t.setExpression("top",T);else if(c.centerY)h&&t.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),t.marginTop=0;else if(!c.centerY&&h){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';t.setExpression("top",i)}}))}if(k&&(c.theme?w.find(".ui-widget-content").append(k):w.append(k),(k.jquery||k.nodeType)&&e(k).show()),(t||c.forceIframe)&&c.showOverlay&&m.show(),c.fadeIn){var _=c.onBlock?c.onBlock:o,B=c.showOverlay&&!k?_:o,j=k?_:o;c.showOverlay&&g._fadeIn(c.fadeIn,B),k&&w._fadeIn(c.fadeIn,j)}else c.showOverlay&&g.show(),k&&w.show(),c.onBlock&&c.onBlock.bind(w)();if(r(1,a,c),h?(l=w[0],s=e(c.focusableElements,l),c.focusInput&&setTimeout(f,20)):function(e,o,t){var i=e.parentNode,n=e.style,l=(i.offsetWidth-e.offsetWidth)/2-b(i,"borderLeftWidth"),s=(i.offsetHeight-e.offsetHeight)/2-b(i,"borderTopWidth");o&&(n.left=l>0?l+"px":"0");t&&(n.top=s>0?s+"px":"0")}(w[0],c.centerX,c.centerY),c.timeout){var H=setTimeout((function(){h?e.unblockUI(c):e(a).wu_unblock(c)}),c.timeout);e(a).data("blockUI.timeout",H)}}}function d(o,t){var i,n,a=o==window,d=e(o),u=d.data("blockUI.history"),f=d.data("blockUI.timeout");f&&(clearTimeout(f),d.removeData("blockUI.timeout")),t=e.extend({},e.blockUI.defaults,t||{}),r(0,o,t),null===t.onUnblock&&(t.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock")),n=a?e("body").children().filter(".wu_blockUI").add("body > .wu_blockUI"):d.find("> .wu_blockUI"),t.cursorReset&&(n.length>1&&(n[1].style.cursor=t.cursorReset),n.length>2&&(n[2].style.cursor=t.cursorReset)),a&&(l=s=null),t.fadeOut?(i=n.length,n.stop().fadeOut(t.fadeOut,(function(){0==--i&&c(n,u,t,o)}))):c(n,u,t,o)}function c(o,t,i,n){var l=e(n);if(!l.data("blockUI.isBlocked")){o.each((function(e,o){this.parentNode&&this.parentNode.removeChild(this)})),t&&t.el&&(t.el.style.display=t.display,t.el.style.position=t.position,t.el.style.cursor="default",t.parent&&t.parent.appendChild(t.el),l.removeData("blockUI.history")),l.data("blockUI.static")&&l.css("position","static"),"function"==typeof i.onUnblock&&i.onUnblock(n,i);var s=e(document.body),a=s.width(),d=s[0].style.width;s.width(a-1).width(a),s[0].style.width=d}}function r(o,t,i){var n=t==window,s=e(t);if((o||(!n||l)&&(n||s.data("blockUI.isBlocked")))&&(s.data("blockUI.isBlocked",o),n&&i.bindEvents&&(!o||i.showOverlay))){var a="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";o?e(document).bind(a,i,u):e(document).unbind(a,u)}}function u(o){if("keydown"===o.type&&o.keyCode&&9==o.keyCode&&l&&o.data.constrainTabKey){var t=s,i=!o.shiftKey&&o.target===t[t.length-1],n=o.shiftKey&&o.target===t[0];if(i||n)return setTimeout((function(){f(n)}),10),!1}var a=o.data,d=e(o.target);return d.hasClass("blockOverlay")&&a.onOverlayClick&&a.onOverlayClick(o),d.parents("div."+a.blockMsgClass).length>0||0===d.parents().children().filter("div.wu_blockUI").length}function f(e){if(s){var o=s[!0===e?s.length-1:0];o&&o.focus()}}function b(o,t){return parseInt(e.css(o,t),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();