// JQuery URL Parser Written by Mark Perkins, mark@allmarkedup.com License: http://unlicense.org/ (i.e. do what you want with it!)
jQuery.url=function(){var E={};var B={};var D={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var C=function(){str=decodeURI(D.url);var I=D.parser[D.strictMode?"strict":"loose"].exec(str);var K={};var J=14;while(J--){K[D.key[J]]=I[J]||""}K[D.q.name]={};K[D.key[12]].replace(D.q.parser,function(M,L,N){if(L){K[D.q.name][L]=N}});return K};var F=function(I){if(jQuery.isEmptyObject(B)){A()}if(I=="base"){if(B.port!==null&&B.port!==""){return B.protocol+"://"+B.host+":"+B.port+"/"}else{return B.protocol+"://"+B.host+"/"}}return(B[I]==="")?null:B[I]};var H=function(I){if(jQuery.isEmptyObject(B)){A()}return(B.queryKey[I]===null)?null:B.queryKey[I]};var A=function(){B=C();G()};var G=function(){var I=B.path;E=[];E=B.path.length==1?{}:(I.charAt(I.length-1)=="/"?I.substring(1,I.length-1):path=I.substring(1)).split("/")};return{setMode:function(I){D.strictMode=I=="strict"?true:false;return this},setUrl:function(I){D.url=I===undefined?window.location:I;A();return this},segment:function(I){if(jQuery.isEmptyObject(B)){A()}if(I===undefined){return E.length}return(E[I]===""||E[I]===undefined)?null:E[I]},attr:F,param:H}}()
/** Cookie plugin Copyright (c) 2006 Klaus Hartl (stilbuero.de) Dual licensed under the MIT and GPL licenses: http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html */
jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}}
/** jQuery.ScrollTo - Easy element scrolling using jQuery. Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com Dual licensed under MIT and GPL. Date: 5/25/2009 @author Ariel Flesler @version 1.4.2 http://flesler.blogspot.com/2007/10/jqueryscrollto.html */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
// ColorBox v1.3.19 - jQuery lightbox plugin (c) 2011 Jack Moore - jacklmoore.com License: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Z(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bc(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[$(-1),$(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),ba(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Z("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||bb(),bc(m),bc(i,K.onLoad),K.h=K.height?_(K.height,"y")-N-L:K.innerHeight&&_(K.innerHeight,"y"),K.w=K.width?_(K.width,"x")-O-M:K.innerWidth&&_(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=_(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=_(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Z(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):ba(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Z(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this);
/* jQuery blockUI plugin Version 2.39 (23-MAY-2011) @requires jQuery v1.2.3 or later Examples at: http://malsup.com/jquery/block/ Copyright (c) 2007-2010 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(I){if(/1\.(0|1|2)\.(0|1|2)/.test(I.fn.jquery)||/^1.1/.test(I.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+I.fn.jquery);return }I.fn._fadeIn=I.fn.fadeIn;var C=function(){};var J=document.documentMode||0;var E=I.browser.msie&&((I.browser.version<8&&!J)||J<8);var F=I.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!J;I.blockUI=function(P){D(window,P)};I.unblockUI=function(P){H(window,P)};I.growlUI=function(T,R,S,P){var Q=I("<div class=\"growlUI\"></div>");if(T){Q.append("<h1>"+T+"</h1>")}if(R){Q.append("<h2>"+R+"</h2>")}if(S==undefined){S=3000}I.blockUI({message:Q,fadeIn:700,fadeOut:1000,centerY:false,timeout:S,showOverlay:false,onUnblock:P,css:I.blockUI.defaults.growlCSS})};I.fn.block=function(P){return this.unblock({fadeOut:0}).each(function(){if(I.css(this,"position")=="static"){this.style.position="relative"}if(I.browser.msie){this.style.zoom=1}D(this,P)})};I.fn.unblock=function(P){return this.each(function(){H(this,P)})};I.blockUI.version=2.39;I.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:"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: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,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var B=null;var G=[];function D(R,c){var X=(R==window);var U=c&&c.message!==undefined?c.message:undefined;c=I.extend({},I.blockUI.defaults,c||{});c.overlayCSS=I.extend({},I.blockUI.defaults.overlayCSS,c.overlayCSS||{});var Z=I.extend({},I.blockUI.defaults.css,c.css||{});var k=I.extend({},I.blockUI.defaults.themedCSS,c.themedCSS||{});U=U===undefined?c.message:U;if(X&&B){H(window,{fadeOut:0})}if(U&&typeof U!="string"&&(U.parentNode||U.jquery)){var f=U.jquery?U[0]:U;var n={};I(R).data("blockUI.history",n);n.el=f;n.parent=f.parentNode;n.display=f.style.display;n.position=f.style.position;if(n.parent){n.parent.removeChild(f)}}I(R).data("blockUI.onUnblock",c.onUnblock);var Y=c.baseZ;var j=(I.browser.msie||c.forceIframe)?I("<iframe class=\"blockUI\" style=\"z-index:"+(Y++)+";display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0\" src=\""+c.iframeSrc+"\"></iframe>"):I("<div class=\"blockUI\" style=\"display:none\"></div>");var i=c.theme?I("<div class=\"blockUI blockOverlay ui-widget-overlay\" style=\"z-index:"+(Y++)+";display:none\"></div>"):I("<div class=\"blockUI blockOverlay\" style=\"z-index:"+(Y++)+";display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0\"></div>");var h,d;if(c.theme&&X){d="<div class=\"blockUI "+c.blockMsgClass+" blockPage ui-dialog ui-widget ui-corner-all\" style=\"z-index:"+(Y+10)+";display:none;position:fixed\"><div class=\"ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle\">"+(c.title||"&nbsp;")+"</div><div class=\"ui-widget-content ui-dialog-content\"></div></div>"}else{if(c.theme){d="<div class=\"blockUI "+c.blockMsgClass+" blockElement ui-dialog ui-widget ui-corner-all\" style=\"z-index:"+(Y+10)+";display:none;position:absolute\"><div class=\"ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle\">"+(c.title||"&nbsp;")+"</div><div class=\"ui-widget-content ui-dialog-content\"></div></div>"}else{if(X){d="<div class=\"blockUI "+c.blockMsgClass+" blockPage\" style=\"z-index:"+(Y+10)+";display:none;position:fixed\"></div>"}else{d="<div class=\"blockUI "+c.blockMsgClass+" blockElement\" style=\"z-index:"+(Y+10)+";display:none;position:absolute\"></div>"}}}h=I(d);if(U){if(c.theme){h.css(k);h.addClass("ui-widget-content")}else{h.css(Z)}}if(!c.theme&&(!c.applyPlatformOpacityRules||!(I.browser.mozilla&&/Linux/.test(navigator.platform)))){i.css(c.overlayCSS)}i.css("position",X?"fixed":"absolute");if(I.browser.msie||c.forceIframe){j.css("opacity",0)}var W=[j,i,h],m=X?I("body"):I(R);I.each(W,function(){this.appendTo(m)});if(c.theme&&c.draggable&&I.fn.draggable){h.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var T=E&&(!I.boxModel||I("object,embed",X?null:R).length>0);if(F||T){if(X&&c.allowBodyStretch&&I.boxModel){I("html,body").css("height","100%")}if((F||!I.boxModel)&&!X){var b=M(R,"borderTopWidth"),g=M(R,"borderLeftWidth");var V=b?"(0 - "+b+")":0;var a=g?"(0 - "+g+")":0}I.each([j,i,h],function(l,t){var p=t[0].style;p.position="absolute";if(l<2){X?p.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+c.quirksmodeOffsetHack+") + \"px\""):p.setExpression("height","this.parentNode.offsetHeight + \"px\"");X?p.setExpression("width","jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + \"px\""):p.setExpression("width","this.parentNode.offsetWidth + \"px\"");if(a){p.setExpression("left",a)}if(V){p.setExpression("top",V)}}else{if(c.centerY){if(X){p.setExpression("top","(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + \"px\"")}p.marginTop=0}else{if(!c.centerY&&X){var q=(c.css&&c.css.top)?parseInt(c.css.top):0;var r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+q+") + \"px\"";p.setExpression("top",r)}}}})}if(U){if(c.theme){h.find(".ui-widget-content").append(U)}else{h.append(U)}if(U.jquery||U.nodeType){I(U).show()}}if((I.browser.msie||c.forceIframe)&&c.showOverlay){j.show()}if(c.fadeIn){var e=c.onBlock?c.onBlock:C;var Q=(c.showOverlay&&!U)?e:C;var P=U?e:C;if(c.showOverlay){i._fadeIn(c.fadeIn,Q)}if(U){h._fadeIn(c.fadeIn,P)}}else{if(c.showOverlay){i.show()}if(U){h.show()}if(c.onBlock){c.onBlock()}}L(1,R,c);if(X){B=h[0];G=I(":input:enabled:visible",B);if(c.focusInput){setTimeout(O,20)}}else{A(h[0],c.centerX,c.centerY)}if(c.timeout){var S=setTimeout(function(){X?I.unblockUI(c):I(R).unblock(c)},c.timeout);I(R).data("blockUI.timeout",S)}}function H(S,T){var R=(S==window);var Q=I(S);var U=Q.data("blockUI.history");var V=Q.data("blockUI.timeout");if(V){clearTimeout(V);Q.removeData("blockUI.timeout")}T=I.extend({},I.blockUI.defaults,T||{});L(0,S,T);if(T.onUnblock===null){T.onUnblock=Q.data("blockUI.onUnblock");Q.removeData("blockUI.onUnblock")}var P;if(R){P=I("body").children().filter(".blockUI").add("body > .blockUI")}else{P=I(".blockUI",S)}if(R){B=G=null}if(T.fadeOut){P.fadeOut(T.fadeOut);setTimeout(function(){K(P,U,T,S)},T.fadeOut)}else{K(P,U,T,S)}}function K(P,S,R,Q){P.each(function(T,U){if(this.parentNode){this.parentNode.removeChild(this)}});if(S&&S.el){S.el.style.display=S.display;S.el.style.position=S.position;if(S.parent){S.parent.appendChild(S.el)}I(Q).removeData("blockUI.history")}if(typeof R.onUnblock=="function"){R.onUnblock(Q,R)}}function L(P,T,U){var S=T==window,R=I(T);if(!P&&(S&&!B||!S&&!R.data("blockUI.isBlocked"))){return }if(!S){R.data("blockUI.isBlocked",P)}if(!U.bindEvents||(P&&!U.showOverlay)){return }var Q="mousedown mouseup keydown keypress";P?I(document).bind(Q,U,N):I(document).unbind(Q,N)}function N(T){if(T.keyCode&&T.keyCode==9){if(B&&T.data.constrainTabKey){var R=G;var Q=!T.shiftKey&&T.target===R[R.length-1];var P=T.shiftKey&&T.target===R[0];if(Q||P){setTimeout(function(){O(P)},10);return false}}}var S=T.data;if(I(T.target).parents("div."+S.blockMsgClass).length>0){return true}return I(T.target).parents().children().filter("div.blockUI").length==0}function O(P){if(!G){return }var Q=G[P===true?G.length-1:0];if(Q){Q.focus()}}function A(T,P,V){var U=T.parentNode,S=T.style;var Q=((U.offsetWidth-T.offsetWidth)/2)-M(U,"borderLeftWidth");var R=((U.offsetHeight-T.offsetHeight)/2)-M(U,"borderTopWidth");if(P){S.left=Q>0?(Q+"px"):"0"}if(V){S.top=R>0?(R+"px"):"0"}}function M(P,Q){return parseInt(I.css(P,Q))||0}})(jQuery)
