(function(D){var A=D.fn.remove;D.fn.remove=function(){D("*",this).add(this).triggerHandler("remove");return A.apply(this,arguments)};function C(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))&&C(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 B(I,E,J,H){function G(L){var K=D[I][E][L]||[];return(typeof K=="string"?K.split(/,?\s+/):K)}var F=G("getter");if(H.length==1&&typeof H[0]=="string"){F=F.concat(G("getterSetter"))}return(D.inArray(J,F)!=-1)}D.widget=function(E,F){var G=E.split(".")[0];E=E.split(".")[1];D.fn[E]=function(K){var I=(typeof K=="string"),J=Array.prototype.slice.call(arguments,1);if(I&&K.substring(0,1)=="_"){return this}if(I&&B(G,E,K,J)){var H=D.data(this[0],E);return(H?H[K].apply(H,J):undefined)}return this.each(function(){var L=D.data(this,E);(!L&&!I&&D.data(this,E,new D[G][E](this,K)));(L&&I&&D.isFunction(L[K])&&L[K].apply(L,J))})};D[G][E]=function(I,J){var H=this;this.widgetName=E;this.widgetEventPrefix=D[G][E].eventPrefix||E;this.widgetBaseClass=G+"-"+E;this.options=D.extend({},D.widget.defaults,D[G][E].defaults,D.metadata&&D.metadata.get(I)[E],J);this.element=D(I).bind("setData."+E,function(M,K,L){return H._setData(K,L)}).bind("getData."+E,function(L,K){return H._getData(K)}).bind("remove",function(){return H.destroy()});this._init()};D[G][E].prototype=D.extend({},D.widget.prototype,F);D[G][E].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,E,I){var H=D.ui[F].prototype;for(var G in I){H.plugins[G]=H.plugins[G]||[];H.plugins[G].push([E,I[G]])}},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,E){if(D(H).css("overflow")=="hidden"){return false}var G=(E&&E=="left")?"scrollLeft":"scrollTop",F=false;if(H[G]>0){return true}H[G]=1;F=(H[G]>0);H[G]=0;return F}};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 E=this,H=(G.which==1),F=(typeof this.options.cancel=="string"?D(G.target).parents().add(G.target).filter(this.options.cancel).length:false);if(!H||F||!this._mouseCapture(G)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){E.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 E._mouseMove(I)};this._mouseUpDelegate=function(I){return E._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(E){E.widget("ui.accordion",{_init:function(){var H=this.options;if(H.navigation){var J=this.element.find("a").filter(H.navigationFilter);if(J.length){if(J.filter(H.header).length){H.active=J}else{H.active=J.parent().parent().prev();J.addClass("current")}}}H.headers=this.element.find(H.header);H.active=A(H.headers,H.active);if(E.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E('<span class="ui-accordion-left"/>').insertBefore(H.headers);E('<span class="ui-accordion-right"/>').appendTo(H.headers);H.headers.addClass("ui-accordion-header").attr("tabindex","0")}var G;if(H.fillSpace){G=this.element.parent().height();H.headers.each(function(){G-=E(this).outerHeight()});var I=0;H.headers.next().each(function(){I=Math.max(I,E(this).innerHeight()-E(this).height())}).height(G-I)}else{if(H.autoHeight){G=0;H.headers.next().each(function(){G=Math.max(G,E(this).outerHeight())}).height(G)}}H.headers.not(H.active||"").next().hide();H.active.parent().andSelf().addClass(H.selectedClass);if(H.event){this.element.bind((H.event)+".accordion",F)}},activate:function(G){F.call(this.element[0],{target:A(this.options.headers,G)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});function C(H,G){return function(){return H.apply(G,arguments)}}function B(H){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var I=G.options;I.running=H?0:--I.running;if(I.running){return }if(I.clearStyle){I.toShow.add(I.toHide).css({height:"",overflow:""})}G._trigger("change",null,I.data)}function D(L,I,K,G,M){var H=E.data(this,"accordion").options;H.toShow=L;H.toHide=I;H.data=K;var J=C(B,this);E.data(this,"accordion")._trigger("changestart",null,H.data);H.running=I.size()===0?L.size():I.size();if(H.animated){if(!H.alwaysOpen&&G){E.ui.accordion.animations[H.animated]({toShow:jQuery([]),toHide:I,complete:J,down:M,autoHeight:H.autoHeight})}else{E.ui.accordion.animations[H.animated]({toShow:L,toHide:I,complete:J,down:M,autoHeight:H.autoHeight})}}else{if(!H.alwaysOpen&&G){L.toggle()}else{I.hide();L.show()}J(true)}}function F(K){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!K.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={options:J,newHeader:jQuery([]),oldHeader:J.active,newContent:jQuery([]),oldContent:I},L=(J.active=E([]));D.call(this,L,I,M);return false}var H=E(K.target);H=E(H.parents(J.header)[0]||H);var G=H[0]==J.active[0];if(J.running||(J.alwaysOpen&&G)){return false}if(!H.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!G){H.parent().andSelf().addClass(J.selectedClass)}var L=H.next(),I=J.active.next(),M={options:J,newHeader:G&&!J.alwaysOpen?E([]):H,oldHeader:J.active,newContent:G&&!J.alwaysOpen?E([]):L,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(H[0]);J.active=G?E([]):H;D.call(this,L,I,M,G,N);return false}function A(H,G){return G?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(G,I){G=E.extend({easing:"swing",duration:300},G,I);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var H=G.toHide.height(),J=G.toShow.height(),K=J/H;G.toShow.css({height:0,overflow:"hidden"}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(L){var M=(H-L)*K;if(E.browser.msie||E.browser.opera){M=Math.ceil(M)}G.toShow.height(M)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"bounceout":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}})})(jQuery);