$(document).ready(function(){$("#btnComment").click(function(a){$.blockUI({message:$("#commentBox"),css:{top:"200px",width:"600px",padding:"10px",backgroundColor:"#ffffff",border:"0px",textAlign:"left",cursor:"default"},centerX:true,focusInput:true});$(".blockOverlay").css("cursor","pointer").attr("title",$("#jqBlockUiCancelMsg").text()).click($.unblockUI);a.preventDefault()});$("#comment_form").submit(function(d){var c=$("#name").val();var a=$("#email").val();var b=$("#comment").val();$.post("/service/commentPage.ashx",{name:c,email:a,comment:b,page:$("#comment_form_sPage").text()},function(e){$("#status").html(e)});d.preventDefault()})});
/*!
* 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(q){d(window,q)};i.unblockUI=function(q){h(window,q)};i.growlUI=function(u,s,t,q){var r=i('<div class="growlUI"></div>');if(u){r.append("<h1>"+u+"</h1>")}if(s){r.append("<h2>"+s+"</h2>")}if(t==undefined){t=3000}i.blockUI({message:r,fadeIn:700,fadeOut:1000,centerY:false,timeout:t,showOverlay:false,onUnblock:q,css:i.blockUI.defaults.growlCSS})};i.fn.block=function(q){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,q)})};i.fn.unblock=function(q){return this.each(function(){h(this,q)})};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(u,G){var B=(u==window);var x=G&&G.message!==undefined?G.message:undefined;G=i.extend({},i.blockUI.defaults,G||{});G.overlayCSS=i.extend({},i.blockUI.defaults.overlayCSS,G.overlayCSS||{});var D=i.extend({},i.blockUI.defaults.css,G.css||{});var O=i.extend({},i.blockUI.defaults.themedCSS,G.themedCSS||{});x=x===undefined?G.message:x;if(B&&b){h(window,{fadeOut:0})}if(x&&typeof x!="string"&&(x.parentNode||x.jquery)){var J=x.jquery?x[0]:x;var Q={};i(u).data("blockUI.history",Q);Q.el=J;Q.parent=J.parentNode;Q.display=J.style.display;Q.position=J.style.position;if(Q.parent){Q.parent.removeChild(J)}}i(u).data("blockUI.onUnblock",G.onUnblock);var C=G.baseZ;var N=(i.browser.msie||G.forceIframe)?i('<iframe class="blockUI" style="z-index:'+(C++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+G.iframeSrc+'"></iframe>'):i('<div class="blockUI" style="display:none"></div>');var M=G.theme?i('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+(C++)+';display:none"></div>'):i('<div class="blockUI blockOverlay" style="z-index:'+(C++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var L,H;if(G.theme&&B){H='<div class="blockUI '+G.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(G.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(G.theme){H='<div class="blockUI '+G.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(G.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(B){H='<div class="blockUI '+G.blockMsgClass+' blockPage" style="z-index:'+(C+10)+';display:none;position:fixed"></div>'}else{H='<div class="blockUI '+G.blockMsgClass+' blockElement" style="z-index:'+(C+10)+';display:none;position:absolute"></div>'}}}L=i(H);if(x){if(G.theme){L.css(O);L.addClass("ui-widget-content")}else{L.css(D)}}if(!G.theme&&(!G.applyPlatformOpacityRules||!(i.browser.mozilla&&/Linux/.test(navigator.platform)))){M.css(G.overlayCSS)}M.css("position",B?"fixed":"absolute");if(i.browser.msie||G.forceIframe){N.css("opacity",0)}var A=[N,M,L],P=B?i("body"):i(u);i.each(A,function(){this.appendTo(P)});if(G.theme&&G.draggable&&i.fn.draggable){L.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var w=e&&(!i.boxModel||i("object,embed",B?null:u).length>0);if(f||w){if(B&&G.allowBodyStretch&&i.boxModel){i("html,body").css("height","100%")}if((f||!i.boxModel)&&!B){var F=m(u,"borderTopWidth"),K=m(u,"borderLeftWidth");var y=F?"(0 - "+F+")":0;var E=K?"(0 - "+K+")":0}i.each([N,M,L],function(t,T){var z=T[0].style;z.position="absolute";if(t<2){B?z.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+G.quirksmodeOffsetHack+') + "px"'):z.setExpression("height",'this.parentNode.offsetHeight + "px"');B?z.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):z.setExpression("width",'this.parentNode.offsetWidth + "px"');if(E){z.setExpression("left",E)}if(y){z.setExpression("top",y)}}else{if(G.centerY){if(B){z.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}z.marginTop=0}else{if(!G.centerY&&B){var R=(G.css&&G.css.top)?parseInt(G.css.top):0;var S="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+R+') + "px"';z.setExpression("top",S)}}}})}if(x){if(G.theme){L.find(".ui-widget-content").append(x)}else{L.append(x)}if(x.jquery||x.nodeType){i(x).show()}}if((i.browser.msie||G.forceIframe)&&G.showOverlay){N.show()}if(G.fadeIn){var I=G.onBlock?G.onBlock:c;var r=(G.showOverlay&&!x)?I:c;var q=x?I:c;if(G.showOverlay){M._fadeIn(G.fadeIn,r)}if(x){L._fadeIn(G.fadeIn,q)}}else{if(G.showOverlay){M.show()}if(x){L.show()}if(G.onBlock){G.onBlock()}}l(1,u,G);if(B){b=L[0];g=i(":input:enabled:visible",b);if(G.focusInput){setTimeout(o,20)}}else{a(L[0],G.centerX,G.centerY)}if(G.timeout){var v=setTimeout(function(){B?i.unblockUI(G):i(u).unblock(G)},G.timeout);i(u).data("blockUI.timeout",v)}}function h(t,u){var s=(t==window);var r=i(t);var v=r.data("blockUI.history");var w=r.data("blockUI.timeout");if(w){clearTimeout(w);r.removeData("blockUI.timeout")}u=i.extend({},i.blockUI.defaults,u||{});l(0,t,u);if(u.onUnblock===null){u.onUnblock=r.data("blockUI.onUnblock");r.removeData("blockUI.onUnblock")}var q;if(s){q=i("body").children().filter(".blockUI").add("body > .blockUI")}else{q=i(".blockUI",t)}if(s){b=g=null}if(u.fadeOut){q.fadeOut(u.fadeOut);setTimeout(function(){k(q,v,u,t)},u.fadeOut)}else{k(q,v,u,t)}}function k(q,t,s,r){q.each(function(u,v){if(this.parentNode){this.parentNode.removeChild(this)}});if(t&&t.el){t.el.style.display=t.display;t.el.style.position=t.position;if(t.parent){t.parent.appendChild(t.el)}i(r).removeData("blockUI.history")}if(typeof s.onUnblock=="function"){s.onUnblock(r,s)}}function l(q,u,v){var t=u==window,s=i(u);if(!q&&(t&&!b||!t&&!s.data("blockUI.isBlocked"))){return}if(!t){s.data("blockUI.isBlocked",q)}if(!v.bindEvents||(q&&!v.showOverlay)){return}var r="mousedown mouseup keydown keypress";q?i(document).bind(r,v,n):i(document).unbind(r,n)}function n(u){if(u.keyCode&&u.keyCode==9){if(b&&u.data.constrainTabKey){var s=g;var r=!u.shiftKey&&u.target===s[s.length-1];var q=u.shiftKey&&u.target===s[0];if(r||q){setTimeout(function(){o(q)},10);return false}}}var t=u.data;if(i(u.target).parents("div."+t.blockMsgClass).length>0){return true}return i(u.target).parents().children().filter("div.blockUI").length==0}function o(q){if(!g){return}var r=g[q===true?g.length-1:0];if(r){r.focus()}}function a(w,q,A){var z=w.parentNode,v=w.style;var r=((z.offsetWidth-w.offsetWidth)/2)-m(z,"borderLeftWidth");var u=((z.offsetHeight-w.offsetHeight)/2)-m(z,"borderTopWidth");if(q){v.left=r>0?(r+"px"):"0"}if(A){v.top=u>0?(u+"px"):"0"}}function m(q,r){return parseInt(i.css(q,r))||0}})(jQuery);(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(g.state==0){g.start=c(g.elem,e);g.end=b(g.end)}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]}})(jQuery);jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version: 2.9993 (26-MAY-2011)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.3.2 or later
*/
(function(i){var l="2.9992";if(i.support==undefined){i.support={opacity:!(i.browser.msie)}}function a(t){i.fn.cycle.debug&&f(t)}function f(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}i.expr[":"].paused=function(s){return s.cyclePause};i.fn.cycle=function(t,s){var u={s:this.selector,c:this.context};if(this.length===0&&t!="stop"){if(!i.isReady&&u.s){f("DOM not ready, queuing slideshow");i(function(){i(u.s,u.c).cycle(t,s)});return this}f("terminating; zero elements found by selector"+(i.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var y=n(this,t,s);if(y===false){return}y.updateActivePagerLink=y.updateActivePagerLink||i.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var z=i(this);var A=y.slideExpr?i(y.slideExpr,this):z.children();var w=A.get();var v=k(z,A,w,y,u);if(v===false){return}if(w.length<2){f("terminating; too few slides: "+w.length);return}var x=v.continuous?10:h(w[v.currSlide],w[v.nextSlide],v,!v.backwards);if(x){x+=(v.delay||0);if(x<10){x=10}a("first timeout: "+x);this.cycleTimeout=setTimeout(function(){e(w,v,0,!y.backwards)},x)}})};function m(s,v,u){var w=i(s).data("cycle.opts");var t=!!s.cyclePause;if(t&&w.paused){w.paused(s,w,v,u)}else{if(!t&&w.resumed){w.resumed(s,w,v,u)}}}function n(s,v,t){if(s.cycleStop==undefined){s.cycleStop=0}if(v===undefined||v===null){v={}}if(v.constructor==String){switch(v){case"destroy":case"stop":var x=i(s).data("cycle.opts");if(!x){return false}s.cycleStop++;if(s.cycleTimeout){clearTimeout(s.cycleTimeout)}s.cycleTimeout=0;i(s).removeData("cycle.opts");if(v=="destroy"){r(x)}return false;case"toggle":s.cyclePause=(s.cyclePause===1)?0:1;w(s.cyclePause,t,s);m(s);return false;case"pause":s.cyclePause=1;m(s);return false;case"resume":s.cyclePause=0;w(false,t,s);m(s);return false;case"prev":case"next":var x=i(s).data("cycle.opts");if(!x){f('options not found, "prev/next" ignored');return false}i.fn.cycle[v](x);return false;default:v={fx:v}}return v}else{if(v.constructor==Number){var u=v;v=i(s).data("cycle.opts");if(!v){f("options not found, can not advance slide");return false}if(u<0||u>=v.elements.length){f("invalid slide index: "+u);return false}v.nextSlide=u;if(s.cycleTimeout){clearTimeout(s.cycleTimeout);s.cycleTimeout=0}if(typeof t=="string"){v.oneTimeFx=t}e(v.elements,v,1,u>=v.currSlide);return false}}return v;function w(z,A,y){if(!z&&A===true){var B=i(y).data("cycle.opts");if(!B){f("options not found, can not resume");return false}if(y.cycleTimeout){clearTimeout(y.cycleTimeout);y.cycleTimeout=0}e(B.elements,B,1,!B.backwards)}}}function b(s,t){if(!i.support.opacity&&t.cleartype&&s.style.filter){try{s.style.removeAttribute("filter")}catch(u){}}}function r(s){if(s.next){i(s.next).unbind(s.prevNextEvent)}if(s.prev){i(s.prev).unbind(s.prevNextEvent)}if(s.pager||s.pagerAnchorBuilder){i.each(s.pagerAnchors||[],function(){this.unbind().remove()})}s.pagerAnchors=null;if(s.destroy){s.destroy(s)}}function k(A,N,x,v,H){var F=i.extend({},i.fn.cycle.defaults,v||{},i.metadata?A.metadata():i.meta?A.data():{});var D=i.isFunction(A.data)?A.data(F.metaAttr):null;if(D){F=i.extend(F,D)}if(F.autostop){F.countdown=F.autostopCount||x.length}var t=A[0];A.data("cycle.opts",F);F.$cont=A;F.stopCount=t.cycleStop;F.elements=x;F.before=F.before?[F.before]:[];F.after=F.after?[F.after]:[];if(!i.support.opacity&&F.cleartype){F.after.push(function(){b(this,F)})}if(F.continuous){F.after.push(function(){e(x,F,0,!F.backwards)})}o(F);if(!i.support.opacity&&F.cleartype&&!F.cleartypeNoBg){g(N)}if(A.css("position")=="static"){A.css("position","relative")}if(F.width){A.width(F.width)}if(F.height&&F.height!="auto"){A.height(F.height)}if(F.startingSlide){F.startingSlide=parseInt(F.startingSlide)}else{if(F.backwards){F.startingSlide=x.length-1}}if(F.random){F.randomMap=[];for(var L=0;L<x.length;L++){F.randomMap.push(L)}F.randomMap.sort(function(P,w){return Math.random()-0.5});F.randomIndex=1;F.startingSlide=F.randomMap[1]}else{if(F.startingSlide>=x.length){F.startingSlide=0}}F.currSlide=F.startingSlide||0;var z=F.startingSlide;N.css({position:"absolute",top:0,left:0}).hide().each(function(w){var P;if(F.backwards){P=z?w<=z?x.length+(w-z):z-w:x.length-w}else{P=z?w>=z?x.length-(w-z):z-w:x.length-w}i(this).css("z-index",P)});i(x[z]).css("opacity",1).show();b(x[z],F);if(F.fit){if(!F.aspect){if(F.width){N.width(F.width)}if(F.height&&F.height!="auto"){N.height(F.height)}}else{N.each(function(){var P=i(this);var w=(F.aspect===true)?P.width()/P.height():F.aspect;if(F.width&&P.width()!=F.width){P.width(F.width);P.height(F.width/w)}if(F.height&&P.height()<F.height){P.height(F.height);P.width(F.height*w)}})}}if(F.center&&((!F.fit)||F.aspect)){N.each(function(){var w=i(this);w.css({"margin-left":F.width?((F.width-w.width())/2)+"px":0,"margin-top":F.height?((F.height-w.height())/2)+"px":0})})}if(F.center&&!F.fit&&!F.slideResize){N.each(function(){var w=i(this);w.css({"margin-left":F.width?((F.width-w.width())/2)+"px":0,"margin-top":F.height?((F.height-w.height())/2)+"px":0})})}var G=F.containerResize&&!A.innerHeight();if(G){var y=0,E=0;for(var J=0;J<x.length;J++){var s=i(x[J]),O=s[0],C=s.outerWidth(),M=s.outerHeight();if(!C){C=O.offsetWidth||O.width||s.attr("width")}if(!M){M=O.offsetHeight||O.height||s.attr("height")}y=C>y?C:y;E=M>E?M:E}if(y>0&&E>0){A.css({width:y+"px",height:E+"px"})}}if(F.pause){A.hover(function(){this.cyclePause++;m(t,true)},function(){this.cyclePause--;m(t,true)})}if(c(F)===false){return false}var u=false;v.requeueAttempts=v.requeueAttempts||0;N.each(function(){var R=i(this);this.cycleH=(F.fit&&F.height)?F.height:(R.height()||this.offsetHeight||this.height||R.attr("height")||0);this.cycleW=(F.fit&&F.width)?F.width:(R.width()||this.offsetWidth||this.width||R.attr("width")||0);if(R.is("img")){var P=(i.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var S=(i.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var Q=(i.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(P||S||Q||w){if(H.s&&F.requeueOnImageNotLoaded&&++v.requeueAttempts<100){f(v.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){i(H.s,H.c).cycle(v)},F.requeueTimeout);u=true;return false}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(u){return false}F.cssBefore=F.cssBefore||{};F.cssAfter=F.cssAfter||{};F.cssFirst=F.cssFirst||{};F.animIn=F.animIn||{};F.animOut=F.animOut||{};N.not(":eq("+z+")").css(F.cssBefore);i(N[z]).css(F.cssFirst);if(F.timeout){F.timeout=parseInt(F.timeout);if(F.speed.constructor==String){F.speed=i.fx.speeds[F.speed]||parseInt(F.speed)}if(!F.sync){F.speed=F.speed/2}var I=F.fx=="none"?0:F.fx=="shuffle"?500:250;while((F.timeout-F.speed)<I){F.timeout+=F.speed}}if(F.easing){F.easeIn=F.easeOut=F.easing}if(!F.speedIn){F.speedIn=F.speed}if(!F.speedOut){F.speedOut=F.speed}F.slideCount=x.length;F.currSlide=F.lastSlide=z;if(F.random){if(++F.randomIndex==x.length){F.randomIndex=0}F.nextSlide=F.randomMap[F.randomIndex]}else{if(F.backwards){F.nextSlide=F.startingSlide==0?(x.length-1):F.startingSlide-1}else{F.nextSlide=F.startingSlide>=(x.length-1)?0:F.startingSlide+1}}if(!F.multiFx){var K=i.fn.cycle.transitions[F.fx];if(i.isFunction(K)){K(A,N,F)}else{if(F.fx!="custom"&&!F.multiFx){f("unknown transition: "+F.fx,"; slideshow terminating");return false}}}var B=N[z];if(F.before.length){F.before[0].apply(B,[B,B,F,true])}if(F.after.length){F.after[0].apply(B,[B,B,F,true])}if(F.next){i(F.next).bind(F.prevNextEvent,function(){return q(F,1)})}if(F.prev){i(F.prev).bind(F.prevNextEvent,function(){return q(F,0)})}if(F.pager||F.pagerAnchorBuilder){d(x,F)}j(F,x);return F}function o(s){s.original={before:[],after:[]};s.original.cssBefore=i.extend({},s.cssBefore);s.original.cssAfter=i.extend({},s.cssAfter);s.original.animIn=i.extend({},s.animIn);s.original.animOut=i.extend({},s.animOut);i.each(s.before,function(){s.original.before.push(this)});i.each(s.after,function(){s.original.after.push(this)})}function c(y){var w,u,t=i.fn.cycle.transitions;if(y.fx.indexOf(",")>0){y.multiFx=true;y.fxs=y.fx.replace(/\s*/g,"").split(",");for(w=0;w<y.fxs.length;w++){var x=y.fxs[w];u=t[x];if(!u||!t.hasOwnProperty(x)||!i.isFunction(u)){f("discarding unknown transition: ",x);y.fxs.splice(w,1);w--}}if(!y.fxs.length){f("No valid transitions named; slideshow terminating.");return false}}else{if(y.fx=="all"){y.multiFx=true;y.fxs=[];for(p in t){u=t[p];if(t.hasOwnProperty(p)&&i.isFunction(u)){y.fxs.push(p)}}}}if(y.multiFx&&y.randomizeEffects){var v=Math.floor(Math.random()*20)+30;for(w=0;w<v;w++){var s=Math.floor(Math.random()*y.fxs.length);y.fxs.push(y.fxs.splice(s,1)[0])}a("randomized fx sequence: ",y.fxs)}return true}function j(t,s){t.addSlide=function(v,w){var u=i(v),x=u[0];if(!t.autostopCount){t.countdown++}s[w?"unshift":"push"](x);if(t.els){t.els[w?"unshift":"push"](x)}t.slideCount=s.length;u.css("position","absolute");u[w?"prependTo":"appendTo"](t.$cont);if(w){t.currSlide++;t.nextSlide++}if(!i.support.opacity&&t.cleartype&&!t.cleartypeNoBg){g(u)}if(t.fit&&t.width){u.width(t.width)}if(t.fit&&t.height&&t.height!="auto"){u.height(t.height)}x.cycleH=(t.fit&&t.height)?t.height:u.height();x.cycleW=(t.fit&&t.width)?t.width:u.width();u.css(t.cssBefore);if(t.pager||t.pagerAnchorBuilder){i.fn.cycle.createPagerAnchor(s.length-1,x,i(t.pager),s,t)}if(i.isFunction(t.onAddSlide)){t.onAddSlide(u)}else{u.hide()}}}i.fn.cycle.resetState=function(t,s){s=s||t.fx;t.before=[];t.after=[];t.cssBefore=i.extend({},t.original.cssBefore);t.cssAfter=i.extend({},t.original.cssAfter);t.animIn=i.extend({},t.original.animIn);t.animOut=i.extend({},t.original.animOut);t.fxFn=null;i.each(t.original.before,function(){t.before.push(this)});i.each(t.original.after,function(){t.after.push(this)});var u=i.fn.cycle.transitions[s];if(i.isFunction(u)){u(t.$cont,i(t.elements),t)}};function e(z,s,y,B){if(y&&s.busy&&s.manualTrump){a("manualTrump in go(), stopping active transition");i(z).stop(true,true);s.busy=0}if(s.busy){a("transition active, ignoring new tx request");return}var w=s.$cont[0],D=z[s.currSlide],C=z[s.nextSlide];if(w.cycleStop!=s.stopCount||w.cycleTimeout===0&&!y){return}if(!y&&!w.cyclePause&&!s.bounce&&((s.autostop&&(--s.countdown<=0))||(s.nowrap&&!s.random&&s.nextSlide<s.currSlide))){if(s.end){s.end(s)}return}var A=false;if((y||!w.cyclePause)&&(s.nextSlide!=s.currSlide)){A=true;var x=s.fx;D.cycleH=D.cycleH||i(D).height();D.cycleW=D.cycleW||i(D).width();C.cycleH=C.cycleH||i(C).height();C.cycleW=C.cycleW||i(C).width();if(s.multiFx){if(B&&(s.lastFx==undefined||++s.lastFx>=s.fxs.length)){s.lastFx=0}else{if(!B&&(s.lastFx==undefined||--s.lastFx<0)){s.lastFx=s.fxs.length-1}}x=s.fxs[s.lastFx]}if(s.oneTimeFx){x=s.oneTimeFx;s.oneTimeFx=null}i.fn.cycle.resetState(s,x);if(s.before.length){i.each(s.before,function(E,F){if(w.cycleStop!=s.stopCount){return}F.apply(C,[D,C,s,B])})}var u=function(){s.busy=0;i.each(s.after,function(E,F){if(w.cycleStop!=s.stopCount){return}F.apply(C,[D,C,s,B])})};a("tx firing("+x+"); currSlide: "+s.currSlide+"; nextSlide: "+s.nextSlide);s.busy=1;if(s.fxFn){s.fxFn(D,C,s,u,B,y&&s.fastOnEvent)}else{if(i.isFunction(i.fn.cycle[s.fx])){i.fn.cycle[s.fx](D,C,s,u,B,y&&s.fastOnEvent)}else{i.fn.cycle.custom(D,C,s,u,B,y&&s.fastOnEvent)}}}if(A||s.nextSlide==s.currSlide){s.lastSlide=s.currSlide;if(s.random){s.currSlide=s.nextSlide;if(++s.randomIndex==z.length){s.randomIndex=0}s.nextSlide=s.randomMap[s.randomIndex];if(s.nextSlide==s.currSlide){s.nextSlide=(s.currSlide==s.slideCount-1)?0:s.currSlide+1}}else{if(s.backwards){var v=(s.nextSlide-1)<0;if(v&&s.bounce){s.backwards=!s.backwards;s.nextSlide=1;s.currSlide=0}else{s.nextSlide=v?(z.length-1):s.nextSlide-1;s.currSlide=v?0:s.nextSlide+1}}else{var v=(s.nextSlide+1)==z.length;if(v&&s.bounce){s.backwards=!s.backwards;s.nextSlide=z.length-2;s.currSlide=z.length-1}else{s.nextSlide=v?0:s.nextSlide+1;s.currSlide=v?z.length-1:s.nextSlide-1}}}}if(A&&s.pager){s.updateActivePagerLink(s.pager,s.currSlide,s.activePagerClass)}var t=0;if(s.timeout&&!s.continuous){t=h(z[s.currSlide],z[s.nextSlide],s,B)}else{if(s.continuous&&w.cyclePause){t=10}}if(t>0){w.cycleTimeout=setTimeout(function(){e(z,s,0,!s.backwards)},t)}}i.fn.cycle.updateActivePagerLink=function(s,u,t){i(s).each(function(){i(this).children().removeClass(t).eq(u).addClass(t)})};function h(x,v,w,u){if(w.timeoutFn){var s=w.timeoutFn.call(x,x,v,w,u);while(w.fx!="none"&&(s-w.speed)<250){s+=w.speed}a("calculated timeout: "+s+"; speed: "+w.speed);if(s!==false){return s}}return w.timeout}i.fn.cycle.next=function(s){q(s,1)};i.fn.cycle.prev=function(s){q(s,0)};function q(v,u){var y=u?1:-1;var t=v.elements;var x=v.$cont[0],w=x.cycleTimeout;if(w){clearTimeout(w);x.cycleTimeout=0}if(v.random&&y<0){v.randomIndex--;if(--v.randomIndex==-2){v.randomIndex=t.length-2}else{if(v.randomIndex==-1){v.randomIndex=t.length-1}}v.nextSlide=v.randomMap[v.randomIndex]}else{if(v.random){v.nextSlide=v.randomMap[v.randomIndex]}else{v.nextSlide=v.currSlide+y;if(v.nextSlide<0){if(v.nowrap){return false}v.nextSlide=t.length-1}else{if(v.nextSlide>=t.length){if(v.nowrap){return false}v.nextSlide=0}}}}var s=v.onPrevNextEvent||v.prevNextClick;if(i.isFunction(s)){s(y>0,v.nextSlide,t[v.nextSlide])}e(t,v,1,u);return false}function d(t,u){var s=i(u.pager);i.each(t,function(v,w){i.fn.cycle.createPagerAnchor(v,w,s,t,u)});u.updateActivePagerLink(u.pager,u.startingSlide,u.activePagerClass)}i.fn.cycle.createPagerAnchor=function(w,x,u,v,y){var t;if(i.isFunction(y.pagerAnchorBuilder)){t=y.pagerAnchorBuilder(w,x);a("pagerAnchorBuilder("+w+", el) returned: "+t)}else{t='<a href="#">'+(w+1)+"</a>"}if(!t){return}var z=i(t);if(z.parents("body").length===0){var s=[];if(u.length>1){u.each(function(){var A=z.clone(true);i(this).append(A);s.push(A[0])});z=i(s)}else{z.appendTo(u)}}y.pagerAnchors=y.pagerAnchors||[];y.pagerAnchors.push(z);z.bind(y.pagerEvent,function(D){D.preventDefault();y.nextSlide=w;var C=y.$cont[0],B=C.cycleTimeout;if(B){clearTimeout(B);C.cycleTimeout=0}var A=y.onPagerEvent||y.pagerClick;if(i.isFunction(A)){A(y.nextSlide,v[y.nextSlide])}e(v,y,1,y.currSlide<w)});if(!/^click/.test(y.pagerEvent)&&!y.allowPagerClickBubble){z.bind("click.cycle",function(){return false})}if(y.pauseOnPagerHover){z.hover(function(){y.$cont[0].cyclePause++;m(cont,true,true)},function(){y.$cont[0].cyclePause--;m(cont,true,true)})}};i.fn.cycle.hopsFromLast=function(v,u){var t,s=v.lastSlide,w=v.currSlide;if(u){t=w>s?w-s:v.slideCount-s}else{t=w<s?s-w:s+v.slideCount-w}return t};function g(u){a("applying clearType background-color hack");function t(v){v=parseInt(v).toString(16);return v.length<2?"0"+v:v}function s(y){for(;y&&y.nodeName.toLowerCase()!="html";y=y.parentNode){var w=i.css(y,"background-color");if(w&&w.indexOf("rgb")>=0){var x=w.match(/\d+/g);return"#"+t(x[0])+t(x[1])+t(x[2])}if(w&&w!="transparent"){return w}}return"#ffffff"}u.each(function(){i(this).css("background-color",s(this))})}i.fn.cycle.commonReset=function(y,v,x,t,u,s){i(x.elements).not(y).hide();if(typeof x.cssBefore.opacity=="undefined"){x.cssBefore.opacity=1}x.cssBefore.display="block";if(x.slideResize&&t!==false&&v.cycleW>0){x.cssBefore.width=v.cycleW}if(x.slideResize&&u!==false&&v.cycleH>0){x.cssBefore.height=v.cycleH}x.cssAfter=x.cssAfter||{};x.cssAfter.display="none";i(y).css("zIndex",x.slideCount+(s===true?1:0));i(v).css("zIndex",x.slideCount+(s===true?0:1))};i.fn.cycle.custom=function(E,y,s,v,x,t){var D=i(E),z=i(y);var u=s.speedIn,C=s.speedOut,w=s.easeIn,B=s.easeOut;z.css(s.cssBefore);if(t){if(typeof t=="number"){u=C=t}else{u=C=1}w=B=null}var A=function(){z.animate(s.animIn,u,w,function(){v()})};D.animate(s.animOut,C,B,function(){D.css(s.cssAfter);if(!s.sync){A()}});if(s.sync){A()}};i.fn.cycle.transitions={fade:function(t,u,s){u.not(":eq("+s.currSlide+")").css("opacity",0);s.before.push(function(x,v,w){i.fn.cycle.commonReset(x,v,w);w.cssBefore.opacity=0});s.animIn={opacity:1};s.animOut={opacity:0};s.cssBefore={top:0,left:0}}};i.fn.cycle.ver=function(){return l};i.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!i.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
/*!
* jQuery Cycle Plugin Transition Definitions
* This script is a plugin for the jQuery Cycle Plugin
* Examples and documentation at: http://malsup.com/jquery/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version:	 2.73
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function(a){a.fn.cycle.transitions.none=function(c,d,b){b.fxFn=function(g,e,f,h){a(e).show();a(g).hide();h()}};a.fn.cycle.transitions.fadeout=function(c,d,b){d.not(":eq("+b.currSlide+")").css({display:"block",opacity:1});b.before.push(function(k,i,j,f,g,e){a(k).css("zIndex",j.slideCount+(!e===true?1:0));a(i).css("zIndex",j.slideCount+(!e===true?0:1))});b.animIn.opacity=1;b.animOut.opacity=0;b.cssBefore.opacity=1;b.cssBefore.display="block";b.cssAfter.zIndex=0};a.fn.cycle.transitions.scrollUp=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssBefore.top=b;c.cssBefore.left=0;c.cssFirst.top=0;c.animIn.top=0;c.animOut.top=-b};a.fn.cycle.transitions.scrollDown=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.height();c.cssFirst.top=0;c.cssBefore.top=-b;c.cssBefore.left=0;c.animIn.top=0;c.animOut.top=b};a.fn.cycle.transitions.scrollLeft=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst.left=0;c.cssBefore.left=b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=0-b};a.fn.cycle.transitions.scrollRight=function(d,e,c){d.css("overflow","hidden");c.before.push(a.fn.cycle.commonReset);var b=d.width();c.cssFirst.left=0;c.cssBefore.left=-b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=b};a.fn.cycle.transitions.scrollHorz=function(c,d,b){c.css("overflow","hidden").width();b.before.push(function(h,f,g,e){if(g.rev){e=!e}a.fn.cycle.commonReset(h,f,g);g.cssBefore.left=e?(f.cycleW-1):(1-f.cycleW);g.animOut.left=e?-h.cycleW:h.cycleW});b.cssFirst.left=0;b.cssBefore.top=0;b.animIn.left=0;b.animOut.top=0};a.fn.cycle.transitions.scrollVert=function(c,d,b){c.css("overflow","hidden");b.before.push(function(h,f,g,e){if(g.rev){e=!e}a.fn.cycle.commonReset(h,f,g);g.cssBefore.top=e?(1-f.cycleH):(f.cycleH-1);g.animOut.top=e?h.cycleH:-h.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.animIn.top=0;b.animOut.left=0};a.fn.cycle.transitions.slideX=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.width="show";b.animOut.width=0};a.fn.cycle.transitions.slideY=function(c,d,b){b.before.push(function(g,e,f){a(f.elements).not(g).hide();a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH});b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animIn.height="show";b.animOut.height=0};a.fn.cycle.transitions.shuffle=function(e,f,d){var c,b=e.css("overflow","visible").width();f.css({left:0,top:0});d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true)});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-b,top:15};d.els=[];for(c=0;c<f.length;c++){d.els.push(f[c])}for(c=0;c<d.currSlide;c++){d.els.push(d.els.shift())}d.fxFn=function(m,j,l,g,i){if(l.rev){i=!i}var h=i?a(m):a(j);a(j).css(l.cssBefore);var k=l.slideCount;h.animate(l.shuffle,l.speedIn,l.easeIn,function(){var o=a.fn.cycle.hopsFromLast(l,i);for(var q=0;q<o;q++){i?l.els.push(l.els.shift()):l.els.unshift(l.els.pop())}if(i){for(var r=0,n=l.els.length;r<n;r++){a(l.els[r]).css("z-index",n-r+k)}}else{var s=a(m).css("z-index");h.css("z-index",parseInt(s)+1+k)}h.animate({left:0,top:0},l.speedOut,l.easeOut,function(){a(i?this:m).hide();if(g){g()}})})};a.extend(d.cssBefore,{display:"block",opacity:1,top:0,left:0})};a.fn.cycle.transitions.turnUp=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=e.cycleH;f.animIn.height=e.cycleH;f.animOut.width=e.cycleW});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.height=0;b.animIn.top=0;b.animOut.height=0};a.fn.cycle.transitions.turnDown=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.animIn.height=e.cycleH;f.animOut.top=g.cycleH});b.cssFirst.top=0;b.cssBefore.left=0;b.cssBefore.top=0;b.cssBefore.height=0;b.animOut.height=0};a.fn.cycle.transitions.turnLeft=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=e.cycleW;f.animIn.width=e.cycleW});b.cssBefore.top=0;b.cssBefore.width=0;b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.turnRight=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.animIn.width=e.cycleW;f.animOut.left=g.cycleW});a.extend(b.cssBefore,{top:0,left:0,width:0});b.animIn.left=0;b.animOut.width=0};a.fn.cycle.transitions.zoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false,true);f.cssBefore.top=e.cycleH/2;f.cssBefore.left=e.cycleW/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH});a.extend(f.animOut,{width:0,height:0,top:g.cycleH/2,left:g.cycleW/2})});b.cssFirst.top=0;b.cssFirst.left=0;b.cssBefore.width=0;b.cssBefore.height=0};a.fn.cycle.transitions.fadeZoom=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,false);f.cssBefore.left=e.cycleW/2;f.cssBefore.top=e.cycleH/2;a.extend(f.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH})});b.cssBefore.width=0;b.cssBefore.height=0;b.animOut.opacity=0};a.fn.cycle.transitions.blindX=function(d,e,c){var b=d.css("overflow","hidden").width();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.width=f.cycleW;g.animOut.left=h.cycleW});c.cssBefore.left=b;c.cssBefore.top=0;c.animIn.left=0;c.animOut.left=b};a.fn.cycle.transitions.blindY=function(d,e,c){var b=d.css("overflow","hidden").height();c.before.push(function(h,f,g){a.fn.cycle.commonReset(h,f,g);g.animIn.height=f.cycleH;g.animOut.top=h.cycleH});c.cssBefore.top=b;c.cssBefore.left=0;c.animIn.top=0;c.animOut.top=b};a.fn.cycle.transitions.blindZ=function(e,f,d){var c=e.css("overflow","hidden").height();var b=e.width();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h);h.animIn.height=g.cycleH;h.animOut.top=i.cycleH});d.cssBefore.top=c;d.cssBefore.left=b;d.animIn.top=0;d.animIn.left=0;d.animOut.top=c;d.animOut.left=b};a.fn.cycle.transitions.growX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true);f.cssBefore.left=this.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.growY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false);f.cssBefore.top=this.cycleH/2;f.animIn.top=0;f.animIn.height=this.cycleH;f.animOut.top=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.curtainX=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,false,true,true);f.cssBefore.left=e.cycleW/2;f.animIn.left=0;f.animIn.width=this.cycleW;f.animOut.left=g.cycleW/2;f.animOut.width=0});b.cssBefore.top=0;b.cssBefore.width=0};a.fn.cycle.transitions.curtainY=function(c,d,b){b.before.push(function(g,e,f){a.fn.cycle.commonReset(g,e,f,true,false,true);f.cssBefore.top=e.cycleH/2;f.animIn.top=0;f.animIn.height=e.cycleH;f.animOut.top=g.cycleH/2;f.animOut.height=0});b.cssBefore.height=0;b.cssBefore.left=0};a.fn.cycle.transitions.cover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h);if(i=="right"){h.cssBefore.left=-b}else{if(i=="up"){h.cssBefore.top=c}else{if(i=="down"){h.cssBefore.top=-c}else{h.cssBefore.left=b}}}});e.animIn.left=0;e.animIn.top=0;e.cssBefore.top=0;e.cssBefore.left=0};a.fn.cycle.transitions.uncover=function(f,g,e){var i=e.direction||"left";var b=f.css("overflow","hidden").width();var c=f.height();e.before.push(function(j,d,h){a.fn.cycle.commonReset(j,d,h,true,true,true);if(i=="right"){h.animOut.left=b}else{if(i=="up"){h.animOut.top=-c}else{if(i=="down"){h.animOut.top=c}else{h.animOut.left=-b}}}});e.animIn.left=0;e.animIn.top=0;e.cssBefore.top=0;e.cssBefore.left=0};a.fn.cycle.transitions.toss=function(e,f,d){var b=e.css("overflow","visible").width();var c=e.height();d.before.push(function(i,g,h){a.fn.cycle.commonReset(i,g,h,true,true,true);if(!h.animOut.left&&!h.animOut.top){a.extend(h.animOut,{left:b*2,top:-c/2,opacity:0})}else{h.animOut.opacity=0}});d.cssBefore.left=0;d.cssBefore.top=0;d.animIn.left=0};a.fn.cycle.transitions.wipe=function(s,m,e){var q=s.css("overflow","hidden").width();var j=s.height();e.cssBefore=e.cssBefore||{};var g;if(e.clip){if(/l2r/.test(e.clip)){g="rect(0px 0px "+j+"px 0px)"}else{if(/r2l/.test(e.clip)){g="rect(0px "+q+"px "+j+"px "+q+"px)"}else{if(/t2b/.test(e.clip)){g="rect(0px "+q+"px 0px 0px)"}else{if(/b2t/.test(e.clip)){g="rect("+j+"px "+q+"px "+j+"px 0px)"}else{if(/zoom/.test(e.clip)){var o=parseInt(j/2);var f=parseInt(q/2);g="rect("+o+"px "+f+"px "+o+"px "+f+"px)"}}}}}}e.cssBefore.clip=e.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var k=e.cssBefore.clip.match(/(\d+)/g);var u=parseInt(k[0]),c=parseInt(k[1]),n=parseInt(k[2]),i=parseInt(k[3]);e.before.push(function(w,h,t){if(w==h){return}var d=a(w),b=a(h);a.fn.cycle.commonReset(w,h,t,true,true,false);t.cssAfter.display="block";var r=1,l=parseInt((t.speedIn/13))-1;(function v(){var y=u?u-parseInt(r*(u/l)):0;var z=i?i-parseInt(r*(i/l)):0;var A=n<j?n+parseInt(r*((j-n)/l||1)):j;var x=c<q?c+parseInt(r*((q-c)/l||1)):q;b.css({clip:"rect("+y+"px "+x+"px "+A+"px "+z+"px)"});(r++<=l)?setTimeout(v,13):d.css("display","none")})()});a.extend(e.cssBefore,{display:"block",opacity:1,top:0,left:0});e.animIn={left:0};e.animOut={left:0}}})(jQuery);(function(c){function b(){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}};c.extend(this._defaults,this.regional[""]);this._disabled=[]}c.extend(b.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(e){var d=e.curMinDate();return(!d||c.datepick.add(c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(e.drawDate),1-e.get("monthsToStep"),"m"),e),1),-1,"d").getTime()>=d.getTime())},date:function(d){return c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(d.drawDate),-d.get("monthsToStep"),"m"),d),1)},action:function(d){c.datepick.changeMonth(this,-d.get("monthsToStep"))}},prevJump:{text:"prevJumpText",status:"prevJumpStatus",keystroke:{keyCode:33,ctrlKey:true},enabled:function(e){var d=e.curMinDate();return(!d||c.datepick.add(c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(e.drawDate),1-e.get("monthsToJump"),"m"),e),1),-1,"d").getTime()>=d.getTime())},date:function(d){return c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(d.drawDate),-d.get("monthsToJump"),"m"),d),1)},action:function(d){c.datepick.changeMonth(this,-d.get("monthsToJump"))}},next:{text:"nextText",status:"nextStatus",keystroke:{keyCode:34},enabled:function(d){var e=d.get("maxDate");return(!e||c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(d.drawDate),d.get("monthsToStep"),"m"),d),1).getTime()<=e.getTime())},date:function(d){return c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(d.drawDate),d.get("monthsToStep"),"m"),d),1)},action:function(d){c.datepick.changeMonth(this,d.get("monthsToStep"))}},nextJump:{text:"nextJumpText",status:"nextJumpStatus",keystroke:{keyCode:34,ctrlKey:true},enabled:function(d){var e=d.get("maxDate");return(!e||c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(d.drawDate),d.get("monthsToJump"),"m"),d),1).getTime()<=e.getTime())},date:function(d){return c.datepick.day(c.datepick._applyMonthsOffset(c.datepick.add(c.datepick.newDate(d.drawDate),d.get("monthsToJump"),"m"),d),1)},action:function(d){c.datepick.changeMonth(this,d.get("monthsToJump"))}},current:{text:"currentText",status:"currentStatus",keystroke:{keyCode:36,ctrlKey:true},enabled:function(f){var e=f.curMinDate();var g=f.get("maxDate");var d=f.selectedDates[0]||c.datepick.today();return(!e||d.getTime()>=e.getTime())&&(!g||d.getTime()<=g.getTime())},date:function(d){return d.selectedDates[0]||c.datepick.today()},action:function(e){var d=e.selectedDates[0]||c.datepick.today();c.datepick.showMonth(this,d.getFullYear(),d.getMonth()+1)}},today:{text:"todayText",status:"todayStatus",keystroke:{keyCode:36,ctrlKey:true},enabled:function(e){var d=e.curMinDate();var f=e.get("maxDate");return(!d||c.datepick.today().getTime()>=d.getTime())&&(!f||c.datepick.today().getTime()<=f.getTime())},date:function(d){return c.datepick.today()},action:function(d){c.datepick.showMonth(this)}},clear:{text:"clearText",status:"clearStatus",keystroke:{keyCode:35,ctrlKey:true},enabled:function(d){return true},date:function(d){return null},action:function(d){c.datepick.clear(this)}},close:{text:"closeText",status:"closeStatus",keystroke:{keyCode:27},enabled:function(d){return true},date:function(d){return null},action:function(d){c.datepick.hide(this)}},prevWeek:{text:"prevWeekText",status:"prevWeekStatus",keystroke:{keyCode:38,ctrlKey:true},enabled:function(e){var d=e.curMinDate();return(!d||c.datepick.add(c.datepick.newDate(e.drawDate),-7,"d").getTime()>=d.getTime())},date:function(d){return c.datepick.add(c.datepick.newDate(d.drawDate),-7,"d")},action:function(d){c.datepick.changeDay(this,-7)}},prevDay:{text:"prevDayText",status:"prevDayStatus",keystroke:{keyCode:37,ctrlKey:true},enabled:function(e){var d=e.curMinDate();return(!d||c.datepick.add(c.datepick.newDate(e.drawDate),-1,"d").getTime()>=d.getTime())},date:function(d){return c.datepick.add(c.datepick.newDate(d.drawDate),-1,"d")},action:function(d){c.datepick.changeDay(this,-1)}},nextDay:{text:"nextDayText",status:"nextDayStatus",keystroke:{keyCode:39,ctrlKey:true},enabled:function(d){var e=d.get("maxDate");return(!e||c.datepick.add(c.datepick.newDate(d.drawDate),1,"d").getTime()<=e.getTime())},date:function(d){return c.datepick.add(c.datepick.newDate(d.drawDate),1,"d")},action:function(d){c.datepick.changeDay(this,1)}},nextWeek:{text:"nextWeekText",status:"nextWeekStatus",keystroke:{keyCode:40,ctrlKey:true},enabled:function(d){var e=d.get("maxDate");return(!e||c.datepick.add(c.datepick.newDate(d.drawDate),7,"d").getTime()<=e.getTime())},date:function(d){return c.datepick.add(c.datepick.newDate(d.drawDate),7,"d")},action:function(d){c.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(d){c.extend(this._defaults,d||{});return this},_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),_msPerDay:24*60*60*1000,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(o,h,i){if(typeof o!="string"){i=h;h=o;o=""}if(!h){return""}o=o||this._defaults.dateFormat;i=i||{};var r=i.dayNamesShort||this._defaults.dayNamesShort;var e=i.dayNames||this._defaults.dayNames;var m=i.monthNamesShort||this._defaults.monthNamesShort;var j=i.monthNames||this._defaults.monthNames;var f=i.calculateWeek||this._defaults.calculateWeek;var k=function(s,t){var u=1;while(q+u<o.length&&o.charAt(q+u)==s){u++}q+=u-1;return Math.floor(u/(t||1))>1};var d=function(u,w,s,v){var t=""+w;if(k(u,v)){while(t.length<s){t="0"+t}}return t};var l=function(s,u,t,v){return(k(s)?v[u]:t[u])};var g="";var n=false;for(var q=0;q<o.length;q++){if(n){if(o.charAt(q)=="'"&&!k("'")){n=false}else{g+=o.charAt(q)}}else{switch(o.charAt(q)){case"d":g+=d("d",h.getDate(),2);break;case"D":g+=l("D",h.getDay(),r,e);break;case"o":g+=d("o",this.dayOfYear(h),3);break;case"w":g+=d("w",f(h),2);break;case"m":g+=d("m",h.getMonth()+1,2);break;case"M":g+=l("M",h.getMonth(),m,j);break;case"y":g+=(k("y",2)?h.getFullYear():(h.getFullYear()%100<10?"0":"")+h.getFullYear()%100);break;case"@":g+=Math.floor(h.getTime()/1000);break;case"!":g+=h.getTime()*10000+this._ticksTo1970;break;case"'":if(k("'")){g+="'"}else{n=true}break;default:g+=o.charAt(q)}}}return g},parseDate:function(t,m,w){if(m==null){throw"Invalid arguments"}m=(typeof m=="object"?m.toString():m+"");if(m==""){return null}t=t||this._defaults.dateFormat;w=w||{};var e=w.shortYearCutoff||this._defaults.shortYearCutoff;e=(typeof e!="string"?e:this.today().getFullYear()%100+parseInt(e,10));var l=w.dayNamesShort||this._defaults.dayNamesShort;var y=w.dayNames||this._defaults.dayNames;var d=w.monthNamesShort||this._defaults.monthNamesShort;var g=w.monthNames||this._defaults.monthNames;var i=-1;var z=-1;var r=-1;var j=-1;var v=false;var q=false;var h=function(B,C){var D=1;while(f+D<t.length&&t.charAt(f+D)==B){D++}f+=D-1;return Math.floor(D/(C||1))>1};var A=function(D,F){var B=h(D,F);var E=[2,3,B?4:2,11,20]["oy@!".indexOf(D)+1];var G=new RegExp("^-?\\d{1,"+E+"}");var C=m.substring(s).match(G);if(!C){throw"Missing number at position {0}".replace(/\{0\}/,s)}s+=C[0].length;return parseInt(C[0],10)};var k=function(B,D,G,E){var F=(h(B,E)?G:D);for(var C=0;C<F.length;C++){if(m.substr(s,F[C].length)==F[C]){s+=F[C].length;return C+1}}throw"Unknown name at position {0}".replace(/\{0\}/,s)};var o=function(){if(m.charAt(s)!=t.charAt(f)){throw"Unexpected literal at position {0}".replace(/\{0\}/,s)}s++};var s=0;for(var f=0;f<t.length;f++){if(q){if(t.charAt(f)=="'"&&!h("'")){q=false}else{o()}}else{switch(t.charAt(f)){case"d":r=A("d");break;case"D":k("D",l,y);break;case"o":j=A("o");break;case"w":A("w");break;case"m":z=A("m");break;case"M":z=k("M",d,g);break;case"y":var u=f;v=!h("y",2);f=u;i=A("y",2);break;case"@":var x=this._normaliseDate(new Date(A("@")*1000));i=x.getFullYear();z=x.getMonth()+1;r=x.getDate();break;case"!":var x=this._normaliseDate(new Date((A("!")-this._ticksTo1970)/10000));i=x.getFullYear();z=x.getMonth()+1;r=x.getDate();break;case"*":s=m.length;break;case"'":if(h("'")){o()}else{q=true}break;default:o()}}}if(s<m.length){throw"Additional text found at end"}if(i==-1){i=this.today().getFullYear()}else{if(i<100&&v){i+=(e==-1?1900:this.today().getFullYear()-this.today().getFullYear()%100-(i<=e?0:100))}}if(j>-1){z=1;r=j;for(var n=this.daysInMonth(i,z);r>n;n=this.daysInMonth(i,z)){z++;r-=n}}var x=this.newDate(i,z,r);if(x.getFullYear()!=i||x.getMonth()+1!=z||x.getDate()!=r){throw"Invalid date"}return x},determineDate:function(f,i,e,d,h){if(e&&typeof e!="object"){h=d;d=e;e=null}if(typeof d!="string"){h=d;d=""}var g=function(n){try{return c.datepick.parseDate(d,n,h)}catch(m){}n=n.toLowerCase();var j=(n.match(/^c/)&&e?c.datepick.newDate(e):null)||c.datepick.today();var l=/([+-]?[0-9]+)\s*(d|w|m|y)?/g;var k=l.exec(n);while(k){j=c.datepick.add(j,parseInt(k[1],10),k[2]||"d");k=l.exec(n)}return j};i=(i?c.datepick.newDate(i):null);f=(f==null?i:(typeof f=="string"?g(f):(typeof f=="number"?(isNaN(f)||f==Infinity||f==-Infinity?i:c.datepick.add(c.datepick.today(),f,"d")):c.datepick.newDate(f))));return f},daysInMonth:function(d,e){e=(d.getFullYear?d.getMonth()+1:e);d=(d.getFullYear?d.getFullYear():d);return this.newDate(d,e+1,0).getDate()},dayOfYear:function(g,h,d){var f=(g.getFullYear?g:this.newDate(g,h,d));var e=this.newDate(f.getFullYear(),1,1);return Math.floor((f.getTime()-e.getTime())/this._msPerDay)+1},iso8601Week:function(e,g,d){var h=(e.getFullYear?new Date(e.getTime()):this.newDate(e,g,d));h.setDate(h.getDate()+4-(h.getDay()||7));var f=h.getTime();h.setMonth(0,1);return Math.floor(Math.round((f-h)/86400000)/7)+1},today:function(){return this._normaliseDate(new Date())},newDate:function(e,f,d){return(!e?null:(e.getFullYear?this._normaliseDate(new Date(e.getTime())):new Date(e,f-1,d,12)))},_normaliseDate:function(d){if(d){d.setHours(12,0,0,0)}return d},year:function(d,e){d.setFullYear(e);return this._normaliseDate(d)},month:function(d,e){d.setMonth(e-1);return this._normaliseDate(d)},day:function(e,d){e.setDate(d);return this._normaliseDate(e)},add:function(d,e,h){if(h=="d"||h=="w"){this._normaliseDate(d);d.setDate(d.getDate()+e*(h=="w"?7:1))}else{var f=d.getFullYear()+(h=="y"?e:0);var g=d.getMonth()+(h=="m"?e:0);d.setTime(c.datepick.newDate(f,g+1,Math.min(d.getDate(),this.daysInMonth(f,g+1))).getTime())}return d},_applyMonthsOffset:function(d,e){var f=e.get("monthsOffset");if(c.isFunction(f)){f=f.apply(e.target[0],[d])}return c.datepick.add(d,-f,"m")},_attachPicker:function(g,e){g=c(g);if(g.hasClass(this.markerClass)){return}g.addClass(this.markerClass);var f={target:g,selectedDates:[],drawDate:null,pickingRange:false,inline:(c.inArray(g[0].nodeName.toLowerCase(),["div","span"])>-1),get:function(h){var i=this.settings[h]!==undefined?this.settings[h]:c.datepick._defaults[h];if(c.inArray(h,["defaultDate","minDate","maxDate"])>-1){i=c.datepick.determineDate(i,null,this.selectedDates[0],this.get("dateFormat"),f.getConfig())}return i},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")}}};c.data(g[0],this.dataName,f);var d=(c.fn.metadata?g.metadata():{});f.settings=c.extend({},e||{},d||{});if(f.inline){f.drawDate=c.datepick._checkMinMax(c.datepick.newDate(f.selectedDates[0]||f.get("defaultDate")||c.datepick.today()),f);f.prevDate=c.datepick.newDate(f.drawDate);this._update(g[0]);if(c.fn.mousewheel){g.mousewheel(this._doMouseWheel)}}else{this._attachments(g,f);g.bind("keydown."+this.dataName,this._keyDown).bind("keypress."+this.dataName,this._keyPress).bind("keyup."+this.dataName,this._keyUp);if(g.attr("disabled")){this.disable(g[0])}}},options:function(f,d){var e=c.data(f,this.dataName);return(e?(d?(d=="all"?e.settings:e.settings[d]):c.datepick._defaults):{})},option:function(i,e,g){i=c(i);if(!i.hasClass(this.markerClass)){return}e=e||{};if(typeof e=="string"){var d=e;e={};e[d]=g}var f=c.data(i[0],this.dataName);var h=f.selectedDates;a(f.settings,e);this.setDate(i[0],h,null,false,true);f.pickingRange=false;f.drawDate=c.datepick.newDate(this._checkMinMax((e.defaultDate?f.get("defaultDate"):f.drawDate)||f.get("defaultDate")||c.datepick.today(),f));if(!f.inline){this._attachments(i,f)}if(f.inline||f.div){this._update(i[0])}},_attachments:function(g,e){g.unbind("focus."+this.dataName);if(e.get("showOnFocus")){g.bind("focus."+this.dataName,this.show)}if(e.trigger){e.trigger.remove()}var d=e.get("showTrigger");e.trigger=(!d?c([]):c(d).clone().removeAttr("id").addClass(this._triggerClass)[e.get("isRTL")?"insertBefore":"insertAfter"](g).click(function(){if(!c.datepick.isDisabled(g[0])){c.datepick[c.datepick.curInst==e?"hide":"show"](g[0])}}));this._autoSize(g,e);var f=this._extractDates(e,g.val());if(f){this.setDate(g[0],f,null,true)}if(e.get("selectDefaultDate")&&e.get("defaultDate")&&e.selectedDates.length==0){this.setDate(g[0],c.datepick.newDate(e.get("defaultDate")||c.datepick.today()))}},_autoSize:function(h,g){if(g.get("autoSize")&&!g.inline){var f=c.datepick.newDate(2009,10,20);var d=g.get("dateFormat");if(d.match(/[DM]/)){var e=function(m){var j=0;var k=0;for(var l=0;l<m.length;l++){if(m[l].length>j){j=m[l].length;k=l}}return k};f.setMonth(e(g.get(d.match(/MM/)?"monthNames":"monthNamesShort")));f.setDate(e(g.get(d.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())}g.target.attr("size",c.datepick.formatDate(d,f,g.getConfig()).length)}},destroy:function(e){e=c(e);if(!e.hasClass(this.markerClass)){return}var d=c.data(e[0],this.dataName);if(d.trigger){d.trigger.remove()}e.removeClass(this.markerClass).empty().unbind("."+this.dataName);if(d.inline&&c.fn.mousewheel){e.unmousewheel()}if(!d.inline&&d.get("autoSize")){e.removeAttr("size")}c.removeData(e[0],this.dataName)},multipleEvents:function(e){var d=arguments;return function(f){for(var g=0;g<d.length;g++){d[g].apply(this,arguments)}}},enable:function(f){var d=c(f);if(!d.hasClass(this.markerClass)){return}var e=c.data(f,this.dataName);if(e.inline){d.children("."+this._disableClass).remove().end().find("button,select").attr("disabled","").end().find("a").attr("href","javascript:void(0)")}else{f.disabled=false;e.trigger.filter("button."+this._triggerClass).attr("disabled","").end().filter("img."+this._triggerClass).css({opacity:"1.0",cursor:""})}this._disabled=c.map(this._disabled,function(g){return(g==f?null:g)})},disable:function(g){var d=c(g);if(!d.hasClass(this.markerClass)){return}var e=c.data(g,this.dataName);if(e.inline){var f=d.children(":last");var i=f.offset();var h={left:0,top:0};f.parents().each(function(){if(c(this).css("position")=="relative"){h=c(this).offset();return false}});var j=d.css("zIndex");j=(j=="auto"?0:parseInt(j,10))+1;d.prepend('<div class="'+this._disableClass+'" style="width: '+f.outerWidth()+"px; height: "+f.outerHeight()+"px; left: "+(i.left-h.left)+"px; top: "+(i.top-h.top)+"px; z-index: "+j+'"></div>').find("button,select").attr("disabled","disabled").end().find("a").removeAttr("href")}else{g.disabled=true;e.trigger.filter("button."+this._triggerClass).attr("disabled","disabled").end().filter("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"})}this._disabled=c.map(this._disabled,function(k){return(k==g?null:k)});this._disabled.push(g)},isDisabled:function(d){return(d&&c.inArray(d,this._disabled)>-1)},show:function(j){j=j.target||j;var i=c.data(j,c.datepick.dataName);if(c.datepick.curInst==i){return}if(c.datepick.curInst){c.datepick.hide(c.datepick.curInst,true)}if(i){i.lastVal=null;i.selectedDates=c.datepick._extractDates(i,c(j).val());i.pickingRange=false;i.drawDate=c.datepick._checkMinMax(c.datepick.newDate(i.selectedDates[0]||i.get("defaultDate")||c.datepick.today()),i);i.prevDate=c.datepick.newDate(i.drawDate);c.datepick.curInst=i;c.datepick._update(j,true);var k=c.datepick._checkOffset(i);i.div.css({left:k.left,top:k.top});var d=i.get("showAnim");var f=i.get("showSpeed");f=(f=="normal"&&c.ui&&c.ui.version>="1.8"?"_default":f);var h=function(){var m=i.div.find("."+c.datepick._coverClass);if(m.length){var l=c.datepick._getBorders(i.div);m.css({left:-l[0],top:-l[1],width:i.div.outerWidth()+l[0],height:i.div.outerHeight()+l[1]})}};if(c.effects&&c.effects[d]){var g=i.div.data();for(var e in g){if(e.match(/^ec\.storage\./)){g[e]=i._mainDiv.css(e.replace(/ec\.storage\./,""))}}i.div.data(g).show(d,i.get("showOptions"),f,h)}else{i.div[d||"show"]((d?f:""),h)}if(!d){h()}}},_extractDates:function(m,q){if(q==m.lastVal){return}m.lastVal=q;var f=m.get("dateFormat");var g=m.get("multiSelect");var o=m.get("rangeSelect");q=q.split(g?m.get("multiSeparator"):(o?m.get("rangeSeparator"):"\x00"));var d=[];for(var l=0;l<q.length;l++){try{var h=c.datepick.parseDate(f,q[l],m.getConfig());if(h){var r=false;for(var k=0;k<d.length;k++){if(d[k].getTime()==h.getTime()){r=true;break}}if(!r){d.push(h)}}}catch(n){}}d.splice(g||(o?2:1),d.length);if(o&&d.length==1){d[1]=d[0]}return d},_update:function(g,f){g=c(g.target||g);var e=c.data(g[0],c.datepick.dataName);if(e){if(e.inline||c.datepick.curInst==e){var d=e.get("onChangeMonthYear");if(d&&(!e.prevDate||e.prevDate.getFullYear()!=e.drawDate.getFullYear()||e.prevDate.getMonth()!=e.drawDate.getMonth())){d.apply(g[0],[e.drawDate.getFullYear(),e.drawDate.getMonth()+1])}}if(e.inline){g.html(this._generateContent(g[0],e))}else{if(c.datepick.curInst==e){if(!e.div){e.div=c("<div></div>").addClass(this._popupClass).css({display:(f?"none":"static"),position:"absolute",left:g.offset().left,top:g.offset().top+g.outerHeight()}).appendTo(c(e.get("popupContainer")||"body"));if(c.fn.mousewheel){e.div.mousewheel(this._doMouseWheel)}}e.div.html(this._generateContent(g[0],e));g.focus()}}}},_updateInput:function(k,e){var j=c.data(k,this.dataName);if(j){var m="";var f="";var n=(j.get("multiSelect")?j.get("multiSeparator"):j.get("rangeSeparator"));var d=j.get("dateFormat");var g=j.get("altFormat")||d;for(var h=0;h<j.selectedDates.length;h++){m+=(e?"":(h>0?n:"")+c.datepick.formatDate(d,j.selectedDates[h],j.getConfig()));f+=(h>0?n:"")+c.datepick.formatDate(g,j.selectedDates[h],j.getConfig())}if(!j.inline&&!e){c(k).val(m)}c(j.get("altField")).val(f);var l=j.get("onSelect");if(l&&!e&&!j.inSelect){j.inSelect=true;l.apply(k,[j.selectedDates]);j.inSelect=false}}},_getBorders:function(d){var e=function(g){var f=(c.browser.msie?1:0);return{thin:1+f,medium:3+f,thick:5+f}[g]||g};return[parseFloat(e(d.css("border-left-width"))),parseFloat(e(d.css("border-top-width")))]},_checkOffset:function(j){var e=(j.target.is(":hidden")&&j.trigger?j.trigger:j.target);var i=e.offset();var g=false;c(j.target).parents().each(function(){g|=c(this).css("position")=="fixed";return !g});if(g&&c.browser.opera){i.left-=document.documentElement.scrollLeft;i.top-=document.documentElement.scrollTop}var t=(!c.browser.mozilla||document.doctype?document.documentElement.clientWidth:0)||document.body.clientWidth;var k=(!c.browser.mozilla||document.doctype?document.documentElement.clientHeight:0)||document.body.clientHeight;if(t==0){return i}var n=j.get("alignment");var f=j.get("isRTL");var s=document.documentElement.scrollLeft||document.body.scrollLeft;var r=document.documentElement.scrollTop||document.body.scrollTop;var m=i.top-j.div.outerHeight()-(g&&c.browser.opera?document.documentElement.scrollTop:0);var q=i.top+e.outerHeight();var o=i.left;var l=i.left+e.outerWidth()-j.div.outerWidth()-(g&&c.browser.opera?document.documentElement.scrollLeft:0);var h=(i.left+j.div.outerWidth()-s)>t;var d=(i.top+j.target.outerHeight()+j.div.outerHeight()-r)>k;if(n=="topLeft"){i={left:o,top:m}}else{if(n=="topRight"){i={left:l,top:m}}else{if(n=="bottomLeft"){i={left:o,top:q}}else{if(n=="bottomRight"){i={left:l,top:q}}else{if(n=="top"){i={left:(f||h?l:o),top:m}}else{i={left:(f||h?l:o),top:(d?m:q)}}}}}}i.left=Math.max((g?0:s),i.left-(g?s:0));i.top=Math.max((g?0:r),i.top-(g?r:0));return i},_checkExternalClick:function(d){if(!c.datepick.curInst){return}var e=c(d.target);if(!e.parents().andSelf().hasClass(c.datepick._popupClass)&&!e.hasClass(c.datepick.markerClass)&&!e.parents().andSelf().hasClass(c.datepick._triggerClass)){c.datepick.hide(c.datepick.curInst)}},hide:function(j,f){var i=c.data(j,this.dataName)||j;if(i&&i==c.datepick.curInst){var e=(f?"":i.get("showAnim"));var g=i.get("showSpeed");g=(g=="normal"&&c.ui&&c.ui.version>="1.8"?"_default":g);var h=function(){i.div.remove();i.div=null;c.datepick.curInst=null;var k=i.get("onClose");if(k){k.apply(j,[i.selectedDates])}};i.div.stop();if(c.effects&&c.effects[e]){i.div.hide(e,i.get("showOptions"),g,h)}else{var d=(e=="slideDown"?"slideUp":(e=="fadeIn"?"fadeOut":"hide"));i.div[d]((e?g:""),h)}if(!e){h()}}},_keyDown:function(f){var i=f.target;var g=c.data(i,c.datepick.dataName);var h=false;if(g.div){if(f.keyCode==9){c.datepick.hide(i)}else{if(f.keyCode==13){c.datepick.selectDate(i,c("a."+g.get("renderer").highlightedClass,g.div)[0]);h=true}else{var d=g.get("commands");for(var e in d){var j=d[e];if(j.keystroke.keyCode==f.keyCode&&!!j.keystroke.ctrlKey==!!(f.ctrlKey||f.metaKey)&&!!j.keystroke.altKey==f.altKey&&!!j.keystroke.shiftKey==f.shiftKey){c.datepick.performAction(i,e);h=true;break}}}}}else{var j=g.get("commands").current;if(j.keystroke.keyCode==f.keyCode&&!!j.keystroke.ctrlKey==!!(f.ctrlKey||f.metaKey)&&!!j.keystroke.altKey==f.altKey&&!!j.keystroke.shiftKey==f.shiftKey){c.datepick.show(i);h=true}}g.ctrlKey=((f.keyCode<48&&f.keyCode!=32)||f.ctrlKey||f.metaKey);if(h){f.preventDefault();f.stopPropagation()}return !h},_keyPress:function(f){var h=f.target;var g=c.data(h,c.datepick.dataName);if(g&&g.get("constrainInput")){var e=String.fromCharCode(f.keyCode||f.charCode);var d=c.datepick._allowedChars(g);return(f.metaKey||g.ctrlKey||e<" "||!d||d.indexOf(e)>-1)}return true},_allowedChars:function(k){var d=k.get("dateFormat");var e=(k.get("multiSelect")?k.get("multiSeparator"):(k.get("rangeSelect")?k.get("rangeSeparator"):""));var j=false;var f=false;for(var g=0;g<d.length;g++){var h=d.charAt(g);if(j){if(h=="'"&&d.charAt(g+1)!="'"){j=false}else{e+=h}}else{switch(h){case"d":case"m":case"o":case"w":e+=(f?"":"0123456789");f=true;break;case"y":case"@":case"!":e+=(f?"":"0123456789")+"-";f=true;break;case"J":e+=(f?"":"0123456789")+"-.";f=true;break;case"D":case"M":case"Y":return null;case"'":if(d.charAt(g+1)=="'"){e+="'"}else{j=true}break;default:e+=h}}}return e},_keyUp:function(d){var g=d.target;var e=c.data(g,c.datepick.dataName);if(e&&!e.ctrlKey&&e.lastVal!=e.target.val()){try{var f=c.datepick._extractDates(e,e.target.val());if(f.length>0){c.datepick.setDate(g,f,null,true)}}catch(d){}}return true},_doMouseWheel:function(d,g){var f=(c.datepick.curInst&&c.datepick.curInst.target[0])||c(d.target).closest("."+c.datepick.markerClass)[0];if(c.datepick.isDisabled(f)){return}var e=c.data(f,c.datepick.dataName);if(e.get("useMouseWheel")){g=(c.browser.opera?-g:g);g=(g<0?-1:+1);c.datepick.changeMonth(f,-e.get(d.ctrlKey?"monthsToJump":"monthsToStep")*g)}d.preventDefault()},clear:function(e){var d=c.data(e,this.dataName);if(d){d.selectedDates=[];this.hide(e);if(d.get("selectDefaultDate")&&d.get("defaultDate")){this.setDate(e,c.datepick.newDate(d.get("defaultDate")||c.datepick.today()))}else{this._updateInput(e)}}},getDate:function(e){var d=c.data(e,this.dataName);return(d?d.selectedDates:[])},setDate:function(s,e,r,g,n){var q=c.data(s,this.dataName);if(q){if(!c.isArray(e)){e=[e];if(r){e.push(r)}}var f=q.get("dateFormat");var m=q.get("minDate");var d=q.get("maxDate");var k=q.selectedDates[0];q.selectedDates=[];for(var o=0;o<e.length;o++){var h=c.datepick.determineDate(e[o],null,k,f,q.getConfig());if(h){if((!m||h.getTime()>=m.getTime())&&(!d||h.getTime()<=d.getTime())){var u=false;for(var l=0;l<q.selectedDates.length;l++){if(q.selectedDates[l].getTime()==h.getTime()){u=true;break}}if(!u){q.selectedDates.push(h)}}}}var t=q.get("rangeSelect");q.selectedDates.splice(q.get("multiSelect")||(t?2:1),q.selectedDates.length);if(t){switch(q.selectedDates.length){case 1:q.selectedDates[1]=q.selectedDates[0];break;case 2:q.selectedDates[1]=(q.selectedDates[0].getTime()>q.selectedDates[1].getTime()?q.selectedDates[0]:q.selectedDates[1]);break}q.pickingRange=false}q.prevDate=(q.drawDate?c.datepick.newDate(q.drawDate):null);q.drawDate=this._checkMinMax(c.datepick.newDate(q.selectedDates[0]||q.get("defaultDate")||c.datepick.today()),q);if(!n){this._update(s);this._updateInput(s,g)}}},isSelectable:function(f,d){var e=c.data(f,this.dataName);if(!e){return false}d=c.datepick.determineDate(d,e.selectedDates[0]||this.today(),null,e.get("dateFormat"),e.getConfig());return this._isSelectable(f,d,e.get("onDate"),e.get("minDate"),e.get("maxDate"))},_isSelectable:function(h,e,d,g,i){var f=(typeof d=="boolean"?{selectable:d}:(!d?{}:d.apply(h,[e,true])));return(f.selectable!=false)&&(!g||e.getTime()>=g.getTime())&&(!i||e.getTime()<=i.getTime())},performAction:function(g,f){var e=c.data(g,this.dataName);if(e&&!this.isDisabled(g)){var d=e.get("commands");if(d[f]&&d[f].enabled.apply(g,[e])){d[f].action.apply(g,[e])}}},showMonth:function(i,f,h,e){var g=c.data(i,this.dataName);if(g&&(e!=null||(g.drawDate.getFullYear()!=f||g.drawDate.getMonth()+1!=h))){g.prevDate=c.datepick.newDate(g.drawDate);var d=this._checkMinMax((f!=null?c.datepick.newDate(f,h,1):c.datepick.today()),g);g.drawDate=c.datepick.newDate(d.getFullYear(),d.getMonth()+1,(e!=null?e:Math.min(g.drawDate.getDate(),c.datepick.daysInMonth(d.getFullYear(),d.getMonth()+1))));this._update(i)}},changeMonth:function(f,g){var e=c.data(f,this.dataName);if(e){var d=c.datepick.add(c.datepick.newDate(e.drawDate),g,"m");this.showMonth(f,d.getFullYear(),d.getMonth()+1)}},changeDay:function(f,g){var e=c.data(f,this.dataName);if(e){var d=c.datepick.add(c.datepick.newDate(e.drawDate),g,"d");this.showMonth(f,d.getFullYear(),d.getMonth()+1,d.getDate())}},_checkMinMax:function(d,f){var e=f.get("minDate");var g=f.get("maxDate");d=(e&&d.getTime()<e.getTime()?c.datepick.newDate(e):d);d=(g&&d.getTime()>g.getTime()?c.datepick.newDate(g):d);return d},retrieveDate:function(f,d){var e=c.data(f,this.dataName);return(!e?null:this._normaliseDate(new Date(parseInt(d.className.replace(/^.*dp(-?\d+).*$/,"$1"),10))))},selectDate:function(l,g){var j=c.data(l,this.dataName);if(j&&!this.isDisabled(l)){var e=this.retrieveDate(l,g);var k=j.get("multiSelect");var d=j.get("rangeSelect");if(k){var h=false;for(var f=0;f<j.selectedDates.length;f++){if(e.getTime()==j.selectedDates[f].getTime()){j.selectedDates.splice(f,1);h=true;break}}if(!h&&j.selectedDates.length<k){j.selectedDates.push(e)}}else{if(d){if(j.pickingRange){j.selectedDates[1]=e}else{j.selectedDates=[e,e]}j.pickingRange=!j.pickingRange}else{j.selectedDates=[e]}}j.prevDate=c.datepick.newDate(e);this._updateInput(l);if(j.inline||j.pickingRange||j.selectedDates.length<(k||(d?2:1))){this._update(l)}else{this.hide(l)}}},_generateContent:function(v,e){var r=e.get("renderer");var d=e.get("monthsToShow");d=(c.isArray(d)?d:[1,d]);e.drawDate=this._checkMinMax(e.drawDate||e.get("defaultDate")||c.datepick.today(),e);var u=c.datepick._applyMonthsOffset(c.datepick.newDate(e.drawDate),e);var t="";for(var h=0;h<d[0];h++){var k="";for(var f=0;f<d[1];f++){k+=this._generateMonth(v,e,u.getFullYear(),u.getMonth()+1,r,(h==0&&f==0));c.datepick.add(u,1,"m")}t+=this._prepare(r.monthRow,e).replace(/\{months\}/,k)}var l=this._prepare(r.picker,e).replace(/\{months\}/,t).replace(/\{weekHeader\}/g,this._generateDayHeaders(e,r))+(c.browser.msie&&parseInt(c.browser.version,10)<7&&!e.inline?'<iframe src="javascript:void(0);" class="'+this._coverClass+'"></iframe>':"");var g=e.get("commands");var j=e.get("commandsAsDateFormat");var m=function(B,z,D,y,A){if(l.indexOf("{"+B+":"+y+"}")==-1){return}var C=g[y];var x=(j?C.date.apply(v,[e]):null);l=l.replace(new RegExp("\\{"+B+":"+y+"\\}","g"),"<"+z+(C.status?' title="'+e.get(C.status)+'"':"")+' class="'+r.commandClass+" "+r.commandClass+"-"+y+" "+A+(C.enabled(e)?"":" "+r.disabledClass)+'">'+(x?c.datepick.formatDate(e.get(C.text),x,e.getConfig()):e.get(C.text))+"</"+D+">")};for(var w in g){m("button",'button type="button"',"button",w,r.commandButtonClass);m("link",'a href="javascript:void(0)"',"a",w,r.commandLinkClass)}l=c(l);if(d[1]>1){var i=0;c(r.monthSelector,l).each(function(){var x=++i%d[1];c(this).addClass(x==1?"first":(x==0?"last":""))})}var n=this;l.find(r.daySelector+" a").hover(function(){c(this).addClass(r.highlightedClass)},function(){(e.inline?c(this).parents("."+n.markerClass):e.div).find(r.daySelector+" a").removeClass(r.highlightedClass)}).click(function(){n.selectDate(v,this)}).end().find("select."+this._monthYearClass+":not(."+this._anyYearClass+")").change(function(){var x=c(this).val().split("/");n.showMonth(v,parseInt(x[1],10),parseInt(x[0],10))}).end().find("select."+this._anyYearClass).click(function(){c(this).css("visibility","hidden").next("input").css({left:this.offsetLeft,top:this.offsetTop,width:this.offsetWidth,height:this.offsetHeight}).show().focus()}).end().find("input."+n._monthYearClass).change(function(){try{var x=parseInt(c(this).val(),10);x=(isNaN(x)?e.drawDate.getFullYear():x);n.showMonth(v,x,e.drawDate.getMonth()+1,e.drawDate.getDate())}catch(y){alert(y)}}).keydown(function(x){if(x.keyCode==13){c(x.target).change()}else{if(x.keyCode==27){c(x.target).hide().prev("select").css("visibility","visible");e.target.focus()}}});l.find("."+r.commandClass).click(function(){if(!c(this).hasClass(r.disabledClass)){var x=this.className.replace(new RegExp("^.*"+r.commandClass+"-([^ ]+).*$"),"$1");c.datepick.performAction(v,x)}});if(e.get("isRTL")){l.addClass(r.rtlClass)}if(d[0]*d[1]>1){l.addClass(r.multiClass)}var s=e.get("pickerClass");if(s){l.addClass(s)}c("body").append(l);var q=0;l.find(r.monthSelector).each(function(){q+=c(this).outerWidth()});l.width(q/d[0]);var o=e.get("onShow");if(o){o.apply(v,[l,e])}return l},_generateMonth:function(L,h,v,I,z,m){var e=c.datepick.daysInMonth(v,I);var f=h.get("monthsToShow");f=(c.isArray(f)?f:[1,f]);var q=h.get("fixedWeeks")||(f[0]*f[1]>1);var s=h.get("firstDay");var N=(c.datepick.newDate(v,I,1).getDay()-s+7)%7;var k=(q?6:Math.ceil((N+e)/7));var E=h.get("showOtherMonths");var x=h.get("selectOtherMonths")&&E;var H=h.get("dayStatus");var n=(h.pickingRange?h.selectedDates[0]:h.get("minDate"));var t=h.get("maxDate");var o=h.get("rangeSelect");var w=h.get("onDate");var D=z.week.indexOf("{weekOfYear}")>-1;var K=h.get("calculateWeek");var G=c.datepick.today();var J=c.datepick.newDate(v,I,1);c.datepick.add(J,-N-(q&&(J.getDay()==s)?7:0),"d");var d=J.getTime();var l="";for(var A=0;A<k;A++){var M=(!D?"":'<span class="dp'+d+'">'+(K?K(J):0)+"</span>");var j="";for(var C=0;C<7;C++){var y=false;if(o&&h.selectedDates.length>0){y=(J.getTime()>=h.selectedDates[0]&&J.getTime()<=h.selectedDates[1])}else{for(var B=0;B<h.selectedDates.length;B++){if(h.selectedDates[B].getTime()==J.getTime()){y=true;break}}}var F=(!w?{}:w.apply(L,[J,J.getMonth()+1==I]));var r=(x||J.getMonth()+1==I)&&this._isSelectable(L,J,F.selectable,n,t);j+=this._prepare(z.day,h).replace(/\{day\}/g,(r?'<a href="javascript:void(0)"':"<span")+' class="dp'+d+" "+(F.dateClass||"")+(y&&(x||J.getMonth()+1==I)?" "+z.selectedClass:"")+(r?" "+z.defaultClass:"")+((J.getDay()||7)<6?"":" "+z.weekendClass)+(J.getMonth()+1==I?"":" "+z.otherMonthClass)+(J.getTime()==G.getTime()&&(J.getMonth()+1)==I?" "+z.todayClass:"")+(J.getTime()==h.drawDate.getTime()&&(J.getMonth()+1)==I?" "+z.highlightedClass:"")+'"'+(F.title||(H&&r)?' title="'+(F.title||c.datepick.formatDate(H,J,h.getConfig()))+'"':"")+">"+(E||(J.getMonth()+1)==I?F.content||J.getDate():"&nbsp;")+(r?"</a>":"</span>"));c.datepick.add(J,1,"d");d=J.getTime()}l+=this._prepare(z.week,h).replace(/\{days\}/g,j).replace(/\{weekOfYear\}/g,M)}var g=this._prepare(z.month,h).match(/\{monthHeader(:[^\}]+)?\}/);g=(g[0].length<=13?"MM yyyy":g[0].substring(13,g[0].length-1));g=(m?this._generateMonthSelection(h,v,I,n,t,g,z):c.datepick.formatDate(g,c.datepick.newDate(v,I,1),h.getConfig()));var u=this._prepare(z.weekHeader,h).replace(/\{days\}/g,this._generateDayHeaders(h,z));return this._prepare(z.month,h).replace(/\{monthHeader(:[^\}]+)?\}/g,g).replace(/\{weekHeader\}/g,u).replace(/\{weeks\}/g,l)},_generateDayHeaders:function(h,g){var f=h.get("firstDay");var k=h.get("dayNames");var e=h.get("dayNamesMin");var j="";for(var d=0;d<7;d++){var i=(d+f)%7;j+=this._prepare(g.dayHeader,h).replace(/\{day\}/g,'<span class="'+this._curDoWClass+i+'" title="'+k[i]+'">'+e[i]+"</span>")}return j},_generateMonthSelection:function(k,q,n,i,d,t){if(!k.get("changeMonth")){return c.datepick.formatDate(t,c.datepick.newDate(q,n,1),k.getConfig())}var j=k.get("monthNames"+(t.match(/mm/i)?"":"Short"));var l=t.replace(/m+/i,"\\x2E").replace(/y+/i,"\\x2F");var g='<select class="'+this._monthYearClass+'" title="'+k.get("monthStatus")+'">';for(var f=1;f<=12;f++){if((!i||c.datepick.newDate(q,f,c.datepick.daysInMonth(q,f)).getTime()>=i.getTime())&&(!d||c.datepick.newDate(q,f,1).getTime()<=d.getTime())){g+='<option value="'+f+"/"+q+'"'+(n==f?' selected="selected"':"")+">"+j[f-1]+"</option>"}}g+="</select>";l=l.replace(/\\x2E/,g);var u=k.get("yearRange");if(u=="any"){g='<select class="'+this._monthYearClass+" "+this._anyYearClass+'" title="'+k.get("yearStatus")+'"><option>'+q+'</option></select><input class="'+this._monthYearClass+" "+this._curMonthClass+n+'" value="'+q+'">'}else{u=u.split(":");var s=c.datepick.today().getFullYear();var e=(u[0].match("c[+-].*")?q+parseInt(u[0].substring(1),10):((u[0].match("[+-].*")?s:0)+parseInt(u[0],10)));var h=(u[1].match("c[+-].*")?q+parseInt(u[1].substring(1),10):((u[1].match("[+-].*")?s:0)+parseInt(u[1],10)));g='<select class="'+this._monthYearClass+'" title="'+k.get("yearStatus")+'">';e=c.datepick.add(c.datepick.newDate(e+1,1,1),-1,"d");h=c.datepick.newDate(h,1,1);var o=function(m){if(m!=0){g+='<option value="'+n+"/"+m+'"'+(q==m?' selected="selected"':"")+">"+m+"</option>"}};if(e.getTime()<h.getTime()){e=(i&&i.getTime()>e.getTime()?i:e).getFullYear();h=(d&&d.getTime()<h.getTime()?d:h).getFullYear();for(var r=e;r<=h;r++){o(r)}}else{e=(d&&d.getTime()<e.getTime()?d:e).getFullYear();h=(i&&i.getTime()>h.getTime()?i:h).getFullYear();for(var r=e;r>=h;r--){o(r)}}g+="</select>"}l=l.replace(/\\x2F/,g);return l},_prepare:function(h,f){var g=function(k,i){while(true){var l=h.indexOf("{"+k+":start}");if(l==-1){return}var j=h.substring(l).indexOf("{"+k+":end}");if(j>-1){h=h.substring(0,l)+(i?h.substr(l+k.length+8,j-k.length-8):"")+h.substring(l+j+k.length+6)}}};g("inline",f.inline);g("popup",!f.inline);var e=/\{l10n:([^\}]+)\}/;var d=null;while(d=e.exec(h)){h=h.replace(d[0],f.get(d[1]))}return h}});function a(f,e){c.extend(f,e);for(var d in e){if(e[d]==null||e[d]==undefined){f[d]=e[d]}}return f}c.fn.datepick=function(e){var d=Array.prototype.slice.call(arguments,1);if(c.inArray(e,["getDate","isDisabled","isSelectable","options","retrieveDate"])>-1){return c.datepick[e].apply(c.datepick,[this[0]].concat(d))}return this.each(function(){if(typeof e=="string"){c.datepick[e].apply(c.datepick,[this].concat(d))}else{c.datepick._attachPicker(this,e||{})}})};c.datepick=new b();c(function(){c(document).mousedown(c.datepick._checkExternalClick).resize(function(){c.datepick.hide(c.datepick.curInst)})})})(jQuery);(function($){if(typeof window.console!=="object"||typeof window.console.emulated==="undefined"){if(typeof window.console!=="object"||!(typeof window.console.log==="function"||typeof window.console.log==="object")){window.console={};window.console.log=window.console.debug=window.console.warn=window.console.trace=function(){};window.console.error=function(){var msg="An error has occured. More information will be available in the console log.";for(var i=0;i<arguments.length;++i){if(typeof arguments[i]!=="string"){break}msg+="\n"+arguments[i]}if(typeof Error!=="undefined"){throw new Error(msg)}else{throw (msg)}}}else{if(typeof window.console.debug==="undefined"){window.console.debug=function(){var arr=["console.debug:"];for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}window.console.log.apply(window.console,arr)}}if(typeof window.console.warn==="undefined"){window.console.warn=function(){var arr=["console.warn:"];for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}window.console.log.apply(window.console,arr)}}if(typeof window.console.error==="undefined"){window.console.error=function(){var arr=["console.error"];for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}window.console.log.apply(window.console,arr)}}if(typeof window.console.trace==="undefined"){window.console.trace=function(){window.console.error.apply(window.console,["console.trace does not exist"])}}}window.console.emulated=true}String.prototype.queryStringToJSON=String.prototype.queryStringToJSON||function(){var params=String(this);params=params.substring(params.indexOf("?")+1);params=params.replace(/\+/g,"%20");if(params.substring(0,1)==="{"&&params.substring(params.length-1)==="}"){return eval(decodeURIComponent(params))}params=params.split(/\&(amp\;)?/);var json={};for(var i=0,n=params.length;i<n;++i){var param=params[i]||null;if(param===null){continue}param=param.split("=");if(param===null){continue}var key=param[0]||null;if(key===null){continue}if(typeof param[1]==="undefined"){continue}var value=param[1];key=decodeURIComponent(key);value=decodeURIComponent(value);try{value=eval(value)}catch(e){}var keys=key.split(".");if(keys.length===1){json[key]=value}else{var path="",cmd="";$.each(keys,function(ii,key){path+='["'+key.replace(/"/g,'\\"')+'"]';jsonCLOSUREGLOBAL=json;cmd="if ( typeof jsonCLOSUREGLOBAL"+path+' === "undefined" ) jsonCLOSUREGLOBAL'+path+" = {}";eval(cmd);json=jsonCLOSUREGLOBAL;delete jsonCLOSUREGLOBAL});jsonCLOSUREGLOBAL=json;valueCLOSUREGLOBAL=value;cmd="jsonCLOSUREGLOBAL"+path+" = valueCLOSUREGLOBAL";eval(cmd);json=jsonCLOSUREGLOBAL;delete jsonCLOSUREGLOBAL;delete valueCLOSUREGLOBAL}}return json};Array.prototype.remove=function(from,to){var rest=this.slice((to||from)+1||this.length);this.length=from<0?this.length+from:from;return this.push.apply(this,rest)};Array.prototype.get=function(index,current){if(index==="first"){index=0}else{if(index==="last"){index=this.length-1}else{if(index==="prev"){index=this.index-1}else{if(index==="next"){index=this.index+1}else{if(!index&&index!==0){index=this.index}}}}}if(current||false!==false){this.setIndex(index)}return this.exists(index)?this[index]:undefined};Array.prototype.each=function(fn){for(var i=0;i<this.length;++i){if(fn(i,this[i],this)===false){break}}return this};Array.prototype.validIndex=function(index){return index>=0&&index<this.length};Array.prototype.setIndex=function(index){if(this.validIndex(index)){this.index=index}else{this.index=null}return this};Array.prototype.current=function(index){return this.get(index,true)};Array.prototype.isEmpty=function(){return this.length===0};Array.prototype.isSingle=function(){return this.length===1};Array.prototype.isNotEmpty=function(){return this.length!==0};Array.prototype.isNotEmpty=function(){return this.length>1};Array.prototype.isLast=function(index){index=typeof index==="undefined"?this.index:index;return !this.isEmpty()&&index===this.length-1};Array.prototype.isFirst=function(index){index=typeof index==="undefined"?this.index:index;return !this.isEmpty()&&index===0};Array.prototype.clear=function(){this.length=0};Array.prototype.next=function(update){return this.get(this.index+1,update)};Array.prototype.prev=function(update){return this.get(this.index-1,update)};Array.prototype.reset=function(){this.index=null;return this};Array.prototype.set=function(index,item){if(index<this.length&&index>=0){this[index]=item}else{throw new Error("Array.prototype.set: [index] above this.length")}return this};Array.prototype.loop=function(){if(!this.index&&this.index!==0){return this.current(0)}return this.next()};Array.prototype.add=function(){this.push.apply(this,arguments);return this};Array.prototype.insert=function(index,item){if(typeof index!=="number"){index=this.length}index=index<=this.length?index:this.length;var rest=this.slice(index);this.length=index;this.push(item);this.push.apply(this,rest);return this};Array.prototype.exists=Array.prototype.exists||function(index){return typeof this[index]!=="undefined"};Array.prototype.has=Array.prototype.has||function(value){var has=false;for(var i=0,n=this.length;i<n;++i){if(value==this[i]){has=true;break}}return has};$.fn.once=$.fn.once||function(event,data,callback){var $this=$(this);if((callback||false)){$this.unbind(event,callback);$this.bind(event,data,callback)}else{callback=data;$this.unbind(event,callback);$this.bind(event,callback)}return $this};$.fn.binder=$.fn.binder||function(event,data,callback){var $this=$(this);if((callback||false)){$this.bind(event,data,callback)}else{callback=data;$this.bind(event,callback)}return $this};$.fn.lastclick=$.fn.lastclick||function(data,callback){return $(this).binder("lastclick",data,callback)};$.event.special.lastclick=$.event.special.lastclick||{setup:function(data,namespaces){$(this).bind("click",$.event.special.lastclick.handler)},teardown:function(namespaces){$(this).unbind("click",$.event.special.lastclick.handler)},handler:function(event){var clear=function(){var Me=this;var $el=$(Me);var timeout=$el.data("lastclick-timeout")||false;if(timeout){clearTimeout(timeout)}timeout=false;$el.data("lastclick-timeout",timeout)};var check=function(event){var Me=this;clear.call(Me);var $el=$(Me);$el.data("lastclick-clicks",($el.data("lastclick-clicks")||0)+1);var timeout=setTimeout(function(){var clicks=$el.data("lastclick-clicks");clear.apply(Me,[event]);$el.data("lastclick-clicks",0);event.type="lastclick";$.event.handle.apply(Me,[event,clicks])},300);$el.data("lastclick-timeout",timeout)};check.apply(this,[event])}};$.fn.preventDefault=$.fn.preventDefault||function(){return $(this).click(function(event){event.preventDefault();return false})};$.LightboxClass=function(){this.construct()};$.fn.lightbox=function(options){$.Lightbox=$.Lightbox||new $.LightboxClass();if($.Lightbox.ie6&&!$.Lightbox.ie6_support){return this}options=$.extend({start:false,events:true},options);var $group=$(this);if(options.events){$group.preventDefault().once("lastclick",function(event){var $obj=$(this);var index=$group.index($obj);if(!$.Lightbox.init(index,$group)){return false}if(!$.Lightbox.start()){return false}event.preventDefault();return false});$group.addClass("lightbox-enabled")}if(options.start){var obj=$(this);if(!$.Lightbox.init(0,$group)){return this}if(!$.Lightbox.start()){return this}}return this};$.extend($.LightboxClass.prototype,{images:[],constructed:false,compressed:null,src:null,baseurl:null,files:{compressed:{scripts:{lightbox:"scripts/jquery.lightbox.min.js",colorBlend:"scripts/jquery.color.min.js"},styles:{lightbox:"styles/jquery.lightbox.min.css"}},uncompressed:{scripts:{lightbox:"scripts/jquery.lightbox.js",colorBlend:"scripts/jquery.color.js"},styles:{lightbox:"styles/jquery.lightbox.css"}},images:{prev:"images/prev.gif",next:"images/next.gif",blank:"images/blank.gif",loading:"images/loading.gif"}},text:{image:"Image",of:"of",close:"Close X",closeInfo:"You can also click anywhere outside the image to close.",download:"Download.",help:{close:"Click to close",interact:"Hover to interact"},about:{text:"jQuery Lightbox Plugin (balupton edition)",title:"Licenced under the GNU Affero General Public License.",link:"http://www.balupton.com/projects/jquery-lightbox"}},keys:{close:"c",prev:"p",next:"n"},handlers:{show:null},opacity:0.9,padding:null,speed:400,rel:"lightbox",auto_relify:true,auto_scroll:"follow",auto_resize:true,ie6:null,ie6_support:true,colorBlend:null,download_link:true,show_helper_text:true,show_linkback:true,show_info:"auto",show_extended_info:"auto",options:["show_helper_text","auto_scroll","auto_resize","download_link","show_info","show_extended_info","ie6_support","colorBlend","baseurl","files","text","show_linkback","keys","opacity","padding","speed","rel","auto_relify"],construct:function(options){var initial=typeof this.constructed==="undefined"||this.constructed===false;this.constructed=true;var domReady=initial;options=options||{};var prepend=function(item,value){if(typeof item==="object"){for(var i in item){item[i]=prepend(item[i],value)}}else{if(typeof value==="array"){for(var i=0,n=item.length;i<n;++i){item[i]=prepend(item[i],value)}}else{item=value+item}}return item};if(initial&&(typeof options.files==="undefined")){this.compressed=null;var $script=$("script[src*="+this.files.compressed.scripts.lightbox+"]:first");if($script.length!==0){$.extend(true,this.files,this.files.compressed);this.compressed=true}else{$script=$("script[src*="+this.files.uncompressed.scripts.lightbox+"]:first");if($script.length!==0){$.extend(true,this.files,this.files.uncompressed);this.compressed=false}else{}}if(this.compressed===null){window.console.error("Lightbox was not able to find it's javascript script tag necessary for auto-inclusion.");domReady=false}else{this.src=$script.attr("src");this.baseurl=this.src.substring(0,this.src.indexOf(this.files.scripts.lightbox));this.files=prepend(this.files,this.baseurl);options=$.extend(options,this.src.queryStringToJSON())}this.images.image={src:"",title:"Untitled",description:"",name:"",color:null,width:null,height:null,id:null,image:true};this.images.prepare=function(obj){var image=$.extend({},this.image);if(obj.tagName){obj=$(obj);if(obj.attr("src")||obj.attr("href")){image.src=obj.attr("src")||obj.attr("href");image.title=obj.attr("title")||obj.attr("alt")||image.title;image.name=obj.attr("name")||"";image.color=obj.css("backgroundColor");var s=image.title.indexOf(": ");if(s>0){image.description=image.title.substring(s+2)||image.description;image.title=image.title.substring(0,s)||image.title}}else{image=null}}else{if(obj.src){image=$.extend(this.image,obj)}else{image=null}}if(image){image.id=image.id||image.src+image.title+image.description}return image};this.images.create=function(obj){var images=this;if(obj.each){obj.each(function(index,item){images.create(item)});return}var image=images.prepare(obj);if(!image){window.console.error("We dont know what we have:",obj,image)}else{images.push(image)}return images}}else{if(typeof options.files==="object"){options.files=prepend(options.files,this.baseurl)}else{domReady=false}}for(var i in this.options){var name=this.options[i];if((typeof options[name]==="object")&&(typeof this[name]==="object")){this[name]=$.extend(true,this[name],options[name])}else{if(typeof options[name]!=="undefined"){this[name]=options[name]}}}delete i;if(initial&&navigator.userAgent.indexOf("MSIE 6")>=0){this.ie6=true}else{this.ie6=false}if(domReady||typeof options.download_link!=="undefined"||typeof options.colorBlend!=="undefined"||typeof options.files==="object"||typeof options.text==="object"||typeof options.show_linkback!=="undefined"||typeof options.scroll_with!=="undefined"){$(function(){$.Lightbox.domReady()})}return true},domReady:function(){var bodyEl=document.getElementsByTagName($.browser.safari?"head":"body")[0];var stylesheets=this.files.styles;var scripts=this.files.scripts;if(this.colorBlend===true&&typeof $.colorBlend==="undefined"){this.colorBlend=true}else{this.colorBlend=typeof $.colorBlend!=="undefined";delete scripts.colorBlend}for(stylesheet in stylesheets){var linkEl=document.createElement("link");linkEl.type="text/css";linkEl.rel="stylesheet";linkEl.media="screen";linkEl.href=stylesheets[stylesheet];linkEl.id="lightbox-stylesheet-"+stylesheet.replace(/[^a-zA-Z0-9]/g,"");$("#"+linkEl.id).remove();bodyEl.appendChild(linkEl)}delete scripts.lightbox;for(script in scripts){var scriptEl=document.createElement("script");scriptEl.type="text/javascript";scriptEl.src=scripts[script];scriptEl.id="lightbox-script-"+script.replace(/[^a-zA-Z0-9]/g,"");$("#"+scriptEl.id).remove();bodyEl.appendChild(scriptEl)}delete scripts;delete stylesheets;delete bodyEl;$("#lightbox,#lightbox-overlay").remove();$("body").append('<div id="lightbox-overlay"><div id="lightbox-overlay-text">'+(this.show_linkback?'<p><span id="lightbox-overlay-text-about"><a href="#" title="'+this.text.about.title+'">'+this.text.about.text+"</a></span></p><p>&nbsp;</p>":"")+(this.show_helper_text?'<p><span id="lightbox-overlay-text-close">'+this.text.help.close+'</span><br/>&nbsp;<span id="lightbox-overlay-text-interact">'+this.text.help.interact+"</span></p>":"")+'</div></div><div id="lightbox"><div id="lightbox-imageBox"><div id="lightbox-imageContainer"><img id="lightbox-image" /><div 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="'+this.files.images.loading+'" /></a></div></div></div><div id="lightbox-infoBox"><div id="lightbox-infoContainer"><div id="lightbox-infoHeader"><span id="lightbox-caption">'+(this.download_link?'<a href="#" title="'+this.text.download+'" id="lightbox-caption-title"></a>':'<span id="lightbox-caption-title"></span>')+'<span id="lightbox-caption-seperator"></span><span id="lightbox-caption-description"></span></span></div><div id="lightbox-infoFooter"><span id="lightbox-currentNumber"></span><span id="lightbox-close"><a href="#" id="lightbox-close-button" title="'+this.text.closeInfo+'">'+this.text.close+'</a></span></div><div id="lightbox-infoContainer-clear"></div></div></div></div>');this.resizeBoxes();this.repositionBoxes();$("#lightbox,#lightbox-overlay,#lightbox-overlay-text-interact").hide();if(this.ie6&&this.ie6_support){$("#lightbox-overlay").css({position:"absolute",top:"0px",left:"0px"})}$.each(this.files.images,function(){var preloader=new Image();preloader.onload=function(){preloader.onload=null;preloader=null};preloader.src=this});$(window).unbind("resize").resize(function(){$.Lightbox.resizeBoxes("resized")});if(this.scroll==="follow"){$(window).scroll(function(){$.Lightbox.repositionBoxes()})}$("#lightbox-nav-btnPrev").unbind().preventDefault().hover(function(){$(this).css({background:"url("+$.Lightbox.files.images.prev+") left 45% no-repeat"})},function(){$(this).css({background:"transparent url("+$.Lightbox.files.images.blank+") no-repeat"})}).lastclick(function(){$.Lightbox.showImage("prev");return false});$("#lightbox-nav-btnNext").unbind().preventDefault().hover(function(){$(this).css({background:"url("+$.Lightbox.files.images.next+") right 45% no-repeat"})},function(){$(this).css({background:"transparent url("+$.Lightbox.files.images.blank+") no-repeat"})}).lastclick(function(){$.Lightbox.showImage("next");return false});if(this.show_linkback){$("#lightbox-overlay-text-about a").preventDefault().lastclick(function(){window.open($.Lightbox.text.about.link);return false})}$("#lightbox-overlay-text-close").unbind().hover(function(){$("#lightbox-overlay-text-interact").fadeIn()},function(){$("#lightbox-overlay-text-interact").fadeOut()});if(this.download_link){$("#lightbox-caption-title").preventDefault().lastclick(function(){window.open($(this).attr("href"));return false})}$("#lightbox-overlay, #lightbox, #lightbox-loading-link, #lightbox-btnClose").unbind().preventDefault().lastclick(function(){$.Lightbox.finish();return false});if(this.auto_relify){this.relify()}return true},relify:function(){var groups={};var groups_n=0;var orig_rel=this.rel;$.each($("[rel*="+orig_rel+"]"),function(index,obj){var rel=$(obj).attr("rel");if(rel===orig_rel){rel=groups_n}if(typeof groups[rel]==="undefined"){groups[rel]=[];groups_n++}groups[rel].push(obj)});$.each(groups,function(index,group){$(group).lightbox()});return true},init:function(image,images){if(typeof images==="undefined"){images=image;image=0}this.images.clear();this.images.create(images);if(this.images.isEmpty()){window.console.warn("WARNING","Lightbox started, but no images: ",image,images);return false}if(!this.images.current(image)){window.console.warn("WARNING","Could not find current image: ",image,this.images);return false}return true},start:function(){this.visible=true;if(this.scroll==="disable"){$(document.body).css("overflow","hidden")}$("embed, object, select").css("visibility","hidden");this.resizeBoxes("general");this.repositionBoxes({speed:0});$("#lightbox-infoFooter").hide();$("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-infoBox").hide();$("#lightbox-overlay").css("opacity",this.opacity).fadeIn(400,function(){$("#lightbox").fadeIn(300);if(!$.Lightbox.showImage()){$.Lightbox.finish();return false}});return true},finish:function(){$("#lightbox").hide();$("#lightbox-overlay").fadeOut(function(){$("#lightbox-overlay").hide()});$("embed, object, select").css({visibility:"visible"});this.images.reset();if(this.scroll==="disable"){$(document.body).css("overflow","visible")}this.visible=false},resizeBoxes:function(type){if(type!=="transition"){var $body=$(this.ie6?document.body:document);$("#lightbox-overlay").css({width:$body.width(),height:$body.height()});delete $body}switch(type){case"general":return true;break;case"resized":if(this.auto_resize===false){this.repositionBoxes({nHeight:nHeight,speed:this.speed});return true}case"transition":default:break}var image=this.images.current();if(!image||!image.width||!this.visible){return false}var iWidth=image.width;var iHeight=image.height;var wWidth=$(window).width();var wHeight=$(window).height();if(this.auto_resize!==false){var maxWidth=Math.floor(wWidth*(4/5));var maxHeight=Math.floor(wHeight*(4/5));var resizeRatio;while(iWidth>maxWidth||iHeight>maxHeight){if(iWidth>maxWidth){resizeRatio=maxWidth/iWidth;iWidth=maxWidth;iHeight=Math.floor(iHeight*resizeRatio)}if(iHeight>maxHeight){resizeRatio=maxHeight/iHeight;iHeight=maxHeight;iWidth=Math.floor(iWidth*resizeRatio)}}}var cWidth=$("#lightbox-imageBox").width();var cHeight=$("#lightbox-imageBox").height();var nWidth=(iWidth+(this.padding*2));var nHeight=(iHeight+(this.padding*2));var dWidth=cWidth-nWidth;var dHeight=cHeight-nHeight;$("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css("height",nHeight);$("#lightbox-infoBox").css("width",nWidth);if(type==="transition"){if(dWidth===0&&dHeight===0){this.pause(this.speed/3);this.showImage(null,3)}else{$("#lightbox-image").width(iWidth).height(iHeight);$("#lightbox-imageBox").animate({width:nWidth,height:nHeight},this.speed,function(){$.Lightbox.showImage(null,3)})}}else{$("#lightbox-image").animate({width:iWidth,height:iHeight},this.speed);$("#lightbox-imageBox").animate({width:nWidth,height:nHeight},this.speed)}this.repositionBoxes({nHeight:nHeight,speed:this.speed});return true},repositioning:false,reposition_failsafe:false,repositionBoxes:function(options){if(this.repositioning){this.reposition_failsafe=true;return null}this.repositioning=true;options=$.extend({},options);options.callback=options.callback||null;options.speed=options.speed||"slow";var pageScroll=this.getPageScroll();var nHeight=options.nHeight||parseInt($("#lightbox").height(),10);var nTop=pageScroll.yScroll+($(window).height()-nHeight)/2.5;var nLeft=pageScroll.xScroll;var css={left:nLeft,top:nTop};if(options.speed){$("#lightbox").animate(css,"slow",function(){if($.Lightbox.reposition_failsafe){$.Lightbox.repositioning=$.Lightbox.reposition_failsafe=false;$.Lightbox.repositionBoxes(options)}else{$.Lightbox.repositioning=false;if(options.callback){options.callback()}}})}else{$("#lightbox").css(css);if(this.reposition_failsafe){this.repositioning=this.reposition_failsafe=false;this.repositionBoxes(options)}else{this.repositioning=false}}return true},visible:false,showImage:function(image,step){step=step||1;image=this.images.current(image)||this.images.get("first",true);if(!image){return}switch(step){case 1:this.KeyboardNav_Disable();$("#lightbox-loading").show();$("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-infoBox").hide();$("#lightbox-imageBox").unbind();if(image.width&&image.height){this.showImage(null,2)}else{var preloader=new Image();preloader.onload=function(){image.width=preloader.width;image.height=preloader.height;$.Lightbox.showImage(null,2);preloader.onload=null;preloader=null};preloader.src=image.src}break;case 2:$("#lightbox-image").attr("src",image.src);if(typeof this.padding==="undefined"||this.padding===null||isNaN(this.padding)){this.padding=parseInt($("#lightbox-imageContainer").css("padding-left"),10)||parseInt($("#lightbox-imageContainer").css("padding"),10)||0}if(this.colorBlend){$("#lightbox-overlay").animate({backgroundColor:image.color},this.speed*2);$("#lightbox-imageBox").css("borderColor",image.color)}this.resizeBoxes("transition");break;case 3:$("#lightbox-loading").hide();$("#lightbox-image").fadeIn(this.speed*1.5,function(){$.Lightbox.showImage(null,4)});this.preloadNeighbours();if(this.handlers.show!==null){this.handlers.show(image)}break;case 4:var $title=$("#lightbox-caption-title").html(image.title||"Untitled");if(this.download_link){$title.attr("href",this.download_link?image.src:"")}delete $title;$("#lightbox-caption-seperator").html(image.description?": ":"");$("#lightbox-caption-description").html(image.description||"&nbsp;");if(this.images.length>1){$("#lightbox-currentNumber").html(this.text.image+"&nbsp;"+(this.images.index+1)+"&nbsp;"+this.text.of+"&nbsp;"+this.images.length)}else{$("#lightbox-currentNumber").html("&nbsp;")}$("#lightbox-imageBox").unbind("mouseover").mouseover(function(){$("#lightbox-infoBox:not(:visible)").stop().slideDown("fast")});$("#lightbox-infoBox").unbind("mouseover").mouseover(function(){$("#lightbox-infoFooter:not(:visible)").stop().slideDown("fast")});if(this.show_extended_info===true){$("#lightbox-imageBox").trigger("mouseover");$("#lightbox-infoBox").trigger("mouseover")}else{if(this.show_info===true){$("#lightbox-imageBox").trigger("mouseover")}}$("#lightbox-nav-btnPrev, #lightbox-nav-btnNext").css({background:"transparent url("+this.files.images.blank+") no-repeat"});if(!this.images.isFirst()){$("#lightbox-nav-btnPrev").show()}if(!this.images.isLast()){$("#lightbox-nav-btnNext").show()}$("#lightbox-nav").show();this.KeyboardNav_Enable();break;default:window.console.error("Don't know what to do: ",image,step);return this.showImage(image,1)}return true},preloadNeighbours:function(){if(this.images.isSingle()||this.images.isEmpty()){return true}var image=this.images.current();var index=this.images.index;if(!image){return image}var objNext;var prev=this.images.prev();if(prev){objNext=new Image();objNext.src=prev.src}this.images.setIndex(index);var next=this.images.next();if(next){objNext=new Image();objNext.src=next.src}this.images.setIndex(index)},KeyboardNav_Enable:function(){$(document).keydown(function(objEvent){$.Lightbox.KeyboardNav_Action(objEvent)})},KeyboardNav_Disable:function(){$(document).unbind("keydown")},KeyboardNav_Action:function(objEvent){objEvent=objEvent||window.event;var keycode=objEvent.keyCode;var escapeKey=objEvent.DOM_VK_ESCAPE||27;var key=String.fromCharCode(keycode).toLowerCase();if(key===this.keys.close||keycode===escapeKey){return $.Lightbox.finish()}if(key===this.keys.prev||keycode===37){return $.Lightbox.showImage("prev")}if(key===this.keys.next||keycode===39){return $.Lightbox.showImage("next")}return true},getPageScroll:function(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft}else{if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft}}}var arrayPageScroll={xScroll:xScroll,yScroll:yScroll};return arrayPageScroll},pause:function(ms){var date=new Date();var curDate=null;do{curDate=new Date()}while(curDate-date<ms)}});if(typeof $.Lightbox==="undefined"){$.Lightbox=new $.LightboxClass()}})(jQuery);
