(function(D){var C=D.fn.remove;D.fn.remove=function(){D("*",this).add(this).triggerHandler("remove");return C.apply(this,arguments);};function B(E){function G(H){var I=H.style;return(I.display!="none"&&I.visibility!="hidden");}var F=G(E);(F&&D.each(D.dir(E,"parentNode"),function(){return(F=G(this));}));return F;}D.extend(D.expr[":"],{data:function(F,G,E){return D.data(F,E[3]);},tabbable:function(F,G,E){var H=F.nodeName.toLowerCase();return(F.tabIndex>=0&&(("a"==H&&F.href)||(/input|select|textarea|button/.test(H)&&"hidden"!=F.type&&!F.disabled))&&B(F));}});D.keyCode={BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38};function A(H,I,J,G){function F(L){var K=D[H][I][L]||[];return(typeof K=="string"?K.split(/,?\s+/):K);}var E=F("getter");if(G.length==1&&typeof G[0]=="string"){E=E.concat(F("getterSetter"));}return(D.inArray(J,E)!=-1);}D.widget=function(F,E){var G=F.split(".")[0];F=F.split(".")[1];D.fn[F]=function(K){var I=(typeof K=="string"),J=Array.prototype.slice.call(arguments,1);if(I&&K.substring(0,1)=="_"){return this;}if(I&&A(G,F,K,J)){var H=D.data(this[0],F);return(H?H[K].apply(H,J):undefined);}return this.each(function(){var L=D.data(this,F);(!L&&!I&&D.data(this,F,new D[G][F](this,K)));(L&&I&&D.isFunction(L[K])&&L[K].apply(L,J));});};D[G][F]=function(J,I){var H=this;this.widgetName=F;this.widgetEventPrefix=D[G][F].eventPrefix||F;this.widgetBaseClass=G+"-"+F;this.options=D.extend({},D.widget.defaults,D[G][F].defaults,D.metadata&&D.metadata.get(J)[F],I);this.element=D(J).bind("setData."+F,function(M,K,L){return H._setData(K,L);}).bind("getData."+F,function(L,K){return H._getData(K);}).bind("remove",function(){return H.destroy();});this._init();};D[G][F].prototype=D.extend({},D.widget.prototype,E);D[G][F].getterSetter="option";};D.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName);},option:function(G,H){var F=G,E=this;if(typeof G=="string"){if(H===undefined){return this._getData(G);}F={};F[G]=H;}D.each(F,function(I,J){E._setData(I,J);});},_getData:function(E){return this.options[E];},_setData:function(E,F){this.options[E]=F;if(E=="disabled"){this.element[F?"addClass":"removeClass"](this.widgetBaseClass+"-disabled");}},enable:function(){this._setData("disabled",false);},disable:function(){this._setData("disabled",true);},_trigger:function(F,H,G){var E=(F==this.widgetEventPrefix?F:this.widgetEventPrefix+F);H=H||D.event.fix({type:E,target:this.element[0]});return this.element.triggerHandler(E,[H,G],this.options[F]);}};D.widget.defaults={disabled:false};D.ui={plugin:{add:function(F,G,I){var H=D.ui[F].prototype;for(var E in I){H.plugins[E]=H.plugins[E]||[];H.plugins[E].push([G,I[E]]);}},call:function(E,G,F){var I=E.plugins[G];if(!I){return ;}for(var H=0;H<I.length;H++){if(E.options[I[H][0]]){I[H][1].apply(E.element,F);}}}},cssCache:{},css:function(E){if(D.ui.cssCache[E]){return D.ui.cssCache[E];}var F=D('<div class="ui-gen">').addClass(E).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");D.ui.cssCache[E]=!!((!(/auto|default/).test(F.css("cursor"))||(/^[1-9]/).test(F.css("height"))||(/^[1-9]/).test(F.css("width"))||!(/none/).test(F.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(F.css("backgroundColor"))));try{D("body").get(0).removeChild(F.get(0));}catch(G){}return D.ui.cssCache[E];},disableSelection:function(E){return D(E).attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false;});},enableSelection:function(E){return D(E).attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui");},hasScroll:function(H,F){if(D(H).css("overflow")=="hidden"){return false;}var E=(F&&F=="left")?"scrollLeft":"scrollTop",G=false;if(H[E]>0){return true;}H[E]=1;G=(H[E]>0);H[E]=0;return G;}};D.ui.mouse={_mouseInit:function(){var E=this;this.element.bind("mousedown."+this.widgetName,function(F){return E._mouseDown(F);});if(D.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on");}this.started=false;},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(D.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable));},_mouseDown:function(G){(this._mouseStarted&&this._mouseUp(G));this._mouseDownEvent=G;var F=this,H=(G.which==1),E=(typeof this.options.cancel=="string"?D(G.target).parents().add(G.target).filter(this.options.cancel).length:false);if(!H||E||!this._mouseCapture(G)){return true;}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){F.mouseDelayMet=true;},this.options.delay);}if(this._mouseDistanceMet(G)&&this._mouseDelayMet(G)){this._mouseStarted=(this._mouseStart(G)!==false);if(!this._mouseStarted){G.preventDefault();return true;}}this._mouseMoveDelegate=function(I){return F._mouseMove(I);};this._mouseUpDelegate=function(I){return F._mouseUp(I);};D(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false;},_mouseMove:function(E){if(D.browser.msie&&!E.button){return this._mouseUp(E);}if(this._mouseStarted){this._mouseDrag(E);return false;}if(this._mouseDistanceMet(E)&&this._mouseDelayMet(E)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,E)!==false);(this._mouseStarted?this._mouseDrag(E):this._mouseUp(E));}return !this._mouseStarted;},_mouseUp:function(E){D(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._mouseStop(E);}return false;},_mouseDistanceMet:function(E){return(Math.max(Math.abs(this._mouseDownEvent.pageX-E.pageX),Math.abs(this._mouseDownEvent.pageY-E.pageY))>=this.options.distance);},_mouseDelayMet:function(E){return this.mouseDelayMet;},_mouseStart:function(E){},_mouseDrag:function(E){},_mouseStop:function(E){},_mouseCapture:function(E){return true;}};D.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{getHandle:function(C){var B=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==C.target){B=true;}});return B;},createHelper:function(){var C=this.options;var B=A.isFunction(C.helper)?A(C.helper.apply(this.element[0],[e])):(C.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((C.appendTo=="parent"?this.element[0].parentNode:C.appendTo));}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute");}return B;},_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative";}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit();},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false;}this.handle=this.getHandle(B);if(!this.handle){return false;}return true;},_mouseStart:function(D){var E=this.options;this.helper=this.createHelper();if(A.ui.ddmanager){A.ui.ddmanager.current=this;}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:D.pageX-this.offset.left,top:D.pageY-this.offset.top};this.cacheScrollParents();this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){B={top:0,left:0};}this.offset.parent={top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};if(this.cssPosition=="relative"){var C=this.element.position();this.offset.relative={top:C.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollTopParent.scrollTop(),left:C.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollLeftParent.scrollLeft()};}else{this.offset.relative={top:0,left:0};}this.originalPosition=this._generatePosition(D);this.cacheHelperProportions();if(E.cursorAt){this.adjustOffsetFromHelper(E.cursorAt);}A.extend(this,{PAGEY_INCLUDES_SCROLL:(this.cssPosition=="absolute"&&(!this.scrollTopParent[0].tagName||(/(html|body)/i).test(this.scrollTopParent[0].tagName))),PAGEX_INCLUDES_SCROLL:(this.cssPosition=="absolute"&&(!this.scrollLeftParent[0].tagName||(/(html|body)/i).test(this.scrollLeftParent[0].tagName))),OFFSET_PARENT_NOT_SCROLL_PARENT_Y:this.scrollTopParent[0]!=this.offsetParent[0]&&!(this.scrollTopParent[0]==document&&(/(body|html)/i).test(this.offsetParent[0].tagName)),OFFSET_PARENT_NOT_SCROLL_PARENT_X:this.scrollLeftParent[0]!=this.offsetParent[0]&&!(this.scrollLeftParent[0]==document&&(/(body|html)/i).test(this.offsetParent[0].tagName))});if(E.containment){this.setContainment();}this._propagate("start",D);this.cacheHelperProportions();if(A.ui.ddmanager&&!E.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D);}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(D);return true;},cacheScrollParents:function(){this.scrollTopParent=function(B){do{if(/auto|scroll/.test(B.css("overflow"))||(/auto|scroll/).test(B.css("overflow-y"))){return B;}B=B.parent();}while(B[0].parentNode);return A(document);}(this.helper);this.scrollLeftParent=function(B){do{if(/auto|scroll/.test(B.css("overflow"))||(/auto|scroll/).test(B.css("overflow-x"))){return B;}B=B.parent();}while(B[0].parentNode);return A(document);}(this.helper);},adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left;}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left;}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top;}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top;}},cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode;}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}},_convertPositionTo:function(C,D){if(!D){D=this.position;}var B=C=="absolute"?1:-1;return{top:(D.top+this.offset.relative.top*B+this.offset.parent.top*B-(this.cssPosition=="fixed"||this.PAGEY_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y?0:this.scrollTopParent.scrollTop())*B+(this.cssPosition=="fixed"?A(document).scrollTop():0)*B+this.margins.top*B),left:(D.left+this.offset.relative.left*B+this.offset.parent.left*B-(this.cssPosition=="fixed"||this.PAGEX_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_X?0:this.scrollLeftParent.scrollLeft())*B+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*B+this.margins.left*B)};},_generatePosition:function(E){var F=this.options;var B={top:(E.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||this.PAGEY_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y?0:this.scrollTopParent.scrollTop())-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(E.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||this.PAGEX_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_X?0:this.scrollLeftParent.scrollLeft())-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};if(!this.originalPosition){return B;}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0];}if(B.top<this.containment[1]){B.top=this.containment[1];}if(B.left>this.containment[2]){B.left=this.containment[2];}if(B.top>this.containment[3]){B.top=this.containment[3];}}if(F.grid){var D=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/F.grid[1])*F.grid[1];B.top=this.containment?(!(D<this.containment[1]||D>this.containment[3])?D:(!(D<this.containment[1])?D-F.grid[1]:D+F.grid[1])):D;var C=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/F.grid[0])*F.grid[0];B.left=this.containment?(!(C<this.containment[0]||C>this.containment[2])?C:(!(C<this.containment[0])?C-F.grid[0]:C+F.grid[0])):C;}return B;},_mouseDrag:function(B){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");this.position=this._propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px";}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px";}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B);}return false;},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C);}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10)||500,function(){B._propagate("stop",C);B._clear();});}else{this._propagate("stop",C);this._clear();}return false;},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove();}this.helper=null;this.cancelHelperRemoval=false;},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options};},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.uiHash()]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute");}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.uiHash()],this.options[C]);},destroy:function(){if(!this.element.data("draggable")){return ;}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original",scope:"default",cssNamespace:"ui"}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor");}B.css("cursor",C.options.cursor);},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor);}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex");}B.css("zIndex",C.options.zIndex);},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex);}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity");}B.css("opacity",C.options.opacity);},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity);}}});A.ui.plugin.add("draggable","iframeFix",{start:function(C,B){A(B.options.iframeFix===true?"iframe":B.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body");});},stop:function(C,B){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var E=C.options;var B=A(this).data("draggable");E.scrollSensitivity=E.scrollSensitivity||20;E.scrollSpeed=E.scrollSpeed||20;B.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F;}F=F.parent();}while(F[0].parentNode);return A(document);}(this);B.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F;}F=F.parent();}while(F[0].parentNode);return A(document);}(this);if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){B.overflowYOffset=B.overflowY.offset();}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){B.overflowXOffset=B.overflowX.offset();}},drag:function(E,D){var F=D.options,B=false;var C=A(this).data("draggable");if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){if((C.overflowYOffset.top+C.overflowY[0].offsetHeight)-E.pageY<F.scrollSensitivity){C.overflowY[0].scrollTop=B=C.overflowY[0].scrollTop+F.scrollSpeed;}if(E.pageY-C.overflowYOffset.top<F.scrollSensitivity){C.overflowY[0].scrollTop=B=C.overflowY[0].scrollTop-F.scrollSpeed;}}else{if(E.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed);}if(A(window).height()-(E.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed);}}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){if((C.overflowXOffset.left+C.overflowX[0].offsetWidth)-E.pageX<F.scrollSensitivity){C.overflowX[0].scrollLeft=B=C.overflowX[0].scrollLeft+F.scrollSpeed;}if(E.pageX-C.overflowXOffset.left<F.scrollSensitivity){C.overflowX[0].scrollLeft=B=C.overflowX[0].scrollLeft-F.scrollSpeed;}}else{if(E.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed);}if(A(window).width()-(E.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed);}}if(B!==false){A.ui.ddmanager.prepareOffsets(C,E);}}});A.ui.plugin.add("draggable","snap",{start:function(D,C){var B=A(this).data("draggable");B.snapElements=[];A(C.options.snap.constructor!=String?(C.options.snap.items||":data(draggable)"):C.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left});}});},drag:function(P,K){var E=A(this).data("draggable");var Q=K.options.snapTolerance||20;var O=K.absolutePosition.left,N=O+E.helperProportions.width,D=K.absolutePosition.top,C=D+E.helperProportions.height;for(var M=E.snapElements.length-1;M>=0;M--){var L=E.snapElements[M].left,J=L+E.snapElements[M].width,I=E.snapElements[M].top,S=I+E.snapElements[M].height;if(!((L-Q<O&&O<J+Q&&I-Q<D&&D<S+Q)||(L-Q<O&&O<J+Q&&I-Q<C&&C<S+Q)||(L-Q<N&&N<J+Q&&I-Q<D&&D<S+Q)||(L-Q<N&&N<J+Q&&I-Q<C&&C<S+Q))){if(E.snapElements[M].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,null,A.extend(E.uiHash(),{snapItem:E.snapElements[M].item})));}E.snapElements[M].snapping=false;continue;}if(K.options.snapMode!="inner"){var B=Math.abs(I-C)<=Q;var R=Math.abs(S-D)<=Q;var G=Math.abs(L-N)<=Q;var H=Math.abs(J-O)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,left:0}).top;}if(R){K.position.top=E._convertPositionTo("relative",{top:S,left:0}).top;}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L-E.helperProportions.width}).left;}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left;}}var F=(B||R||G||H);if(K.options.snapMode!="outer"){var B=Math.abs(I-D)<=Q;var R=Math.abs(S-C)<=Q;var G=Math.abs(L-O)<=Q;var H=Math.abs(J-N)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top;}if(R){K.position.top=E._convertPositionTo("relative",{top:S-E.helperProportions.height,left:0}).top;}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L}).left;}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left;}}if(!E.snapElements[M].snapping&&(B||R||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,null,A.extend(E.uiHash(),{snapItem:E.snapElements[M].item})));}E.snapElements[M].snapping=(B||R||G||H||F);}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(D,C){var B=A(this).data("draggable");B.sortables=[];A(C.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");B.sortables.push({instance:E,shouldRevert:E.options.revert});E._refreshItems();E._propagate("activate",D,B);}});},stop:function(D,C){var B=A(this).data("draggable");A.each(B.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;B.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true;}this.instance._mouseStop(D);this.instance.element.triggerHandler("sortreceive",[D,A.extend(this.instance.ui(),{sender:B.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper;}else{this.instance._propagate("deactivate",D,B);}});},drag:function(F,E){var D=A(this).data("draggable"),B=this;var C=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G);};A.each(D.sortables,function(G){if(C.call(D,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return E.helper[0];};F.target=this.instance.currentItem[0];this.instance._mouseCapture(F,true);this.instance._mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D._propagate("toSortable",F);}if(this.instance.currentItem){this.instance._mouseDrag(F);}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove();}D._propagate("fromSortable",F);}}});}});A.ui.plugin.add("draggable","stack",{start:function(D,B){var C=A.makeArray(A(B.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||B.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||B.options.stack.min);});A(C).each(function(E){this.style.zIndex=B.options.stack.min+E;});this[0].style.zIndex=B.options.stack.min+C.length;}});})(jQuery);(function(A){A.widget("ui.resizable",A.extend({},A.ui.mouse,{_init:function(){var M=this,N=this.options;var Q=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(Q)?"relative":Q});A.extend(N,{_aspectRatio:!!(N.aspectRatio),helper:N.helper||N.ghost||N.animate?N.helper||"proxy":null,knobHandles:N.knobHandles===true?"ui-resizable-knob-handle":N.knobHandles});var H="1px solid #DEDEDE";N.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:H},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:H},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:H},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:H},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:H,borderBottom:H},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:H,borderLeft:H},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:H,borderTop:H},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:H,borderTop:H}};N.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};N._nodeName=this.element[0].nodeName;if(N._nodeName.match(/canvas|textarea|input|select|button|img/i)){var B=this.element;if(/relative/.test(B.css("position"))&&A.browser.opera){B.css({position:"relative",top:"auto",left:"auto"});}B.wrap(A('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:B.css("position"),width:B.outerWidth(),height:B.outerHeight(),top:B.css("top"),left:B.css("left")}));var J=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:J.css("marginLeft"),marginTop:J.css("marginTop"),marginRight:J.css("marginRight"),marginBottom:J.css("marginBottom")});J.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(A.browser.safari&&N.preventDefault){J.css("resize","none");}N.proportionallyResize=J.css({position:"static",zoom:1,display:"block"});this.element.css({margin:J.css("margin")});this._proportionallyResize();}if(!N.handles){N.handles=!A(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"};}if(N.handles.constructor==String){N.zIndex=N.zIndex||1000;if(N.handles=="all"){N.handles="n,e,s,w,se,sw,ne,nw";}var O=N.handles.split(",");N.handles={};var G={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var R=0;R<O.length;R++){var S=A.trim(O[R]),L=N.defaultTheme,F="ui-resizable-"+S,C=!A.ui.css(F)&&!N.knobHandles,P=A.ui.css("ui-resizable-knob-handle"),T=A.extend(L[F],L["ui-resizable-handle"]),D=A.extend(N.knobTheme[F],!P?N.knobTheme["ui-resizable-handle"]:{});var K=/sw|se|ne|nw/.test(S)?{zIndex:++N.zIndex}:{};var I=(C?G[S]:""),E=A(['<div class="ui-resizable-handle ',F,'" style="',I,G.handle,'"></div>'].join("")).css(K);N.handles[S]=".ui-resizable-"+S;this.element.append(E.css(C?T:{}).css(N.knobHandles?D:{}).addClass(N.knobHandles?"ui-resizable-knob-handle":"").addClass(N.knobHandles));}if(N.knobHandles){this.element.addClass("ui-resizable-knob").css(!A.ui.css("ui-resizable-knob")?{}:{});}}this._renderAxis=function(Y){Y=Y||this.element;for(var V in N.handles){if(N.handles[V].constructor==String){N.handles[V]=A(N.handles[V],this.element).show();}if(N.transparent){N.handles[V].css({opacity:0});}if(this.element.is(".ui-wrapper")&&N._nodeName.match(/textarea|input|select|button/i)){var W=A(N.handles[V],this.element),X=0;X=/sw|ne|nw|se|n|s/.test(V)?W.outerHeight():W.outerWidth();var U=["padding",/ne|nw|n/.test(V)?"Top":/se|sw|s/.test(V)?"Bottom":/^e$/.test(V)?"Right":"Left"].join("");if(!N.transparent){Y.css(U,X);}this._proportionallyResize();}if(!A(N.handles[V]).length){continue;}}};this._renderAxis(this.element);N._handles=A(".ui-resizable-handle",M.element);if(N.disableSelection){N._handles.each(function(U,V){A.ui.disableSelection(V);});}N._handles.mouseover(function(){if(!N.resizing){if(this.className){var U=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);}M.axis=N.axis=U&&U[1]?U[1]:"se";}});if(N.autoHide){N._handles.hide();A(M.element).addClass("ui-resizable-autohide").hover(function(){A(this).removeClass("ui-resizable-autohide");N._handles.show();},function(){if(!N.resizing){A(this).addClass("ui-resizable-autohide");N._handles.hide();}});}this._mouseInit();},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition};},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);if(C!="resize"){this.element.triggerHandler(["resize",C].join(""),[B,this.ui()],this.options[C]);}},destroy:function(){var D=this.element,C=D.children(".ui-resizable").get(0);this._mouseDestroy();var B=function(E){A(E).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove();};B(D);if(D.is(".ui-wrapper")&&C){D.parent().append(A(C).css({position:D.css("position"),width:D.outerWidth(),height:D.outerHeight(),top:D.css("top"),left:D.css("left")})).end().remove();B(C);}},_mouseCapture:function(D){if(this.options.disabled){return false;}var C=false;for(var B in this.options.handles){if(A(this.options.handles[B])[0]==D.target){C=true;}}if(!C){return false;}return true;},_mouseStart:function(I){var C=this.options,B=this.element.position(),D=this.element,H=function(M){return parseInt(M,10)||0;},G=A.browser.msie&&A.browser.version<7;C.resizing=true;C.documentScroll={top:A(document).scrollTop(),left:A(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){var J=A.browser.msie&&!C.containment&&(/absolute/).test(D.css("position"))&&!(/relative/).test(D.parent().css("position"));var K=J?C.documentScroll.top:0,F=J?C.documentScroll.left:0;D.css({position:"absolute",top:(B.top+K),left:(B.left+F)});}if(A.browser.opera&&/relative/.test(D.css("position"))){D.css({position:"relative",top:"auto",left:"auto"});}this._renderProxy();var L=H(this.helper.css("left")),E=H(this.helper.css("top"));if(C.containment){L+=A(C.containment).scrollLeft()||0;E+=A(C.containment).scrollTop()||0;}this.offset=this.helper.offset();this.position={left:L,top:E};this.size=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:L,top:E};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:I.pageX,top:I.pageY};C.aspectRatio=(typeof C.aspectRatio=="number")?C.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(C.preserveCursor){A("body").css("cursor",this.axis+"-resize");}this._propagate("start",I);return true;},_mouseDrag:function(I){var D=this.helper,C=this.options,J={},M=this,F=this.originalMousePosition,K=this.axis;var N=(I.pageX-F.left)||0,L=(I.pageY-F.top)||0;var E=this._change[K];if(!E){return false;}var H=E.apply(this,[I,N,L]),G=A.browser.msie&&A.browser.version<7,B=this.sizeDiff;if(C._aspectRatio||I.shiftKey){H=this._updateRatio(H,I);}H=this._respectSize(H,I);this._propagate("resize",I);D.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!C.helper&&C.proportionallyResize){this._proportionallyResize();}this._updateCache(H);this.element.triggerHandler("resize",[I,this.ui()],this.options.resize);return false;},_mouseStop:function(I){this.options.resizing=false;var E=this.options,H=function(M){return parseInt(M,10)||0;},K=this;if(E.helper){var D=E.proportionallyResize,B=D&&(/textarea/i).test(D.get(0).nodeName),C=B&&A.ui.hasScroll(D.get(0),"left")?0:K.sizeDiff.height,G=B?0:K.sizeDiff.width;var L={width:(K.size.width-G),height:(K.size.height-C)},F=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!E.animate){this.element.css(A.extend(L,{top:J,left:F}));}if(E.helper&&!E.animate){this._proportionallyResize();}}if(E.preserveCursor){A("body").css("cursor","auto");}this._propagate("stop",I);if(E.helper){this.helper.remove();}return false;},_updateCache:function(B){var C=this.options;this.offset=this.helper.offset();if(B.left){this.position.left=B.left;}if(B.top){this.position.top=B.top;}if(B.height){this.size.height=B.height;}if(B.width){this.size.width=B.width;}},_updateRatio:function(D,E){var F=this.options,G=this.position,C=this.size,B=this.axis;if(D.height){D.width=(C.height*F.aspectRatio);}else{if(D.width){D.height=(C.width/F.aspectRatio);}}if(B=="sw"){D.left=G.left+(C.width-D.width);D.top=null;}if(B=="nw"){D.top=G.top+(C.height-D.height);D.left=G.left+(C.width-D.width);}return D;},_respectSize:function(H,I){var F=this.helper,E=this.options,N=E._aspectRatio||I.shiftKey,M=this.axis,P=H.width&&E.maxWidth&&E.maxWidth<H.width,J=H.height&&E.maxHeight&&E.maxHeight<H.height,D=H.width&&E.minWidth&&E.minWidth>H.width,O=H.height&&E.minHeight&&E.minHeight>H.height;if(D){H.width=E.minWidth;}if(O){H.height=E.minHeight;}if(P){H.width=E.maxWidth;}if(J){H.height=E.maxHeight;}var C=this.originalPosition.left+this.originalSize.width,L=this.position.top+this.size.height;var G=/sw|nw|w/.test(M),B=/nw|ne|n/.test(M);if(D&&G){H.left=C-E.minWidth;}if(P&&G){H.left=C-E.maxWidth;}if(O&&B){H.top=L-E.minHeight;}if(J&&B){H.top=L-E.maxHeight;}var K=!H.width&&!H.height;if(K&&!H.left&&H.top){H.top=null;}else{if(K&&!H.top&&H.left){H.left=null;}}return H;},_proportionallyResize:function(){var F=this.options;if(!F.proportionallyResize){return ;}var D=F.proportionallyResize,C=this.helper||this.element;if(!F.borderDif){var B=[D.css("borderTopWidth"),D.css("borderRightWidth"),D.css("borderBottomWidth"),D.css("borderLeftWidth")],E=[D.css("paddingTop"),D.css("paddingRight"),D.css("paddingBottom"),D.css("paddingLeft")];F.borderDif=A.map(B,function(G,I){var H=parseInt(G,10)||0,J=parseInt(E[I],10)||0;return H+J;});}D.css({height:(C.height()-F.borderDif[0]-F.borderDif[2])+"px",width:(C.width()-F.borderDif[1]-F.borderDif[3])+"px"});},_renderProxy:function(){var C=this.element,F=this.options;this.elementOffset=C.offset();if(F.helper){this.helper=this.helper||A('<div style="overflow:hidden;"></div>');var B=A.browser.msie&&A.browser.version<7,D=(B?1:0),E=(B?2:-1);this.helper.addClass(F.helper).css({width:C.outerWidth()+E,height:C.outerHeight()+E,position:"absolute",left:this.elementOffset.left-D+"px",top:this.elementOffset.top-D+"px",zIndex:++F.zIndex});this.helper.appendTo("body");if(F.disableSelection){A.ui.disableSelection(this.helper.get(0));}}else{this.helper=C;}},_change:{e:function(D,C,B){return{width:this.originalSize.width+C};},w:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{left:E.left+C,width:D.width-C};},n:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{top:E.top+B,height:D.height-B};},s:function(D,C,B){return{height:this.originalSize.height+B};},se:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,C,B]));},sw:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,C,B]));},ne:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,C,B]));},nw:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,C,B]));}}}));A.extend(A.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});A.ui.plugin.add("resizable","containment",{start:function(I,K){var E=K.options,M=A(this).data("resizable"),G=M.element;var C=E.containment,F=(C instanceof A)?C.get(0):(/parent/.test(C))?G.parent().get(0):C;if(!F){return ;}M.containerElement=A(F);if(/document/.test(C)||C==document){M.containerOffset={left:0,top:0};M.containerPosition={left:0,top:0};M.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight};}else{M.containerOffset=A(F).offset();M.containerPosition=A(F).position();M.containerSize={height:A(F).innerHeight(),width:A(F).innerWidth()};var J=M.containerOffset,B=M.containerSize.height,H=M.containerSize.width,D=(A.ui.hasScroll(F,"left")?F.scrollWidth:H),L=(A.ui.hasScroll(F)?F.scrollHeight:B);M.parentData={element:F,left:J.left,top:J.top,width:D,height:L};}},resize:function(H,K){var E=K.options,N=A(this).data("resizable"),C=N.containerSize,J=N.containerOffset,G=N.size,I=N.position,L=E._aspectRatio||H.shiftKey,B={top:0,left:0},D=N.containerElement;if(D[0]!=document&&/static/.test(D.css("position"))){B=N.containerPosition;}if(I.left<(E.helper?J.left:B.left)){N.size.width=N.size.width+(E.helper?(N.position.left-J.left):(N.position.left-B.left));if(L){N.size.height=N.size.width/E.aspectRatio;}N.position.left=E.helper?J.left:B.left;}if(I.top<(E.helper?J.top:0)){N.size.height=N.size.height+(E.helper?(N.position.top-J.top):N.position.top);if(L){N.size.width=N.size.height*E.aspectRatio;}N.position.top=E.helper?J.top:0;}var F=(E.helper?N.offset.left-J.left:(N.position.left-B.left))+N.sizeDiff.width,M=(E.helper?N.offset.top-J.top:N.position.top)+N.sizeDiff.height;if(F+N.size.width>=N.parentData.width){N.size.width=N.parentData.width-F;if(L){N.size.height=N.size.width/E.aspectRatio;}}if(M+N.size.height>=N.parentData.height){N.size.height=N.parentData.height-M;if(L){N.size.width=N.size.height*E.aspectRatio;}}},stop:function(G,J){var C=J.options,L=A(this).data("resizable"),H=L.position,I=L.containerOffset,B=L.containerPosition,D=L.containerElement;var E=A(L.helper),M=E.offset(),K=E.innerWidth(),F=E.innerHeight();if(C.helper&&!C.animate&&/relative/.test(D.css("position"))){A(this).css({left:(M.left-I.left),top:(M.top-I.top),width:K,height:F});}if(C.helper&&!C.animate&&/static/.test(D.css("position"))){A(this).css({left:B.left+(M.left-I.left),top:B.top+(M.top-I.top),width:K,height:F});}}});A.ui.plugin.add("resizable","grid",{resize:function(H,J){var D=J.options,L=A(this).data("resizable"),G=L.size,E=L.originalSize,F=L.originalPosition,K=L.axis,I=D._aspectRatio||H.shiftKey;D.grid=typeof D.grid=="number"?[D.grid,D.grid]:D.grid;var C=Math.round((G.width-E.width)/(D.grid[0]||1))*(D.grid[0]||1),B=Math.round((G.height-E.height)/(D.grid[1]||1))*(D.grid[1]||1);if(/^(se|s|e)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;}else{if(/^(ne)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;}else{if(/^(sw)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.left=F.left-C;}else{L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;L.position.left=F.left-C;}}}}});A.ui.plugin.add("resizable","animate",{stop:function(I,K){var F=K.options,L=A(this).data("resizable");var E=F.proportionallyResize,B=E&&(/textarea/i).test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,J=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;L.element.animate(A.extend(D,J&&G?{top:J,left:G}:{}),{duration:F.animateDuration||"slow",easing:F.animateEasing||"swing",step:function(){var M={width:parseInt(L.element.css("width"),10),height:parseInt(L.element.css("height"),10),top:parseInt(L.element.css("top"),10),left:parseInt(L.element.css("left"),10)};if(E){E.css({width:M.width,height:M.height});}L._updateCache(M);L._propagate("animate",I);}});}});A.ui.plugin.add("resizable","ghost",{start:function(E,D){var F=D.options,B=A(this).data("resizable"),G=F.proportionallyResize,C=B.size;if(!G){B.ghost=B.element.clone();}else{B.ghost=G.clone();}B.ghost.css({opacity:0.25,display:"block",position:"relative",height:C.height,width:C.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof F.ghost=="string"?F.ghost:"");B.ghost.appendTo(B.helper);},resize:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost){B.ghost.css({position:"relative",height:B.size.height,width:B.size.width});}},stop:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost&&B.helper){B.helper.get(0).removeChild(B.ghost.get(0));}}});A.ui.plugin.add("resizable","alsoResize",{start:function(E,C){var F=C.options,B=A(this).data("resizable"),D=function(G){A(G).each(function(){A(this).data("resizable-alsoresize",{width:parseInt(A(this).width(),10),height:parseInt(A(this).height(),10),left:parseInt(A(this).css("left"),10),top:parseInt(A(this).css("top"),10)});});};if(typeof (F.alsoResize)=="object"){if(F.alsoResize.length){F.alsoResize=F.alsoResize[0];D(F.alsoResize);}else{A.each(F.alsoResize,function(G,H){D(G);});}}else{D(F.alsoResize);}},resize:function(F,E){var G=E.options,C=A(this).data("resizable"),D=C.originalSize,I=C.originalPosition;var H={height:(C.size.height-D.height)||0,width:(C.size.width-D.width)||0,top:(C.position.top-I.top)||0,left:(C.position.left-I.left)||0},B=function(J,K){A(J).each(function(){var N=A(this).data("resizable-alsoresize"),M={},L=K&&K.length?K:["width","height","top","left"];A.each(L||["width","height","top","left"],function(O,Q){var P=(N[Q]||0)+(H[Q]||0);if(P&&P>=0){M[Q]=P||null;}});A(this).css(M);});};if(typeof (G.alsoResize)=="object"){A.each(G.alsoResize,function(J,K){B(J,K);});}else{B(G.alsoResize);}},stop:function(C,B){A(this).removeData("resizable-alsoresize-start");}});})(jQuery);(function(A){A.fn.unwrap=A.fn.unwrap||function(B){return this.each(function(){A(this).parents(B).eq(0).after(this).remove();});};A.widget("ui.slider",{plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this._getRange()};},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C]);},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){A(this).data("mouse")._mouseDestroy();});}this.generated&&this.generated.remove();},_setData:function(B,C){A.widget.prototype._setData.apply(this,arguments);if(/min|max|steps/.test(B)){this._initBoundaries();}if(B=="range"){C?this.handle.length==2&&this._createRange():this._removeRange();}},_init:function(){var B=this;this.element.addClass("ui-slider");this._initBoundaries();this.handle=A(this.options.handle,this.element);if(!this.handle.length){B.handle=B.generated=A(B.options.handles||[0]).map(function(){var D=A("<div/>").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id);}return D[0];});}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle);}B._focus(this,true);});this._mouseInit();};A.extend(C.prototype,A.ui.mouse,{_mouseStart:function(D){return B._start.call(B,D,this.element[0]);},_mouseStop:function(D){return B._stop.call(B,D,this.element[0]);},_mouseDrag:function(D){return B._drag.call(B,D,this.element[0]);},_mouseCapture:function(){return true;},trigger:function(D){this._mouseDown(D);}});A(this.handle).each(function(){new C(this);}).wrap('<a href="#" style="outline:none;border:none;"></a>').parent().bind("click",function(){return false;}).bind("focus",function(D){B._focus(this.firstChild);}).bind("blur",function(D){B._blur(this.firstChild);}).bind("keydown",function(D){if(!B.options.noKeyboard){return B._keydown(D.keyCode,this.firstChild);}});this.element.bind("mousedown.slider",function(D){B._click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1;});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true);});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true);}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this._createRange();}},_initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth<B.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(C.max,10))?{x:parseInt(C.max,10),y:parseInt(C.max,10)}:({x:C.max&&C.max.x||100,y:C.max&&C.max.y||100}),min:!isNaN(parseInt(C.min,10))?{x:parseInt(C.min,10),y:parseInt(C.min,10)}:({x:C.min&&C.min.x||0,y:C.min&&C.min.y||0})});C.realMax={x:C.max.x-C.min.x,y:C.max.y-C.min.y};C.stepping={x:C.stepping&&C.stepping.x||parseInt(C.stepping,10)||(C.steps?C.realMax.x/(C.steps.x||parseInt(C.steps,10)||C.realMax.x):0),y:C.stepping&&C.stepping.y||parseInt(C.stepping,10)||(C.steps?C.realMax.y/(C.steps.y||parseInt(C.steps,10)||C.realMax.y):0)};},_keydown:function(F,E){var C=F;if(/(33|34|35|36|37|38|39|40)/.test(C)){var G=this.options,B,I;if(/(35|36)/.test(C)){B=(C==35)?G.max.x:G.min.x;I=(C==35)?G.max.y:G.min.y;}else{var H=/(34|37|40)/.test(C)?"-=":"+=";var D=/(37|38|39|40)/.test(C)?"_oneStep":"_pageStep";B=H+this[D]("x");I=H+this[D]("y");}this.moveTo({x:B,y:I},E);return false;}return true;},_focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus();}},_blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null;}},_click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true;}});if(B||this.options.disabled||!(this.currentHandle||this.previousHandle)){return ;}if(!this.currentHandle&&this.previousHandle){this._focus(this.previousHandle,true);}this.offset=this.element.offset();this.moveTo({y:this._convertValue(C.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this._convertValue(C.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance);},_createRange:function(){if(this.rangeElement){return ;}this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this._updateRange();},_removeRange:function(){this.rangeElement.remove();this.rangeElement=null;},_updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(parseInt(A(this.handle[0]).css(C),10)||0)+this._handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(parseInt(A(this.handle[1]).css(C),10)||0)-(parseInt(A(this.handle[0]).css(C),10)||0));},_getRange:function(){return this.rangeElement?this._convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null;},_handleIndex:function(){return this.handle.index(this.currentHandle[0]);},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle;}if(!B){B=this.options.axis=="vertical"?"y":"x";}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return parseInt(C.data("mouse").sliderValue[B],10);}else{return parseInt(((parseInt(C.css(B=="x"?"left":"top"),10)/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(D,B)))*this.options.realMax[B])+this.options.min[B],10);}},_convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)))*this.options.realMax[B];},_translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B));},_translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this._translateValue(this.value(1),B)){D=this._translateValue(this.value(1,B)-this._oneStep(B),B);}if(this.currentHandle[0]==this.handle[1]&&D<=this._translateValue(this.value(0),B)){D=this._translateValue(this.value(0,B)+this._oneStep(B),B);}}if(this.options.handles){var C=this.options.handles[this._handleIndex()];if(D<this._translateValue(C.min,B)){D=this._translateValue(C.min,B);}else{if(D>this._translateValue(C.max,B)){D=this._translateValue(C.max,B);}}}return D;},_translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B);}if(C<=0){C=0;}return C;},_handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")];},_oneStep:function(B){return this.options.stepping[B]||1;},_pageStep:function(B){return 10;},_start:function(C,B){var D=this.options;if(D.disabled){return false;}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this._focus(this.previousHandle,true);}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:C.pageY-this.handleOffset.top,left:C.pageX-this.handleOffset.left};this.firstValue=this.value();this._propagate("start",C);this._drag(C,B);return true;},_stop:function(B){this._propagate("stop",B);if(this.firstValue!=this.value()){this._propagate("change",B);}this._focus(this.currentHandle,true);return false;},_drag:function(E,D){var F=this.options;var B={top:E.pageY-this.offset.top-this.clickOffset.top,left:E.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this._focus(this.previousHandle,true);}B.left=this._translateLimits(B.left,"x");B.top=this._translateLimits(B.top,"y");if(F.stepping.x){var C=this._convertValue(B.left,"x");C=Math.round(C/F.stepping.x)*F.stepping.x;B.left=this._translateValue(C,"x");}if(F.stepping.y){var C=this._convertValue(B.top,"y");C=Math.round(C/F.stepping.y)*F.stepping.y;B.top=this._translateValue(C,"y");}B.left=this._translateRange(B.left,"x");B.top=this._translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left});}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top});}this.currentHandle.data("mouse").sliderValue={x:Math.round(this._convertValue(B.left,"x"))||0,y:Math.round(this._convertValue(B.top,"y"))||0};if(this.rangeElement){this._updateRange();}this._propagate("slide",E);return false;},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false;}if(E==undefined&&!this.currentHandle){E=0;}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E);}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y;}else{var B=F,I=F;}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+parseInt(B.replace(D?"=":"+=",""),10);}else{B=isNaN(parseInt(B,10))?undefined:parseInt(B,10);}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+parseInt(I.replace(D?"=":"+=",""),10);}else{I=isNaN(parseInt(I,10))?undefined:parseInt(I,10);}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=Math.round(B/H.stepping.x)*H.stepping.x;}B=this._translateValue(B,"x");B=this._translateLimits(B,"x");B=this._translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"))-B))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({left:B});}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=Math.round(I/H.stepping.y)*H.stepping.y;}I=this._translateValue(I,"y");I=this._translateLimits(I,"y");I=this._translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"))-I))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({top:I});}if(this.rangeElement){this._updateRange();}this.currentHandle.data("mouse").sliderValue={x:Math.round(this._convertValue(B,"x"))||0,y:Math.round(this._convertValue(I,"y"))||0};if(!G){this._propagate("start",null);this._propagate("stop",null);this._propagate("change",null);this._propagate("slide",null);}}});A.ui.slider.getter="value";A.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false};})(jQuery);(function(A){A.widget("ui.progressbar",{_init:function(){this._interval=this.options.interval;var B=this,C=this.options,E=(new Date()).getTime()+Math.random(),D=C.text||"";this.element.addClass("ui-progressbar").width(C.width);A.extend(this,{active:false,pixelState:0,percentState:0,identifier:E,bar:A('<div class="ui-progressbar-bar ui-hidden"></div>').css({width:"0px",overflow:"hidden",zIndex:100}),textElement:A('<div class="ui-progressbar-text"></div>').html(D).css({width:"0px",overflow:"hidden"}),textBg:A('<div class="ui-progressbar-text ui-progressbar-text-back"></div>').html(D).css({width:this.element.width()}),wrapper:A('<div class="ui-progressbar-wrap"></div>')});this.wrapper.append(this.bar.append(this.textElement.addClass(C.textClass)),this.textBg).appendTo(this.element);},plugins:{},ui:function(B){return{instance:this,identifier:this.identifier,options:this.options,element:this.bar,textElement:this.textElement,pixelState:this.pixelState,percentState:this.percentState};},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="progressbar"?C:["progressbar",C].join(""),[B,this.ui()],this.options[C]);},destroy:function(){this.stop();this.element.removeClass("ui-progressbar ui-progressbar-disabled").removeData("progressbar").unbind(".progressbar").find(".ui-progressbar-wrap").remove();delete jQuery.easing[this.identifier];},enable:function(){this.element.removeClass("ui-progressbar-disabled");this.disabled=false;},disable:function(){this.element.addClass("ui-progressbar-disabled");this.disabled=true;},start:function(){var B=this,C=this.options;if(this.disabled){return ;}jQuery.easing[this.identifier]=function(K,L,J,I,H){var G=C.increment,E=C.width,F=((G>E?E:G)/E),D=Math.round(K/F)*F;return D>1?1:D;};B.active=true;setTimeout(function(){B.active=false;},C.duration);this._animate();this._propagate("start",this.ui());return false;},_animate:function(){var C=this,D=this.options,B=D.interval;this.bar.animate({width:D.width},{duration:B,easing:this.identifier,step:function(G,E){C.progress((G/D.width)*100);var H=new Date().getTime(),F=(H-E.startTime);D.interval=B-F;},complete:function(){delete jQuery.easing[C.identifier];C.pause();if(C.active){}}});},pause:function(){if(this.disabled){return ;}this.bar.stop();this._propagate("pause",this.ui());},stop:function(){this.bar.stop();this.bar.width(0);this.textElement.width(0);this.bar.addClass("ui-hidden");this.options.interval=this._interval;this._propagate("stop",this.ui());},text:function(B){this.textElement.html(B);this.textBg.html(B);},progress:function(B){if(this.bar.is(".ui-hidden")){this.bar.removeClass("ui-hidden");}this.percentState=B>100?100:B;this.pixelState=(this.percentState/100)*this.options.width;this.bar.width(this.pixelState);this.textElement.width(this.pixelState);if(this.options.range&&!this.options.text){this.textElement.html(Math.round(this.percentState)+"%");}this._propagate("progress",this.ui());}});A.ui.progressbar.defaults={width:300,duration:3000,interval:200,increment:1,range:true,text:"",addClass:"",textClass:""};})(jQuery);(function(I){function B(){this.regional=[];this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Min","Sec"],labelsSingle:["Year","Month","Week","Day","Hour","Min","Sec"],compactLabels:["y","m","w","d"],compactLabelsSingle:["y","m","w","d"],timeSeparator:":"};this._defaults={format:"dHMS",layout:"",compact:false,description:"",expiryUrl:null,alwaysExpire:false,onExpiry:null,onTick:null,serverTime:null};I.extend(this._defaults,this.regional[""]);}var L="countdown";var C=0;var J=1;var E=2;var A=3;var N=4;var K=5;var G=6;I.extend(B.prototype,{markerClassName:"hasCountdown",setDefaults:function(D){F(this._defaults,D||{});},_attachCountdown:function(M,D){M=I(M);if(M.is("."+this.markerClassName)){return ;}M.addClass(this.markerClassName);if(!M[0].id){M[0].id="cdn"+new Date().getTime();}var H={};H.options=I.extend({},D);H._periods=[0,0,0,0,0,0,0];this._adjustSettings(H);I.data(M[0],L,H);this._updateCountdown(M,H);},_updateCountdown:function(S,P){var R=I(S);P=P||I.data(R[0],L);if(!P){return ;}R.html(this._generateHTML(P));var H=this._get(P,"onTick");if(H){H.apply(R[0],[P._hold!="lap"?P._periods:this._calculatePeriods(P,P._show,new Date())]);}var M=P._hold!="pause"&&(P._since?P._now.getTime()<=P._since.getTime():P._now.getTime()>=P._until.getTime());if(M){if(P._timer||this._get(P,"alwaysExpire")){var O=this._get(P,"onExpiry");if(O){O.apply(R[0],[]);}var D=this._get(P,"expiryUrl");if(D){window.location=D;}}P._timer=null;}else{if(P._hold=="pause"){P._time=null;}else{var Q=this._get(P,"format");P._timer=setTimeout('$.countdown._updateCountdown("#'+R[0].id+'")',(Q.match("s|S")?1:(Q.match("m|M")?30:600))*980);}}I.data(R[0],L,P);},_changeCountdown:function(M,D){var H=I.data(M,L);if(H){F(H.options,D||{});this._adjustSettings(H);I.data(M,L,H);this._updateCountdown(M,H);}},_destroyCountdown:function(H){H=I(H);if(!H.is("."+this.markerClassName)){return ;}H.removeClass(this.markerClassName).empty();var D=I.data(H[0],L);if(D._timer){clearTimeout(D._timer);}I.removeData(H[0],L);},_pauseCountdown:function(D){this._hold(D,"pause");},_lapCountdown:function(D){this._hold(D,"lap");},_resumeCountdown:function(D){this._hold(D,null);},_hold:function(O,M){var H=I.data(O,L);if(H){if(H._hold=="pause"&&!M){H._periods=H._savePeriods;var D=(H._since?"-":"+");H[H._since?"_since":"_until"]=this._determineTime(D+H._periods[0]+"Y"+D+H._periods[1]+"O"+D+H._periods[2]+"W"+D+H._periods[3]+"D"+D+H._periods[4]+"H"+D+H._periods[5]+"M"+D+H._periods[6]+"S");}H._hold=M;H._savePeriods=(M=="pause"?H._periods:null);I.data(O,L,H);this._updateCountdown(O,H);}},_getTimesCountdown:function(H){var D=I.data(H,L);return(!D?null:(!D._hold?D._periods:this._calculatePeriods(D,D._show,new Date())));},_get:function(H,D){return(H.options[D]!=null?H.options[D]:I.countdown._defaults[D]);},_adjustSettings:function(M){var D=new Date();var H=this._get(M,"serverTime");M._offset=(H?H.getTime()-D.getTime():0);M._since=this._get(M,"since");if(M._since){M._since=this._determineTime(M._since,null);}M._until=this._determineTime(this._get(M,"until"),D);M._show=this._determineShow(M);},_determineTime:function(P,D){var O=function(S){var R=new Date();R.setTime(R.getTime()+S*1000);return R;};var M=function(R,S){return 32-new Date(R,S,32).getDate();};var H=function(V){var S=new Date();var Z=S.getFullYear();var X=S.getMonth();var a=S.getDate();var U=S.getHours();var T=S.getMinutes();var R=S.getSeconds();var Y=/([+-]?[0-9]+)\s*(s|S|m|M|h|H|d|D|w|W|o|O|y|Y)?/g;var W=Y.exec(V);while(W){switch(W[2]||"s"){case"s":case"S":R+=parseInt(W[1]);break;case"m":case"M":T+=parseInt(W[1]);break;case"h":case"H":U+=parseInt(W[1]);break;case"d":case"D":a+=parseInt(W[1]);break;case"w":case"W":a+=parseInt(W[1])*7;break;case"o":case"O":X+=parseInt(W[1]);a=Math.min(a,M(Z,X));break;case"y":case"Y":Z+=parseInt(W[1]);a=Math.min(a,M(Z,X));break;}W=Y.exec(V);}S=new Date(Z,X,a,U,T,R,0);return S;};var Q=(P==null?D:(typeof P=="string"?H(P):(typeof P=="number"?O(P):P)));if(Q){Q.setMilliseconds(0);}return Q;},_generateHTML:function(P){P._periods=periods=(P._hold?P._periods:this._calculatePeriods(P,P._show,new Date()));var V=false;var M=0;for(var T=0;T<P._show.length;T++){V|=(P._show[T]=="?"&&periods[T]>0);P._show[T]=(P._show[T]=="?"&&!V?null:P._show[T]);M+=(P._show[T]?1:0);}var U=this._get(P,"compact");var R=this._get(P,"layout");var Q=(U?this._get(P,"compactLabels"):this._get(P,"labels"));var D=(U?this._get(P,"compactLabelsSingle"):this._get(P,"labelsSingle"))||Q;var X=this._get(P,"timeSeparator");var W=this._get(P,"description")||"";var H=function(Y){return(Y<10?"0":"")+Y;};var S=function(Y){return(P._show[Y]?periods[Y]+(periods[Y]==1?D[Y]:Q[Y])+" ":"");};var O=function(Y){return(P._show[Y]?'<div class="countdown_section"><span class="countdown_amount">'+periods[Y]+'</span><span class="countdown_amount-desc">'+(periods[Y]==1?D[Y]:Q[Y])+"</span></div>":"");};W=false;return(R?this._buildLayout(P,R,Q,D):((U?'<div class="countdown_row countdown_amount'+(P._hold?" countdown_holding":"")+'">'+S(C)+S(J)+S(E)+S(A)+(P._show[N]?H(periods[N]):"")+(P._show[K]?(P._show[N]?X:"")+H(periods[K])+"Min":"")+(P._show[G]?(P._show[N]||P._show[K]?X:"")+H(periods[G])+"Sec":""):'<div class="countdown_row countdown_show'+M+(P._hold?" countdown_holding":"")+'">'+O(C)+O(J)+O(E)+O(A)+O(N)+O(K)+O(G))+"</div>"+(W?'<div class="countdown_row countdown_descr">'+W+"</div>":"")));},_buildLayout:function(Q,P,R,O){var M=P;var D=function(W,S){var U=new RegExp("%"+W+".*%"+W);var T=new RegExp("%"+W+".*");while(true){var V=U.exec(M);if(!V){break;}V[0]=V[0].substr(0,2)+V[0].substr(2).replace(T,"%"+W);M=M.replace(V[0],Q._show[S]?H(V[0],W,S):"");}};var H=function(U,T,S){return U.substr(2,U.length-4).replace(/%nn/g,(Q._periods[S]<10?"0":"")+Q._periods[S]).replace(/%n/g,Q._periods[S]).replace(/%l/g,Q._periods[S]==1?O[S]:R[S]);};D("Y",C);D("O",J);D("W",E);D("D",A);D("H",N);D("M",K);D("S",G);return M;},_determineShow:function(H){var M=this._get(H,"format");var D=[];D[C]=(M.match("y")?"?":(M.match("Y")?"!":null));D[J]=(M.match("o")?"?":(M.match("O")?"!":null));D[E]=(M.match("w")?"?":(M.match("W")?"!":null));D[A]=(M.match("d")?"?":(M.match("D")?"!":null));D[N]=(M.match("h")?"?":(M.match("H")?"!":null));D[K]=(M.match("m")?"?":(M.match("M")?"!":null));D[G]=(M.match("s")?"?":(M.match("S")?"!":null));return D;},_calculatePeriods:function(Q,H,O){Q._now=O;Q._now.setMilliseconds(0);var S=new Date(Q._now.getTime());if(Q._since&&O.getTime()<Q._since.getTime()){Q._now=O=S;}else{if(Q._since){O=Q._since;}else{S.setTime(Q._until.getTime());if(O.getTime()>Q._until.getTime()){Q._now=O=S;}}}S.setTime(S.getTime()-Q._offset);var P=[0,0,0,0,0,0,0];if(H[C]||H[J]){var D=Math.max(0,(S.getFullYear()-O.getFullYear())*12+S.getMonth()-O.getMonth()+(S.getDate()<O.getDate()?-1:0));P[C]=(H[C]?Math.floor(D/12):0);P[J]=(H[J]?D-P[C]*12:0);if(Q._since){S.setFullYear(S.getFullYear()-P[C]);S.setMonth(S.getMonth()-P[J]);}else{O=new Date(O.getTime());O.setFullYear(O.getFullYear()+P[C]);O.setMonth(O.getMonth()+P[J]);}}var R=Math.floor((S.getTime()-O.getTime())/1000);var M=function(U,T){P[U]=(H[U]?Math.floor(R/T):0);R-=P[U]*T;};M(E,604800);M(A,86400);M(N,3600);M(K,60);M(G,1);return P;}});function F(M,H){I.extend(M,H);for(var D in H){if(H[D]==null){M[D]=null;}}return M;}I.fn.countdown=function(H){var D=Array.prototype.slice.call(arguments,1);if(H=="getTimes"){return I.countdown["_"+H+"Countdown"].apply(I.countdown,[this[0]].concat(D));}return this.each(function(){if(typeof H=="string"){I.countdown["_"+H+"Countdown"].apply(I.countdown,[this].concat(D));}else{I.countdown._attachCountdown(this,H);}});};I.countdown=new B();})(jQuery);(function(E){E.fn.jqm=function(F){var A={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:O,ajaxText:"",target:O,modal:O,toTop:O,onShow:O,onHide:O,onLoad:O};return this.each(function(){if(this._jqm){return N[this._jqm].c=E.extend({},N[this._jqm].c,F);}P++;this._jqm=P;N[P]={c:E.extend(A,E.jqm.params,F),a:O,w:E(this).addClass("jqmID"+P),s:P};if(A.trigger){E(this).jqmAddTrigger(A.trigger);}});};E.fn.jqmAddClose=function(A){return M(this,A,"jqmHide");};E.fn.jqmAddTrigger=function(A){return M(this,A,"jqmShow");};E.fn.jqmShow=function(A){return this.each(function(){E.jqm.open(this._jqm,A);});};E.fn.jqmHide=function(A){return this.each(function(){E.jqm.close(this._jqm,A);});};E.jqm={hash:{},open:function(V,U){var L=N[V],Q=L.c,H="."+Q.closeClass,R=(parseInt(L.w.css("z-index"))),R=(R>0)?R:3000,F=E("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":R-1,opacity:Q.overlay/100});if(L.a){return O;}L.t=U;L.a=true;L.w.css("z-index",R);if(Q.modal){if(!B[0]){K("bind");}B.push(V);}else{if(Q.overlay>0){L.w.jqmAddClose(F);}else{F=O;}}L.o=(F)?F.addClass(Q.overlayClass).prependTo("body"):O;if(D){E("html,body").css({height:"100%",width:"100%"});if(F){F=F.css({position:"absolute"})[0];for(var S in {Top:1,Left:1}){F.style.setExpression(S.toLowerCase(),"(_=(document.documentElement.scroll"+S+" || document.body.scroll"+S+"))+'px'");}}}if(Q.ajax){var A=Q.target||L.w,T=Q.ajax,A=(typeof A=="string")?E(A,L.w):E(A),T=(T.substr(0,1)=="@")?E(U).attr(T.substring(1)):T;A.html(Q.ajaxText).load(T,function(){if(Q.onLoad){Q.onLoad.call(this,L);}if(H){L.w.jqmAddClose(E(H,L.w));}J(L);});}else{if(H){L.w.jqmAddClose(E(H,L.w));}}if(Q.toTop&&L.o){L.w.before('<span id="jqmP'+L.w[0]._jqm+'"></span>').insertAfter(L.o);}(Q.onShow)?Q.onShow(L):L.w.show();J(L);return O;},close:function(F){var A=N[F];if(!A.a){return O;}A.a=O;if(B[0]){B.pop();if(!B[0]){K("unbind");}}if(A.c.toTop&&A.o){E("#jqmP"+A.w[0]._jqm).after(A.w).remove();}if(A.c.onHide){A.c.onHide(A);}else{A.w.hide();if(A.o){A.o.remove();}}return O;},params:{}};var P=0,N=E.jqm.hash,B=[],D=E.browser.msie&&(E.browser.version=="6.0"),O=false,G=E('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),J=function(A){if(D){if(A.o){A.o.html('<p style="width:100%;height:100%"/>').prepend(G);}else{if(!E("iframe.jqm",A.w)[0]){A.w.prepend(G);}}}I(A);},I=function(F){try{E(":input:visible",F.w)[0].focus();}catch(A){}},K=function(A){E()[A]("keypress",C)[A]("keydown",C)[A]("mousedown",C);},C=function(H){var A=N[B[B.length-1]],F=(!E(H.target).parents(".jqmID"+A.s)[0]);if(F){I(A);}return !F;},M=function(A,F,H){return A.each(function(){var L=this._jqm;E(F).each(function(){if(!this[H]){this[H]=[];E(this).click(function(){for(var Q in {jqmShow:1,jqmHide:1}){for(var R in this[Q]){if(N[this[Q][R]]){N[this[Q][R]].w[Q](this);}}}return O;});}this[H].push(L);});});};})(jQuery);jQuery.fn.catfish=function(A){this.settings={closeLink:"none",animation:"slide",height:"50"};if(A){jQuery.extend(this.settings,A);}if(this.settings.animation!="slide"&&this.settings.animation!="none"&&this.settings.animation!="fade"){alert("animation can only be set to 'slide', 'none' or 'fade'");}var B=this.attr("id");settings=this.settings;jQuery(this).css("padding","0").css("height",this.settings.height+"px").css("margin","0").css("width","100%");jQuery("html").css("padding","0 0 "+(this.settings.height*1+50)+"px 0");if(typeof document.body.style.maxHeight!="undefined"){jQuery(this).css("position","fixed").css("bottom","0").css("left","0");}if(this.settings.animation=="slide"){jQuery(this).slideDown("slow");}else{if(this.settings.animation=="fade"){jQuery(this).fadeIn("slow");}else{jQuery(this).show();}}if(this.settings.closeLink!="none"){jQuery(this.settings.closeLink).click(function(){jQuery.closeCatfish(B);return false;});}return this;};jQuery.closeCatfish=function(A){this.catfish=jQuery("#"+A);jQuery(this.catfish).hide();jQuery("html").css("padding","0");jQuery("body").css("overflow","visible");};(function($){function Datepicker(){this.debug=false;this._nextId=0;this._inst=[];this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"X",closeStatus:"Close without change",prevText:"&#x3c;",prevStatus:"Show the previous month",nextText:"&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",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"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,speed:"",beforeShowDay:null,beforeShow:null,onSelect:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - "};$.extend(this._defaults,this.regional[""]);this._datepickerDiv=$('<div id="datepicker_div">');}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments);}},_register:function(inst){var id=this._nextId++;this._inst[id]=inst;return id;},_getInst:function(id){return this._inst[id]||id;},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}catch(err){inlineSettings[attrName]=attrValue;}}}var nodeName=target.nodeName.toLowerCase();var instSettings=(inlineSettings?$.extend(settings||{},inlineSettings||{}):settings);if(nodeName=="input"){var inst=(inst&&!inlineSettings?inst:new DatepickerInstance(instSettings,false));this._connectDatepicker(target,inst);}else{if(nodeName=="div"||nodeName=="span"){var inst=new DatepickerInstance(instSettings,true);this._inlineDatepicker(target,inst);}}},_destroyDatepicker:function(target){var nodeName=target.nodeName.toLowerCase();var calId=target._calId;target._calId=null;var $target=$(target);if(nodeName=="input"){$target.siblings(".datepicker_append").replaceWith("").end().siblings(".datepicker_trigger").replaceWith("").end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);var wrapper=$target.parents(".datepicker_wrap");if(wrapper){wrapper.replaceWith(wrapper.html());}this._datepickerDiv=null;this._changeDatepicker(target,"buttonImage",null);}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty();}}if($("input[_calId="+calId+"]").length==0){this._inst[calId]=null;}},_enableDatepicker:function(target){target.disabled=false;$(target).siblings("button.datepicker_trigger").each(function(){this.disabled=false;}).end().siblings("img.datepicker_trigger").css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button.datepicker_trigger").each(function(){this.disabled=true;}).end().siblings("img.datepicker_trigger").css({opacity:"0.5",cursor:"default"});this._disabledInputs=$.map($.datepicker._disabledInputs,function(value){return(value==target?null:value);});this._disabledInputs[$.datepicker._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target){return false;}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true;}}return false;},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value;}if(inst=this._getInst(target._calId)){extendRemove(inst._settings,settings);this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date,endDate){if(inst=this._getInst(target._calId)){inst._setDate(date,endDate);this._updateDatepicker(inst);}},_getDateDatepicker:function(target){var inst=this._getInst(target._calId);return(inst?inst._getDate():null);},_doKeyDown:function(e){var inst=$.datepicker._getInst(this._calId);if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(inst,inst._selectedMonth,inst._selectedYear,$("td.datepicker_daysCellOver",inst._datepickerDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,inst._get("speed"));break;case 33:$.datepicker._adjustDate(inst,(e.ctrlKey?-1:-inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(inst,(e.ctrlKey?+1:+inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(inst);}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(inst);}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(inst,-1,"D");}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(inst,-7,"D");}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(inst,+1,"D");}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(inst,+7,"D");}break;}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this);}}},_doKeyPress:function(e){var inst=$.datepicker._getInst(this._calId);var chars=$.datepicker._possibleChars(inst._get("dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1);},_connectDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return ;}var appendText=inst._get("appendText");var isRTL=inst._get("isRTL");if(appendText){if(isRTL){input.before('<span class="datepicker_append">'+appendText);}else{input.after('<span class="datepicker_append">'+appendText);}}var showOn=inst._get("showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker);}if(showOn=="button"||showOn=="both"){input.wrap('<span class="datepicker_wrap">');var buttonText=inst._get("buttonText");var buttonImage=inst._get("buttonImage");var trigger=$(inst._get("buttonImageOnly")?$("<img>").addClass("datepicker_trigger").attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button>").addClass("datepicker_trigger").attr({type:"button"}).html(buttonImage!=""?$("<img>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText));if(isRTL){input.before(trigger);}else{input.after(trigger);}trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker();}else{$.datepicker._showDatepicker(target);}});}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value;}).bind("getData.datepicker",function(event,key){return inst._get(key);});input[0]._calId=inst._id;},_inlineDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return ;}input.addClass(this.markerClassName).append(inst._datepickerDiv).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value;}).bind("getData.datepicker",function(event,key){return inst._get(key);});input[0]._calId=inst._id;this._updateDatepicker(inst);},_inlineShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".datepicker",inst._datepickerDiv[0]).width());},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){inst=this._dialogInst=new DatepickerInstance({},false);this._dialogInput=$('<input type="text" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);this._dialogInput[0]._calId=inst._id;}extendRemove(inst._settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst._settings.onSelect=onSelect;this._inDialog=true;this._datepickerDiv.addClass("datepicker_dialog");this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this._datepickerDiv);}return this;},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0];}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return ;}var inst=$.datepicker._getInst(input._calId);var beforeShow=inst._get("beforeShow");extendRemove(inst._settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;inst._setDateFromField(input);if($.datepicker._inDialog){input.value="";}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop;}inst._datepickerDiv.css("position",($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute"))).css({left:$.datepicker._pos[0]+"px",top:$.datepicker._pos[1]+"px"});$.datepicker._pos=null;inst._rangeStart=null;$.datepicker._updateDatepicker(inst);if(!inst._inline){var speed=inst._get("speed");var postProcess=function(){$.datepicker._datepickerShowing=true;$.datepicker._afterShow(inst);};var showAnim=inst._get("showAnim")||"show";inst._datepickerDiv[showAnim](speed,postProcess);if(speed==""){postProcess();}if(inst._input[0].type!="hidden"){inst._input[0].focus();}$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){inst._datepickerDiv.empty().append(inst._generateDatepicker());var numMonths=inst._getNumberOfMonths();if(numMonths[0]!=1||numMonths[1]!=1){inst._datepickerDiv.addClass("datepicker_multi");}else{inst._datepickerDiv.removeClass("datepicker_multi");}if(inst._get("isRTL")){inst._datepickerDiv.addClass("datepicker_rtl");}else{inst._datepickerDiv.removeClass("datepicker_rtl");}if(inst._input&&inst._input[0].type!="hidden"){inst._input[0].focus();}},_afterShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".datepicker",inst._datepickerDiv[0])[0].offsetWidth);inst._datepickerDiv.width(inst._datepickerDiv.width()+4);if($.browser.msie&&parseInt($.browser.version)<7){$("datepicker_cover").css({width:inst._datepickerDiv.width()+4,height:inst._datepickerDiv.height()+4});}var isFixed=inst._datepickerDiv.css("position")=="fixed";var pos=inst._input?$.datepicker._findPos(inst._input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=(isFixed?0:document.documentElement.scrollLeft||document.body.scrollLeft);var scrollY=(isFixed?0:document.documentElement.scrollTop||document.body.scrollTop);if((inst._datepickerDiv.offset().left+inst._datepickerDiv.width()-(isFixed&&$.browser.msie?document.documentElement.scrollLeft:0))>(browserWidth+scrollX)){inst._datepickerDiv.css("left",Math.max(scrollX,pos[0]+(inst._input?$(inst._input[0]).width():null)-inst._datepickerDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))+"px");if($.browser.msie&&parseInt($.browser.version)<7){$("datepicker_cover").css("left",Math.max(scrollX,pos[0]+(inst._input?$(inst._input[0]).width():null)-inst._datepickerDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))+"px");}}if((inst._datepickerDiv.offset().top+inst._datepickerDiv.height()-(isFixed&&$.browser.msie?document.documentElement.scrollTop:0))>(browserHeight+scrollY)){inst._datepickerDiv.css("top",Math.max(scrollY,pos[1]-(this._inDialog?0:inst._datepickerDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))+"px");if($.browser.msie&&parseInt($.browser.version)<7){$("datepicker_cover").css("top",Math.max(scrollY,pos[1]-(this._inDialog?0:inst._datepickerDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))+"px");}}},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling;}var position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input,speed){var inst=this._curInst;if(!inst){return ;}var rangeSelect=inst._get("rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate(inst,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));}this._stayOpen=false;if(this._datepickerShowing){speed=(speed!=null?speed:inst._get("speed"));var showAnim=inst._get("showAnim");inst._datepickerDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))](speed,function(){$.datepicker._tidyDialog(inst);});if(speed==""){this._tidyDialog(inst);}var onClose=inst._get("onClose");if(onClose){onClose.apply((inst._input?inst._input[0]:null),[inst._getDate(),inst]);}this._datepickerShowing=false;this._lastInput=null;inst._settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this._datepickerDiv);}}this._inDialog=false;}this._curInst=null;},_tidyDialog:function(inst){inst._datepickerDiv.removeClass("datepicker_dialog").unbind(".datepicker");$(".datepicker_prompt",inst._datepickerDiv).remove();},_checkExternalClick:function(event){if(!$.datepicker._curInst){return ;}var $target=$(event.target);if(($target.parents("#datepicker_div").length==0)&&($target.attr("class")!="datepicker_trigger")&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"");}},_adjustDate:function(id,offset,period){var inst=this._getInst(id);inst._adjustDate(offset,period);this._updateDatepicker(inst);},_gotoToday:function(id){var date=new Date();var inst=this._getInst(id);inst._selectedDay=date.getDate();inst._drawMonth=inst._selectedMonth=date.getMonth();inst._drawYear=inst._selectedYear=date.getFullYear();this._adjustDate(inst);},_selectMonthYear:function(id,select,period){var inst=this._getInst(id);inst._selectingMonthYear=false;inst[period=="M"?"_drawMonth":"_drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(inst);},_clickMonthYear:function(id){var inst=this._getInst(id);if(inst._input&&inst._selectingMonthYear&&!$.browser.msie){inst._input[0].focus();}inst._selectingMonthYear=!inst._selectingMonthYear;},_changeFirstDay:function(id,day){var inst=this._getInst(id);inst._settings.firstDay=day;this._updateDatepicker(inst);},_selectDay:function(id,month,year,td){if($(td).is(".datepicker_unselectable")){return ;}var inst=this._getInst(id);var rangeSelect=inst._get("rangeSelect");if(rangeSelect){if(!this._stayOpen){$(".datepicker td").removeClass("datepicker_currentDay");$(td).addClass("datepicker_currentDay");}this._stayOpen=!this._stayOpen;}inst._selectedDay=inst._currentDay=$("a",td).html();inst._selectedMonth=inst._currentMonth=month;inst._selectedYear=inst._currentYear=year;this._selectDate(id,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));if(this._stayOpen){inst._endDay=inst._endMonth=inst._endYear=null;inst._rangeStart=new Date(inst._currentYear,inst._currentMonth,inst._currentDay);this._updateDatepicker(inst);}else{if(rangeSelect){inst._endDay=inst._currentDay;inst._endMonth=inst._currentMonth;inst._endYear=inst._currentYear;inst._selectedDay=inst._currentDay=inst._rangeStart.getDate();inst._selectedMonth=inst._currentMonth=inst._rangeStart.getMonth();inst._selectedYear=inst._currentYear=inst._rangeStart.getFullYear();inst._rangeStart=null;if(inst._inline){this._updateDatepicker(inst);}}}},_clearDate:function(id){var inst=this._getInst(id);if(inst._get("mandatory")){return ;}this._stayOpen=false;inst._endDay=inst._endMonth=inst._endYear=inst._rangeStart=null;this._selectDate(inst,"");},_selectDate:function(id,dateStr){var inst=this._getInst(id);dateStr=(dateStr!=null?dateStr:inst._formatDate());if(inst._rangeStart){dateStr=inst._formatDate(inst._rangeStart)+inst._get("rangeSeparator")+dateStr;}if(inst._input){inst._input.val(dateStr);}var onSelect=inst._get("onSelect");if(onSelect){onSelect.apply((inst._input?inst._input[0]:null),[dateStr,inst]);}else{if(inst._input){inst._input.trigger("change");}}if(inst._inline){this._updateDatepicker(inst);}else{if(!this._stayOpen){this._hideDatepicker(null,inst._get("speed"));this._lastInput=inst._input[0];if(typeof (inst._input[0])!="object"){inst._input[0].focus();}this._lastInput=null;}}var inputid=inst._input[0].id;var val;for(var i=0;i<document.forms[0].tt.length;i++){if(document.forms[0].tt[i].checked){val=document.forms[0].tt[i].value;}}if(inputid=="dFrom_0"){if(val=="R"){document.getElementById("dTo_0").focus();}else{if(val=="M"){}else{document.getElementById("selnoOfAdults").focus();}}}else{if(inputid=="dTo_0"){document.getElementById("selnoOfAdults").focus();}}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""];},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate(),(date.getTimezoneOffset()/-60));var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate);}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate);}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1;},dateStatus:function(date,inst){return $.datepicker.formatDate(inst._get("dateStatus"),date,inst._getFormatConfig());},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments";}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null;}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++;}return matches;};var getNumber=function(match){lookAhead(match);var size=(match=="y"?4:2);var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);size--;}if(size==(match=="y"?4:2)){throw"Missing number at position "+iValue;}return num;};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length);}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1;}}size--;}throw"Unknown name at position "+iInit;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue;}iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false;}else{checkLiteral();}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"'":if(lookAhead("'")){checkLiteral();}else{literal=true;}break;default:checkLiteral();}}}if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100);}var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date";}return date;},formatDate:function(format,date,settings){if(!date){return"";}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++;}return matches;};var formatNumber=function(match,value){return(lookAhead(match)&&value<10?"0":"")+value;};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false;}else{output+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"'":if(lookAhead("'")){output+="'";}else{literal=true;}break;default:output+=format.charAt(iFormat);}}}}return output;},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false;}else{chars+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d"||"m"||"y":chars+="0123456789";break;case"D"||"M":return null;case"'":if(lookAhead("'")){chars+="'";}else{literal=true;}break;default:chars+=format.charAt(iFormat);}}}return chars;}});function DatepickerInstance(settings,inline){this._id=$.datepicker._register(this);this._selectedDay=0;this._selectedMonth=0;this._selectedYear=0;this._drawMonth=0;this._drawYear=0;this._input=null;this._inline=inline;this._datepickerDiv=(!inline?$.datepicker._datepickerDiv:$('<div id="datepicker_div_'+this._id+'" class="datepicker_inline">'));this._settings=extendRemove(settings||{});if(inline){this._setDate(this._getDefaultDate());}}$.extend(DatepickerInstance.prototype,{_get:function(name){return this._settings[name]||$.datepicker._defaults[name];},_setDateFromField:function(input){this._input=$(input);var dateFormat=this._get("dateFormat");var dates=this._input?this._input.val().split(this._get("rangeSeparator")):null;this._endDay=this._endMonth=this._endYear=null;var date=defaultDate=this._getDefaultDate();if(dates.length>0){var settings=this._getFormatConfig();if(dates.length>1){date=$.datepicker.parseDate(dateFormat,dates[1],settings)||defaultDate;this._endDay=date.getDate();this._endMonth=date.getMonth();this._endYear=date.getFullYear();}try{date=$.datepicker.parseDate(dateFormat,dates[0],settings)||defaultDate;}catch(e){$.datepicker.log(e);date=defaultDate;}}this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear();this._currentDay=(dates[0]?date.getDate():0);this._currentMonth=(dates[0]?date.getMonth():0);this._currentYear=(dates[0]?date.getFullYear():0);this._adjustDate();},_getDefaultDate:function(){var date=this._determineDate("defaultDate",new Date());var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date;},_determineDate:function(name,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;};var offsetString=function(offset,getDaysInMonth){var date=new Date();var matches=/^([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?$/.exec(offset);if(matches){var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();switch(matches[2]||"d"){case"d":case"D":day+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;}date=new Date(year,month,day);}return date;};var date=this._get(name);return(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?offsetNumeric(date):date)));},_setDate:function(date,endDate){this._selectedDay=this._currentDay=date.getDate();this._drawMonth=this._selectedMonth=this._currentMonth=date.getMonth();this._drawYear=this._selectedYear=this._currentYear=date.getFullYear();if(this._get("rangeSelect")){if(endDate){this._endDay=endDate.getDate();this._endMonth=endDate.getMonth();this._endYear=endDate.getFullYear();}else{this._endDay=this._currentDay;this._endMonth=this._currentMonth;this._endYear=this._currentYear;}}this._adjustDate();},_getDate:function(){var startDate=(!this._currentYear||(this._input&&this._input.val()=="")?null:new Date(this._currentYear,this._currentMonth,this._currentDay));if(this._get("rangeSelect")){return[startDate,(!this._endYear?null:new Date(this._endYear,this._endMonth,this._endDay))];}else{return startDate;}},_generateDatepicker:function(){var today=new Date();today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var showStatus=this._get("showStatus");var isRTL=this._get("isRTL");var clear=(this._get("mandatory")?"":'<div class="datepicker_clear"><a onclick="jQuery.datepicker._clearDate('+this._id+');"'+(showStatus?this._addStatus(this._get("clearStatus")||"&#xa0;"):"")+">"+this._get("clearText")+"</a></div>");var controls='<div class="datepicker_control">'+(isRTL?"":clear)+'<div class="datepicker_close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(this._get("closeStatus")||"&#xa0;"):"")+">"+this._get("closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get("prompt");var closeAtTop=this._get("closeAtTop");var hideIfNoPrevNext=this._get("hideIfNoPrevNext");var numMonths=this._getNumberOfMonths();var stepMonths=this._get("stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");var drawMonth=this._drawMonth;var drawYear=this._drawYear;if(maxDate){var maxDraw=new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate());maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(new Date(drawYear,drawMonth,1)>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}var prev=(this._canAdjustMonth(-1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("prevStatus")||"&#xa0;"):"")+'><span class="cal-prev-next">'+this._get("prevText")+"</span></a>":(hideIfNoPrevNext?"":"<label>"+this._get("prevText")+"</label>"));var next=(this._canAdjustMonth(+1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("nextStatus")||"&#xa0;"):"")+'><span class="cal-prev-next">'+this._get("nextText")+"</span></a>":(hideIfNoPrevNext?">":"<label>"+this._get("nextText")+"</label>"));var html=(prompt?'<div class="datepicker_prompt">'+prompt+"</div>":"")+(closeAtTop&&!this._inline?controls:"");var showWeeks=this._get("showWeeks");for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=new Date(drawYear,drawMonth,this._selectedDay);html+='<div class="datepicker_oneMonth'+(col==0?" datepicker_newRow":"")+'"><div class="datepicker_header">';if(col==0){html+=(isRTL?next:prev)+"&nbsp;&nbsp;";}html+=this._generateMonthYearHeader(drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0);if(col==0){html+="&nbsp;&nbsp;"+(isRTL?prev:next);}html+='</div><table class="datepicker" cellpadding="0" cellspacing="0"><thead><tr class="datepicker_titleRow">'+(showWeeks?"<td>"+this._get("weekHeader")+"</td>":"");var firstDay=this._get("firstDay");var changeFirstDay=this._get("changeFirstDay");var dayNames=this._get("dayNames");var dayNamesShort=this._get("dayNamesShort");var dayNamesMin=this._get("dayNamesMin");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var status=this._get("dayStatus")||"&#xa0;";status=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="datepicker_weekEndCell"':"")+">"+(!changeFirstDay?"<span":'<a onclick="jQuery.datepicker._changeFirstDay('+this._id+", "+day+');"')+(showStatus?this._addStatus(status):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>";}html+="</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==this._selectedYear&&drawMonth==this._selectedMonth){this._selectedDay=Math.min(this._selectedDay,daysInMonth);}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var currentDate=(!this._currentDay?new Date(9999,9,9):new Date(this._currentYear,this._currentMonth,this._currentDay));var endDate=this._endDay?new Date(this._endYear,this._endMonth,this._endDay):currentDate;var printDate=new Date(drawYear,drawMonth,1-leadDays);var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var beforeShowDay=this._get("beforeShowDay");var showOtherMonths=this._get("showOtherMonths");var calculateWeek=this._get("calculateWeek")||$.datepicker.iso8601Week;var dateStatus=this._get("statusForDate")||$.datepicker.dateStatus;for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="datepicker_daysRow">'+(showWeeks?'<td class="datepicker_weekCol">'+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((this._input?this._input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="datepicker_daysCell'+((dow+firstDay+6)%7>=5?" datepicker_weekEndCell":"")+(otherMonth?" datepicker_otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==this._selectedMonth?" datepicker_daysCellOver":"")+(unselectable?" datepicker_unselectable":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" datepicker_currentDay":"")+(printDate.getTime()==today.getTime()?" datepicker_today":""))+'"'+(unselectable?"":" onmouseover=\"jQuery(this).addClass('datepicker_daysCellOver');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#datepicker_status_"+this._id+"').html('"+(dateStatus.apply((this._input?this._input[0]:null),[printDate,this])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('datepicker_daysCellOver');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#datepicker_status_"+this._id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay('+this._id+","+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);}html+="</tr>";}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}html+="</tbody></table></div>";}}html+=(showStatus?'<div id="datepicker_status_'+this._id+'" class="datepicker_status">'+(this._get("initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!this._inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!this._inline?'<iframe src="javascript:false;" class="datepicker_cover"></iframe>':"");return html;},_generateMonthYearHeader:function(drawMonth,drawYear,minDate,maxDate,selectedDate,secondary){minDate=(this._rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var showStatus=this._get("showStatus");var html="";var monthNames=this._get("monthNames");if(secondary||!this._get("changeMonth")){html+='<span class="datepicker_nonselect">'+monthNames[drawMonth]+"&#xa0;";}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="datepicker_newMonth" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>";}}html+="</select>";}if(secondary||!this._get("changeYear")){html+=drawYear+"</span>";}else{var years=this._get("yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10;}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10);}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="datepicker_newYear" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>";}html+="</select>";}return html;},_addStatus:function(text){return" onmouseover=\"jQuery('#datepicker_status_"+this._id+"').html('"+text+"');\" onmouseout=\"jQuery('#datepicker_status_"+this._id+"').html('&#xa0;');\"";},_adjustDate:function(offset,period){var year=this._drawYear+(period=="Y"?offset:0);var month=this._drawMonth+(period=="M"?offset:0);var day=Math.min(this._selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear();},_getNumberOfMonths:function(){var numMonths=this._get("numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths));},_getMinMaxDate:function(minMax,checkRange){var date=this._determineDate(minMax+"Date",null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);}return date||(checkRange?this._rangeStart:null);},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(offset,curYear,curMonth){var numMonths=this._getNumberOfMonths();var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));}return this._isInRange(date);},_isInRange:function(date){var newMinDate=(!this._rangeStart?null:new Date(this._selectedYear,this._selectedMonth,this._selectedDay));newMinDate=(newMinDate&&this._rangeStart<newMinDate?this._rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate("min");var maxDate=this._getMinMaxDate("max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_getFormatConfig:function(){var shortYearCutoff=this._get("shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get("dayNamesShort"),dayNames:this._get("dayNames"),monthNamesShort:this._get("monthNamesShort"),monthNames:this._get("monthNames")};},_formatDate:function(day,month,year){if(!day){this._currentDay=this._selectedDay;this._currentMonth=this._selectedMonth;this._currentYear=this._selectedYear;}var date=(day?(typeof day=="object"?day:new Date(year,month,day)):new Date(this._currentYear,this._currentMonth,this._currentDay));return $.datepicker.formatDate(this._get("dateFormat"),date,this._getFormatConfig());}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null;}}return target;}$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$(document).ready(function(){$(document.body).append($.datepicker._datepickerDiv).mousedown($.datepicker._checkExternalClick);});$.datepicker=new Datepicker();})(jQuery);var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");var isReturn=false;var NUM_CENTYEAR=30;var BUL_TIMECOMPONENT=false;var BUL_YEARSCROLL=true;var calendars=[];var RE_NUM=/^\-?\d+$/;var monthAry=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var ARR_MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];var ARR_WEEKDAYS=["Sun","Mon","Tue","Wed","Thur","Fri","Sat"];var NUM_WEEKSTART=0;var currDate;var dt_current;var passedDate;var depdate;var dt_firstday;var curday;var curmon;year_scroll=BUL_YEARSCROLL;var sysDate="";var targetDisplayCol="";var targetDisplayColHidden="";var mflag=0;var ctflag=0;function LZ(A){return(A<0||A>9?"":"0")+A;}function isDate(C,B){var A=getDateFromFormat(C,B);if(A==0){return false;}return true;}function compareDates(E,F,C,D){var B=getDateFromFormat(E,F);var A=getDateFromFormat(C,D);if(B==0||A==0){return -1;}else{if(B>A){return 1;}}return 0;}function formatDate(g,a){a=a+"";var J="";var T=0;var f="";var D="";var I=g.getYear()+"";var F=g.getMonth()+1;var b=g.getDate();var N=g.getDay();var L=g.getHours();var V=g.getMinutes();var P=g.getSeconds();var R,S,B,Q,j,C,Z,Y,W,O,n,L,l,G,A,X;var U=new Object();if(I.length<4){I=""+(I-0+1900);}U.y=""+I;U.yyyy=I;U.yy=I.substring(2,4);U.M=F;U.MM=LZ(F);U.MMM=MONTH_NAMES[F-1];U.NNN=MONTH_NAMES[F+11];U.d=b;U.dd=LZ(b);U.E=DAY_NAMES[N+7];U.EE=DAY_NAMES[N];U.H=L;U.HH=LZ(L);if(L==0){U.h=12;}else{if(L>12){U.h=L-12;}else{U.h=L;}}U.hh=LZ(U.h);if(L>11){U.K=L-12;}else{U.K=L;}U.k=L+1;U.KK=LZ(U.K);U.kk=LZ(U.k);if(L>11){U.a="PM";}else{U.a="AM";}U.m=V;U.mm=LZ(V);U.s=P;U.ss=LZ(P);while(T<a.length){f=a.charAt(T);D="";while((a.charAt(T)==f)&&(T<a.length)){D+=a.charAt(T++);}if(U[D]!=null){J=J+U[D];}else{J=J+D;}}return J;}function _isInteger(C){var B="1234567890";for(var A=0;A<C.length;A++){if(B.indexOf(C.charAt(A))==-1){return false;}}return true;}function _getInt(F,D,E,C){for(var A=C;A>=E;A--){var B=F.substring(D,D+A);if(B.length<E){return null;}if(_isInteger(B)){return B;}}return null;}function getDateFromFormat(U,N){U=U+"";N=N+"";var T=0;var J=0;var P="";var E="";var S="";var G,F;var B=new Date();var H=B.getYear();var R=B.getMonth()+1;var Q=1;var C=B.getHours();var O=B.getMinutes();var L=B.getSeconds();var I="";while(J<N.length){P=N.charAt(J);E="";while((N.charAt(J)==P)&&(J<N.length)){E+=N.charAt(J++);}if(E=="yyyy"||E=="yy"||E=="y"){if(E=="yyyy"){G=4;F=4;}if(E=="yy"){G=2;F=2;}if(E=="y"){G=2;F=4;}H=_getInt(U,T,G,F);if(H==null){return 0;}T+=H.length;if(H.length==2){if(H>70){H=1900+(H-0);}else{H=2000+(H-0);}}}else{if(E=="MMM"||E=="NNN"){R=0;for(var M=0;M<MONTH_NAMES.length;M++){var D=MONTH_NAMES[M];if(U.substring(T,T+D.length).toLowerCase()==D.toLowerCase()){if(E=="MMM"||(E=="NNN"&&M>11)){R=M+1;if(R>12){R-=12;}T+=D.length;break;}}}if((R<1)||(R>12)){return 0;}}else{if(E=="EE"||E=="E"){for(var M=0;M<DAY_NAMES.length;M++){var K=DAY_NAMES[M];if(U.substring(T,T+K.length).toLowerCase()==K.toLowerCase()){T+=K.length;break;}}}else{if(E=="MM"||E=="M"){R=_getInt(U,T,E.length,2);if(R==null||(R<1)||(R>12)){return 0;}T+=R.length;}else{if(E=="dd"||E=="d"){Q=_getInt(U,T,E.length,2);if(Q==null||(Q<1)||(Q>31)){return 0;}T+=Q.length;}else{if(E=="hh"||E=="h"){C=_getInt(U,T,E.length,2);if(C==null||(C<1)||(C>12)){return 0;}T+=C.length;}else{if(E=="HH"||E=="H"){C=_getInt(U,T,E.length,2);if(C==null||(C<0)||(C>23)){return 0;}T+=C.length;}else{if(E=="KK"||E=="K"){C=_getInt(U,T,E.length,2);if(C==null||(C<0)||(C>11)){return 0;}T+=C.length;}else{if(E=="kk"||E=="k"){C=_getInt(U,T,E.length,2);if(C==null||(C<1)||(C>24)){return 0;}T+=C.length;C--;}else{if(E=="mm"||E=="m"){O=_getInt(U,T,E.length,2);if(O==null||(O<0)||(O>59)){return 0;}T+=O.length;}else{if(E=="ss"||E=="s"){L=_getInt(U,T,E.length,2);if(L==null||(L<0)||(L>59)){return 0;}T+=L.length;}else{if(E=="a"){if(U.substring(T,T+2).toLowerCase()=="am"){I="AM";}else{if(U.substring(T,T+2).toLowerCase()=="pm"){I="PM";}else{return 0;}}T+=2;}else{if(U.substring(T,T+E.length)!=E){return 0;}else{T+=E.length;}}}}}}}}}}}}}}if(T!=U.length){return 0;}if(R==2){if(((H%4==0)&&(H%100!=0))||(H%400==0)){if(Q>29){return 0;}}else{if(Q>28){return 0;}}}if((R==4)||(R==6)||(R==9)||(R==11)){if(Q>30){return 0;}}if(C<12&&I=="PM"){C=C-0+12;}else{if(C>11&&I=="AM"){C-=12;}}var A=new Date(H,R-1,Q,C,O,L);return A.getTime();}function parseDate(G){var E=(arguments.length==2)?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var B=new Array("generalFormats",E?"dateFirst":"monthFirst",E?"monthFirst":"dateFirst");var F=null;for(var D=0;D<B.length;D++){var A=window[B[D]];for(var C=0;C<A.length;C++){F=getDateFromFormat(G,A[C]);if(F!=0){return new Date(F);}}}return null;}function getdtnumber(A){var C=A.substr(A.length-4,4);var E=getMonthVal(A.substr(A.length-8,3))+"";if(E.replace(/^\s*|\s*$/g,"").length==1){E="0"+E;}var B=A.substr(0,2);var D=C+E+B;return D;}function gen_date(A){return((A.getDate()<=9?"0":"")+A.getDate()+"/"+((A.getMonth()+1)<=9?"0":"")+(A.getMonth()+1)+"/"+A.getFullYear());}(function(A){A.fn.extend({autocomplete:function(B,C){var D=typeof B=="string";C=A.extend({},A.Autocompleter.defaults,{url:D?B:null,data:D?null:B,delay:D?A.Autocompleter.defaults.delay:10,max:C&&!C.scroll?10:150},C);C.highlight=C.highlight||function(E){return E;};C.formatMatch=C.formatMatch||C.formatItem;return this.each(function(){new A.Autocompleter(this,C);});},result:function(B){return this.bind("result",B);},search:function(B){return this.trigger("search",[B]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(B){return this.trigger("setOptions",[B]);},unautocomplete:function(){return this.trigger("unautocomplete");}});A.Autocompleter=function(L,G){var C={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var B=A(L).attr("autocomplete","off").addClass(G.inputClass);var S=[];var J;var Q="";var M=A.Autocompleter.Cache(G);var E=0;var V;var Y={mouseDownOnSelect:false};var R=A.Autocompleter.Select(G,L,D,Y);var X;A.browser.opera&&A(L.form).bind("submit.autocomplete",function(){if(X){X=false;return false;}});B.bind((A.browser.opera?"keypress":"keydown")+".autocomplete",function(Z){V=Z.keyCode;switch(Z.keyCode){case C.UP:Z.preventDefault();if(R.visible()){R.prev();}else{U(0,true);}break;case C.DOWN:Z.preventDefault();if(R.visible()){R.next();}else{U(0,true);}break;case C.PAGEUP:Z.preventDefault();if(R.visible()){R.pageUp();}else{U(0,true);}break;case C.PAGEDOWN:Z.preventDefault();if(R.visible()){R.pageDown();}else{U(0,true);}break;case G.multiple&&A.trim(G.multipleSeparator)==","&&C.COMMA:case C.TAB:case C.RETURN:if(D()){Z.preventDefault();X=true;return false;}break;case C.ESC:R.hide();break;default:clearTimeout(J);J=setTimeout(U,G.delay);break;}}).focus(function(){E++;}).blur(function(){E=0;if(!Y.mouseDownOnSelect){T();}}).click(function(){if(E++>1&&!R.visible()){U(0,true);}}).bind("search",function(){var Z=(arguments.length>1)?arguments[1]:null;function a(f,d){var b;if(d&&d.length){for(var c=0;c<d.length;c++){if(d[c].result.toLowerCase()==f.toLowerCase()){b=d[c];break;}}}if(typeof Z=="function"){Z(b);}else{B.trigger("result",b&&[b.data,b.value]);}}A.each(H(B.val()),function(b,c){F(c,a,a);});}).bind("flushCache",function(){M.flush();}).bind("setOptions",function(){A.extend(G,arguments[1]);if("data" in arguments[1]){M.populate();}}).bind("unautocomplete",function(){R.unbind();B.unbind();var Z=A(".ac_results");A(".ac_even").unbind("click");A(".ac_odd").unbind("click");if(Z.length>0){Z.remove();}A(L.form).unbind(".autocomplete");});function D(){var a=R.selected();if(!a){return false;}var Z=a.result;Q=Z;if(G.multiple){var b=H(B.val());if(b.length>1){Z=b.slice(0,b.length-1).join(G.multipleSeparator)+G.multipleSeparator+Z;}Z+=G.multipleSeparator;}B.val(Z);W();B.trigger("result",[a.data,a.value]);return true;}function U(b,a){if(V==C.DEL){R.hide();return ;}var Z=B.val();if(!a&&Z==Q){return ;}Q=Z;Z=I(Z);if(Z.length>=G.minChars){B.addClass(G.loadingClass);if(!G.matchCase){Z=Z.toLowerCase();}F(Z,K,W);}else{N();R.hide();}}function H(a){if(!a){return[""];}var b=a.split(G.multipleSeparator);var Z=[];A.each(b,function(c,d){if(A.trim(d)){Z[c]=A.trim(d);}});return Z;}function I(Z){if(!G.multiple){return Z;}var a=H(Z);return a[a.length-1];}function P(Z,a){if(G.autoFill&&(I(B.val()).toLowerCase()==Z.toLowerCase())&&V!=C.BACKSPACE){B.val(B.val()+a.substring(I(Q).length));A.Autocompleter.Selection(L,Q.length,Q.length+a.length);}}function T(){clearTimeout(J);J=setTimeout(W,200);}function W(){var Z=R.visible();R.hide();clearTimeout(J);N();if(G.mustMatch){B.search(function(a){if(!a){if(G.multiple){var b=H(B.val()).slice(0,-1);B.val(b.join(G.multipleSeparator)+(b.length?G.multipleSeparator:""));}else{B.val("");}}});}if(Z){A.Autocompleter.Selection(L,L.value.length,L.value.length);}}function K(a,Z){if(Z&&Z.length&&E){N();R.display(Z,a);P(a,Z[0].value);R.show();}else{W();}}function F(a,c,Z){if(!G.matchCase){a=a.toLowerCase();}var b=M.load(a);if(b&&b.length){c(a,b);}else{if((typeof G.url=="string")&&(G.url.length>0)){var d={timestamp:+new Date()};A.each(G.extraParams,function(f,g){d[f]=typeof g=="function"?g():g;});S.push(a);if(S.length==1){A.ajax({mode:"abort",port:"autocomplete"+L.name,dataType:G.dataType,url:G.url,data:A.extend({q:I(a),limit:G.max},d),success:function(h){var f=G.parse&&G.parse(h)||O(h);M.add(a,f);if(S.length>1){var g=S[S.length-1];S=[];F(g,c,Z);}else{S=[];c(a,f);}}});}}else{R.emptyList();Z(a);}}}function O(c){var Z=[];var b=c.split("\n");for(var a=0;a<b.length;a++){var d=A.trim(b[a]);if(d){d=d.split("|");Z[Z.length]={data:d,value:d[0],result:G.formatResult&&G.formatResult(d,d[0])||d[0]};}}return Z;}function N(){B.removeClass(G.loadingClass);}};A.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:0,matchCase:false,matchSubset:true,matchContains:true,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(B){return B[0];},formatMatch:null,autoFill:false,width:300,multiple:false,multipleSeparator:", ",highlight:function(C,B){return C;},scroll:true,scrollHeight:180};A.Autocompleter.Cache=function(C){var F={};var D=0;function H(K,J){if(!C.matchCase){K=K.toLowerCase();}var I=K.indexOf(J);if(C.matchContains=="word"){I=K.toLowerCase().search("\\b"+J.toLowerCase());}if(I==-1){return false;}return I==0||C.matchContains;}function G(J,I){if(D>C.cacheLength){B();}if(!F[J]){D++;}F[J]=I;}function E(){if(!C.data){return false;}var J={},I=0;if(!C.url){C.cacheLength=1;}J[""]=[];for(var L=0,K=C.data.length;L<K;L++){var O=C.data[L];O=(typeof O=="string")?[O]:O;var N=C.formatMatch(O,L+1,C.data.length);if(N===false){continue;}var M=N.charAt(0).toLowerCase();if(!J[M]){J[M]=[];}var P={value:N,data:O,result:C.formatResult&&C.formatResult(O)||N};J[M].push(P);if(I++<C.max){J[""].push(P);}}A.each(J,function(Q,R){C.cacheLength++;G(Q,R);});}setTimeout(E,25);function B(){F={};D=0;}return{flush:B,add:G,populate:E,load:function(L){if(!C.cacheLength||!D){return null;}if(!C.url&&C.matchContains){var K=[];for(var I in F){if(I.length>0){var M=F[I];A.each(M,function(O,N){if(H(N.value,L)){K.push(N);}});}}return K;}else{if(F[L]){return F[L];}else{if(C.matchSubset){for(var J=L.length-1;J>=C.minChars;J--){var M=F[L.substr(0,J)];if(M){var K=[];A.each(M,function(O,N){if(H(N.value,L)){K[K.length]=N;}});return K;}}}}}return null;}};};A.Autocompleter.Select=function(E,M,O,T){var L={ACTIVE:"ac_over"};var N,G=-1,V,P="",W=true,C,S;function R(){if(!W){A(".ac_odd").unbind();A(".ac_even").unbind();C&&C.empty();S=A("<div/>").css("overflow","auto").appendTo(C);return ;}C=A("<div/>").hide().addClass(E.resultsClass).css("position","absolute").css("overflow","auto").appendTo(document.body);S=A("<div/>").css("overflow","auto").appendTo(C);if(E.width>0){C.css("width",E.width);}W=false;}function U(Y){var X=Y.target;while(X&&X.tagName!="DIV"){X=X.parentNode;}if(!X){return[];}return X;}function K(X){N.slice(G,G+1).removeClass(L.ACTIVE);H(X);var Z=N.slice(G,G+1).addClass(L.ACTIVE);if(E.scroll){var Y=0;N.slice(0,G).each(function(){Y+=this.offsetHeight;});if((Y+Z[0].offsetHeight-S.scrollTop())>S[0].clientHeight){S.scrollTop(Y+Z[0].offsetHeight-S.innerHeight());}else{if(Y<S.scrollTop()){S.scrollTop(Y);}}}}function H(X){G+=X;if(G<0){G=N.size()-1;}else{if(G>=N.size()){G=0;}}}function B(X){E.max=100;return E.max&&E.max<X?E.max:X;}function Q(X){if(U(X).nodeName&&U(X).nodeName.toUpperCase()=="DIV"){G=A("div",S).removeClass(L.ACTIVE).index(U(X));A(U(X)).addClass(L.ACTIVE);}}function J(X){A(U(X)).addClass(L.ACTIVE);O();M.focus();return false;}function I(){T.mouseDownOnSelect=true;}function F(){T.mouseDownOnSelect=false;}function D(){S.empty();var Y=B(V.length);for(var Z=0;Z<Y;Z++){if(!V[Z]){continue;}var a=E.formatItem(V[Z].data,Z+1,Y,V[Z].value,P);if(a===false){continue;}var X=A("<DIV/>").css("padding-left","5px").css("width","97%").html(E.highlight(a,P)).addClass(Z%2==0?"ac_even":"ac_odd").mouseover(Q).click(J).mousedown(I).mouseup(F).appendTo(S)[0];A.data(X,"ac_data",V[Z]);}N=S.find("DIV");if(E.selectFirst){N.slice(0,1).addClass(L.ACTIVE);G=0;}if(A.fn.bgiframe){S.bgiframe();}}return{display:function(Y,X){R();V=Y;P=X;D();},next:function(){K(1);},prev:function(){K(-1);},pageUp:function(){if(G!=0&&G-8<0){K(-G);}else{K(-8);}},pageDown:function(){if(G!=N.size()-1&&G+8>N.size()){K(N.size()-1-G);}else{K(8);}},hide:function(){N&&N.unbind("click",J).unbind("mouseover",Q).unbind("mousedown",I).unbind("mouseup",F);N&&N.removeClass(L.ACTIVE);C&&C.hide();C&&C.empty();G=-1;},visible:function(){return C&&C.is(":visible");},current:function(){return this.visible()&&(N.filter("."+L.ACTIVE)[0]||E.selectFirst&&N[0]);},show:function(){var Z=A(M).offset();C.css({width:typeof E.width=="string"||E.width>0?E.width:A(M).width(),top:Z.top+M.offsetHeight,left:Z.left}).show();if(E.scroll){S.scrollTop(0);S.css({maxHeight:E.scrollHeight,width:"100%",cursor:"pointer"});if(A.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var X=0;N.each(function(){X+=this.offsetHeight;});var Y=X>E.scrollHeight;S.css("height",Y?E.scrollHeight:X);if(!Y){N.width(S.width()-parseInt(N.css("padding-left"))-parseInt(N.css("padding-right")));}}}},selected:function(){var X=N&&N.filter("."+L.ACTIVE).removeClass(L.ACTIVE);getFareHistory();return X&&X.length&&A.data(X[0],"ac_data");},emptyList:function(){S&&S.empty();},unbind:function(){C&&C.remove();}};};A.Autocompleter.Selection=function(D,E,C){if(D.createTextRange){var B=D.createTextRange();B.collapse(true);B.moveStart("character",E);B.moveEnd("character",C);B.select();}else{if(D.setSelectionRange){D.setSelectionRange(E,C);}else{if(D.selectionStart){D.selectionStart=E;D.selectionEnd=C;}}}D.focus();};})(jQuery);(function(A){A.fn.bgIframe=A.fn.bgiframe=function(C){if(A.browser.msie&&/6.0/.test(navigator.userAgent)){C=A.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},C||{});var D=function(E){return E&&E.constructor==Number?E+"px":E;},B='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+C.src+'"style="display:block;position:absolute;z-index:-1;'+(C.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(C.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":D(C.top))+";left:"+(C.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":D(C.left))+";width:"+(C.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":D(C.width))+";height:"+(C.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":D(C.height))+';"/>';return this.each(function(){if(A("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(B),this.firstChild);}});}return this;};})(jQuery);jQuery.fn.bt=function(content,options){if(typeof content!="string"){var contentSelect=true;options=content;content=false;}else{var contentSelect=false;}return this.each(function(index){var opts=jQuery.extend(false,jQuery.fn.bt.defaults,options);opts.spikeLength=numb(opts.spikeLength);opts.spikeGirth=numb(opts.spikeGirth);opts.overlap=numb(opts.overlap);var turnOn=function(){if(typeof $(this).data("bt-box")=="object"){turnOff.apply(this);}opts.preShow.apply(this);if(contentSelect){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"));}content=eval("$(this)."+opts.titleSelector);if(opts.killTitle){$(this).removeAttr("title");}}var offsetParent=$(this).offsetParent();var pos=$(this).btPosition();var top=numb(pos.top)+numb($(this).css("margin-top"));var left=numb(pos.left)+numb($(this).css("margin-left"));var width=$(this).outerWidth();var height=$(this).outerHeight();var $text=$('<div class="bt-content"></div>').append(content).css({padding:opts.padding+"px",position:"absolute",width:opts.width+"px",zIndex:opts.textzIndex}).css(opts.cssStyles);var $box=$('<div class="bt-wrapper"></div>').append($text).addClass(opts.cssClass).css({position:"absolute",width:opts.width+"px"}).appendTo(offsetParent);$(this).data("bt-box",$box);var scrollTop=numb($(document).scrollTop());var scrollLeft=numb($(document).scrollLeft());var docWidth=numb($(window).width());var docHeight=numb($(window).height());var winRight=scrollLeft+docWidth;var winBottom=scrollTop+docHeight;var space=new Object();space.top=$(this).offset().top-scrollTop;space.bottom=docHeight-(($(this).offset().top+height)-scrollTop);space.left=$(this).offset().left-scrollLeft;space.right=docWidth-(($(this).offset().left+width)-scrollLeft);var textOutHeight=numb($text.outerHeight());var textOutWidth=numb($text.outerWidth());if(opts.positions.constructor==String){opts.positions=opts.positions.replace(/ /,"").split(",");}if(opts.positions[0]=="most"){var position="top";for(var pig in space){position=space[pig]>space[position]?pig:position;}}else{for(var x in opts.positions){var position=opts.positions[x];if((position=="left"||position=="right")&&space[position]>textOutWidth+opts.spikeLength){break;}else{if((position=="top"||position=="bottom")&&space[position]>textOutHeight+opts.spikeLength){break;}}}}var horiz=left+((width-textOutWidth)/2);var vert=top+((height-textOutHeight)/2);var animDist=opts.animate?numb(opts.distance):0;var points=new Array();var textTop,textLeft,textRight,textBottom,textTopSpace,textBottomSpace,textLeftSpace,textRightSpace,crossPoint,textCenter;switch(position){case"top":$text.css("margin-bottom",opts.spikeLength+"px");$box.css({top:(top-$text.outerHeight(true)-animDist)+opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.outerWidth(true));var xShift=0;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()/2),y:textTop+($text.outerHeight()/2)};points[points.length]=spikePoint={y:textBottom+opts.spikeLength,x:((textRight-textLeft)/2)+xShift,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textBottom);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.CornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:crossPoint.x+(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]=spikePoint;break;case"left":$text.css("margin-right",opts.spikeLength+"px");$box.css({top:vert+"px",left:((left-$text.outerWidth(true)-animDist)+opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=0;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()/2),y:textTop+($text.outerHeight()/2)};points[points.length]=spikePoint={x:textRight+opts.spikeLength,y:((textBottom-textTop)/2)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textRight);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textRight,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;case"bottom":$text.css("margin-top",opts.spikeLength+"px");$box.css({top:(top+height+animDist)-opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.outerWidth(true));var xShift=0;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()/2),y:textTop+($text.outerHeight()/2)};points[points.length]=spikePoint={x:((textRight-textLeft)/2)+xShift,y:0,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textTop);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x+opts.spikeGirth/2,y:textTop,type:"join"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textTop,type:"join"};points[points.length]=spikePoint;break;case"right":$text.css("margin-left",(opts.spikeLength+"px"));$box.css({top:vert+"px",left:((left+width+animDist)-opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=0;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()/2),y:textTop+($text.outerHeight()/2)};points[points.length]=spikePoint={x:0,y:((textBottom-textTop)/2)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textLeft);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textLeft,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;}var canvas=$('<canvas width="'+(numb($text.outerWidth(true))+opts.strokeWidth*2)+'" height="'+(numb($text.outerHeight(true))+opts.strokeWidth*2)+'"></canvas>').appendTo($box).css({position:"absolute",top:$text.btPosition().top,left:$text.btPosition().left,zIndex:opts.boxzIndex}).get(0);if(typeof G_vmlCanvasManager!="undefined"){canvas=G_vmlCanvasManager.initElement(canvas);if(canvas==null){canvas=$('<canvas width="'+(numb($text.outerWidth(true))+opts.strokeWidth*2)+'" height="'+(numb($text.outerHeight(true))+opts.strokeWidth*2)+'"></canvas>').appendTo($box).css({position:"absolute",top:$text.btPosition().top,left:$text.btPosition().left,zIndex:opts.boxzIndex}).get(0);}}if(canvas==null){canvas=$('<canvas width="'+(numb($text.outerWidth(true))+opts.strokeWidth*2)+'" height="'+(numb($text.outerHeight(true))+opts.strokeWidth*2)+'"></canvas>').appendTo($box).css({position:"absolute",top:$text.btPosition().top,left:$text.btPosition().left,zIndex:opts.boxzIndex}).get(0);}if(opts.cornerRadius>0){var newPoints=new Array();var newPoint;for(var i=0;i<points.length;i++){if(points[i].type=="corner"){newPoint=betweenPoint(points[i],points[(i-1)%points.length],opts.cornerRadius);newPoint.type="arcStart";newPoints[newPoints.length]=newPoint;newPoints[newPoints.length]=points[i];newPoint=betweenPoint(points[i],points[(i+1)%points.length],opts.cornerRadius);newPoint.type="arcEnd";newPoints[newPoints.length]=newPoint;}else{newPoints[newPoints.length]=points[i];}}points=newPoints;}var ctx=canvas.getContext("2d");drawIt.apply(ctx,[points]);ctx.fillStyle=opts.fill;if(opts.shadow){ctx.shadowOffsetX=2;ctx.shadowOffsetY=2;ctx.shadowBlur=5;ctx.shadowColor=opts.shadowColor;}ctx.closePath();ctx.fill();if(opts.strokeWidth>0){ctx.lineWidth=opts.strokeWidth;ctx.strokeStyle=opts.strokeStyle;ctx.beginPath();drawIt.apply(ctx,[points]);ctx.closePath();ctx.stroke();}if(opts.animate){$box.css({opacity:0.1});}$box.css({visibility:"visible"});if(opts.overlay){var overlay=$('<div class="bt-overlay"></div>').css({position:"absolute",backgroundColor:"blue",top:top,left:left,width:width,height:height,opacity:".2"}).appendTo(offsetParent);$(this).data("overlay",overlay);}var animParams={opacity:1};if(opts.animate){switch(position){case"top":animParams.top=$box.btPosition().top+opts.distance;break;case"left":animParams.left=$box.btPosition().left+opts.distance;break;case"bottom":animParams.top=$box.btPosition().top-opts.distance;break;case"right":animParams.left=$box.btPosition().left-opts.distance;break;}$box.animate(animParams,{duration:opts.speed,easing:opts.easing});}opts.postShow.apply(this);};var turnOff=function(){opts.preHide.apply(this);var box=$(this).data("bt-box");var overlay=$(this).data("bt-overlay");if(typeof box=="object"){$(box).remove();$(this).removeData("bt-box");}if(typeof overlay=="object"){$(overlay).remove();$(this).removeData("bt-overlay");}opts.postHide.apply(this);};var refresh=function(){turnOff.apply(this);turnOn.apply(this);};if(opts.killTitle){$(this).find("[title]").andSelf().each(function(){$(this).attr("bt-xTitle",$(this).attr("title")).removeAttr("title");});}if(typeof opts.trigger=="string"){opts.trigger=[opts.trigger];}if(opts.trigger[0]=="hover"){$(this).hover(function(){turnOn.apply(this);},function(){turnOff.apply(this);});}else{if(opts.trigger[0]=="now"){var box=$(this).data("bt-box");if(typeof box=="object"){turnOff.apply(this);}else{turnOn.apply(this);}}else{if(opts.trigger.length>1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){turnOn.apply(this);}).bind(opts.trigger[1],function(){turnOff.apply(this);});}else{$(this).bind(opts.trigger[0],function(){if(typeof this.triggerToggle=="undefined"){this.triggerToggle=false;}this.triggerToggle=!this.triggerToggle;if(this.triggerToggle){turnOn.apply(this);}else{turnOff.apply(this);}});}}}});function drawIt(points){this.moveTo(points[0].x,points[0].y);for(i=1;i<points.length;i++){if(points[i-1].type=="arcStart"){this.quadraticCurveTo(round5(points[i].x),round5(points[i].y),round5(points[(i+1)%points.length].x),round5(points[(i+1)%points.length].y));i++;}else{this.lineTo(round5(points[i].x),round5(points[i].y));}}}function round5(num){return Math.round(num-0.5)+0.5;}function numb(num){return parseInt(num)||0;}function betweenPoint(point1,point2,dist){var y,x;if(point1.x==point2.x){y=point1.y<point2.y?point1.y+dist:point1.y-dist;return{x:point1.x,y:y};}else{if(point1.y==point2.y){x=point1.x<point2.x?point1.x+dist:point1.x-dist;return{x:x,y:point1.y};}}}function centerPoint(arcStart,corner,arcEnd){var x=corner.x==arcStart.x?arcEnd.x:arcStart.x;var y=corner.y==arcStart.y?arcEnd.y:arcStart.y;var startAngle,endAngle;if(arcStart.x<arcEnd.x){if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*180;endAngle=(Math.PI/180)*90;}else{startAngle=(Math.PI/180)*90;endAngle=0;}}else{if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*270;endAngle=(Math.PI/180)*180;}else{startAngle=0;endAngle=(Math.PI/180)*270;}}return{x:x,y:y,type:"center",startAngle:startAngle,endAngle:endAngle};}function findIntersect(r1x1,r1y1,r1x2,r1y2,r2x1,r2y1,r2x2,r2y2){if(r2x1==r2x2){return findIntersectY(r1x1,r1y1,r1x2,r1y2,r2x1);}if(r2y1==r2y2){return findIntersectX(r1x1,r1y1,r1x2,r1y2,r2y1);}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var r2m=(r2y1-r2y2)/(r2x1-r2x2);var r2b=r2y1-(r2m*r2x1);var x=(r2b-r1b)/(r1m-r2m);var y=r1m*x+r1b;return{x:x,y:y};}function findIntersectY(r1x1,r1y1,r1x2,r1y2,x){if(r1y1==r1y2){return{x:x,y:r1y1};}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var y=r1m*x+r1b;return{x:x,y:y};}function findIntersectX(r1x1,r1y1,r1x2,r1y2,y){if(r1x1==r1x2){return{x:r1x1,y:y};}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var x=(y-r1b)/r1m;return{x:x,y:y};}};jQuery.fn.btPosition=function(){function B(H,I){return H[0]&&parseInt(jQuery.curCSS(H[0],I,true),10)||0;}var F=0,E=0,C;if(this[0]){var D=this.offsetParent(),G=this.offset(),A=/^body|html$/i.test(D[0].tagName)?{top:0,left:0}:D.offset();G.top-=B(this,"marginTop");G.left-=B(this,"marginLeft");A.top+=B(D,"borderTopWidth");A.left+=B(D,"borderLeftWidth");C={top:G.top-A.top,left:G.left-A.left};}return C;};jQuery.fn.bt.defaults={trigger:"hover",width:200,padding:10,spikeGirth:10,spikeLength:15,overlap:0,overlay:false,killTitle:true,textzIndex:9999,boxzIndex:9990,positions:["most"],fill:"rgb(255, 255, 102)",windowMargin:10,strokeWidth:1,strokeStyle:"#000",cornerRadius:5,shadow:false,shadowOffsetX:2,shadowOffsetY:2,shadowBlur:3,shadowColor:"#000",animate:false,distance:15,easing:"swing",speed:200,cssClass:"",cssStyles:{},titleSelector:"attr('title')",preShow:function(){return ;},postShow:function(){return ;},preHide:function(){return ;},postHide:function(){return ;}};(function(B){B.jmap=B.jmap||{};B.jmap.store={};B.jmap.JDetails={name:"jMaps Google Maps Plugin",description:"jMaps is a jQuery plugin that makes google maps easy",version:"3.0",releaseDate:"19/04/2008",author:"Tane Piper <digitalspaghetti@gmail.com>",blog:"http://digitalspaghetti.me.uk",repository:"http://hg.digitalspaghetti.me.uk/jmaps",googleGroup:"http://groups.google.com/group/jmaps",licenceType:"MIT",licenceURL:"http://www.opensource.org/licenses/mit-license.php"};B.jmap.JErrors={en:{functionDoesNotExist:"jMap Error 1: The function does not exist",addressNotFound:"This address cannot be found.  Please modify your search.",browserNotCompatible:"This browser is reported as being not compatible with Google Maps.",cannotLoad:"Cannot load the Google Maps API at this time.  Please check your connection."},fr:{addressNotFound:"Cette adresse ne peut pas être trouvée. Veuillez modifier votre recherche.",browserNotCompatible:"Ce navigateur est rapporté en tant qu'étant non compatible avec des cartes de Google.",cannotLoad:"Ne peut pas charger les cartes api de Google actuellement. Veuillez vérifier votre raccordement."},de:{addressNotFound:"Diese Adresse kann nicht gefunden werden. Ändern Sie bitte Ihre Suche.",browserNotCompatible:"Diese Datenbanksuchroutine wird als seiend nicht kompatibel mit Google Diagrammen berichtet.",cannotLoad:"Kann nicht die Google Diagramme API diesmal laden. Überprüfen Sie bitte Ihren Anschluß."},nl:{addressNotFound:"Dit adres kan worden gevonden niet. Gelieve te wijzigen uw onderzoek.",browserNotCompatible:"Dit browser wordt gemeld zoals zijnd niet compatibel met Kaarten Google.",cannotLoad:"Kan de Google Kaarten API op dit moment laden niet. Gelieve te controleren uw verbinding."},es:{addressNotFound:"Esta dirección no puede ser encontrada. Modifique por favor su búsqueda.",browserNotCompatible:"Este browser se divulga como siendo no compatible con los mapas de Google.",cannotLoad:"No puede cargar los mapas API de Google en este tiempo. Compruebe por favor su conexión."},sv:{addressNotFound:"Denna adress kunde ej hittas. Var god justera din sökning",browserNotCompatible:"Denna webbläsare är ej kompatibel med Google Maps",cannotLoad:"Kan inte ladda Google Maps API för tillfället. Var god kontrollera din anslutning."}};B.jmap.JDefaults={language:"en",mapType:"map",mapCenter:[55.958858,-3.162302],mapDimensions:[400,400],mapZoom:12,mapControlSize:"small",mapEnableType:false,mapEnableOverview:false,mapEnableDragging:true,mapEnableInfoWindows:true,mapEnableDoubleClickZoom:false,mapEnableScrollZoom:false,mapEnableSmoothZoom:false,mapEnableGoogleBar:false,mapEnableScaleControl:false,mapShowjMapIcon:false,debugMode:false};B.jmap.JAdsManagerDefaults={publisherId:""};B.jmap.JFeedDefaults={feedUrl:"",mapCenter:[]};B.jmap.JGroundOverlayDefaults={overlaySouthWestBounds:[],overlayNorthEastBounds:[],overlayImage:""};B.jmap.JIconDefaults={iconImage:"",iconShadow:"",iconSize:null,iconShadowSize:null,iconAnchor:null,iconInfoWindowAnchor:null,iconPrintImage:"",iconMozPrintImage:"",iconPrintShadow:"",iconTransparent:""};B.jmap.JMarkerManagerDefaults={borderPadding:100,maxZoom:17,trackMarkers:false};B.jmap.JMarkerDefaults={pointLatLng:[],pointHTML:null,pointOpenHTMLEvent:"mouseover",pointIsDraggable:false,pointIsRemovable:false,pointRemoveEvent:"dblclick",pointMinZoom:4,pointMaxZoom:17,pointIcon:null,pointMaxContent:null,pointMaxTitle:null};B.jmap.JPolygonDefaults={polygonPoints:[],polygonStrokeColor:"#000000",polygonStrokeWeight:5,polygonStrokeOpacity:1,polygonFillColor:"#ff0000",polygonFillOpacity:1,mapCenter:[],polygonClickable:true};B.jmap.JPolylineDefaults={polylinePoints:[],polylineStrokeColor:"#ff0000",polylineStrokeWidth:10,polylineStrokeOpacity:1,mapCenter:[],polylineGeodesic:false,polylineClickable:true,pointHTML:"aggsdga",pointOpenHTMLEvent:"mouseover",pointMaxContent:null,pointMaxTitle:null};B.jmap.JScreenOverlayDefaults={};B.jmap.JSearchAddressDefaults={address:null,cache:{},countryCode:"uk"};B.jmap.JSearchDirectionsDefault={fromAddress:"",toAddress:"",directionsPanel:""};B.jmap.JTrafficDefaults={method:"create",mapCenter:[]};B.jmap.JMoveToDefaults={centerMethod:"normal",mapType:null,mapCenter:[],mapZoom:null};B.jmap.JSavePositionDefaults={recall:false};B.jmap.variables={mapType:"Unknown",mapCenter:[]};B.jmap.init=function(G,H,A){var H=B.extend({},B.jmap.JDefaults,H);var H=B.jmap.JOptions=B.meta?B.extend({},H,B(this).data()):H;B.jmap._initChecks(G);G.jmap=B.jmap.GMap2=new GMap2(G);if(H.mapShowjMapIcon){B.jmap.addScreenOverlay({imageUrl:"http://hg.digitalspaghetti.me.uk/jmaps/raw-file/3228fade0b3c/docs/images/jmaps-mapicon.png",screenXY:[70,10],overlayXY:[0,0],size:[42,25]});}var F=B.jmap._initMapType(H.mapType);G.jmap.setCenter(new GLatLng(H.mapCenter[0],H.mapCenter[1]),H.mapZoom,F);switch(H.mapControlSize){case"small":G.jmap.addControl(new GSmallMapControl());break;case"large":G.jmap.addControl(new GLargeMapControl());break;}if(H.mapEnableType){G.jmap.addControl(new GMapTypeControl());}if(H.mapEnableOverview){G.jmap.addControl(new GOverviewMapControl());}if(!H.mapEnableDragging){G.jmap.disableDragging();}if(!H.mapEnableInfoWindows){G.jmap.disableInfoWindow();}if(H.mapEnableDoubleClickZoom){G.jmap.enableDoubleClickZoom();}if(H.mapEnableScrollZoom){G.jmap.enableScrollWheelZoom();}if(H.mapEnableSmoothZoom){G.jmap.enableContinuousZoom();}if(H.mapEnableGoogleBar){G.jmap.enableGoogleBar();}if(H.mapEnableScaleControl){G.jmap.addControl(new GScaleControl());}if(H.debugMode){console.log(G.jmap);}B.jmap.getMapType();if(typeof A=="function"){return A(G,H);}};B.jmap.addFeed=function(F,A){var F=B.extend({},B.jmap.JFeedDefaults,F);var E=new GGeoXml(F.feedUrl);B.jmap.GMap2.addOverlay(E);if(F.mapCenter[0]&&F.mapCenter[1]){B.jmap.GMap2.setCenter(new GLatLng(F.mapCenter[0],F.mapCenter[1]));}if(typeof A=="function"){return A(E,F);}};B.jmap.addGroundOverlay=function(F,A){var F=B.extend({},B.jmap.JGroundOverlayDefaults,F);var E=new GLatLngBounds(new GLatLng(F.overlaySouthWestBounds[0],F.overlaySouthWestBounds[1]),new GLatLng(F.overlayNorthEastBounds[0],F.overlayNorthEastBounds[1]));B.jmap.GGroundOverlay=new GGroundOverlay(F.overlayImage,E);B.jmap.GMap2.addOverlay(B.jmap.GGroundOverlay);if(typeof A=="function"){return A();}};B.jmap.hideGroundOverlay=function(A){B.jmap.GGroundOverlay.hide();if(typeof A=="function"){return A();}};B.jmap.showGroundOverlay=function(A){isHidden=B.jmap.GGroundOverlay.isHidden();if(isHidden){B.jmap.GGroundOverlay.show();}if(typeof A=="function"){return A();}};B.jmap.addMarker=function(F,A){var F=B.extend({},B.jmap.JMarkerDefaults,F);var G={};if(typeof F.pointIcon=="object"){B.extend(G,{icon:F.pointIcon});}if(F.pointIsDraggable){B.extend(G,{draggable:F.pointIsDraggable});}var H=new GMarker(new GLatLng(F.pointLatLng[0],F.pointLatLng[1]),G);if(F.pointHTML){GEvent.addListener(H,F.pointOpenHTMLEvent,function(){H.openInfoWindowHtml(F.pointHTML,{maxContent:F.pointMaxContent,maxTitle:F.pointMaxTitle});});}if(F.pointIsRemovable){GEvent.addListener(H,F.pointRemoveEvent,function(){B.jmap.GMap2.removeOverlay(H);});}if(B.jmap.GMarkerManager){B.jmap.GMarkerManager.addMarker(H,F.pointMinZoom,F.pointMaxZoom);}else{B.jmap.GMap2.addOverlay(H);}if(typeof A=="function"){return A(H,F);}};B.jmap.removeMarker=function(A){B.jmap.GMap2.removeOverlay(A);};B.jmap.addScreenOverlay=function(E,A){var E=B.extend({},B.jmap.JScreenOverlayDefaults,E);var F=new GScreenOverlay(E.imageUrl,new GScreenPoint(E.screenXY[0],E.screenXY[1]),new GScreenPoint(E.overlayXY[0],E.overlayXY[1]),new GScreenSize(E.size[0],E.size[1]));B.jmap.GMap2.addOverlay(F);if(typeof A=="function"){return A(F,E);}};B.jmap.addPolygon=function(G,A){var G=B.extend({},B.jmap.JPolygonDefaults,G);H={};if(!G.polygonClickable){var H=B.extend({},H,{clickable:false});}if(G.mapCenter[0]&&G.mapCenter[1]){B.jmap.GMap2.setCenter(new GLatLng(G.mapCenter[0],G.mapCenter[1]));}var F=new GPolygon(G.polygonPoints,G.polygonStrokeColor,G.polygonStrokeWeight,G.polygonStrokeOpacity,G.polygonFillColor,G.polygonFillOpacity,H);B.jmap.GMap2.addOverlay(F);if(typeof A=="function"){return A();}};B.jmap.addPolyline=function(H,F){var H=B.extend({},B.jmap.JPolylineDefaults,H);var G={};if(H.polylineGeodesic){B.extend({},G,{geodesic:true});}if(!H.polylineClickable){B.extend({},G,{clickable:false});}if(H.mapCenter[0]&&H.mapCenter[1]){B.jmap.GMap2.setCenter(new GLatLng(H.mapCenter[0],H.mapCenter[1]));}var A={clickable:true,geodesic:true};var I=new GPolyline(H.polylinePoints,H.polylineStrokeColor,H.polylineStrokeWidth,H.polylineStrokeOpacity,A);B.jmap.GMap2.addOverlay(I);if(typeof F=="function"){return F(I,H);}};B.jmap.removePolyline=function(A){B.jmap.GMap2.removeOverlay(A);};B.jmap.openInfowindowpolyline=function(A){B.jmap.GMap2.openInfoWindow(A.polyCenter,A.polyHTML);};B.jmap.resetCenterAndZoom=function(A){B.jmap.GMap2.setCenter(new GLatLng(A.mapCenter[0],A.mapCenter[1]),A.mapZoom);};B.jmap.addTrafficInfo=function(D,A){var D=B.extend({},B.jmap.JTrafficDefaults,D);switch(D.method){case"create":B.jmap.GTrafficOverlay=new GTrafficOverlay;B.jmap.GMap2.addOverlay(B.jmap.GTrafficOverlay);if(D.mapCenter[0]&&D.mapCenter[1]){B.jmap.GMap2.setCenter(new GLatLng(D.mapCenter[0],D.mapCenter[1]));}break;case"destroy":B.jmap.GMap2.removeOverlay(B.jmap.GTrafficOverlay);break;}if(typeof A=="function"){return A();}};B.jmap.disableTraffic=function(A){B.jmap.GTrafficOverlay.hide();if(typeof A=="function"){return A();}};B.jmap.enableTraffic=function(A){B.jmap.GTrafficOverlay.show();if(typeof A=="function"){return A();}};B.jmap.createAdsManager=function(D,A){var D=B.extend({},B.jmap.JAdsManagerDefaults,D);B.jmap.GAdsManager=new GAdsManager(B.jmap.GMap2,D.publisherId);if(typeof A=="function"){return A();}};B.jmap.hideAds=function(A){B.jmap.GAdsManager.disable();if(typeof A=="function"){return A();}};B.jmap.showAds=function(A){B.jmap.GAdsManager.enable();if(typeof A=="function"){return A();}};B.jmap.createGeoCache=function(A){B.jmap.GGeocodeCache=new GGeocodeCache();if(typeof A=="function"){return A();}};B.jmap.createGeoCoder=function(D,A){if(D){B.jmap.GClientGeocoder=new GClientGeocoder(D);}else{B.jmap.GClientGeocoder=new GClientGeocoder;}if(typeof A=="function"){return A();}};B.jmap.createIcon=function(D){var D=B.extend({},B.jmap.JIconDefaults,D);var A=new GIcon(G_DEFAULT_ICON);if(D.iconImage){A.image=D.iconImage;}if(D.iconShadow){A.shadow=D.iconShadow;}if(D.iconSize){A.iconSize=D.iconSize;}if(D.iconShadowSize){A.shadowSize=D.iconShadowSize;}if(D.iconAnchor){A.iconAnchor=D.iconAnchor;}if(D.iconInfoWindowAnchor){A.infoWindowAnchor=D.iconInfoWindowAnchor;}return A;};B.jmap.createMarkerManager=function(D,A){var D=B.extend({},B.jmap.JMarkerManagerDefaults,D);B.jmap.GMarkerManager=new GMarkerManager(B.jmap.GMap2,D);if(typeof A=="function"){return A();}};B.jmap.searchAddress=function(H,A){var H=B.extend({},B.jmap.JSearchAddressDefaults,H);var G=B.extend({},B.jmap.JMarkerManagerDefaults);if(typeof B.jmap.GClientGeocoder=="undefined"){var F=new GClientGeocoder;}else{var F=B.jmap.GClientGeocoder;}F.getLatLng(H.address,function(C){if(!C){throw new Error(B.jmap.JErrors[B.jmap.JOptions.language].addressNotFound);}if(typeof A=="function"){return A(H,C);}});};B.jmap.searchDirections=function(E,A){var E=B.extend({},B.jmap.JSearchDirectionsDefaults,E);var F=B("#"+E.directionsPanel).get(0);B.jmap.GDirections=new GDirections(B.jmap.GMap2,F);B.jmap.GDirections.load(E.fromAddress+" to "+E.toAddress);if(typeof A=="function"){return A();}};B.jmap.moveTo=function(G,A){var G=B.extend({},B.jmap.JMoveToDefaults,G);if(G.mapType){var F=B.jmap._initMapType(G.mapType);}var H=new GLatLng(G.mapCenter[0],G.mapCenter[1]);switch(G.centerMethod){case"normal":B.jmap.GMap2.setCenter(H,G.mapZoom,F);break;case"pan":B.jmap.GMap2.panTo(H);break;}if(typeof A=="function"){return A();}};B.jmap.savePosition=function(D,A){var D=B.extend({},B.jmap.JMoveToDefaults,D);if(D.recall){B.jmap.GMap2.returnToSavedPosition();}else{B.jmap.GMap2.savePosition();}if(typeof A=="function"){return A();}};B.jmap.createKeyboardHandler=function(A){B.jmap.keyboardHandler=new GKeyboardHandler(B.jmap.GMap2);if(typeof A=="function"){return A();}};B.jmap.getMapType=function(){var A=B.jmap.GMap2.getMapTypes();var D=B.jmap.GMap2.getCurrentMapType();if(D.Hz){B.jmap.variables.mapType=D.Hz;}};B.jmap.getCenter=function(){var A=B.jmap.GMap2.getCenter();B.jmap.variables.mapCenter=A;if(typeof callback=="function"){return callback(A);}};B.jmap.getBounds=function(){var A=B.jmap.GMap2.getBounds();B.jmap.variables.mapBounds=A;if(typeof callback=="function"){return callback(A);}};B.jmap._initMapType=function(D){switch(D){case"map":var A=G_NORMAL_MAP;break;case"sat":var A=G_SATELLITE_MAP;break;case"hybrid":var A=G_HYBRID_MAP;break;}return A;};B.jmap._initChecks=function(A){if(typeof GBrowserIsCompatible=="undefined"){B(A).text(B.jmap.JErrors[B.jmap.JOptions.language].cannotLoad).css({color:"#f00"});throw Error(B.jmap.JErrors[B.jmap.JOptions.language].cannotLoad);}if(!GBrowserIsCompatible()){B(A).text(B.jmap.JErrors[B.jmap.JOptions.language].browserNotCompatible).css({color:"#f00"});throw Error(B.jmap.JErrors[B.jmap.JOptions.language].browserNotCompatible);}};B.jmap.storePoints=function(D,A){B.jmap.store=B.extend({},B.jmap.store,D);if(typeof A=="function"){return A(B.jmap.store);}};B.fn.jmap=function(A,F,E){return this.each(function(){if(A=="init"){new B.jmap.init(this,F,E);}else{if(typeof A=="object"||A==null){new B.jmap.init(this,A,F);}else{if(typeof F=="function"){new B.jmap[A](F);}else{try{new B.jmap[A](F,E);}catch(C){throw Error(B.jmap.JErrors[B.jmap.JOptions.language].functionDoesNotExist);}}}}});};})(jQuery);var iframe=null;jQuery.jPrintArea=function(C){iframe=document.createElement("IFRAME");var D=null;$(iframe).attr("style","position:absolute;width:0px;height:0px;left:-500px;top:-500px;");document.body.appendChild(iframe);D=iframe.contentWindow.document;var A=window.document.getElementsByTagName("link");for(var B=0;B<A.length;B++){if(A[B].rel.toLowerCase()=="stylesheet"){D.write('<link type="text/css" rel="stylesheet" href="'+A[B].href+'"></link>');}}D.write('<div class="'+$(C).attr("class")+'">'+$(C).html()+"</div>");D.close();iframe.contentWindow.focus();iframe.contentWindow.print();setTimeout("closePrintFrame()",60000);};function closePrintFrame(){if(iframe!=null){document.body.removeChild(iframe);}}if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n;}Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z";};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c;}return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}}return{stringify:function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");}};}();}
