/*
 CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
*/
jQuery.fn.outerHTML=function(){if($j.browser.msie)return this[0].outerHTML;else{for(var a="<"+this[0].tagName.toLowerCase(),i=0;i<this[0].attributes.length;i++){var p=this[0].attributes[i];a+=" "+p.name+'="'+p.nodeValue.replace(/"/,'"')+'"'}a+=">";a+=this[0].innerHTML+"</"+this[0].tagName.toLowerCase()+">";return a}};jQuery.fn.fasterReplace=function(){return this.domManip(arguments,false,function(a){this.parentNode.replaceChild(a,this)})};
jQuery.fn.removeAll=function(){this.each(function(){var a=this.cloneNode(false);this.parentNode.replaceChild(a,this);jQuery.support.noCloneEvent&&cloneCopyEvent(jQuery(this),jQuery(a))})};$j.fn.center=function(a){a="fixed";this.css("position",a);this.css("top",jQuery(window).height()/2+jQuery(window).scrollTop()-this.height()/2+"px");this.css("left",jQuery(window).width()/2+jQuery(window).scrollLeft()/2-this.width()/2+"px");return this};
(function(a){function i(b){return typeof b=="object"?b:{top:b,left:b}}var p=a.scrollTo=function(b,c,d){a(window).scrollTo(b,c,d)};p.defaults={axis:"xy",duration:parseFloat($j.fn.jquery)>=1.3?0:1};p.window=function(){return a(window)._scrollable()};a.fn._scrollable=function(){return this.map(function(){var b=this;if(!(!b.nodeName||$j.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1))return b;b=(b.contentWindow||b).document||b.ownerDocument||b;return $j.browser.safari||b.compatMode==
"BackCompat"?b.body:b.documentElement})};a.fn.scrollTo=function(b,c,d){if(typeof c=="object"){d=c;c=0}if(typeof d=="function")d={onAfter:d};if(b=="max")b=9E9;d=$j.extend({},p.defaults,d);c=c||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue)c/=2;d.offset=i(d.offset);d.over=i(d.over);return this._scrollable().each(function(){function f(t){n.animate(o,c,d.easing,t&&function(){t.call(this,b,d)})}var l=this,n=$j(l),k=b,m,o={},s=n.is("html,body");switch(typeof k){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=
i(k);break}k=$j(k,this);case "object":if(k.is||k.style)m=(k=$j(k)).offset()}$j.each(d.axis.split(""),function(t,O){var B=O=="x"?"Left":"Top",M=B.toLowerCase(),A="scroll"+B,R=l[A],u=p.max(l,O);if(m){o[A]=m[M]+(s?0:R-n.offset()[M]);if(d.margin){o[A]-=parseInt(k.css("margin"+B))||0;o[A]-=parseInt(k.css("border"+B+"Width"))||0}o[A]+=d.offset[M]||0;if(d.over[M])o[A]+=k[O=="x"?"width":"height"]()*d.over[M]}else{O=k[M];o[A]=O.slice&&O.slice(-1)=="%"?parseFloat(O)/100*u:O}if(/^\d+$/.test(o[A]))o[A]=o[A]<=
0?0:Math.min(o[A],u);if(!t&&d.queue){R!=o[A]&&f(d.onAfterFirst);delete o[A]}});f(d.onAfter)}).end()};p.max=function(b,c){var d=c=="x"?"Width":"Height";c="scroll"+d;if(!a(b).is("html,body"))return b[c]-$j(b)[d.toLowerCase()]();d="client"+d;var f=b.ownerDocument.documentElement;b=b.ownerDocument.body;return Math.max(f[c],b[c])-Math.min(f[d],b[d])}})(jQuery);
(function(){function a(i,p){if(p)this.tag=p;p=String(this.tag).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1");this.evaluate=new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+i.toString().replace(/[\r\t\n]/g," ").replace(new RegExp("'(?=[^"+p+"]*"+p+">)","g"),"\t").split("'").join("\\'").split("\t").join("'").replace(new RegExp("<"+p+"=(.+?)"+p+">","g"),"',$1,'").split("<"+p).join("');").split(p+">").join("p.push('")+"');}return p.join('');")}a.prototype.Pattern=
/(^|.|\r|\n)(#\{(.*?)\})/;a.prototype.tag="%";$j.renderTemplate=function(i,p){i=new a(i);return p?i.evaluate(p):i}})(jQuery);
jQuery.fn.replaceRadio=function(){jQuery(this).each(function(){if($j(this).is("[type=radio]")){var a=jQuery(this),i=false,p="",b=$j("label[for="+a.attr("id")+"]");if(a.is(".g_radio_type_default"))p=" g_radioreplace_type_default";else if(a.is(".g_radio_type_clear")){i=true;p=" g_radioreplace_type_clear"}else if(a.is(".g_radio_type_yes"))p=" g_radioreplace_type_yes";else if(a.is(".g_radio_type_no"))p=" g_radioreplace_type_no";else if(a.is(".g_radio_type_add")){p=" g_radioreplace_type_add";i=true}else return;
$j('<div class="g_radioreplace'+p+'"></div>').insertBefore(a).append(a,b);var c=jQuery("input[name="+a.attr("name")+"]");a.bind("updateState",function(){if(a.is(":checked")){a.is(":radio")&&c.each(function(){jQuery("label[for="+jQuery(this).attr("id")+"]").removeClass("g_current");i&&$j(this).closest("div").find("a").remove()});b.addClass("g_current");tdc.Grd.Event.Pool.trigger("radioButtonsClicked",$j(this));i&&b.closest("div").append("<a class='g_radio_clear' href='#'>Nulstil</a>").find("a").click(function(){a.attr("checked",
false);b.removeClass("g_current");jQuery(this).closest("div").find("a").remove();tdc.Grd.Event.Pool.trigger("clearedButtons",jQuery(this));return false})}else b.removeClass("g_current")}).trigger("updateState").click(function(){jQuery(this).trigger("updateState")})}})};
(function(){$j.crc32=function(a,i){if(i==window.undefined)i=0;var p=0;p=0;i^=-1;for(var b=0,c=a.length;b<c;b++){p=(i^a.charCodeAt(b))&255;p="0x"+"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(p*9,
8);i=i>>>8^p}return Math.abs(i^-1)}})();
jQuery.cookie=function(a,i,p){if(arguments.length>1&&(i===null||typeof i!=="object")){p=jQuery.extend({},p);if(i===null)p.expires=-1;if(typeof p.expires==="number"){var b=p.expires,c=p.expires=new Date;c.setDate(c.getDate()+b)}return document.cookie=[encodeURIComponent(a),"=",p.raw?String(i):encodeURIComponent(String(i)),p.expires?"; expires="+p.expires.toUTCString():"",p.path?"; path="+p.path:"",p.domain?"; domain="+p.domain:"",p.secure?"; secure":""].join("")}p=i||{};c=p.raw?function(d){return d}:
decodeURIComponent;return(b=(new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)")).exec(document.cookie))?c(b[1]):null};
(function(a){a.lazyLoadAdRunning=false;a.lazyLoadAdTimers=[];a.fn.lazyLoadAd=function(i){function p(){if(typeof console!="undefined"&&b.debug){for(var d=[],f=0;f<arguments.length;f++)d.push(arguments[f]);try{console.log("LazyLoadAD |",d)}catch(l){}}}var b={threshold:0,failurelimit:1,forceLoad:false,event:"scroll",viewport:window,onComplete:false,timeout:2E3,debug:false};i&&a.extend(b,i);var c=this;a(b.viewport).bind("checkLazyLoadAd",function(){var d=0;c.each(function(){if(a.lazyLoadAdRunning){a.lazyLoadAdTimers.runTimeOut&&
clearTimeout(a.lazyLoadAdTimers.runTimeOut);a.lazyLoadAdTimers.runTimeOut=setTimeout(function(){a(b.viewport).trigger("checkLazyLoadAd")},800);return false}else if(b.forceLoad==true)a(this).trigger("load");else if(!a.belowthefold(this,b)&&!a.abovethetop(this,b))a(this).trigger("load");else if(d++>b.failurelimit)return false});var f=a.grep(c,function(l){return!l.loaded});c=a(f)});"scroll"==b.event&&a(b.viewport).bind("scroll",function(){a(b.viewport).trigger("checkLazyLoadAd")});this.each(function(){var d=
this;undefined==a(d).attr("original")&&a(d).attr("original",a(d).attr("src"));if("scroll"!=b.event||undefined==a(d).attr("src")||a.abovethetop(d,b)||a.belowthefold(d,b)){a(d).removeAttr("src");d.loaded=false}else d.loaded=true;a(d).one("load",function(){if(!this.loaded){a.lazyLoadAdRunning=true;a(d).one("lazyLoadComplete",function(){a.lazyLoadAdRunning=false;a(d).attr("src",a(d).attr("original"));a(d).removeAttr("original");d.loaded=true;if(typeof b.onComplete=="function")try{b.onComplete()}catch(A){}});
for(var f=[],l,n=/<code[^>]*>([\s\S]*?)<\/code>/gi;l=n.exec(a(d).html());)f.push(l[1].replace("<!--","").replace("//--\>",""));f=f.length?f.join("\n"):"";try{f!=""&&eval(f)}catch(k){}var m=a("<div>"),o=document.createDocumentFragment(),s=0,t=false;document._writeOriginal=document.write;document.write=function(){function A(){s--;for(var I="",K=0;K<R.length;K++)I+=R[K];p("Fragment append : ",s,u.attr("id"),I);o.appendChild(a(m.html(I))[0]);u.replaceWith(o);s==0&&a(document.write.context).trigger("lazyLoadComplete")}
var R=arguments,u="document_write"+(new Date).getTime().toString(36);u=a("<span>",{id:u});a(document.write.context).append(u);p("Overload document.write : ",u,document.write.context,R);t=true;s++;setTimeout(A,0)};document.write.context=a(d)[0];p("------------------------------  Lazy Load Ad CALL ----");p("Context : "+document.write.context);l=document.createElement("script");var O=a(d).attr("original");l.src=O;l.type="text/javascript";document.write.context.appendChild(l);var B=function(){p("Load Ad Code",
O);setTimeout(function(){if(!t){p("... is considred as injected");a(document.write.context).trigger("lazyLoadComplete")}a(l).remove()},300)};l.onreadystatechange=function(){if(l.readyState=="loaded"||l.readyState=="complete")B()};l.onload=function(){B()};try{if(Prototype.Browser.WebKit&&!navigator.userAgent.match(/Version\/3/)||Prototype.Browser.Opera)a.lazyLoadAdTimers[O]=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(a.lazyLoadAdTimers[O]);B()}},10)}catch(M){}a.lazyLoadAdTimers.failBack&&
clearTimeout(a.lazyLoadAdTimers.failBack);a.lazyLoadAdTimers.failBack=setTimeout(function(){if(a.lazyLoadAdRunning){p("Fail back actioned after "+b.timeout+" ms");B()}},b.timeout)}});"scroll"!=b.event&&a(d).bind(b.event,function(){d.loaded||a(d).trigger("load")})});a(b.viewport).trigger("checkLazyLoadAd");return this};a.belowthefold=function(i,p){return(p.viewport===undefined||p.viewport===window?a(window).height()+a(window).scrollTop():a(p.viewport).offset().top+a(p.viewport).height())<=a(i).offset().top-
p.threshold};a.abovethetop=function(i,p){return(p.viewport===undefined||p.viewport===window?a(window).scrollTop():a(p.viewport).offset().top)>=a(i).offset().top+p.threshold+a(i).height()}})(jQuery);
$j.extend({getUrlVars:function(){var a=[],i;i=window.location.href.indexOf("?");var p=window.location.href.slice(i+1).split("&");if(i!=-1)for(var b=0;b<p.length;b++){i=p[b].split("=");a.push(i[0]);var c=null;if(i[1])c=i[1].split("#")[0];a[i[0]]=c}return a},getUrlVar:function(a){return $j.getUrlVars()[a]},getAnchorVar:function(){if(window.location.href.match("#")){var a=window.location.href.split("#")[1];return a!=undefined?a.split("&")[0]:false}}});
(function(a){function i(c){c=c.replace(/left|top/g,"0px");c=c.replace(/right|bottom/g,"100%");c=c.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");c=c.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(c[1],10),c[2],parseFloat(c[3],10),c[4]]}if(!document.defaultView||!document.defaultView.getComputedStyle){var p=jQuery.curCSS;jQuery.curCSS=function(c,d,f){if(d==="background-position")d="backgroundPosition";if(d!=="backgroundPosition"||!c.currentStyle||c.currentStyle[d])return p.apply(this,
arguments);var l=c.style;if(!f&&l&&l[d])return l[d];return p(c,"backgroundPositionX",f)+" "+p(c,"backgroundPositionY",f)}}var b=a.fn.animate;a.fn.animate=function(c){if("background-position"in c){c.backgroundPosition=c["background-position"];delete c["background-position"]}if("backgroundPosition"in c)c.backgroundPosition="("+c.backgroundPosition;return b.apply(this,arguments)};a.fx.step.backgroundPosition=function(c){if(!c.bgPosReady){var d=a.curCSS(c.elem,"backgroundPosition");d||(d="0px 0px");d=
i(d);c.start=[d[0],d[2]];d=i(c.options.curAnim.backgroundPosition);c.end=[d[0],d[2]];c.unit=[d[1],d[3]];c.bgPosReady=true}d=[];d[0]=(c.end[0]-c.start[0])*c.pos+c.start[0]+c.unit[0];d[1]=(c.end[1]-c.start[1])*c.pos+c.start[1]+c.unit[1];c.elem.style.backgroundPosition=d[0]+" "+d[1]}})(jQuery);
(function(a){a.fn.lightBox=function(i){function p(){b(this,R);return false}function b(u,I){a("embed, object, select").css({visibility:"hidden"});c();i.imageArray.length=0;i.activeImage=0;if(I.length==1)i.imageArray.push(new Array(u.getAttribute("href"),u.getAttribute("title")));else for(var K=0;K<I.length;K++)i.imageArray.push(new Array(I[K].getAttribute("href"),I[K].getAttribute("title")));for(;i.imageArray[i.activeImage][0]!=u.getAttribute("href");)i.activeImage++;d()}function c(){a("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+
i.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+i.imageBtnClose+'"></a></div></div></div></div>');var u=B();a("#jquery-overlay").css({backgroundColor:i.overlayBgColor,opacity:i.overlayOpacity,width:u[0],
height:u[1]}).fadeIn();var I=M();a("#jquery-lightbox").css({top:I[1]+u[3]/10,left:I[0]}).show();a("#jquery-overlay,#jquery-lightbox").click(function(){O()});a("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){O();return false});a(window).resize(function(){var K=B();a("#jquery-overlay").css({width:K[0],height:K[1]});var h=M();a("#jquery-lightbox").css({top:h[1]+K[3]/10,left:h[0]})})}function d(){a("#lightbox-loading").show();i.fixedNavigation?a("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide():
a("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide();var u=new Image;u.onload=function(){a("#lightbox-image").attr("src",i.imageArray[i.activeImage][0]);f(u.width,u.height);u.onload=function(){}};u.src=i.imageArray[i.activeImage][0]}function f(u,I){var K=a("#lightbox-container-image-box").width(),h=a("#lightbox-container-image-box").height(),e=u+i.containerBorderSize*2,w=I+i.containerBorderSize*
2;K=K-e;h=h-w;a("#lightbox-container-image-box").animate({width:e,height:w},i.containerResizeSpeed,function(){l()});if(K==0&&h==0)a.browser.msie?A(250):A(100);a("#lightbox-container-image-data-box").css({width:u});a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:I+i.containerBorderSize*2})}function l(){a("#lightbox-loading").hide();a("#lightbox-image").fadeIn(function(){n();k()});t()}function n(){a("#lightbox-container-image-data-box").slideDown("fast");a("#lightbox-image-details-caption").hide();
i.imageArray[i.activeImage][1]&&a("#lightbox-image-details-caption").html(i.imageArray[i.activeImage][1]).show();i.imageArray.length>1&&a("#lightbox-image-details-currentNumber").html(i.txtImage+" "+(i.activeImage+1)+" "+i.txtOf+" "+i.imageArray.length).show()}function k(){a("#lightbox-nav").show();a("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+i.imageBlank+") no-repeat"});if(i.activeImage!=0)i.fixedNavigation?a("#lightbox-nav-btnPrev").css({background:"url("+
i.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){i.activeImage-=1;d();return false}):a("#lightbox-nav-btnPrev").unbind().hover(function(){a(this).css({background:"url("+i.imageBtnPrev+") left 15% no-repeat"})},function(){a(this).css({background:"transparent url("+i.imageBlank+") no-repeat"})}).show().bind("click",function(){i.activeImage-=1;d();return false});if(i.activeImage!=i.imageArray.length-1)i.fixedNavigation?a("#lightbox-nav-btnNext").css({background:"url("+i.imageBtnNext+
") right 15% no-repeat"}).unbind().bind("click",function(){i.activeImage+=1;d();return false}):a("#lightbox-nav-btnNext").unbind().hover(function(){a(this).css({background:"url("+i.imageBtnNext+") right 15% no-repeat"})},function(){a(this).css({background:"transparent url("+i.imageBlank+") no-repeat"})}).show().bind("click",function(){i.activeImage+=1;d();return false});m()}function m(){a(document).keydown(function(u){s(u)})}function o(){a(document).unbind()}function s(u){if(u==null){keycode=event.keyCode;
escapeKey=27}else{keycode=u.keyCode;escapeKey=u.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if(key==i.keyToClose||key=="x"||keycode==escapeKey)O();if(key==i.keyToPrev||keycode==37)if(i.activeImage!=0){i.activeImage-=1;d();o()}if(key==i.keyToNext||keycode==39)if(i.activeImage!=i.imageArray.length-1){i.activeImage+=1;d();o()}}function t(){if(i.imageArray.length-1>i.activeImage){objNext=new Image;objNext.src=i.imageArray[i.activeImage+1][0]}if(i.activeImage>0){objPrev=new Image;objPrev.src=
i.imageArray[i.activeImage-1][0]}}function O(){a("#jquery-lightbox").remove();a("#jquery-overlay").fadeOut(function(){a("#jquery-overlay").remove()});a("embed, object, select").css({visibility:"visible"})}function B(){var u,I;if(window.innerHeight&&window.scrollMaxY){u=window.innerWidth+window.scrollMaxX;I=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){u=document.body.scrollWidth;I=document.body.scrollHeight}else{u=document.body.offsetWidth;I=document.body.offsetHeight}var K,
h;if(self.innerHeight){K=document.documentElement.clientWidth?document.documentElement.clientWidth:self.innerWidth;h=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){K=document.documentElement.clientWidth;h=document.documentElement.clientHeight}else if(document.body){K=document.body.clientWidth;h=document.body.clientHeight}pageHeight=I<h?h:I;pageWidth=u<K?u:K;return arrayPageSize=new Array(pageWidth,pageHeight,K,h)}function M(){var u,I;if(self.pageYOffset){I=
self.pageYOffset;u=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){I=document.documentElement.scrollTop;u=document.documentElement.scrollLeft}else if(document.body){I=document.body.scrollTop;u=document.body.scrollLeft}return arrayPageScroll=new Array(u,I)}function A(u){var I=new Date;do var K=new Date;while(K-I<u)}i=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageLoading:"images/lightbox-ico-loading.gif",imageBtnPrev:"images/lightbox-btn-prev.gif",
imageBtnNext:"images/lightbox-btn-next.gif",imageBtnClose:"images/lightbox-btn-close.gif",imageBlank:"images/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},i);var R=this;return this.unbind("click").click(p)}})(jQuery);
(function(a){a.bind=function(i,p){var b=Array.prototype.slice.call(arguments,2);return b.length?function(){var c=[this].concat(b,a.makeArray(arguments));return p.apply(i,c)}:function(){var c=[this].concat(a.makeArray(arguments));return p.apply(i,c)}}})(jQuery);
(function(a){a.widget("ui.checkBox",{_init:function(){var i=this,p=this.options,b=function(c){if(this.disabledStatus)return false;i.hover=c.type=="focus"||c.type=="mouseenter";i._changeStateClassChain()};if(!this.element.is(":radio,:checkbox"))return false;this.labels=a([]);this.hoverStatus=this.disabledStatus=this.checkedStatus=false;this.radio=this.element.is(":radio");this.visualElement=a("<span />").addClass(this.radio?"ui-radio":"ui-checkbox").bind("mouseenter.checkBox mouseleave.checkBox",b).bind("click.checkBox",
function(){i.element[0].click();return false});p.replaceInput&&this.element.addClass("ui-helper-hidden-accessible").after(this.visualElement[0]).bind("usermode",function(c){c.enabled&&i.destroy.call(i,true)});this.element.bind("click.checkBox",a.bind(this,this.reflectUI)).bind("focus.checkBox blur.checkBox",b);if(p.addLabel)this.labels=a("label[for="+this.element.attr("id")+"]").bind("mouseenter.checkBox mouseleave.checkBox",b);this.reflectUI({type:"initialReflect"})},_changeStateClassChain:function(){function i(){var c=
this.className.split(" "),d=false;a.each(c,function(f,l){if(l.indexOf(b)===0){d=true;c[f]=p;return false}});d||c.push(p);this.className=c.join(" ")}var p=this.checkedStatus?"-checked":"",b="ui-"+(this.radio?"radio":"checkbox")+"-state";p+=this.disabledStatus?"-disabled":"";p+=this.hover?"-hover":"";if(p)p=b+p;this.labels.each(i);this.visualElement.each(i)},destroy:function(i){this.element.removeClass("ui-helper-hidden-accessible");this.visualElement.addClass("ui-helper-hidden");if(!i){this.element.unbind(".checkBox");
this.visualElement.remove();this.labels.unbind(".checkBox").removeClass("ui-state-hover ui-state-checked ui-state-disabled")}},disable:function(){this.element[0].disabled=true;this.reflectUI({type:"manuallyDisabled"})},enable:function(){this.element[0].disabled=false;this.reflectUI({type:"manuallyenabled"})},toggle:function(i){this.changeCheckStatus(this.element.is(":checked")?false:true,i)},changeCheckStatus:function(i,p){if(p&&p.type=="click"&&this.element[0].disabled)return false;this.element.attr({checked:i});
this.reflectUI(p||{type:"changeCheckStatus"})},propagate:function(i,p,b){if(!p||p.type!="initialReflect"){this.radio&&!b&&a(document.getElementsByName(this.element.attr("name"))).checkBox("reflectUI",p,true);return this._trigger(i,p,{options:this.options,checked:this.checkedStatus,labels:this.labels,disabled:this.disabledStatus})}},reflectUI:function(i,p){var b=this.checkedStatus,c=this.disabledStatus;p=p||i;this.disabledStatus=this.element.is(":disabled");this.checkedStatus=this.element.is(":checked");
if(this.disabledStatus!=c||this.checkedStatus!==b){this._changeStateClassChain();this.disabledStatus!=c&&this.propagate("disabledChange",p);this.checkedStatus!==b&&this.propagate("change",p)}}});a.ui.checkBox.defaults={replaceInput:true,addLabel:true}})(jQuery);
jQuery.fn.crossSelect=function(a){function i(){B='<div class="jqxs_buttons">';if(!n.clickSelects){B+='<input type="button" value="'+n.select_txt+'" class="jqxs_selectButton" disabled="disabled"></input>';B+='<input type="button" value="'+n.remove_txt+'" class="jqxs_removeButton" disabled="disabled"></input>'}B+="</div>";$(m).append(t+B+O+'<div style="clear:left;"></div>');$("ul",m).css({height:s.height,width:s.width,"min-height":s["min-height"]});if(n.horizontal==="hide"||n.horizontal==="classBased")$("ul",
m).css({"overflow-x":"hidden"})}function p(){s["min-height"]=n.rows*n.font*1.25;switch(n.vertical){case "expand":s.height=$(k).children("option").size()*n.font*1.25;break;case "scroll":s.height=n.font*1.25*Math.min($(k).children("option").size(),n.rows);break}switch(n.horizontal){case "expand":s.width=Math.max(o+10,n.listWidth);break;case "scroll":s.width=n.listWidth;if(o>n.listWidth)s.height+=24;break;case "hide":s.width=n.listWidth;break;case "classBased":s.width=$(k).outerWidth()}}function b(){var M=
0;t='<ul class="jqxs_optionsList">';O='<ul class="jqxs_chosenList">';var A;$(k).children("option").each(function(){A="";$(this).attr("selected")===true?(A+='<li class="jqxs_selected"'):(A+="<li");A+=' style="line-height: '+n.font*1.25+"px; height:"+n.font*1.25+"px;font-size: "+n.font+"px;width:"+s.width+'px">';A+=$(this).text()+"<span>"+M+"</span></li>";t+=A;if($(this).attr("selected")===true)O+=A;M++});O+="</ul>";t+="</ul>"}function c(){var M="";$("option",k).each(function(){M+=$(this).text()+"<br />"});
$(m).append('<span class="jqxs_ruler" style="font-size:'+n.font+'px">'+M+"</span>");o=$("span",m).width();$("span",m).remove()}function d(){function M(){if($(this).hasClass("jqxs_focused")){$(this).removeClass("jqxs_focused");if($(this).parent().children(".jqxs_focused").length===0){l(D);l(P)}}else{if(n.clicksAccumulate)$(this).parent().hasClass("jqxs_optionsList")?$("li",F).removeClass("jqxs_focused"):$("li",z).removeClass("jqxs_focused");else{$("li",z).removeClass("jqxs_focused");$("li",F).removeClass("jqxs_focused")}$(this).addClass("jqxs_focused");
if($(this).parent().hasClass("jqxs_optionsList")){f(D);l(P)}else{f(P);l(D)}}}function A(){var X=$("span",this).text();X=$(S).children("option")[X];if($(X).attr("selected")===false){$(X).attr("selected","selected");$(this).removeClass("jqxs_focused");if(n.clickSelects)$(this).clone().appendTo(F).click(I);else n.dblclick?$(this).clone().appendTo(F).click(M).dblclick(I):$(this).clone().appendTo(F).click(M);$(this).addClass("jqxs_selected")}}function R(){var X=$("span",this).text(),Z=$(S).children("option")[X];
if($(Z).attr("selected")===true){$(Z).attr("selected","");$($(z).children("li")[X]).removeClass("jqxs_selected");$(this).remove()}}function u(){$(this).each(A);y("sel")}function I(){$(this).each(R);y("rem")}function K(){$(".jqxs_focused",z).each(A);y("sel")}function h(){$(".jqxs_focused",F).each(R);y("rem")}function e(){$("li",z).each(A);l(P);y("sel")}function w(){$("li",F).each(R);l(D);y("rem")}function y(X){switch(X){case "sel":l(D);f(ca);$("li:not(.jqxs_selected)",z).size()===0&&l(aa);break;case "rem":l(P);
f(aa);$("li",F).size()===0&&l(ca);break}}var S=k,z=$(".jqxs_optionsList",m),F=$(".jqxs_chosenList",m),D=$(".jqxs_selectButton",m),P=$(".jqxs_removeButton",m),aa=$(".jqxs_selectAllButton",m),ca=$(".jqxs_removeAllButton",m);if(n.clickSelects){$("li",z).click(u);$("li",F).click(I)}else{$("li",m).click(M);$(D).click(K);$(P).click(h)}if(n.dblclick){$("li",z).dblclick(u);$("li",F).dblclick(I)}$(aa).click(e);$(ca).click(w)}function f(M){$(M).addClass("jqxs_active").attr("disabled","")}function l(M){$(M).removeClass("jqxs_active").attr("disabled",
"disabled")}var n=$.extend({},jQuery.fn.crossSelect.defaults,a),k,m,o,s=[],t,O,B;return this.each(function(){if($(this).attr("multiple")===true){k=$(this).hide().wrap('<div class="jqxs"></div>');m=$(k).parent();c();p();b();i();d()}})};jQuery.fn.crossSelect.defaults={vertical:"scroll",horizontal:"hide",listWidth:150,font:12,rows:8,dblclick:true,clickSelects:false,clicksAccumulate:false,select_txt:"select",remove_txt:"remove",selectAll_txt:"select all",removeAll_txt:"remove all"};
(function(a,i,p){function b(){var h=i.console;return h&&(h.error||h.log||a.noop).apply(h,arguments)}function c(h){var e;if(!h||"object"!==typeof h)return m;if("object"!==typeof h.metadata)h.metadata={type:h.metadata};if("content"in h){if("object"!==typeof h.content||h.content.jquery)h.content={text:h.content};e=h.content.text||m;if(!a.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"===typeof e&&!e.jquery))h.content.text=m;if("title"in h.content){if("object"!==typeof h.content.title)h.content.title=
{text:h.content.title};e=h.content.title.text||m;if(!a.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"===typeof e&&!e.jquery))h.content.title.text=m}}if("position"in h)if("object"!==typeof h.position)h.position={my:h.position,at:h.position};if("show"in h)if("object"!==typeof h.show)h.show=h.show.jquery?{target:h.show}:{event:h.show};if("hide"in h)if("object"!==typeof h.hide)h.hide=h.hide.jquery?{target:h.hide}:{event:h.hide};if("style"in h)if("object"!==typeof h.style)h.style={classes:h.style};
a.each(t,function(){this.sanitize&&this.sanitize(h)});return h}function d(h,e,w,y){function S(j){var r=0,v,G=e;for(j=j.split(".");G=G[j[r++]];)if(r<j.length)v=G;return[v||e,j.pop()]}function z(){return q&&q.css("left")!==I&&q.css("visibility")!=="hidden"}function F(){var j=e.style.widget;q.toggleClass(M,j);J.content.toggleClass(M+"-content",j);J.titlebar&&J.titlebar.toggleClass(M+"-header",j);J.button&&J.button.toggleClass(B+"-icon",!j)}function D(){if(J.title){J.titlebar.remove();J.titlebar=J.title=
J.button=o;g.reposition()}}function P(){var j=e.content.title.button;J.button&&J.button.remove();J.button=j.jquery?j:a("<a />",{"class":"ui-state-default "+(e.style.widget?"":B+"-icon"),title:"Close tooltip","aria-label":"Close tooltip"}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}));J.button.appendTo(J.titlebar).attr("role","button").hover(function(r){a(this).toggleClass("ui-state-hover",r.type==="mouseenter")}).click(function(r){q.hasClass(A)||g.hide(r);return m}).bind("mousedown keydown mouseup keyup mouseout",
function(r){a(this).toggleClass("ui-state-active ui-state-focus",r.type.substr(-4)==="down")});g.redraw()}function aa(){var j=N+"-title";J.titlebar&&D();J.titlebar=a("<div />",{"class":B+"-titlebar "+(e.style.widget?"ui-widget-header":"")}).append(J.title=a("<div />",{id:j,"class":B+"-title","aria-atomic":k})).insertBefore(J.content);if(e.content.title.button)P();else g.rendered&&g.redraw()}function ca(j){var r=J.button,v=J.title;if(!g.rendered)return m;if(j){v||aa();P()}else r.remove()}function X(j){var r=
J.title;if(!g.rendered||!j)return m;if(a.isFunction(j))j=j.call(h,g)||"";j.jquery&&j.length>0?r.empty().append(j.css({display:"block"})):r.html(j);g.redraw();g.rendered&&z()&&g.reposition(V.event)}function Z(j){var r=J.content;if(!g.rendered||!j)return m;if(a.isFunction(j))j=j.call(h,g)||"";j.jquery&&j.length>0?r.empty().append(j.css({display:"block"})):r.html(j);q.queue("fx",function(v){function G(Q){E=E.not(Q);if(E.length===0){g.redraw();g.rendered&&z()&&g.reposition(V.event);v()}}var E=r.find("img:not([height]):not([width])");
E.each(function(Q,ba){var da=["abort","error","load","unload",""].join(".qtip-image ");a(this).bind(da,function(){clearTimeout(g.timers.img[Q]);G(this)});(function U(){if(ba.height&&ba.width)return G(ba);g.timers.img[Q]=setTimeout(U,20)})();return k});E.length===0&&G(E)});return g}function ka(j,r,v,G){function E(L){if(q.hasClass(A))return m;W.show.trigger("qtip-"+w+"-inactive");clearTimeout(g.timers.show);clearTimeout(g.timers.hide);var C=function(){g.show(L)};if(e.show.delay>0)g.timers.show=setTimeout(C,
e.show.delay);else C()}function Q(L){if(q.hasClass(A))return m;var C=a(L.relatedTarget||L.target),ja=C.closest(R)[0]===q[0];C=C[0]===W.show[0];clearTimeout(g.timers.show);clearTimeout(g.timers.hide);if(T.target==="mouse"&&ja||e.hide.fixed&&/mouse(out|leave|move)/.test(L.type)&&(ja||C)){L.stopPropagation();L.preventDefault();return m}q.stop(1,1);if(e.hide.delay>0)g.timers.hide=setTimeout(function(){g.hide(L)},e.hide.delay);else g.hide(L)}function ba(L){if(q.hasClass(A))return m;clearTimeout(g.timers.inactive);
g.timers.inactive=setTimeout(function(){g.hide(L)},e.hide.inactive)}function da(L){z()&&g.reposition(L)}var U=".qtip-"+w,T=e.position,W={show:e.show.target,hide:e.hide.target,container:T.container[0]===H?a(document):T.container,doc:a(document)},ha={show:a.trim(""+e.show.event).split(" "),hide:a.trim(""+e.hide.event).split(" ")},na=a.browser.msie&&parseInt(a.browser.version,10)===6;if(v){if(e.hide.fixed){W.hide=W.hide.add(q);q.bind("mouseover"+U,function(){q.hasClass(A)||clearTimeout(g.timers.hide)})}T.target===
"mouse"&&T.adjust.mouse&&e.hide.event&&q.bind("mouseleave"+U,function(L){if((L.relatedTarget||L.target)!==W.show[0])g.hide(L)});q.bind("mouseenter"+U+" mouseleave"+U,function(L){g[L.type==="mouseenter"?"focus":"blur"](L)})}if(r){if("number"===typeof e.hide.inactive){W.show.bind("qtip-"+w+"-inactive",ba);a.each(s.inactiveEvents,function(L,C){W.hide.add(J.tooltip).bind(C+U+"-inactive",ba)})}a.each(ha.hide,function(L,C){L=a.inArray(C,ha.show);var ja=a(W.hide);if(L>-1&&ja.add(W.show).length===ja.length||
C==="unfocus"){W.show.bind(C+U,function(la){z()?Q(la):E(la)});delete ha.show[L]}else W.hide.bind(C+U,Q)})}j&&a.each(ha.show,function(L,C){W.show.bind(C+U,E)});if(G){if(T.adjust.resize||T.viewport)a(a.event.special.resize?T.viewport:i).bind("resize"+U,da);if(T.viewport||na&&q.css("position")==="fixed")a(T.viewport).bind("scroll"+U,da);/unfocus/i.test(e.hide.event)&&W.doc.bind("mousedown"+U,function(L){var C=a(L.target);C.parents(R).length===0&&C.add(h).length>1&&z()&&!q.hasClass(A)&&g.hide(L)});T.target===
"mouse"&&W.doc.bind("mousemove"+U,function(L){if(T.adjust.mouse&&!q.hasClass(A)&&z())g.reposition(L||O)})}}function x(j,r,v,G){G=parseInt(G,10)!==0;var E=".qtip-"+w;r={show:j&&e.show.target[0],hide:r&&e.hide.target[0],tooltip:v&&g.rendered&&J.tooltip[0],content:v&&g.rendered&&J.content[0],container:G&&e.position.container[0]===H?document:e.position.container[0],window:G&&i};if(g.rendered)a([]).pushStack(a.grep([r.show,r.hide,r.tooltip,r.container,r.content,r.window],function(Q){return typeof Q===
"object"})).unbind(E);else j&&e.show.target.unbind(E+"-create")}var g=this,H=document.body,N=B+"-"+w,Y=0,q,J,V;g.id=w;g.rendered=m;g.elements=J={target:h};g.timers={img:[]};g.options=e;g.checks={};g.plugins={};g.cache=V={event:{},target:o,disabled:m,attr:y};g.checks.builtin={"^id$":function(j,r,v){j=v===k?s.nextid:v;r=B+"-"+j;if(j!==m&&j.length>0&&!a("#"+r).length){q[0].id=r;J.content[0].id=r+"-content";J.title[0].id=r+"-title"}},"^content.text$":function(j,r,v){Z(v)},"^content.title.text$":function(j,
r,v){if(!v)return D();!J.title&&v&&aa();X(v)},"^content.title.button$":function(j,r,v){ca(v)},"^position.(my|at)$":function(j,r,v){if("string"===typeof v)j[r]=new t.Corner(v)},"^position.container$":function(j,r,v){g.rendered&&q.appendTo(v)},"^(show|hide).(event|target|fixed|delay|inactive)$":function(j,r,v,G,E){j=[1,0,0];j[E[0]==="show"?"push":"unshift"](0);x.apply(g,j);ka.apply(g,[1,1,0,0])},"^show.ready$":function(){g.rendered||g.show()},"^style.classes$":function(j,r,v){a.attr(q[0],"class",B+
" qtip ui-helper-reset "+v)},"^style.widget|content.title":F,"^events.(render|show|move|hide|focus|blur)$":function(j,r,v){q[(a.isFunction(v)?"":"un")+"bind"]("tooltip"+r,v)}};a.extend(g,{render:function(j){if(g.rendered)return m;var r=e.content.text,v=e.content.title.text,G=a.Event("tooltiprender");a.attr(h[0],"aria-describedby",N);q=J.tooltip=a("<div/>").attr({id:N,"class":B+" qtip ui-helper-reset "+e.style.classes,role:"alert","aria-live":"polite","aria-atomic":m,"aria-describedby":N+"-content",
"aria-hidden":k}).toggleClass(A,V.disabled).data("qtip",g).appendTo(e.position.container).append(J.content=a("<div />",{"class":B+"-content",id:N+"-content","aria-atomic":k}));g.rendered=-1;if(v){aa();X(v)}Z(r);g.rendered=k;F();a.each(t,function(){this.initialize==="render"&&this(g)});ka(1,1,1,1);a.each(e.events,function(E,Q){if(Q)q.bind(E==="toggle"?"tooltipshow tooltiphide":"tooltip"+E,Q)});q.css("visibility","hidden").queue("fx",function(E){G.originalEvent=V.event;q.trigger(G,[g]);if(e.show.ready||
j)g.show(V.event);E();g.redraw()});return g},get:function(j){switch(j.toLowerCase()){case "dimensions":j={height:q.outerHeight(),width:q.outerWidth()};break;case "offset":j=t.offset(q,e.position.container);break;default:j=S(j.toLowerCase());j=j[0][j[1]];j=j.precedance?j.string():j;break}return j},set:function(j,r){function v(da,U){var T,W,ha;if(g.rendered)for(T in Q)for(W in Q[T]){if(ha=(new RegExp(W,"i")).exec(da)){U.push(ha);Q[T][W].apply(g,U)}}else if(da==="show.ready"&&U[2]){Y=0;g.render(k)}}
var G=/^position.(my|at|adjust|target|container)|style|content/i,E=m,Q=g.checks,ba;if("string"===typeof j){ba=j;j={};j[ba]=r}else j=a.extend(k,{},j);a.each(j,function(da,U){var T=S(da.toLowerCase()),W;W=T[0][T[1]];T[0][T[1]]="object"===typeof U&&U.nodeType?a(U):U;j[da]=[T[0],T[1],U,W];E=G.test(da)||E});c(e);Y=1;a.each(j,v);Y=0;E&&z()&&g.rendered&&g.reposition();return g},toggle:function(j,r){function v(){if(j)a.browser.msie&&q[0].style.removeAttribute("filter");else q.css({display:"",visibility:"hidden",
width:"",opacity:"",left:"",top:""})}if(!g.rendered)if(j)g.render(1);else return m;var G=j?"show":"hide",E=e[G],Q=z();if((typeof j).search("boolean|number"))j=!Q;if(Q===j)return g;if(r){if(/over|enter/.test(r.type)&&/out|leave/.test(V.event.type)&&r.target===e.show.target[0]&&q.has(r.relatedTarget).length)return g;V.event=a.extend({},r)}Q=a.Event("tooltip"+G);Q.originalEvent=r?V.event:o;q.trigger(Q,[g,90]);if(Q.isDefaultPrevented())return g;a.attr(q[0],"aria-hidden",!!!j);if(j){q.hide().css({visibility:""});
g.focus(r);g.reposition(r,0);E.solo&&a(R,E.solo).not(q).qtip("hide",Q)}else{clearTimeout(g.timers.show);g.blur(r)}q.stop(1,1);if(a.isFunction(E.effect)){E.effect.call(q,g);q.queue("fx",function(ba){v.call(this,ba);ba()})}else if(E.effect===m){q[G]();v.call(q)}else q.fadeTo(90,j?1:0,v);j&&E.target.trigger("qtip-"+w+"-inactive");return g},show:function(j){return g.toggle(k,j)},hide:function(j){return g.toggle(m,j)},focus:function(j){if(!g.rendered)return m;var r=a(R),v=parseInt(q[0].style.zIndex,10),
G=s.zindex+r.length;j=a.extend({},j);if(!q.hasClass(u)){if(v!==G){r.each(function(){if(this.style.zIndex>v)this.style.zIndex-=1});r.filter("."+u).qtip("blur",j)}r=a.Event("tooltipfocus");r.originalEvent=j;q.trigger(r,[g,G]);if(!r.isDefaultPrevented())q.addClass(u)[0].style.zIndex=G}return g},blur:function(j){j=a.extend({},j);var r;q.removeClass(u);r=a.Event("tooltipblur");r.originalEvent=j;q.trigger(r,[g]);return g},reposition:function(j,r){if(!g.rendered||Y)return m;Y=k;var v=e.position.target,G=
e.position,E=G.my,Q=G.at,ba=G.adjust,da=q.outerWidth(),U=q.outerHeight(),T=0,W=0,ha=a.Event("tooltipmove"),na=q.css("position")==="fixed",L=G.viewport.jquery?G.viewport:a(i),C={left:0,top:0},ja=(g.plugins.tip||{}).corner,la={left:function(ea){var fa=L.scrollLeft,ia=Q.x==="left"?T:Q.x==="right"?-T:-T/2,ga=ja&&ja.precedance==="x"?s.defaults.style.tip.width:0,ma=fa-ea-ga;fa=ea+da-L.width-fa+ga;ia=(E.x==="left"?da:E.x==="right"?-da:-da/2)-(E.precedance==="x"||E.x===E.y?ia:0);ga=E.x==="center";if(ma>0&&
(E.x!=="left"||fa>0))C.left-=ia+(ga?0:2*ba.x);else if(fa>0&&(E.x!=="right"||ma>0))C.left-=ga?-ia:ia+2*ba.x;if(C.left!==ea&&ga)C.left-=ba.x;if(C.left<0&&-C.left>fa)C.left=ea;return C.left-ea},top:function(ea){var fa=L.scrollTop,ia=Q.y==="top"?W:Q.y==="bottom"?-W:-W/2,ga=ja&&ja.precedance==="y"?s.defaults.style.tip.height:0,ma=fa-ea-ga;fa=ea+U-L.height-fa+ga;ia=(E.y==="top"?U:E.y==="bottom"?-U:-U/2)-(E.precedance==="y"||E.x===E.y?ia:0);ga=E.y==="center";if(ma>0&&(E.y!=="top"||fa>0))C.top-=ia+(ga?0:
2*ba.y);else if(fa>0&&(E.y!=="bottom"||ma>0))C.top-=ga?-ia:ia+2*ba.y;if(C.top!==ea&&ga)C.top-=ba.y;if(C.top<0&&-C.top>fa)C.top=ea;return C.top-ea}};r=r===p||!!r||m;L=!L?m:{elem:L,height:L[(L[0]===i?"h":"outerH")+"eight"](),width:L[(L[0]===i?"w":"outerW")+"idth"](),scrollLeft:L.scrollLeft(),scrollTop:L.scrollTop()};if(v==="mouse"){Q={x:"left",y:"top"};j=j&&(j.type==="resize"||j.type==="scroll")?V.event:ba.mouse||!j||!j.pageX?a.extend({},O):j;C={top:j.pageY,left:j.pageX}}else{if(v==="event")v=j&&j.target&&
j.type!=="scroll"&&j.type!=="resize"?(V.target=a(j.target)):V.target;v=a(v).eq(0);if(v.length===0)return g;else if(v[0]===document||v[0]===i){T=v.width();W=v.height();if(v[0]===i)C={top:na?0:L.scrollTop,left:na?0:L.scrollLeft}}else if(v.is("area")&&t.imagemap)C=t.imagemap(v,Q);else if(v[0].namespaceURI=="http://www.w3.org/2000/svg"&&t.svg)C=t.svg(v,Q);else{T=v.outerWidth();W=v.outerHeight();C=t.offset(v,G.container)}if(C.offset){T=C.width;W=C.height;C=C.offset}C.left+=Q.x==="right"?T:Q.x==="center"?
T/2:0;C.top+=Q.y==="bottom"?W:Q.y==="center"?W/2:0}C.left+=ba.x+(E.x==="right"?-da:E.x==="center"?-da/2:0);C.top+=ba.y+(E.y==="bottom"?-U:E.y==="center"?-U/2:0);C.adjusted=G.viewport.jquery&&v[0]!==i&&v[0]!==H?{left:la.left(C.left),top:la.top(C.top)}:{left:0,top:0};q.attr("class",function(){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(B+"-pos-"+E.abbreviation());ha.originalEvent=a.extend({},j);q.trigger(ha,[g,C,L.elem]);if(ha.isDefaultPrevented())return g;delete C.adjusted;
if(!r||!isNaN(C.left,C.top))q.css(C);else if(z()&&a.isFunction(G.effect)){G.effect.call(q,g,C);q.queue(function(ea){a(this).css({opacity:"",height:""});a.browser.msie&&this.style&&this.style.removeAttribute("filter");ea()})}Y=m;return g},redraw:function(){var j=B+"-fluid",r;if(g.rendered<1)return m;q.css({width:"auto",height:"auto"}).addClass(j);r={height:q.outerHeight(),width:q.outerWidth()};a.each(["width","height"],function(v,G){v=parseInt(q.css("max-"+G),10)||0;var E=parseInt(q.css("min-"+G),
10)||0;r[G]=v+E?Math.min(Math.max(r[G],E),v):r[G]});q.css(r).removeClass(j);return g},disable:function(j){var r=A;if("boolean"!==typeof j)j=!(q.hasClass(r)||V.disabled);if(g.rendered){q.toggleClass(r,j);a.attr(q[0],"aria-disabled",j)}else V.disabled=!!j;return g},enable:function(){g.disable(m)},destroy:function(){var j=h[0],r=a.data(j,K);if(g.rendered){q.remove();a.each(g.plugins,function(){this.destroy&&this.destroy()})}clearTimeout(g.timers.show);clearTimeout(g.timers.hide);x(1,1,1,1);a.removeData(j,
"qtip");r&&a.attr(j,"title",r);h.removeAttr("aria-describedby").unbind(".qtip");return h}})}function f(h,e){var w,y,S,z=a(this),F=a(document.body),D=this===document?F:z;y=z.metadata?z.metadata(e.metadata):o;var P=e.metadata.type==="html5"&&y?y[e.metadata.name]:o,aa=z.data(e.metadata.name||"qtipopts");try{aa=typeof aa==="string"?(new Function("return "+aa))():aa}catch(ca){b("Unable to parse HTML5 attribute data: "+aa)}e=a.extend(k,{},s.defaults,e,typeof aa==="object"?c(aa):o,c(P||y));y&&a.removeData(this,
"metadata");y=e.position;e.id=h;if("boolean"===typeof e.content.text){S=z.attr(e.content.attr);if(e.content.attr!==m&&S)e.content.text=S;else return m}if(y.container===m)y.container=F;if(y.target===m)y.target=D;if(e.show.target===m)e.show.target=D;if(e.show.solo===k)e.show.solo=F;if(e.hide.target===m)e.hide.target=D;if(e.position.viewport===k)e.position.viewport=y.container;y.at=new t.Corner(y.at);y.my=new t.Corner(y.my);if(a.data(this,"qtip"))if(e.overwrite)z.qtip("destroy");else if(e.overwrite===
m)return m;if(a.attr(this,"title")){a.data(this,K,a.attr(this,"title"));z.removeAttr("title")}w=new d(z,e,h,!!S);a.data(this,"qtip",w);z.bind("remove.qtip",function(){w.destroy()});return w}function l(h,e,w){var y=Math.ceil(e/2),S=Math.ceil(w/2);e={bottomright:[[0,0],[e,w],[e,0]],bottomleft:[[0,0],[e,0],[0,w]],topright:[[0,w],[e,0],[e,w]],topleft:[[0,0],[0,w],[e,w]],topcenter:[[0,w],[y,0],[e,w]],bottomcenter:[[0,0],[e,0],[y,w]],rightcenter:[[0,0],[e,S],[0,w]],leftcenter:[[e,0],[e,w],[0,S]]};e.lefttop=
e.bottomright;e.righttop=e.bottomleft;e.leftbottom=e.topright;e.rightbottom=e.topleft;return e[h.string()]}function n(h){function e(x,g,H){if(D.tip){x=a.extend({},z.corner);g=H.adjusted;var N;if(z.corner.fixed!==k){if(g.left)x.x=x.x==="center"?g.left>0?"left":"right":x.x==="left"?"right":"left";if(g.top)x.y=x.y==="center"?g.top>0?"top":"bottom":x.y==="top"?"bottom":"top";if(x.string()!==aa.corner&&(aa.top!==g.top||aa.left!==g.left))N=z.update(x)}N||(N=z.position(x,0));if(N.right!==p)N.left=N.right;
if(N.bottom!==p)N.top=N.bottom;N.option=Math.max(0,F.offset);H.left-=N.left.charAt?N.option:(N.right?-1:1)*N.left;H.top-=N.top.charAt?N.option:(N.bottom?-1:1)*N.top;aa.left=g.left;aa.top=g.top;aa.corner=x.string()}}function w(x,g,H){g=!g?x[x.precedance]:g;g="border-"+g+"-width";x=parseInt((D.titlebar&&x.y==="top"?D.titlebar:D.content).css(g),10);return(H?x||parseInt(P.css(g),10):x)||0}function y(x){var g=a.browser.mozilla,H=x.y+(g?"":"-")+x.x;g=(g?"-moz-":a.browser.webkit?"-webkit-":"")+(g?"border-radius-"+
H:"border-"+H+"-radius");return parseInt((D.titlebar&&x.y==="top"?D.titlebar:D.content).css(g),10)||parseInt(P.css(g),10)||0}function S(x){var g=x.precedance==="y",H=ca[g?"width":"height"],N=ca[g?"height":"width"],Y=x.string().indexOf("center")>-1,q=H*(Y?0.5:1),J=Math.pow;x=Math.round;var V=Math.sqrt(J(q,2)+J(N,2));q=[Z/q*V,Z/N*V];q[2]=Math.sqrt(J(q[0],2)-J(Z,2));q[3]=Math.sqrt(J(q[1],2)-J(Z,2));Y=(V+q[2]+q[3]+(Y?0:q[0]))/V;H=[x(Y*N),x(Y*H)];return{height:H[g?0:1],width:H[g?1:0]}}var z=this,F=h.options.style.tip,
D=h.elements,P=D.tooltip,aa={top:0,left:0,corner:""},ca={width:F.width,height:F.height},X={},Z=F.border||0,ka=a("<canvas />")[0].getContext;z.corner=o;z.mimic=o;h.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){z.init()||z.destroy();h.reposition()},"^style.tip.(height|width)$":function(){ca={width:F.width,height:F.height};z.create();z.update();h.reposition()},"^content.title.text|style.(classes|widget)$":function(){D.tip&&z.update()}};a.extend(z,{init:function(){var x=z.detectCorner()&&
(ka||a.browser.msie);if(x){z.create();z.update();P.unbind(".qtip-tip").bind("tooltipmove.qtip-tip",e)}return x},detectCorner:function(){var x=F.corner,g=h.options.position,H=g.at;g=g.my.string?g.my.string():g.my;if(x===m||g===m&&H===m)return m;else if(x===k)z.corner=new t.Corner(g);else if(!x.string){z.corner=new t.Corner(x);z.corner.fixed=k}return z.corner.string()!=="centercenter"},detectColours:function(){var x=D.tip.css({backgroundColor:"",border:""}),g=z.corner,H=g[g.precedance],N="border-"+
H+"-color",Y="border"+H.charAt(0)+H.substr(1)+"Color";H=/rgba?\(0, 0, 0(, 0)?\)|transparent/i;var q=a(document.body).css("color"),J=h.elements.content.css("color");g=D.titlebar&&(g.y==="top"||g.y==="center"&&x.position().top+ca.height/2+F.offset<D.titlebar.outerHeight(1))?D.titlebar:D.content;var V=x.css("background-color")||"transparent";Y=x[0].style[Y];if(!V||H.test(V)){X.fill=g.css("background-color");if(H.test(X.fill))X.fill=P.css("background-color")||V}if(!Y||H.test(Y)){X.border=P.css(N);if(H.test(X.border)||
X.border===q){X.border=g.css(N);if(X.border===J)X.border=Y}}a("*",x).add(x).css("background-color","transparent").css("border","0px dashed transparent")},create:function(){var x=ca.width,g=ca.height;D.tip&&D.tip.remove();D.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:x,height:g}).prependTo(P);if(ka)a("<canvas />").appendTo(D.tip)[0].getContext("2d").save();else{x='<vml:shape coordorigin="0,0" style="display:block; position:absolute; behavior:url(#default#VML);"></vml:shape>';D.tip.html(Z?
(x+=x):x)}},update:function(x){var g=D.tip,H=g.children(),N=ca.width,Y=ca.height,q=F.mimic,J=Math.round,V,j,r;if(!x)x=z.corner;if(q===m)q=x;else{q=new t.Corner(q);q.precedance=x.precedance;if(q.x==="inherit")q.x=x.x;else if(q.y==="inherit")q.y=x.y;else if(q.x===q.y)q[x.precedance]=x[x.precedance]}V=q.precedance;z.detectColours();Z=X.border==="transparent"||X.border==="#123456"?0:F.border===k?w(x,o,k):F.border;j=l(q,N,Y);r=S(x);g.css(r);g=x.precedance==="y"?[J(q.x==="left"?Z:q.x==="right"?r.width-
N-Z:(r.width-N)/2),J(q.y==="top"?r.height-Y:0)]:[J(q.x==="left"?r.width-N:0),J(q.y==="top"?Z:q.y==="bottom"?r.height-Y-Z:(r.height-Y)/2)];if(ka){H.attr(r);H=H[0].getContext("2d");H.restore();H.save();H.clearRect(0,0,3E3,3E3);H.translate(g[0],g[1]);H.beginPath();H.moveTo(j[0][0],j[0][1]);H.lineTo(j[1][0],j[1][1]);H.lineTo(j[2][0],j[2][1]);H.closePath();H.fillStyle=X.fill;H.strokeStyle=X.border;H.lineWidth=Z*2;H.lineJoin="miter";H.miterLimit=100;H.stroke();H.fill()}else{j="m"+j[0][0]+","+j[0][1]+" l"+
j[1][0]+","+j[1][1]+" "+j[2][0]+","+j[2][1]+" xe";g[2]=Z&&/^(r|b)/i.test(x.string())?1:0;H.css({antialias:""+(q.string().indexOf("center")>-1),left:g[0]-g[2]*Number(V==="x"),top:g[1]-g[2]*Number(V==="y"),width:N+Z,height:Y+Z}).each(function(v){var G=a(this);G.attr({coordsize:N+Z+" "+(Y+Z),path:j,fillcolor:X.fill,filled:!!v,stroked:!!!v}).css({display:Z||v?"block":"none"});!v&&Z>0&&G.html()===""&&G.html('<vml:stroke weight="'+Z*2+'px" color="'+X.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:block;" />')})}return z.position(x,
1)},position:function(x,g){var H=D.tip,N={},Y=Math.max(0,F.offset),q,J,V;if(F.corner===m||!H)return m;x=x||z.corner;q=x.precedance;J=S(x);V=a.browser.msie&&Z&&/^(b|r)/i.test(x.string())?1:0;a.each(q==="y"?[x.x,x.y]:[x.y,x.x],function(j,r){var v,G;if(r==="center"){v=q==="y"?"left":"top";N[v]="50%";N["margin-"+v]=-Math.round(J[q==="y"?"width":"height"]/2)+Y}else{v=w(x,r,k);G=y(x);N[r]=j||!Z?w(x,r)+(!j?G:0):Y+(G>v?G:0)}});N[x[q]]-=J[q==="x"?"width":"height"]+V;g&&H.css({top:"",bottom:"",left:"",right:"",
margin:""}).css(N);return N},destroy:function(){D.tip&&D.tip.remove();P.unbind(".qtip-tip")}});z.init()}var k=true,m=false,o=null,s,t,O,B="ui-tooltip",M="ui-widget",A="ui-state-disabled",R="div.qtip."+B,u=B+"-focus",I="-31000px",K="oldtitle";s=a.fn.qtip=function(h,e,w){var y=(""+h).toLowerCase(),S=o,z=y==="disable"?[k]:a.makeArray(arguments).slice(1,10),F=z[z.length-1],D=this[0]?a.data(this[0],"qtip"):o;if(!arguments.length&&D||y==="api")return D;else if("string"===typeof h){this.each(function(){var P=
a.data(this,"qtip");if(!P)return k;if(F&&F.timeStamp)P.cache.event=F;if(y==="option"&&e)if(a.isPlainObject(e)||w!==p)P.set(e,w);else{S=P.get(e);return m}else P[y]&&P[y].apply(P[y],z)});return S!==o?S:this}else if("object"===typeof h||!arguments.length){D=c(a.extend(k,{},h));return s.bind.call(this,D,F)}};s.bind=function(h,e){return this.each(function(){function w(aa){function ca(){P.render(typeof aa==="object"||y.show.ready);S.show.unbind(z.show);S.hide.unbind(z.hide)}if(P.cache.disabled)return m;
P.cache.event=a.extend({},aa);if(y.show.delay>0){clearTimeout(P.timers.show);P.timers.show=setTimeout(ca,y.show.delay);z.show!==z.hide&&S.hide.bind(z.hide,function(){clearTimeout(P.timers.show)})}else ca()}var y,S,z,F=!h.id||h.id===m||h.id.length<1||a("#"+B+"-"+h.id).length?s.nextid++:h.id,D=".qtip-"+F+"-create",P=f.call(this,F,h);if(P===m)return k;y=P.options;a.each(t,function(){this.initialize==="initialize"&&this(P)});S={show:y.show.target,hide:y.hide.target};z={show:a.trim(""+y.show.event).replace(/ /g,
D+" ")+D,hide:a.trim(""+y.hide.event).replace(/ /g,D+" ")+D};S.show.bind(z.show,w);if(y.show.ready||y.prerender)w(e)})};t=s.plugins={Corner:function(h){h=(""+h).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(h.match(/left|right/i)||h.match(/center/)||["inherit"])[0].toLowerCase();this.y=(h.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=h.charAt(0).search(/^(t|b)/)>-1?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:
this.x+this.y};this.abbreviation=function(){var e=this.x.substr(0,1),w=this.y.substr(0,1);return e===w?e:e==="c"||e!=="c"&&w!=="c"?w+e:e+w}},offset:function(h,e){function w(D,P){y.left+=P*D.scrollLeft();y.top+=P*D.scrollTop()}var y=h.offset();h=e;var S=0,z=document.body,F;if(h){do if(h[0]===z)break;else if(h.css("position")!=="static"){F=h.position();y.left-=F.left+(parseInt(h.css("borderLeftWidth"),10)||0);y.top-=F.top+(parseInt(h.css("borderTopWidth"),10)||0);S++}while(h=h.offsetParent());if(e[0]!==
z||S>1)w(e,1);t.iOS&&w(a(i),-1)}return y},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1]).replace("undefined","3_2").replace("_","."))<4.1,fn:{attr:function(h,e){if(this.length){var w=this[0],y=a.data(w,"qtip");if(h==="title")if(arguments.length<2)return a.data(w,K);else if(typeof y==="object"){y&&y.rendered&&y.options.content.attr==="title"&&y.cache.attr&&y.set("content.text",e);a.fn.attr_replacedByqTip.apply(this,arguments);a.data(w,
K,a.attr(w,"title"));return this.removeAttr("title")}}},clone:function(){var h=a([]),e;a("*",this).add(this).each(function(){var w=a.data(this,K);if(w){a.attr(this,"title",w);h=h.add(this)}});e=a.fn.clone_replacedByqTip.apply(this,arguments);h.removeAttr("title");return e},remove:a.ui?o:function(h,e){a(this).each(function(){if(!e)if(!h||a.filter(h,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}};a.each(t.fn,function(h,e){if(!e)return k;var w=a.fn[h+"_replacedByqTip"]=
a.fn[h];a.fn[h]=function(){return e.apply(this,arguments)||w.apply(this,arguments)}});a(i).bind("load.qtip",function(){a(document).bind("mousemove.qtip",function(h){O={pageX:h.pageX,pageY:h.pageY,type:"mousemove"}})});s.version="nightly";s.nextid=0;s.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");s.zindex=15E3;s.defaults={prerender:m,id:m,overwrite:k,content:{text:k,attr:"title",title:{text:m,button:m}},position:{my:"top left",at:"bottom right",target:m,
container:m,viewport:m,adjust:{x:0,y:0,mouse:k,resize:k},effect:k},show:{target:m,event:"mouseenter",effect:k,delay:90,solo:m,ready:m},hide:{target:m,event:"mouseleave",effect:k,delay:0,fixed:m,inactive:m},style:{classes:"",widget:m},events:{render:o,move:o,show:o,hide:o,toggle:o,focus:o,blur:o}};t.tip=function(h){var e=h.plugins.tip;return"object"===typeof e?e:(h.plugins.tip=new n(h))};t.tip.initialize="render";t.tip.sanitize=function(h){var e=h.style;if(e&&"tip"in e){e=h.style.tip;if(typeof e!==
"object")h.style.tip={corner:e};if(!/string|boolean/i.test(typeof e.corner))e.corner=k;typeof e.width!=="number"&&delete e.width;typeof e.height!=="number"&&delete e.height;typeof e.border!=="number"&&e.border!==k&&delete e.border;typeof e.offset!=="number"&&delete e.offset}};a.extend(k,s.defaults,{style:{tip:{corner:k,mimic:m,width:6,height:6,border:k,offset:0}}})})(jQuery,window);
(function(a){function i(){this._defaults={pickerClass:"",showOnFocus:true,showTrigger:null,showAnim:"show",showOptions:{},showSpeed:"normal",popupContainer:null,alignment:"bottom",fixedWeeks:false,firstDay:0,calculateWeek:this.iso8601Week,monthsToShow:1,monthsOffset:0,monthsToStep:1,monthsToJump:12,useMouseWheel:true,changeMonth:true,yearRange:"c-10:c+10",shortYearCutoff:"+10",showOtherMonths:false,selectOtherMonths:false,defaultDate:null,selectDefaultDate:false,minDate:null,maxDate:null,dateFormat:"mm/dd/yyyy",
autoSize:false,rangeSelect:false,rangeSeparator:" - ",multiSelect:0,multiSeparator:",",onDate:null,onShow:null,onChangeMonthYear:null,onSelect:null,onClose:null,altField:null,altFormat:null,constrainInput:true,commandsAsDateFormat:false,commands:this.commands};this.regional={"":{monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday",
"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yyyy",firstDay:0,renderer:this.defaultRenderer,prevText:"&lt;Prev",prevStatus:"Show the previous month",prevJumpText:"&lt;&lt;",prevJumpStatus:"Show the previous year",nextText:"Next&gt;",nextStatus:"Show the next month",nextJumpText:"&gt;&gt;",nextJumpStatus:"Show the next year",currentText:"Current",currentStatus:"Show the current month",
todayText:"Today",todayStatus:"Show today's month",clearText:"Clear",clearStatus:"Clear all the dates",closeText:"Close",closeStatus:"Close the datepicker",yearStatus:"Change the year",monthStatus:"Change the month",weekText:"Wk",weekStatus:"Week of the year",dayStatus:"Select DD, M d, yyyy",defaultStatus:"Select a date",isRTL:false}};a.extend(this._defaults,this.regional[""]);this._disabled=[]}function p(b,c){a.extend(b,c);for(var d in c)if(c[d]==null||c[d]==undefined)b[d]=c[d];return b}a.extend(i.prototype,
{dataName:"datepick",markerClass:"hasDatepick",_popupClass:"datepick-popup",_triggerClass:"datepick-trigger",_disableClass:"datepick-disable",_coverClass:"datepick-cover",_monthYearClass:"datepick-month-year",_curMonthClass:"datepick-month-",_anyYearClass:"datepick-any-year",_curDoWClass:"datepick-dow-",commands:{prev:{text:"prevText",status:"prevStatus",keystroke:{keyCode:33},enabled:function(b){var c=b.curMinDate();return!c||a.datepick.add(a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),
1-b.get("monthsToStep")-b.get("monthsOffset"),"m"),1),-1,"d").getTime()>=c.getTime()},date:function(b){return a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),-b.get("monthsToStep")-b.get("monthsOffset"),"m"),1)},action:function(b){a.datepick.changeMonth(this,-b.get("monthsToStep"))}},prevJump:{text:"prevJumpText",status:"prevJumpStatus",keystroke:{keyCode:33,ctrlKey:true},enabled:function(b){var c=b.curMinDate();return!c||a.datepick.add(a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),
1-b.get("monthsToJump")-b.get("monthsOffset"),"m"),1),-1,"d").getTime()>=c.getTime()},date:function(b){return a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),-b.get("monthsToJump")-b.get("monthsOffset"),"m"),1)},action:function(b){a.datepick.changeMonth(this,-b.get("monthsToJump"))}},next:{text:"nextText",status:"nextStatus",keystroke:{keyCode:34},enabled:function(b){var c=b.get("maxDate");return!c||a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),b.get("monthsToStep")-b.get("monthsOffset"),
"m"),1).getTime()<=c.getTime()},date:function(b){return a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),b.get("monthsToStep")-b.get("monthsOffset"),"m"),1)},action:function(b){a.datepick.changeMonth(this,b.get("monthsToStep"))}},nextJump:{text:"nextJumpText",status:"nextJumpStatus",keystroke:{keyCode:34,ctrlKey:true},enabled:function(b){var c=b.get("maxDate");return!c||a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),b.get("monthsToJump")-b.get("monthsOffset"),"m"),1).getTime()<=
c.getTime()},date:function(b){return a.datepick.day(a.datepick.add(a.datepick.newDate(b.drawDate),b.get("monthsToJump")-b.get("monthsOffset"),"m"),1)},action:function(b){a.datepick.changeMonth(this,b.get("monthsToJump"))}},current:{text:"currentText",status:"currentStatus",keystroke:{keyCode:36,ctrlKey:true},enabled:function(b){var c=b.curMinDate(),d=b.get("maxDate");b=b.selectedDates[0]||a.datepick.today();return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},date:function(b){return b.selectedDates[0]||
a.datepick.today()},action:function(b){b=b.selectedDates[0]||a.datepick.today();a.datepick.showMonth(this,b.getFullYear(),b.getMonth()+1)}},today:{text:"todayText",status:"todayStatus",keystroke:{keyCode:36,ctrlKey:true},enabled:function(b){var c=b.curMinDate();b=b.get("maxDate");return(!c||a.datepick.today().getTime()>=c.getTime())&&(!b||a.datepick.today().getTime()<=b.getTime())},date:function(){return a.datepick.today()},action:function(){a.datepick.showMonth(this)}},clear:{text:"clearText",status:"clearStatus",
keystroke:{keyCode:35,ctrlKey:true},enabled:function(){return true},date:function(){return null},action:function(){a.datepick.clear(this)}},close:{text:"closeText",status:"closeStatus",keystroke:{keyCode:27},enabled:function(){return true},date:function(){return null},action:function(){a.datepick.hide(this)}},prevWeek:{text:"prevWeekText",status:"prevWeekStatus",keystroke:{keyCode:38,ctrlKey:true},enabled:function(b){var c=b.curMinDate();return!c||a.datepick.add(a.datepick.newDate(b.drawDate),-7,
"d").getTime()>=c.getTime()},date:function(b){return a.datepick.add(a.datepick.newDate(b.drawDate),-7,"d")},action:function(){a.datepick.changeDay(this,-7)}},prevDay:{text:"prevDayText",status:"prevDayStatus",keystroke:{keyCode:37,ctrlKey:true},enabled:function(b){var c=b.curMinDate();return!c||a.datepick.add(a.datepick.newDate(b.drawDate),-1,"d").getTime()>=c.getTime()},date:function(b){return a.datepick.add(a.datepick.newDate(b.drawDate),-1,"d")},action:function(){a.datepick.changeDay(this,-1)}},
nextDay:{text:"nextDayText",status:"nextDayStatus",keystroke:{keyCode:39,ctrlKey:true},enabled:function(b){var c=b.get("maxDate");return!c||a.datepick.add(a.datepick.newDate(b.drawDate),1,"d").getTime()<=c.getTime()},date:function(b){return a.datepick.add(a.datepick.newDate(b.drawDate),1,"d")},action:function(){a.datepick.changeDay(this,1)}},nextWeek:{text:"nextWeekText",status:"nextWeekStatus",keystroke:{keyCode:40,ctrlKey:true},enabled:function(b){var c=b.get("maxDate");return!c||a.datepick.add(a.datepick.newDate(b.drawDate),
7,"d").getTime()<=c.getTime()},date:function(b){return a.datepick.add(a.datepick.newDate(b.drawDate),7,"d")},action:function(){a.datepick.changeDay(this,7)}}},defaultRenderer:{picker:'<div class="datepick"><div class="datepick-nav">{link:prev}{link:today}{link:next}</div>{months}{popup:start}<div class="datepick-ctrl">{link:clear}{link:close}</div>{popup:end}<div class="datepick-clear-fix"></div></div>',monthRow:'<div class="datepick-month-row">{months}</div>',month:'<div class="datepick-month"><div class="datepick-month-header">{monthHeader}</div><table><thead>{weekHeader}</thead><tbody>{weeks}</tbody></table></div>',
weekHeader:"<tr>{days}</tr>",dayHeader:"<th>{day}</th>",week:"<tr>{days}</tr>",day:"<td>{day}</td>",monthSelector:".datepick-month",daySelector:"td",rtlClass:"datepick-rtl",multiClass:"datepick-multi",defaultClass:"",selectedClass:"datepick-selected",highlightedClass:"datepick-highlight",todayClass:"datepick-today",otherMonthClass:"datepick-other-month",weekendClass:"datepick-weekend",commandClass:"datepick-cmd",commandButtonClass:"",commandLinkClass:"",disabledClass:"datepick-disabled"},setDefaults:function(b){a.extend(this._defaults,
b||{});return this},_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,_msPerDay:864E5,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(b,c,d){if(typeof b!="string"){d=c;c=b;b=""}if(!c)return"";b=b||this._defaults.dateFormat;d=d||{};
var f=d.dayNamesShort||this._defaults.dayNamesShort,l=d.dayNames||this._defaults.dayNames,n=d.monthNamesShort||this._defaults.monthNamesShort,k=d.monthNames||this._defaults.monthNames;d=d.calculateWeek||this._defaults.calculateWeek;for(var m=function(M,A){for(var R=1;B+R<b.length&&b.charAt(B+R)==M;)R++;B+=R-1;return Math.floor(R/(A||1))>1},o=function(M,A,R,u){A=""+A;if(m(M,u))for(;A.length<R;)A="0"+A;return A},s=function(M,A,R,u){return m(M)?u[A]:R[A]},t="",O=false,B=0;B<b.length;B++)if(O)if(b.charAt(B)==
"'"&&!m("'"))O=false;else t+=b.charAt(B);else switch(b.charAt(B)){case "d":t+=o("d",c.getDate(),2);break;case "D":t+=s("D",c.getDay(),f,l);break;case "o":t+=o("o",this.dayOfYear(c),3);break;case "w":t+=o("w",d(c),2);break;case "m":t+=o("m",c.getMonth()+1,2);break;case "M":t+=s("M",c.getMonth(),n,k);break;case "y":t+=m("y",2)?c.getFullYear():(c.getFullYear()%100<10?"0":"")+c.getFullYear()%100;break;case "@":t+=Math.floor(c.getTime()/1E3);break;case "!":t+=c.getTime()*1E4+this._ticksTo1970;break;case "'":if(m("'"))t+=
"'";else O=true;break;default:t+=b.charAt(B)}return t},parseDate:function(b,c,d){if(c==null)throw"Invalid arguments";c=typeof c=="object"?c.toString():c+"";if(c=="")return null;b=b||this._defaults.dateFormat;d=d||{};var f=d.shortYearCutoff||this._defaults.shortYearCutoff;f=typeof f!="string"?f:this.today().getFullYear()%100+parseInt(f,10);for(var l=d.dayNamesShort||this._defaults.dayNamesShort,n=d.dayNames||this._defaults.dayNames,k=d.monthNamesShort||this._defaults.monthNamesShort,m=d.monthNames||
this._defaults.monthNames,o=-1,s=d=-1,t=-1,O=false,B=false,M=function(e,w){for(var y=1;K+y<b.length&&b.charAt(K+y)==e;)y++;K+=y-1;return Math.floor(y/(w||1))>1},A=function(e,w){M(e,w);e=[2,3,4,11,20]["oy@!".indexOf(e)+1];e=new RegExp("^-?\\d{1,"+e+"}");e=c.substring(I).match(e);if(!e)throw"Missing number at position {0}".replace(/\{0\}/,I);I+=e[0].length;return parseInt(e[0],10)},R=function(e,w,y,S){e=M(e,S)?y:w;for(w=0;w<e.length;w++)if(c.substr(I,e[w].length)==e[w]){I+=e[w].length;return w+1}throw"Unknown name at position {0}".replace(/\{0\}/,
I);},u=function(){if(c.charAt(I)!=b.charAt(K))throw"Unexpected literal at position {0}".replace(/\{0\}/,I);I++},I=0,K=0;K<b.length;K++)if(B)if(b.charAt(K)=="'"&&!M("'"))B=false;else u();else switch(b.charAt(K)){case "d":s=A("d");break;case "D":R("D",l,n);break;case "o":t=A("o");break;case "w":A("w");break;case "m":d=A("m");break;case "M":d=R("M",k,m);break;case "y":o=K;O=!M("y",2);K=o;o=A("y",2);break;case "@":var h=this._normaliseDate(new Date(A("@")*1E3));o=h.getFullYear();d=h.getMonth()+1;s=h.getDate();
break;case "!":h=this._normaliseDate(new Date((A("!")-this._ticksTo1970)/1E4));o=h.getFullYear();d=h.getMonth()+1;s=h.getDate();break;case "*":I=c.length;break;case "'":if(M("'"))u();else B=true;break;default:u()}if(I<c.length)throw"Additional text found at end";if(o==-1)o=this.today().getFullYear();else if(o<100&&O)o+=f==-1?1900:this.today().getFullYear()-this.today().getFullYear()%100-(o<=f?0:100);if(t>-1){d=1;s=t;for(f=this.daysInMonth(o,d);s>f;f=this.daysInMonth(o,d)){d++;s-=f}}h=this.newDate(o,
d,s);if(h.getFullYear()!=o||h.getMonth()+1!=d||h.getDate()!=s)throw"Invalid date";return h},determineDate:function(b,c,d,f,l){if(d&&typeof d!="object"){l=f;f=d;d=null}if(typeof f!="string"){l=f;f=""}var n=function(k){try{return a.datepick.parseDate(f,k,l)}catch(m){}k=k.toLowerCase();for(var o=(k.match(/^c/)&&d?a.datepick.newDate(d):null)||a.datepick.today(),s=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,t=s.exec(k);t;){o=a.datepick.add(o,parseInt(t[1],10),t[2]||"d");t=s.exec(k)}return o};c=c?a.datepick.newDate(c):
null;return b=b==null?c:typeof b=="string"?n(b):typeof b=="number"?isNaN(b)||b==Infinity||b==-Infinity?c:a.datepick.add(a.datepick.today(),b,"d"):a.datepick._normaliseDate(b)},daysInMonth:function(b,c){c=b.getFullYear?b.getMonth()+1:c;b=b.getFullYear?b.getFullYear():b;return this.newDate(b,c+1,0).getDate()},dayOfYear:function(b,c,d){b=b.getFullYear?b:this.newDate(b,c,d);c=this.newDate(b.getFullYear(),1,1);return Math.floor((b.getTime()-c.getTime())/this._msPerDay)+1},iso8601Week:function(b,c,d){b=
b.getFullYear?new Date(b.getTime()):this.newDate(b,c,d);b.setDate(b.getDate()+4-(b.getDay()||7));c=b.getTime();b.setMonth(0,1);return Math.floor(Math.round((c-b)/864E5)/7)+1},today:function(){return this._normaliseDate(new Date)},newDate:function(b,c,d){return!b?null:b.getFullYear?this._normaliseDate(new Date(b.getTime())):new Date(b,c-1,d,12)},_normaliseDate:function(b){b&&b.setHours(12,0,0,0);return b},year:function(b,c){b.setFullYear(c);return this._normaliseDate(b)},month:function(b,c){b.setMonth(c-
1);return this._normaliseDate(b)},day:function(b,c){b.setDate(c);return this._normaliseDate(b)},add:function(b,c,d){if(d=="d"||d=="w"){this._normaliseDate(b);b.setDate(b.getDate()+c*(d=="w"?7:1))}else{var f=b.getFullYear()+(d=="y"?c:0);c=b.getMonth()+(d=="m"?c:0);b.setTime(a.datepick.newDate(f,c+1,Math.min(b.getDate(),this.daysInMonth(f,c+1))).getTime())}return b},_attachPicker:function(b,c){b=a(b);if(!b.hasClass(this.markerClass)){b.addClass(this.markerClass);var d={target:b,selectedDates:[],drawDate:null,
pickingRange:false,inline:a.inArray(b[0].nodeName.toLowerCase(),["div","span"])>-1,get:function(l){var n=this.settings[l]!==undefined?this.settings[l]:a.datepick._defaults[l];if(a.inArray(l,["defaultDate","minDate","maxDate"])>-1)n=a.datepick.determineDate(n,null,this.selectedDates[0],this.get("dateFormat"),d.getConfig());return n},curMinDate:function(){return this.pickingRange?this.selectedDates[0]:this.get("minDate")},getConfig:function(){return{dayNamesShort:this.get("dayNamesShort"),dayNames:this.get("dayNames"),
monthNamesShort:this.get("monthNamesShort"),monthNames:this.get("monthNames"),calculateWeek:this.get("calculateWeek"),shortYearCutoff:this.get("shortYearCutoff")}}};a.data(b[0],this.dataName,d);var f=a.fn.metadata?b.metadata():{};d.settings=a.extend({},c||{},f||{});if(d.inline){this._update(b[0]);a.fn.mousewheel&&b.mousewheel(this._doMouseWheel)}else{this._attachments(b,d);b.bind("keydown."+this.dataName,this._keyDown).bind("keypress."+this.dataName,this._keyPress).bind("keyup."+this.dataName,this._keyUp);
b.attr("disabled")&&this.disable(b[0])}}},options:function(b,c){return(b=a.data(b,this.dataName))?c?c=="all"?b.settings:b.settings[c]:a.datepick._defaults:{}},option:function(b,c,d){b=a(b);if(b.hasClass(this.markerClass)){c=c||{};if(typeof c=="string"){var f=c;c={};c[f]=d}d=a.data(b[0],this.dataName);f=d.selectedDates;p(d.settings,c);this.setDate(b[0],f,null,false,true);d.pickingRange=false;d.drawDate=a.datepick.newDate(this._checkMinMax((c.defaultDate?d.get("defaultDate"):d.drawDate)||d.get("defaultDate")||
a.datepick.today(),d));d.inline||this._attachments(b,d);if(d.inline||d.div)this._update(b[0])}},_attachments:function(b,c){b.unbind("focus."+this.dataName);c.get("showOnFocus")&&b.bind("focus."+this.dataName,this.show);c.trigger&&c.trigger.remove();var d=c.get("showTrigger");c.trigger=!d?a([]):a(d).clone().removeAttr("id").addClass(this._triggerClass)[c.get("isRTL")?"insertBefore":"insertAfter"](b).click(function(){a.datepick.isDisabled(b[0])||a.datepick[a.datepick.curInst==c?"hide":"show"](b[0])});
this._autoSize(b,c);(d=this._extractDates(c,b.val()))&&this.setDate(b[0],d,null,true);if(c.get("selectDefaultDate")&&c.get("defaultDate")&&c.selectedDates.length==0)this.setDate(b[0],a.datepick.newDate(c.get("defaultDate")||a.datepick.today()))},_autoSize:function(b,c){if(c.get("autoSize")&&!c.inline){b=a.datepick.newDate(2009,10,20);var d=c.get("dateFormat");if(d.match(/[DM]/)){var f=function(l){for(var n=0,k=0,m=0;m<l.length;m++)if(l[m].length>n){n=l[m].length;k=m}return k};b.setMonth(f(c.get(d.match(/MM/)?
"monthNames":"monthNamesShort")));b.setDate(f(c.get(d.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}c.target.attr("size",a.datepick.formatDate(d,b,c.getConfig()).length)}},destroy:function(b){b=a(b);if(b.hasClass(this.markerClass)){var c=a.data(b[0],this.dataName);c.trigger&&c.trigger.remove();b.removeClass(this.markerClass).empty().unbind("."+this.dataName);c.inline&&a.fn.mousewheel&&b.unmousewheel();!c.inline&&c.get("autoSize")&&b.removeAttr("size");a.removeData(b[0],this.dataName)}},
multipleEvents:function(){var b=arguments;return function(){for(var c=0;c<b.length;c++)b[c].apply(this,arguments)}},enable:function(b){var c=a(b);if(c.hasClass(this.markerClass)){var d=a.data(b,this.dataName);if(d.inline)c.children("."+this._disableClass).remove().end().find("button,select").attr("disabled","").end().find("a").attr("href","javascript:void(0)");else{b.disabled=false;d.trigger.filter("button."+this._triggerClass).attr("disabled","").end().filter("img."+this._triggerClass).css({opacity:"1.0",
cursor:""})}this._disabled=a.map(this._disabled,function(f){return f==b?null:f})}},disable:function(b){var c=a(b);if(c.hasClass(this.markerClass)){var d=a.data(b,this.dataName);if(d.inline){d=c.children(":last");var f=d.offset(),l={left:0,top:0};d.parents().each(function(){if(a(this).css("position")=="relative"){l=a(this).offset();return false}});var n=c.css("zIndex");n=(n=="auto"?0:parseInt(n,10))+1;c.prepend('<div class="'+this._disableClass+'" style="width: '+d.outerWidth()+"px; height: "+d.outerHeight()+
"px; left: "+(f.left-l.left)+"px; top: "+(f.top-l.top)+"px; z-index: "+n+'"></div>').find("button,select").attr("disabled","disabled").end().find("a").removeAttr("href")}else{b.disabled=true;d.trigger.filter("button."+this._triggerClass).attr("disabled","disabled").end().filter("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"})}this._disabled=a.map(this._disabled,function(k){return k==b?null:k});this._disabled.push(b)}},isDisabled:function(b){return b&&a.inArray(b,this._disabled)>-1},
show:function(b){b=b.target||b;var c=a.data(b,a.datepick.dataName);if(a.datepick.curInst!=c){a.datepick.curInst&&a.datepick.hide(a.datepick.curInst,true);if(c){c.lastVal=null;c.selectedDates=a.datepick._extractDates(c,a(b).val());c.pickingRange=false;c.drawDate=a.datepick._checkMinMax(a.datepick.newDate(c.selectedDates[0]||c.get("defaultDate")||a.datepick.today()),c);c.prevDate=a.datepick.newDate(c.drawDate);a.datepick.curInst=c;a.datepick._update(b,true);b=a.datepick._checkOffset(c);c.div.css({left:b.left,
top:b.top});b=c.get("showAnim");var d=c.get("showSpeed");d=d=="normal"&&a.ui&&a.ui.version>="1.8"?"_default":d;var f=function(){var k=a.datepick._getBorders(c.div);c.div.find("."+a.datepick._coverClass).css({left:-k[0],top:-k[1],width:c.div.outerWidth()+k[0],height:c.div.outerHeight()+k[1]})};if(a.effects&&a.effects[b]){var l=c.div.data();for(var n in l)if(n.match(/^ec\.storage\./))l[n]=c._mainDiv.css(n.replace(/ec\.storage\./,""));c.div.data(l).show(b,c.get("showOptions"),d,f)}else c.div[b||"show"](b?
d:"",f);b||f()}}},_extractDates:function(b,c){if(c!=b.lastVal){b.lastVal=c;var d=b.get("dateFormat"),f=b.get("multiSelect"),l=b.get("rangeSelect");c=c.split(f?b.get("multiSeparator"):l?b.get("rangeSeparator"):" ");for(var n=[],k=0;k<c.length;k++)try{var m=a.datepick.parseDate(d,c[k],b.getConfig());if(m){for(var o=false,s=0;s<n.length;s++)if(n[s].getTime()==m.getTime()){o=true;break}o||n.push(m)}}catch(t){}n.splice(f||(l?2:1),n.length);if(l&&n.length==1)n[1]=n[0];return n}},_update:function(b,c){b=
a(b.target||b);var d=a.data(b[0],a.datepick.dataName);if(d){if(d.inline||a.datepick.curInst==d){var f=d.get("onChangeMonthYear");if(f&&(!d.prevDate||d.prevDate.getFullYear()!=d.drawDate.getFullYear()||d.prevDate.getMonth()!=d.drawDate.getMonth()))f.apply(b[0],[d.drawDate.getFullYear(),d.drawDate.getMonth()+1])}if(d.inline)b.html(this._generateContent(b[0],d));else if(a.datepick.curInst==d){if(!d.div){d.div=a("<div></div>").addClass(this._popupClass).css({display:c?"none":"static",position:"absolute",
left:b.offset().left,top:b.offset().top+b.outerHeight()}).appendTo(a(d.get("popupContainer")||"body"));a.fn.mousewheel&&d.div.mousewheel(this._doMouseWheel)}d.div.html(this._generateContent(b[0],d));b.focus()}}},_updateInput:function(b,c){var d=a.data(b,this.dataName);if(d){for(var f="",l="",n=d.get("multiSelect")?d.get("multiSeparator"):d.get("rangeSeparator"),k=d.get("dateFormat"),m=d.get("altFormat")||k,o=0;o<d.selectedDates.length;o++){f+=c?"":(o>0?n:"")+a.datepick.formatDate(k,d.selectedDates[o],
d.getConfig());l+=(o>0?n:"")+a.datepick.formatDate(m,d.selectedDates[o],d.getConfig())}!d.inline&&!c&&a(b).val(f);a(d.get("altField")).val(l);if((f=d.get("onSelect"))&&!c&&!d.inSelect){d.inSelect=true;f.apply(b,[d.selectedDates]);d.inSelect=false}}},_getBorders:function(b){var c=function(d){var f=a.browser.msie?1:0;return{thin:1+f,medium:3+f,thick:5+f}[d]||d};return[parseFloat(c(b.css("border-left-width"))),parseFloat(c(b.css("border-top-width")))]},_checkOffset:function(b){var c=b.target.is(":hidden")&&
b.trigger?b.trigger:b.target,d=c.offset(),f=false;a(b.target).parents().each(function(){f|=a(this).css("position")=="fixed";return!f});if(f&&a.browser.opera){d.left-=document.documentElement.scrollLeft;d.top-=document.documentElement.scrollTop}var l=(!a.browser.mozilla||document.doctype?document.documentElement.clientWidth:0)||document.body.clientWidth,n=(!a.browser.mozilla||document.doctype?document.documentElement.clientHeight:0)||document.body.clientHeight;if(l==0)return d;var k=b.get("alignment"),
m=b.get("isRTL"),o=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,t=d.top-b.div.outerHeight()-(f&&a.browser.opera?document.documentElement.scrollTop:0),O=d.top+c.outerHeight(),B=d.left;c=d.left+c.outerWidth()-b.div.outerWidth()-(f&&a.browser.opera?document.documentElement.scrollLeft:0);l=d.left+b.div.outerWidth()-o>l;b=d.top+b.target.outerHeight()+b.div.outerHeight()-s>n;d=k=="topLeft"?{left:B,top:t}:k=="topRight"?{left:c,
top:t}:k=="bottomLeft"?{left:B,top:O}:k=="bottomRight"?{left:c,top:O}:k=="top"?{left:m||l?c:B,top:t}:{left:m||l?c:B,top:b?t:O};d.left=Math.max(f?0:o,d.left-(f?o:0));d.top=Math.max(f?0:s,d.top-(f?s:0));return d},_checkExternalClick:function(b){if(a.datepick.curInst){b=a(b.target);!b.parents().andSelf().hasClass(a.datepick._popupClass)&&!b.hasClass(a.datepick.markerClass)&&!b.parents().andSelf().hasClass(a.datepick._triggerClass)&&a.datepick.hide(a.datepick.curInst)}},hide:function(b,c){var d=a.data(b,
this.dataName)||b;if(d&&d==a.datepick.curInst){c=c?"":d.get("showAnim");var f=d.get("showSpeed");f=f=="normal"&&a.ui&&a.ui.version>="1.8"?"_default":f;var l=function(){d.div.remove();d.div=null;a.datepick.curInst=null;var n=d.get("onClose");n&&n.apply(b,[d.selectedDates])};d.div.stop();a.effects&&a.effects[c]?d.div.hide(c,d.get("showOptions"),f,l):d.div[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?f:"",l);c||l()}},_keyDown:function(b){var c=b.target,d=a.data(c,a.datepick.dataName),f=false;
if(d.div)if(b.keyCode==9)a.datepick.hide(c);else if(b.keyCode==13){a.datepick.selectDate(c,a("a."+d.get("renderer").highlightedClass,d.div)[0]);f=true}else{var l=d.get("commands");for(var n in l){var k=l[n];if(k.keystroke.keyCode==b.keyCode&&!!k.keystroke.ctrlKey==!!(b.ctrlKey||b.metaKey)&&!!k.keystroke.altKey==b.altKey&&!!k.keystroke.shiftKey==b.shiftKey){a.datepick.performAction(c,n);f=true;break}}}else{k=d.get("commands").current;if(k.keystroke.keyCode==b.keyCode&&!!k.keystroke.ctrlKey==!!(b.ctrlKey||
b.metaKey)&&!!k.keystroke.altKey==b.altKey&&!!k.keystroke.shiftKey==b.shiftKey){a.datepick.show(c);f=true}}d.ctrlKey=b.keyCode<48&&b.keyCode!=32||b.ctrlKey||b.metaKey;if(f){b.preventDefault();b.stopPropagation()}return!f},_keyPress:function(b){var c=a.data(b.target,a.datepick.dataName);if(c&&c.get("constrainInput")){var d=String.fromCharCode(b.keyCode||b.charCode),f=a.datepick._allowedChars(c);return b.metaKey||c.ctrlKey||d<" "||!f||f.indexOf(d)>-1}return true},_allowedChars:function(b){var c=b.get("dateFormat");
b=b.get("multiSelect")?b.get("multiSeparator"):b.get("rangeSelect")?b.get("rangeSeparator"):"";for(var d=false,f=false,l=0;l<c.length;l++){var n=c.charAt(l);if(d)if(n=="'"&&c.charAt(l+1)!="'")d=false;else b+=n;else switch(n){case "d":case "m":case "o":case "w":b+=f?"":"0123456789";f=true;break;case "y":case "@":case "!":b+=(f?"":"0123456789")+"-";f=true;break;case "J":b+=(f?"":"0123456789")+"-.";f=true;break;case "D":case "M":case "Y":return null;case "'":if(c.charAt(l+1)=="'")b+="'";else d=true;
break;default:b+=n}}return b},_keyUp:function(b){b=b.target;var c=a.data(b,a.datepick.dataName);if(c&&!c.ctrlKey&&c.lastVal!=c.target.val())try{var d=a.datepick._extractDates(c,c.target.val());d.length>0&&a.datepick.setDate(b,d,null,true)}catch(f){}return true},_doMouseWheel:function(b,c){var d=a.datepick.curInst&&a.datepick.curInst.target[0]||a(b.target).closest("."+a.datepick.markerClass)[0];if(!a.datepick.isDisabled(d)){var f=a.data(d,a.datepick.dataName);if(f.get("useMouseWheel")){c=a.browser.opera?
-c:c;c=c<0?-1:+1;a.datepick.changeMonth(d,-f.get(b.ctrlKey?"monthsToJump":"monthsToStep")*c)}b.preventDefault()}},clear:function(b){var c=a.data(b,this.dataName);if(c){c.selectedDates=[];this.hide(b);c.get("selectDefaultDate")&&c.get("defaultDate")?this.setDate(b,a.datepick.newDate(c.get("defaultDate")||a.datepick.today())):this._updateInput(b)}},getDate:function(b){return(b=a.data(b,this.dataName))?b.selectedDates:[]},setDate:function(b,c,d,f,l){var n=a.data(b,this.dataName);if(n){if(!a.isArray(c)){c=
[c];d&&c.push(d)}d=n.get("dateFormat");var k=n.get("minDate"),m=n.get("maxDate"),o=n.selectedDates[0];n.selectedDates=[];for(var s=0;s<c.length;s++){var t=a.datepick.determineDate(c[s],null,o,d,n.getConfig());if(t)if((!k||t.getTime()>=k.getTime())&&(!m||t.getTime()<=m.getTime())){for(var O=false,B=0;B<n.selectedDates.length;B++)if(n.selectedDates[B].getTime()==t.getTime()){O=true;break}O||n.selectedDates.push(t)}}c=n.get("rangeSelect");n.selectedDates.splice(n.get("multiSelect")||(c?2:1),n.selectedDates.length);
if(c){switch(n.selectedDates.length){case 1:n.selectedDates[1]=n.selectedDates[0];break;case 2:n.selectedDates[1]=n.selectedDates[0].getTime()>n.selectedDates[1].getTime()?n.selectedDates[0]:n.selectedDates[1];break}n.pickingRange=false}n.prevDate=n.drawDate?a.datepick.newDate(n.drawDate):null;n.drawDate=this._checkMinMax(a.datepick.newDate(n.selectedDates[0]||n.get("defaultDate")||a.datepick.today()),n);if(!l){this._update(b);this._updateInput(b,f)}}},isSelectable:function(b,c){var d=a.data(b,this.dataName);
if(!d)return false;c=a.datepick.determineDate(c,d.selectedDates[0]||this.today(),null,d.get("dateFormat"),d.getConfig());return this._isSelectable(b,c,d.get("onDate"),d.get("minDate"),d.get("maxDate"))},_isSelectable:function(b,c,d,f,l){return(typeof d=="boolean"?{selectable:d}:!d?{}:d.apply(b,[c,true])).selectable!=false&&(!f||c.getTime()>=f.getTime())&&(!l||c.getTime()<=l.getTime())},performAction:function(b,c){var d=a.data(b,this.dataName);if(d&&!this.isDisabled(b)){var f=d.get("commands");f[c]&&
f[c].enabled.apply(b,[d])&&f[c].action.apply(b,[d])}},showMonth:function(b,c,d,f){var l=a.data(b,this.dataName);if(l&&(f!=null||l.drawDate.getFullYear()!=c||l.drawDate.getMonth()+1!=d)){l.prevDate=a.datepick.newDate(l.drawDate);c=this._checkMinMax(c!=null?a.datepick.newDate(c,d,1):a.datepick.today(),l);l.drawDate=a.datepick.newDate(c.getFullYear(),c.getMonth()+1,f!=null?f:Math.min(l.drawDate.getDate(),a.datepick.daysInMonth(c.getFullYear(),c.getMonth()+1)));this._update(b)}},changeMonth:function(b,
c){var d=a.data(b,this.dataName);if(d){c=a.datepick.add(a.datepick.newDate(d.drawDate),c,"m");this.showMonth(b,c.getFullYear(),c.getMonth()+1)}},changeDay:function(b,c){var d=a.data(b,this.dataName);if(d){c=a.datepick.add(a.datepick.newDate(d.drawDate),c,"d");this.showMonth(b,c.getFullYear(),c.getMonth()+1,c.getDate())}},_checkMinMax:function(b,c){var d=c.get("minDate");c=c.get("maxDate");b=d&&b.getTime()<d.getTime()?a.datepick.newDate(d):b;return b=c&&b.getTime()>c.getTime()?a.datepick.newDate(c):
b},retrieveDate:function(b,c){return!a.data(b,this.dataName)?null:this._normaliseDate(new Date(parseInt(c.className.replace(/^.*dp(-?\d+).*$/,"$1"),10)))},selectDate:function(b,c){var d=a.data(b,this.dataName);if(d&&!this.isDisabled(b)){c=this.retrieveDate(b,c);var f=d.get("multiSelect"),l=d.get("rangeSelect");if(f){for(var n=false,k=0;k<d.selectedDates.length;k++)if(c.getTime()==d.selectedDates[k].getTime()){d.selectedDates.splice(k,1);n=true;break}!n&&d.selectedDates.length<f&&d.selectedDates.push(c)}else if(l){if(d.pickingRange)d.selectedDates[1]=
c;else d.selectedDates=[c,c];d.pickingRange=!d.pickingRange}else d.selectedDates=[c];d.prevDate=a.datepick.newDate(c);this._updateInput(b);d.inline||d.pickingRange||d.selectedDates.length<(f||(l?2:1))?this._update(b):this.hide(b)}},_generateContent:function(b,c){var d=c.get("renderer"),f=c.get("monthsToShow");f=a.isArray(f)?f:[1,f];c.drawDate=this._checkMinMax(c.drawDate||c.get("defaultDate")||a.datepick.today(),c);for(var l=a.datepick.add(a.datepick.newDate(c.drawDate),-c.get("monthsOffset"),"m"),
n="",k=0;k<f[0];k++){for(var m="",o=0;o<f[1];o++){m+=this._generateMonth(b,c,l.getFullYear(),l.getMonth()+1,d,k==0&&o==0);a.datepick.add(l,1,"m")}n+=this._prepare(d.monthRow,c).replace(/\{months\}/,m)}var s=this._prepare(d.picker,c).replace(/\{months\}/,n).replace(/\{weekHeader\}/g,this._generateDayHeaders(c,d))+(a.browser.msie&&parseInt(a.browser.version,10)<7&&!c.inline?'<iframe src="javascript:void(0);" class="'+this._coverClass+'"></iframe>':""),t=c.get("commands"),O=c.get("commandsAsDateFormat");
l=function(u,I,K,h,e){if(s.indexOf("{"+u+":"+h+"}")!=-1){var w=t[h],y=O?w.date.apply(b,[c]):null;s=s.replace(new RegExp("\\{"+u+":"+h+"\\}","g"),"<"+I+(w.status?' title="'+c.get(w.status)+'"':"")+' class="'+d.commandClass+" "+d.commandClass+"-"+h+" "+e+(w.enabled(c)?"":" "+d.disabledClass)+'">'+(y?a.datepick.formatDate(c.get(w.text),y,c.getConfig()):c.get(w.text))+"</"+K+">")}};for(var B in t){l("button",'button type="button"',"button",B,d.commandButtonClass);l("link",'a href="javascript:void(0)"',
"a",B,d.commandLinkClass)}s=a(s);if(f[1]>1){var M=0;a(d.monthSelector,s).each(function(){var u=++M%f[1];a(this).addClass(u==1?"first":u==0?"last":"")})}var A=this;s.find(d.daySelector+" a").hover(function(){a(this).addClass(d.highlightedClass)},function(){(c.inline?a(this).parents("."+A.markerClass):c.div).find(d.daySelector+" a").removeClass(d.highlightedClass)}).click(function(){A.selectDate(b,this)}).end().find("select."+this._monthYearClass+":not(."+this._anyYearClass+")").change(function(){var u=
a(this).val().split("/");A.showMonth(b,parseInt(u[1],10),parseInt(u[0],10))}).end().find("select."+this._anyYearClass).click(function(){a(this).css("visibility","hidden").next("input").css({left:this.offsetLeft,top:this.offsetTop,width:this.offsetWidth,height:this.offsetHeight}).show().focus()}).end().find("input."+A._monthYearClass).change(function(){try{var u=parseInt(a(this).val(),10);u=isNaN(u)?c.drawDate.getFullYear():u;A.showMonth(b,u,c.drawDate.getMonth()+1,c.drawDate.getDate())}catch(I){alert(I)}}).keydown(function(u){if(u.keyCode==
13)a(u.target).change();else if(u.keyCode==27){a(u.target).hide().prev("select").css("visibility","visible");c.target.focus()}});s.find("."+d.commandClass).click(function(){if(!a(this).hasClass(d.disabledClass)){var u=this.className.replace(new RegExp("^.*"+d.commandClass+"-([^ ]+).*$"),"$1");a.datepick.performAction(b,u)}});c.get("isRTL")&&s.addClass(d.rtlClass);f[0]*f[1]>1&&s.addClass(d.multiClass);(B=c.get("pickerClass"))&&s.addClass(B);a("body").append(s);var R=0;s.find(d.monthSelector).each(function(){R+=
a(this).outerWidth()});s.width(R/f[0]);(B=c.get("onShow"))&&B.apply(b,[s,c]);return s},_generateMonth:function(b,c,d,f,l,n){var k=a.datepick.daysInMonth(d,f),m=c.get("monthsToShow");m=a.isArray(m)?m:[1,m];var o=c.get("fixedWeeks")||m[0]*m[1]>1,s=c.get("firstDay"),t=(a.datepick.newDate(d,f,1).getDay()-s+7)%7,O=o?6:Math.ceil((t+k)/7),B=c.get("showOtherMonths"),M=c.get("selectOtherMonths")&&B,A=c.get("dayStatus");k=c.pickingRange?c.selectedDates[0]:c.get("minDate");m=c.get("maxDate");var R=c.get("rangeSelect"),
u=c.get("onDate"),I=l.week.indexOf("{weekOfYear}")>-1,K=c.get("calculateWeek"),h=a.datepick.today(),e=a.datepick.newDate(d,f,1);a.datepick.add(e,-t-(o&&e.getDay()==s?7:0),"d");s=e.getTime();o="";for(t=0;t<O;t++){for(var w=!I?"":'<span class="dp'+s+'">'+(K?K(e):0)+"</span>",y="",S=0;S<7;S++){var z=false;if(R&&c.selectedDates.length>0)z=e.getTime()>=c.selectedDates[0]&&e.getTime()<=c.selectedDates[1];else for(var F=0;F<c.selectedDates.length;F++)if(c.selectedDates[F].getTime()==e.getTime()){z=true;
break}F=!u?{}:u.apply(b,[e,e.getMonth()+1==f]);var D=(M||e.getMonth()+1==f)&&this._isSelectable(b,e,F.selectable,k,m);y+=this._prepare(l.day,c).replace(/\{day\}/g,(D?'<a href="javascript:void(0)"':"<span")+' class="dp'+s+" "+(F.dateClass||"")+(z&&(M||e.getMonth()+1==f)?" "+l.selectedClass:"")+(D?" "+l.defaultClass:"")+((e.getDay()||7)<6?"":" "+l.weekendClass)+(e.getMonth()+1==f?"":" "+l.otherMonthClass)+(e.getTime()==h.getTime()&&e.getMonth()+1==f?" "+l.todayClass:"")+(e.getTime()==c.drawDate.getTime()&&
e.getMonth()+1==f?" "+l.highlightedClass:"")+'"'+(F.title||A&&D?' title="'+(F.title||a.datepick.formatDate(A,e,c.getConfig()))+'"':"")+">"+(B||e.getMonth()+1==f?F.content||e.getDate():"&nbsp;")+(D?"</a>":"</span>"));a.datepick.add(e,1,"d");s=e.getTime()}o+=this._prepare(l.week,c).replace(/\{days\}/g,y).replace(/\{weekOfYear\}/g,w)}b=this._prepare(l.month,c).match(/\{monthHeader(:[^\}]+)?\}/);b=b[0].length<=13?"MM yyyy":b[0].substring(13,b[0].length-1);b=n?this._generateMonthSelection(c,d,f,k,m,b,
l):a.datepick.formatDate(b,a.datepick.newDate(d,f,1),c.getConfig());d=this._prepare(l.weekHeader,c).replace(/\{days\}/g,this._generateDayHeaders(c,l));return this._prepare(l.month,c).replace(/\{monthHeader(:[^\}]+)?\}/g,b).replace(/\{weekHeader\}/g,d).replace(/\{weeks\}/g,o)},_generateDayHeaders:function(b,c){for(var d=b.get("firstDay"),f=b.get("dayNames"),l=b.get("dayNamesMin"),n="",k=0;k<7;k++){var m=(k+d)%7;n+=this._prepare(c.dayHeader,b).replace(/\{day\}/g,'<span class="'+this._curDoWClass+m+
'" title="'+f[m]+'">'+l[m]+"</span>")}return n},_generateMonthSelection:function(b,c,d,f,l,n){if(!b.get("changeMonth"))return a.datepick.formatDate(n,a.datepick.newDate(c,d,1),b.getConfig());var k=b.get("monthNames"+(n.match(/mm/i)?"":"Short"));n=n.replace(/m+/i,"\\x2E").replace(/y+/i,"\\x2F");for(var m='<select class="'+this._monthYearClass+'" title="'+b.get("monthStatus")+'">',o=1;o<=12;o++)if((!f||a.datepick.newDate(c,o,a.datepick.daysInMonth(c,o)).getTime()>=f.getTime())&&(!l||a.datepick.newDate(c,
o,1).getTime()<=l.getTime()))m+='<option value="'+o+"/"+c+'"'+(d==o?' selected="selected"':"")+">"+k[o-1]+"</option>";m+="</select>";n=n.replace(/\\x2E/,m);o=b.get("yearRange");if(o=="any")m='<select class="'+this._monthYearClass+" "+this._anyYearClass+'" title="'+b.get("yearStatus")+'"><option>'+c+'</option></select><input class="'+this._monthYearClass+" "+this._curMonthClass+d+'" value="'+c+'">';else{o=o.split(":");var s=a.datepick.today().getFullYear();k=o[0].match("c[+-].*")?c+parseInt(o[0].substring(1),
10):(o[0].match("[+-].*")?s:0)+parseInt(o[0],10);o=o[1].match("c[+-].*")?c+parseInt(o[1].substring(1),10):(o[1].match("[+-].*")?s:0)+parseInt(o[1],10);m='<select class="'+this._monthYearClass+'" title="'+b.get("yearStatus")+'">';k=a.datepick.add(a.datepick.newDate(k+1,1,1),-1,"d");o=a.datepick.newDate(o,1,1);b=function(t){if(t!=0)m+='<option value="'+d+"/"+t+'"'+(c==t?' selected="selected"':"")+">"+t+"</option>"};if(k.getTime()<o.getTime()){k=(f&&f.getTime()>k.getTime()?f:k).getFullYear();o=(l&&l.getTime()<
o.getTime()?l:o).getFullYear();for(f=k;f<=o;f++)b(f)}else{k=(l&&l.getTime()<k.getTime()?l:k).getFullYear();o=(f&&f.getTime()>o.getTime()?f:o).getFullYear();for(f=k;f>=o;f--)b(f)}m+="</select>"}return n=n.replace(/\\x2F/,m)},_prepare:function(b,c){var d=function(l,n){for(;;){var k=b.indexOf("{"+l+":start}");if(k==-1)return;var m=b.substring(k).indexOf("{"+l+":end}");if(m>-1)b=b.substring(0,k)+(n?b.substr(k+l.length+8,m-l.length-8):"")+b.substring(k+m+l.length+6)}};d("inline",c.inline);d("popup",!c.inline);
d=/\{l10n:([^\}]+)\}/;for(var f=null;f=d.exec(b);)b=b.replace(f[0],c.get(f[1]));return b}});a.fn.datepick=function(b){var c=Array.prototype.slice.call(arguments,1);if(a.inArray(b,["getDate","isDisabled","isSelectable","options","retrieveDate"])>-1)return a.datepick[b].apply(a.datepick,[this[0]].concat(c));return this.each(function(){typeof b=="string"?a.datepick[b].apply(a.datepick,[this].concat(c)):a.datepick._attachPicker(this,b||{})})};a.datepick=new i;a(function(){a(document).mousedown(a.datepick._checkExternalClick).resize(function(){a.datepick.hide(a.datepick.curInst)})})})(jQuery);

