Modernizr.addTest("ipad",function(){return !!navigator.userAgent.match(/iPad/i)});Modernizr.addTest("iphone",function(){return !!navigator.userAgent.match(/iPhone/i)});Modernizr.addTest("ipod",function(){return !!navigator.userAgent.match(/iPod/i)});Modernizr.addTest("appleios",function(){return(Modernizr.ipad||Modernizr.ipod||Modernizr.iphone)});
/*
 * jQuery UI 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(D,C){function B(F,E){var G=F.nodeName.toLowerCase();if("area"===G){E=F.parentNode;G=E.name;if(!F.href||!G||E.nodeName.toLowerCase()!=="map"){return false}F=D("img[usemap=#"+G+"]")[0];return !!F&&A(F)}return(/input|select|textarea|button|object/.test(G)?!F.disabled:"a"==G?F.href||E:E)&&A(F)}function A(E){return !D(E).parents().andSelf().filter(function(){return D.curCSS(this,"visibility")==="hidden"||D.expr.filters.hidden(this)}).length}D.ui=D.ui||{};if(!D.ui.version){D.extend(D.ui,{version:"1.8.16",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,WINDOWS:91}});D.fn.extend({propAttr:D.fn.prop||D.fn.attr,_focus:D.fn.focus,focus:function(F,E){return typeof F==="number"?this.each(function(){var G=this;setTimeout(function(){D(G).focus();E&&E.call(G)},F)}):this._focus.apply(this,arguments)},scrollParent:function(){var E;E=D.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(D.curCSS(this,"position",1))&&/(auto|scroll)/.test(D.curCSS(this,"overflow",1)+D.curCSS(this,"overflow-y",1)+D.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(D.curCSS(this,"overflow",1)+D.curCSS(this,"overflow-y",1)+D.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!E.length?D(document):E},zIndex:function(F){if(F!==C){return this.css("zIndex",F)}if(this.length){F=D(this[0]);for(var E;F.length&&F[0]!==document;){E=F.css("position");if(E==="absolute"||E==="relative"||E==="fixed"){E=parseInt(F.css("zIndex"),10);if(!isNaN(E)&&E!==0){return E}}F=F.parent()}}return 0},disableSelection:function(){return this.bind((D.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(E){E.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});D.each(["Width","Height"],function(F,E){function J(M,L,K,N){D.each(I,function(){L-=parseFloat(D.curCSS(M,"padding"+this,true))||0;if(K){L-=parseFloat(D.curCSS(M,"border"+this+"Width",true))||0}if(N){L-=parseFloat(D.curCSS(M,"margin"+this,true))||0}});return L}var I=E==="Width"?["Left","Right"]:["Top","Bottom"],H=E.toLowerCase(),G={innerWidth:D.fn.innerWidth,innerHeight:D.fn.innerHeight,outerWidth:D.fn.outerWidth,outerHeight:D.fn.outerHeight};D.fn["inner"+E]=function(K){if(K===C){return G["inner"+E].call(this)}return this.each(function(){D(this).css(H,J(this,K)+"px")})};D.fn["outer"+E]=function(L,K){if(typeof L!=="number"){return G["outer"+E].call(this,L)}return this.each(function(){D(this).css(H,J(this,L,true,K)+"px")})}});D.extend(D.expr[":"],{data:function(F,E,G){return !!D.data(F,G[3])},focusable:function(E){return B(E,!isNaN(D.attr(E,"tabindex")))},tabbable:function(F){var E=D.attr(F,"tabindex"),G=isNaN(E);return(G||E>=0)&&B(F,!G)}});D(function(){var F=document.body,E=F.appendChild(E=document.createElement("div"));D.extend(E.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});D.support.minHeight=E.offsetHeight===100;D.support.selectstart="onselectstart" in E;F.removeChild(E).style.display="none"});D.extend(D.ui,{plugin:{add:function(F,E,H){F=D.ui[F].prototype;for(var G in H){F.plugins[G]=F.plugins[G]||[];F.plugins[G].push([E,H[G]])}},call:function(F,E,H){if((E=F.plugins[E])&&F.element[0].parentNode){for(var G=0;G<E.length;G++){F.options[E[G][0]]&&E[G][1].apply(F.element,H)}}}},contains:function(F,E){return document.compareDocumentPosition?F.compareDocumentPosition(E)&16:F!==E&&F.contains(E)},hasScroll:function(F,E){if(D(F).css("overflow")==="hidden"){return false}E=E&&E==="left"?"scrollLeft":"scrollTop";var G=false;if(F[E]>0){return true}F[E]=1;G=F[E]>0;F[E]=0;return G},isOverAxis:function(F,E,G){return F>E&&F<E+G},isOver:function(F,E,J,I,H,G){return D.ui.isOverAxis(F,J,H)&&D.ui.isOverAxis(E,I,G)}})}})(jQuery);
/*
 * jQuery UI Widget 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(A,D){if(A.cleanData){var C=A.cleanData;A.cleanData=function(E){for(var H=0,G;(G=E[H])!=null;H++){try{A(G).triggerHandler("remove")}catch(F){}}C(E)}}else{var B=A.fn.remove;A.fn.remove=function(E,F){return this.each(function(){if(!F){if(!E||A.filter(E,[this]).length){A("*",this).add([this]).each(function(){try{A(this).triggerHandler("remove")}catch(G){}})}}return B.call(A(this),E,F)})}}A.widget=function(E,I,H){var G=E.split(".")[0],F;E=E.split(".")[1];F=G+"-"+E;if(!H){H=I;I=A.Widget}A.expr[":"][F]=function(J){return !!A.data(J,E)};A[G]=A[G]||{};A[G][E]=function(J,K){arguments.length&&this._createWidget(J,K)};I=new I;I.options=A.extend(true,{},I.options);A[G][E].prototype=A.extend(true,I,{namespace:G,widgetName:E,widgetEventPrefix:A[G][E].prototype.widgetEventPrefix||E,widgetBaseClass:F},H);A.widget.bridge(E,A[G][E])};A.widget.bridge=function(E,F){A.fn[E]=function(J){var I=typeof J==="string",H=Array.prototype.slice.call(arguments,1),G=this;J=!I&&H.length?A.extend.apply(null,[true,J].concat(H)):J;if(I&&J.charAt(0)==="_"){return G}I?this.each(function(){var L=A.data(this,E),K=L&&A.isFunction(L[J])?L[J].apply(L,H):L;if(K!==L&&K!==D){G=K;return false}}):this.each(function(){var K=A.data(this,E);K?K.option(J||{})._init():A.data(this,E,new F(J,this))});return G}};A.Widget=function(E,F){arguments.length&&this._createWidget(E,F)};A.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(E,G){A.data(G,this.widgetName,this);this.element=A(G);this.options=A.extend(true,{},this.options,this._getCreateOptions(),E);var F=this;this.element.bind("remove."+this.widgetName,function(){F.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return A.metadata&&A.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(E,G){var F=E;if(arguments.length===0){return A.extend({},this.options)}if(typeof E==="string"){if(G===D){return this.options[E]}F={};F[E]=G}this._setOptions(F);return this},_setOptions:function(E){var F=this;A.each(E,function(H,G){F._setOption(H,G)});return this},_setOption:function(E,F){this.options[E]=F;if(E==="disabled"){this.widget()[F?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",F)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(E,I,H){var G=this.options[E];I=A.Event(I);I.type=(E===this.widgetEventPrefix?E:this.widgetEventPrefix+E).toLowerCase();H=H||{};if(I.originalEvent){E=A.event.props.length;for(var F;E;){F=A.event.props[--E];I[F]=I.originalEvent[F]}}this.element.trigger(I,H);return !(A.isFunction(G)&&G.call(this.element[0],I,H)===false||I.isDefaultPrevented())}}})(jQuery);
/*
 * jQuery UI Mouse 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(A){var B=false;A(document).mouseup(function(){B=false});A.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var C=this;this.element.bind("mousedown."+this.widgetName,function(D){return C._mouseDown(D)}).bind("click."+this.widgetName,function(D){if(true===A.data(D.target,C.widgetName+".preventClickEvent")){A.removeData(D.target,C.widgetName+".preventClickEvent");D.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(C){if(!B){this._mouseStarted&&this._mouseUp(C);this._mouseDownEvent=C;var F=this,E=C.which==1,D=typeof this.options.cancel=="string"&&C.target.nodeName?A(C.target).closest(this.options.cancel).length:false;if(!E||D||!this._mouseCapture(C)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){F.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(C)&&this._mouseDelayMet(C)){this._mouseStarted=this._mouseStart(C)!==false;if(!this._mouseStarted){C.preventDefault();return true}}true===A.data(C.target,this.widgetName+".preventClickEvent")&&A.removeData(C.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(G){return F._mouseMove(G)};this._mouseUpDelegate=function(G){return F._mouseUp(G)};A(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);C.preventDefault();return B=true}},_mouseMove:function(C){if(A.browser.msie&&!(document.documentMode>=9)&&!C.button){return this._mouseUp(C)}if(this._mouseStarted){this._mouseDrag(C);return C.preventDefault()}if(this._mouseDistanceMet(C)&&this._mouseDelayMet(C)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,C)!==false)?this._mouseDrag(C):this._mouseUp(C)}return !this._mouseStarted},_mouseUp:function(C){A(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;C.target==this._mouseDownEvent.target&&A.data(C.target,this.widgetName+".preventClickEvent",true);this._mouseStop(C)}return false},_mouseDistanceMet:function(C){return Math.max(Math.abs(this._mouseDownEvent.pageX-C.pageX),Math.abs(this._mouseDownEvent.pageY-C.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(E){E.ui=E.ui||{};var D=/left|center|right/,C=/top|center|bottom/,B=E.fn.position,A=E.fn.offset;E.fn.position=function(F){if(!F||!F.of){return B.apply(this,arguments)}F=E.extend({},F);var G=E(F.of),M=G[0],K=(F.collision||"flip").split(" "),L=F.offset?F.offset.split(" "):[0,0],J,H,I;if(M.nodeType===9){J=G.width();H=G.height();I={top:0,left:0}}else{if(M.setTimeout){J=G.width();H=G.height();I={top:G.scrollTop(),left:G.scrollLeft()}}else{if(M.preventDefault){F.at="left top";J=H=0;I={top:F.of.pageY,left:F.of.pageX}}else{J=G.outerWidth();H=G.outerHeight();I=G.offset()}}}E.each(["my","at"],function(){var N=(F[this]||"").split(" ");if(N.length===1){N=D.test(N[0])?N.concat(["center"]):C.test(N[0])?["center"].concat(N):["center","center"]}N[0]=D.test(N[0])?N[0]:"center";N[1]=C.test(N[1])?N[1]:"center";F[this]=N});if(K.length===1){K[1]=K[0]}L[0]=parseInt(L[0],10)||0;if(L.length===1){L[1]=L[0]}L[1]=parseInt(L[1],10)||0;if(F.at[0]==="right"){I.left+=J}else{if(F.at[0]==="center"){I.left+=J/2}}if(F.at[1]==="bottom"){I.top+=H}else{if(F.at[1]==="center"){I.top+=H/2}}I.left+=L[0];I.top+=L[1];return this.each(function(){var T=E(this),R=T.outerWidth(),Q=T.outerHeight(),P=parseInt(E.curCSS(this,"marginLeft",true))||0,O=parseInt(E.curCSS(this,"marginTop",true))||0,V=R+P+(parseInt(E.curCSS(this,"marginRight",true))||0),U=Q+O+(parseInt(E.curCSS(this,"marginBottom",true))||0),S=E.extend({},I),N;if(F.my[0]==="right"){S.left-=R}else{if(F.my[0]==="center"){S.left-=R/2}}if(F.my[1]==="bottom"){S.top-=Q}else{if(F.my[1]==="center"){S.top-=Q/2}}S.left=Math.round(S.left);S.top=Math.round(S.top);N={left:S.left-P,top:S.top-O};E.each(["left","top"],function(X,W){E.ui.position[K[X]]&&E.ui.position[K[X]][W](S,{targetWidth:J,targetHeight:H,elemWidth:R,elemHeight:Q,collisionPosition:N,collisionWidth:V,collisionHeight:U,offset:L,my:F.my,at:F.at})});E.fn.bgiframe&&T.bgiframe();T.offset(E.extend(S,{using:F.using}))})};E.ui.position={fit:{left:function(F,G){var H=E(window);H=G.collisionPosition.left+G.collisionWidth-H.width()-H.scrollLeft();F.left=H>0?F.left-H:Math.max(F.left-G.collisionPosition.left,F.left)},top:function(F,G){var H=E(window);H=G.collisionPosition.top+G.collisionHeight-H.height()-H.scrollTop();F.top=H>0?F.top-H:Math.max(F.top-G.collisionPosition.top,F.top)}},flip:{left:function(F,G){if(G.at[0]!=="center"){var K=E(window);K=G.collisionPosition.left+G.collisionWidth-K.width()-K.scrollLeft();var I=G.my[0]==="left"?-G.elemWidth:G.my[0]==="right"?G.elemWidth:0,J=G.at[0]==="left"?G.targetWidth:-G.targetWidth,H=-2*G.offset[0];F.left+=G.collisionPosition.left<0?I+J+H:K>0?I+J+H:0}},top:function(F,G){if(G.at[1]!=="center"){var K=E(window);K=G.collisionPosition.top+G.collisionHeight-K.height()-K.scrollTop();var I=G.my[1]==="top"?-G.elemHeight:G.my[1]==="bottom"?G.elemHeight:0,J=G.at[1]==="top"?G.targetHeight:-G.targetHeight,H=-2*G.offset[1];F.top+=G.collisionPosition.top<0?I+J+H:K>0?I+J+H:0}}}};if(!E.offset.setOffset){E.offset.setOffset=function(F,G){if(/static/.test(E.curCSS(F,"position"))){F.style.position="relative"}var K=E(F),I=K.offset(),J=parseInt(E.curCSS(F,"top",true),10)||0,H=parseInt(E.curCSS(F,"left",true),10)||0;I={top:G.top-I.top+J,left:G.left-I.left+H};"using" in G?G.using.call(F,I):K.css(I)};E.fn.offset=function(F){var G=this[0];if(!G||!G.ownerDocument){return null}if(F){return this.each(function(){E.offset.setOffset(this,F)})}return A.call(this)}}})(jQuery);(function(A){A.widget("ui.draggable",A.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(C){var B=this.options;if(this.helper||B.disabled||A(C.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(C);if(!this.handle){return false}if(B.iframeFix){A(B.iframeFix===true?"iframe":B.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")})}return true},_mouseStart:function(C){var B=this.options;this.helper=this._createHelper(C);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:C.pageX-this.offset.left,top:C.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(C);this.originalPageX=C.pageX;this.originalPageY=C.pageY;B.cursorAt&&this._adjustOffsetFromHelper(B.cursorAt);B.containment&&this._setContainment();if(this._trigger("start",C)===false){this._clear();return false}this._cacheHelperProportions();A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(C,true);A.ui.ddmanager&&A.ui.ddmanager.dragStart(this,C);return true},_mouseDrag:function(C,B){this.position=this._generatePosition(C);this.positionAbs=this._convertPositionTo("absolute");if(!B){B=this._uiHash();if(this._trigger("drag",C,B)===false){this._mouseUp({});return false}this.position=B.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"}A.ui.ddmanager&&A.ui.ddmanager.drag(this,C);return false},_mouseStop:function(C){var B=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){B=A.ui.ddmanager.drop(this,C)}if(this.dropped){B=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if(this.options.revert=="invalid"&&!B||this.options.revert=="valid"&&B||this.options.revert===true||A.isFunction(this.options.revert)&&this.options.revert.call(this.element,B)){var D=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){D._trigger("stop",C)!==false&&D._clear()})}else{this._trigger("stop",C)!==false&&this._clear()}return false},_mouseUp:function(B){this.options.iframeFix===true&&A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});A.ui.ddmanager&&A.ui.ddmanager.dragStop(this,B);return A.ui.mouse.prototype._mouseUp.call(this,B)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_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(C){var B=this.options;C=A.isFunction(B.helper)?A(B.helper.apply(this.element[0],[C])):B.helper=="clone"?this.element.clone().removeAttr("id"):this.element;C.parents("body").length||C.appendTo(B.appendTo=="parent"?this.element[0].parentNode:B.appendTo);C[0]!=this.element[0]&&!/(fixed|absolute)/.test(C.css("position"))&&C.css("position","absolute");return C},_adjustOffsetFromHelper:function(B){if(typeof B=="string"){B=B.split(" ")}if(A.isArray(B)){B={left:+B[0],top:+B[1]||0}}if("left" in B){this.offset.click.left=B.left+this.margins.left}if("right" in B){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if("top" in B){this.offset.click.top=B.top+this.margins.top}if("bottom" in B){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var C=this.options;if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[C.containment=="document"?0:A(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,C.containment=="document"?0:A(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(C.containment=="document"?0:A(window).scrollLeft())+A(C.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(C.containment=="document"?0:A(window).scrollTop())+(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(C.containment)&&C.containment.constructor!=Array){C=A(C.containment);var B=C[0];if(B){C.offset();var D=A(B).css("overflow")!="hidden";this.containment=[(parseInt(A(B).css("borderLeftWidth"),10)||0)+(parseInt(A(B).css("paddingLeft"),10)||0),(parseInt(A(B).css("borderTopWidth"),10)||0)+(parseInt(A(B).css("paddingTop"),10)||0),(D?Math.max(B.scrollWidth,B.offsetWidth):B.offsetWidth)-(parseInt(A(B).css("borderLeftWidth"),10)||0)-(parseInt(A(B).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(D?Math.max(B.scrollHeight,B.offsetHeight):B.offsetHeight)-(parseInt(A(B).css("borderTopWidth"),10)||0)-(parseInt(A(B).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=C}}else{if(C.containment.constructor==Array){this.containment=C.containment}}},_convertPositionTo:function(C,B){if(!B){B=this.position}C=C=="absolute"?1:-1;var E=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,D=/(html|body)/i.test(E[0].tagName);return{top:B.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():D?0:E.scrollTop())*C),left:B.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():D?0:E.scrollLeft())*C)}},_generatePosition:function(C){var B=this.options,H=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=/(html|body)/i.test(H[0].tagName),G=C.pageX,D=C.pageY;if(this.originalPosition){var E;if(this.containment){if(this.relative_container){E=this.relative_container.offset();E=[this.containment[0]+E.left,this.containment[1]+E.top,this.containment[2]+E.left,this.containment[3]+E.top]}else{E=this.containment}if(C.pageX-this.offset.click.left<E[0]){G=E[0]+this.offset.click.left}if(C.pageY-this.offset.click.top<E[1]){D=E[1]+this.offset.click.top}if(C.pageX-this.offset.click.left>E[2]){G=E[2]+this.offset.click.left}if(C.pageY-this.offset.click.top>E[3]){D=E[3]+this.offset.click.top}}if(B.grid){D=B.grid[1]?this.originalPageY+Math.round((D-this.originalPageY)/B.grid[1])*B.grid[1]:this.originalPageY;D=E?!(D-this.offset.click.top<E[1]||D-this.offset.click.top>E[3])?D:!(D-this.offset.click.top<E[1])?D-B.grid[1]:D+B.grid[1]:D;G=B.grid[0]?this.originalPageX+Math.round((G-this.originalPageX)/B.grid[0])*B.grid[0]:this.originalPageX;G=E?!(G-this.offset.click.left<E[0]||G-this.offset.click.left>E[2])?G:!(G-this.offset.click.left<E[0])?G-B.grid[0]:G+B.grid[0]:G}}return{top:D-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():F?0:H.scrollTop()),left:G-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:H.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(C,B,D){D=D||this._uiHash();A.ui.plugin.call(this,C,[B,D]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return A.Widget.prototype._trigger.call(this,C,B,D)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});A.extend(A.ui.draggable,{version:"1.8.16"});A.ui.plugin.add("draggable","connectToSortable",{start:function(C,B){var F=A(this).data("draggable"),D=F.options,E=A.extend({},B,{item:F.element});F.sortables=[];A(D.connectToSortable).each(function(){var G=A.data(this,"sortable");if(G&&!G.options.disabled){F.sortables.push({instance:G,shouldRevert:G.options.revert});G.refreshPositions();G._trigger("activate",C,E)}})},stop:function(C,B){var E=A(this).data("draggable"),D=A.extend({},B,{item:E.element});A.each(E.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;E.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(C);this.instance.options.helper=this.instance.options._helper;E.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",C,D)}})},drag:function(C,B){var E=A(this).data("draggable"),D=this;A.each(E.sortables,function(){this.instance.positionAbs=E.positionAbs;this.instance.helperProportions=E.helperProportions;this.instance.offset.click=E.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(D).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return B.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._trigger("toSortable",C);E.dropped=this.instance.element;E.currentItem=E.element;this.instance.fromOutside=E}this.instance.currentItem&&this.instance._mouseDrag(C)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",C,this.instance._uiHash(this.instance));this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();E._trigger("fromSortable",C);E.dropped=false}}})}});A.ui.plugin.add("draggable","cursor",{start:function(){var C=A("body"),B=A(this).data("draggable").options;if(C.css("cursor")){B._cursor=C.css("cursor")}C.css("cursor",B.cursor)},stop:function(){var B=A(this).data("draggable").options;B._cursor&&A("body").css("cursor",B._cursor)}});A.ui.plugin.add("draggable","opacity",{start:function(C,B){C=A(B.helper);B=A(this).data("draggable").options;if(C.css("opacity")){B._opacity=C.css("opacity")}C.css("opacity",B.opacity)},stop:function(C,B){C=A(this).data("draggable").options;C._opacity&&A(B.helper).css("opacity",C._opacity)}});A.ui.plugin.add("draggable","scroll",{start:function(){var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(C){var B=A(this).data("draggable"),E=B.options,D=false;if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){if(!E.axis||E.axis!="x"){if(B.overflowOffset.top+B.scrollParent[0].offsetHeight-C.pageY<E.scrollSensitivity){B.scrollParent[0].scrollTop=D=B.scrollParent[0].scrollTop+E.scrollSpeed}else{if(C.pageY-B.overflowOffset.top<E.scrollSensitivity){B.scrollParent[0].scrollTop=D=B.scrollParent[0].scrollTop-E.scrollSpeed}}}if(!E.axis||E.axis!="y"){if(B.overflowOffset.left+B.scrollParent[0].offsetWidth-C.pageX<E.scrollSensitivity){B.scrollParent[0].scrollLeft=D=B.scrollParent[0].scrollLeft+E.scrollSpeed}else{if(C.pageX-B.overflowOffset.left<E.scrollSensitivity){B.scrollParent[0].scrollLeft=D=B.scrollParent[0].scrollLeft-E.scrollSpeed}}}}else{if(!E.axis||E.axis!="x"){if(C.pageY-A(document).scrollTop()<E.scrollSensitivity){D=A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}else{if(A(window).height()-(C.pageY-A(document).scrollTop())<E.scrollSensitivity){D=A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}}if(!E.axis||E.axis!="y"){if(C.pageX-A(document).scrollLeft()<E.scrollSensitivity){D=A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}else{if(A(window).width()-(C.pageX-A(document).scrollLeft())<E.scrollSensitivity){D=A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}}}D!==false&&A.ui.ddmanager&&!E.dropBehaviour&&A.ui.ddmanager.prepareOffsets(B,C)}});A.ui.plugin.add("draggable","snap",{start:function(){var C=A(this).data("draggable"),B=C.options;C.snapElements=[];A(B.snap.constructor!=String?B.snap.items||":data(draggable)":B.snap).each(function(){var E=A(this),D=E.offset();this!=C.element[0]&&C.snapElements.push({item:this,width:E.outerWidth(),height:E.outerHeight(),top:D.top,left:D.left})})},drag:function(T,S){for(var R=A(this).data("draggable"),P=R.options,Q=P.snapTolerance,N=S.offset.left,O=N+R.helperProportions.width,H=S.offset.top,G=H+R.helperProportions.height,M=R.snapElements.length-1;M>=0;M--){var L=R.snapElements[M].left,J=L+R.snapElements[M].width,K=R.snapElements[M].top,I=K+R.snapElements[M].height;if(L-Q<N&&N<J+Q&&K-Q<H&&H<I+Q||L-Q<N&&N<J+Q&&K-Q<G&&G<I+Q||L-Q<O&&O<J+Q&&K-Q<H&&H<I+Q||L-Q<O&&O<J+Q&&K-Q<G&&G<I+Q){if(P.snapMode!="inner"){var F=Math.abs(K-G)<=Q,E=Math.abs(I-H)<=Q,D=Math.abs(L-O)<=Q,C=Math.abs(J-N)<=Q;if(F){S.position.top=R._convertPositionTo("relative",{top:K-R.helperProportions.height,left:0}).top-R.margins.top}if(E){S.position.top=R._convertPositionTo("relative",{top:I,left:0}).top-R.margins.top}if(D){S.position.left=R._convertPositionTo("relative",{top:0,left:L-R.helperProportions.width}).left-R.margins.left}if(C){S.position.left=R._convertPositionTo("relative",{top:0,left:J}).left-R.margins.left}}var B=F||E||D||C;if(P.snapMode!="outer"){F=Math.abs(K-H)<=Q;E=Math.abs(I-G)<=Q;D=Math.abs(L-N)<=Q;C=Math.abs(J-O)<=Q;if(F){S.position.top=R._convertPositionTo("relative",{top:K,left:0}).top-R.margins.top}if(E){S.position.top=R._convertPositionTo("relative",{top:I-R.helperProportions.height,left:0}).top-R.margins.top}if(D){S.position.left=R._convertPositionTo("relative",{top:0,left:L}).left-R.margins.left}if(C){S.position.left=R._convertPositionTo("relative",{top:0,left:J-R.helperProportions.width}).left-R.margins.left}}if(!R.snapElements[M].snapping&&(F||E||D||C||B)){R.options.snap.snap&&R.options.snap.snap.call(R.element,T,A.extend(R._uiHash(),{snapItem:R.snapElements[M].item}))}R.snapElements[M].snapping=F||E||D||C||B}else{R.snapElements[M].snapping&&R.options.snap.release&&R.options.snap.release.call(R.element,T,A.extend(R._uiHash(),{snapItem:R.snapElements[M].item}));R.snapElements[M].snapping=false}}}});A.ui.plugin.add("draggable","stack",{start:function(){var C=A(this).data("draggable").options;C=A.makeArray(A(C.stack)).sort(function(E,D){return(parseInt(A(E).css("zIndex"),10)||0)-(parseInt(A(D).css("zIndex"),10)||0)});if(C.length){var B=parseInt(C[0].style.zIndex)||0;A(C).each(function(D){this.style.zIndex=B+D});this[0].style.zIndex=B+C.length}}});A.ui.plugin.add("draggable","zIndex",{start:function(C,B){C=A(B.helper);B=A(this).data("draggable").options;if(C.css("zIndex")){B._zIndex=C.css("zIndex")}C.css("zIndex",B.zIndex)},stop:function(C,B){C=A(this).data("draggable").options;C._zIndex&&A(B.helper).css("zIndex",C._zIndex)}})})(jQuery);(function(A){A.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.accept=A.isFunction(B)?B:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[C.scope]=A.ui.ddmanager.droppables[C.scope]||[];A.ui.ddmanager.droppables[C.scope].push(this);C.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var C=A.ui.ddmanager.droppables[this.options.scope],B=0;B<C.length;B++){C[B]==this&&C.splice(B,1)}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(C,B){if(C=="accept"){this.accept=A.isFunction(B)?B:function(D){return D.is(B)}}A.Widget.prototype._setOption.apply(this,arguments)},_activate:function(C){var B=A.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);B&&this._trigger("activate",C,this.ui(B))},_deactivate:function(C){var B=A.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);B&&this._trigger("deactivate",C,this.ui(B))},_over:function(C){var B=A.ui.ddmanager.current;if(!(!B||(B.currentItem||B.element)[0]==this.element[0])){if(this.accept.call(this.element[0],B.currentItem||B.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",C,this.ui(B))}}},_out:function(C){var B=A.ui.ddmanager.current;if(!(!B||(B.currentItem||B.element)[0]==this.element[0])){if(this.accept.call(this.element[0],B.currentItem||B.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",C,this.ui(B))}}},_drop:function(C,B){var E=B||A.ui.ddmanager.current;if(!E||(E.currentItem||E.element)[0]==this.element[0]){return false}var D=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&!F.options.disabled&&F.options.scope==E.options.scope&&F.accept.call(F.element[0],E.currentItem||E.element)&&A.ui.intersect(E,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){D=true;return false}});if(D){return false}if(this.accept.call(this.element[0],E.currentItem||E.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",C,this.ui(E));return this.element}return false},ui:function(B){return{draggable:B.currentItem||B.element,helper:B.helper,position:B.position,offset:B.positionAbs}}});A.extend(A.ui.droppable,{version:"1.8.16"});A.ui.intersect=function(L,K,J){if(!K.offset){return false}var I=(L.positionAbs||L.position.absolute).left,G=I+L.helperProportions.width,H=(L.positionAbs||L.position.absolute).top,F=H+L.helperProportions.height,E=K.offset.left,C=E+K.proportions.width,D=K.offset.top,B=D+K.proportions.height;switch(J){case"fit":return E<=I&&G<=C&&D<=H&&F<=B;case"intersect":return E<I+L.helperProportions.width/2&&G-L.helperProportions.width/2<C&&D<H+L.helperProportions.height/2&&F-L.helperProportions.height/2<B;case"pointer":return A.ui.isOver((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top,(L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left,D,E,K.proportions.height,K.proportions.width);case"touch":return(H>=D&&H<=B||F>=D&&F<=B||H<D&&F>B)&&(I>=E&&I<=C||G>=E&&G<=C||I<E&&G>C);default:return false}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(C,B){var H=A.ui.ddmanager.droppables[C.options.scope]||[],G=B?B.type:null,E=(C.currentItem||C.element).find(":data(droppable)").andSelf(),F=0;C:for(;F<H.length;F++){if(!(H[F].options.disabled||C&&!H[F].accept.call(H[F].element[0],C.currentItem||C.element))){for(var D=0;D<E.length;D++){if(E[D]==H[F].element[0]){H[F].proportions.height=0;continue C}}H[F].visible=H[F].element.css("display")!="none";if(H[F].visible){G=="mousedown"&&H[F]._activate.call(H[F],B);H[F].offset=H[F].element.offset();H[F].proportions={width:H[F].element[0].offsetWidth,height:H[F].element[0].offsetHeight}}}}},drop:function(C,B){var D=false;A.each(A.ui.ddmanager.droppables[C.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&A.ui.intersect(C,this,this.options.tolerance)){D=D||this._drop.call(this,B)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],C.currentItem||C.element)){this.isout=1;this.isover=0;this._deactivate.call(this,B)}}});return D},dragStart:function(C,B){C.element.parents(":not(body,html)").bind("scroll.droppable",function(){C.options.refreshPositions||A.ui.ddmanager.prepareOffsets(C,B)})},drag:function(C,B){C.options.refreshPositions&&A.ui.ddmanager.prepareOffsets(C,B);A.each(A.ui.ddmanager.droppables[C.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var F=A.ui.intersect(C,this,this.options.tolerance);if(F=!F&&this.isover==1?"isout":F&&this.isover==0?"isover":null){var E;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){E=A.data(D[0],"droppable");E.greedyChild=F=="isover"?1:0}}if(E&&F=="isover"){E.isover=0;E.isout=1;E._out.call(E,B)}this[F]=1;this[F=="isout"?"isover":"isout"]=0;this[F=="isover"?"_over":"_out"].call(this,B);if(E&&F=="isout"){E.isout=0;E.isover=1;E._over.call(E,B)}}}})},dragStop:function(C,B){C.element.parents(":not(body,html)").unbind("scroll.droppable");C.options.refreshPositions||A.ui.ddmanager.prepareOffsets(C,B)}}})(jQuery);(function(C){C.widget("ui.resizable",C.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var D=this,E=this.options;this.element.addClass("ui-resizable");C.extend(this,{_aspectRatio:!!E.aspectRatio,aspectRatio:E.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:E.helper||E.ghost||E.animate?E.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&C.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(C('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=E.handles||(!C(".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(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var I=this.handles.split(",");this.handles={};for(var H=0;H<I.length;H++){var G=C.trim(I[H]),F=C('<div class="ui-resizable-handle '+("ui-resizable-"+G)+'"></div>');/sw|se|ne|nw/.test(G)&&F.css({zIndex:++E.zIndex});"se"==G&&F.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[G]=".ui-resizable-"+G;this.element.append(F)}}this._renderAxis=function(M){M=M||this.element;for(var L in this.handles){if(this.handles[L].constructor==String){this.handles[L]=C(this.handles[L],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var K=C(this.handles[L],this.element),J=0;J=/sw|ne|nw|se|n|s/.test(L)?K.outerHeight():K.outerWidth();K=["padding",/ne|nw|n/.test(L)?"Top":/se|sw|s/.test(L)?"Bottom":/^e$/.test(L)?"Right":"Left"].join("");M.css(K,J);this._proportionallyResize()}C(this.handles[L])}};this._renderAxis(this.element);this._handles=C(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!D.resizing){if(this.className){var J=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}D.axis=J&&J[1]?J[1]:"se"}});if(E.autoHide){this._handles.hide();C(this.element).addClass("ui-resizable-autohide").hover(function(){if(!E.disabled){C(this).removeClass("ui-resizable-autohide");D._handles.show()}},function(){if(!E.disabled){if(!D.resizing){C(this).addClass("ui-resizable-autohide");D._handles.hide()}}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var D=function(F){C(F).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){D(this.element);var E=this.element;E.after(this.originalElement.css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);D(this.originalElement);return this},_mouseCapture:function(D){var E=false;for(var F in this.handles){if(C(this.handles[F])[0]==D.target){E=true}}return !this.options.disabled&&E},_mouseStart:function(D){var E=this.options,H=this.element.position(),G=this.element;this.resizing=true;this.documentScroll={top:C(document).scrollTop(),left:C(document).scrollLeft()};if(G.is(".ui-draggable")||/absolute/.test(G.css("position"))){G.css({position:"absolute",top:H.top,left:H.left})}C.browser.opera&&/relative/.test(G.css("position"))&&G.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();H=A(this.helper.css("left"));var F=A(this.helper.css("top"));if(E.containment){H+=C(E.containment).scrollLeft()||0;F+=C(E.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:H,top:F};this.size=this._helper?{width:G.outerWidth(),height:G.outerHeight()}:{width:G.width(),height:G.height()};this.originalSize=this._helper?{width:G.outerWidth(),height:G.outerHeight()}:{width:G.width(),height:G.height()};this.originalPosition={left:H,top:F};this.sizeDiff={width:G.outerWidth()-G.width(),height:G.outerHeight()-G.height()};this.originalMousePosition={left:D.pageX,top:D.pageY};this.aspectRatio=typeof E.aspectRatio=="number"?E.aspectRatio:this.originalSize.width/this.originalSize.height||1;E=C(".ui-resizable-"+this.axis).css("cursor");C("body").css("cursor",E=="auto"?this.axis+"-resize":E);G.addClass("ui-resizable-resizing");this._propagate("start",D);return true},_mouseDrag:function(D){var E=this.helper,G=this.originalMousePosition,F=this._change[this.axis];if(!F){return false}G=F.apply(this,[D,D.pageX-G.left||0,D.pageY-G.top||0]);this._updateVirtualBoundaries(D.shiftKey);if(this._aspectRatio||D.shiftKey){G=this._updateRatio(G,D)}G=this._respectSize(G,D);this._propagate("resize",D);E.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(G);this._trigger("resize",D,this.ui());return false},_mouseStop:function(D){this.resizing=false;var E=this.options,I=this;if(this._helper){var H=this._proportionallyResizeElements,G=H.length&&/textarea/i.test(H[0].nodeName);H=G&&C.ui.hasScroll(H[0],"left")?0:I.sizeDiff.height;G=G?0:I.sizeDiff.width;G={width:I.helper.width()-G,height:I.helper.height()-H};H=parseInt(I.element.css("left"),10)+(I.position.left-I.originalPosition.left)||null;var F=parseInt(I.element.css("top"),10)+(I.position.top-I.originalPosition.top)||null;E.animate||this.element.css(C.extend(G,{top:F,left:H}));I.helper.height(I.size.height);I.helper.width(I.size.width);this._helper&&!E.animate&&this._proportionallyResize()}C("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",D);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(D){var E=this.options,H,G,F;E={minWidth:B(E.minWidth)?E.minWidth:0,maxWidth:B(E.maxWidth)?E.maxWidth:Infinity,minHeight:B(E.minHeight)?E.minHeight:0,maxHeight:B(E.maxHeight)?E.maxHeight:Infinity};if(this._aspectRatio||D){D=E.minHeight*this.aspectRatio;G=E.minWidth/this.aspectRatio;H=E.maxHeight*this.aspectRatio;F=E.maxWidth/this.aspectRatio;if(D>E.minWidth){E.minWidth=D}if(G>E.minHeight){E.minHeight=G}if(H<E.maxWidth){E.maxWidth=H}if(F<E.maxHeight){E.maxHeight=F}}this._vBoundaries=E},_updateCache:function(D){this.offset=this.helper.offset();if(B(D.left)){this.position.left=D.left}if(B(D.top)){this.position.top=D.top}if(B(D.height)){this.size.height=D.height}if(B(D.width)){this.size.width=D.width}},_updateRatio:function(D){var E=this.position,G=this.size,F=this.axis;if(B(D.height)){D.width=D.height*this.aspectRatio}else{if(B(D.width)){D.height=D.width/this.aspectRatio}}if(F=="sw"){D.left=E.left+(G.width-D.width);D.top=null}if(F=="nw"){D.top=E.top+(G.height-D.height);D.left=E.left+(G.width-D.width)}return D},_respectSize:function(L){var M=this._vBoundaries,K=this.axis,J=B(L.width)&&M.maxWidth&&M.maxWidth<L.width,I=B(L.height)&&M.maxHeight&&M.maxHeight<L.height,H=B(L.width)&&M.minWidth&&M.minWidth>L.width,G=B(L.height)&&M.minHeight&&M.minHeight>L.height;if(H){L.width=M.minWidth}if(G){L.height=M.minHeight}if(J){L.width=M.maxWidth}if(I){L.height=M.maxHeight}var F=this.originalPosition.left+this.originalSize.width,E=this.position.top+this.size.height,D=/sw|nw|w/.test(K);K=/nw|ne|n/.test(K);if(H&&D){L.left=F-M.minWidth}if(J&&D){L.left=F-M.maxWidth}if(G&&K){L.top=E-M.minHeight}if(I&&K){L.top=E-M.maxHeight}if((M=!L.width&&!L.height)&&!L.left&&L.top){L.top=null}else{if(M&&!L.top&&L.left){L.left=null}}return L},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){for(var D=this.helper||this.element,E=0;E<this._proportionallyResizeElements.length;E++){var H=this._proportionallyResizeElements[E];if(!this.borderDif){var G=[H.css("borderTopWidth"),H.css("borderRightWidth"),H.css("borderBottomWidth"),H.css("borderLeftWidth")],F=[H.css("paddingTop"),H.css("paddingRight"),H.css("paddingBottom"),H.css("paddingLeft")];this.borderDif=C.map(G,function(J,I){J=parseInt(J,10)||0;I=parseInt(F[I],10)||0;return J+I})}C.browser.msie&&(C(D).is(":hidden")||C(D).parents(":hidden").length)||H.css({height:D.height()-this.borderDif[0]-this.borderDif[2]||0,width:D.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var D=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||C('<div style="overflow:hidden;"></div>');var E=C.browser.msie&&C.browser.version<7,F=E?1:0;E=E?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+E,height:this.element.outerHeight()+E,position:"absolute",left:this.elementOffset.left-F+"px",top:this.elementOffset.top-F+"px",zIndex:++D.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(D,E){return{width:this.originalSize.width+E}},w:function(D,E){return{left:this.originalPosition.left+E,width:this.originalSize.width-E}},n:function(D,E,F){return{top:this.originalPosition.top+F,height:this.originalSize.height-F}},s:function(D,E,F){return{height:this.originalSize.height+F}},se:function(D,E,F){return C.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,E,F]))},sw:function(D,E,F){return C.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,E,F]))},ne:function(D,E,F){return C.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,E,F]))},nw:function(D,E,F){return C.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,E,F]))}},_propagate:function(D,E){C.ui.plugin.call(this,D,[E,this.ui()]);D!="resize"&&this._trigger(D,E,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});C.extend(C.ui.resizable,{version:"1.8.16"});C.ui.plugin.add("resizable","alsoResize",{start:function(){var D=C(this).data("resizable").options,E=function(F){C(F).each(function(){var G=C(this);G.data("resizable-alsoresize",{width:parseInt(G.width(),10),height:parseInt(G.height(),10),left:parseInt(G.css("left"),10),top:parseInt(G.css("top"),10),position:G.css("position")})})};if(typeof D.alsoResize=="object"&&!D.alsoResize.parentNode){if(D.alsoResize.length){D.alsoResize=D.alsoResize[0];E(D.alsoResize)}else{C.each(D.alsoResize,function(F){E(F)})}}else{E(D.alsoResize)}},resize:function(D,E){var J=C(this).data("resizable");D=J.options;var I=J.originalSize,H=J.originalPosition,G={height:J.size.height-I.height||0,width:J.size.width-I.width||0,top:J.position.top-H.top||0,left:J.position.left-H.left||0},F=function(L,K){C(L).each(function(){var M=C(this),O=C(this).data("resizable-alsoresize"),P={},N=K&&K.length?K:M.parents(E.originalElement[0]).length?["width","height"]:["width","height","top","left"];C.each(N,function(R,Q){if((R=(O[Q]||0)+(G[Q]||0))&&R>=0){P[Q]=R||null}});if(C.browser.opera&&/relative/.test(M.css("position"))){J._revertToRelativePosition=true;M.css({position:"absolute",top:"auto",left:"auto"})}M.css(P)})};typeof D.alsoResize=="object"&&!D.alsoResize.nodeType?C.each(D.alsoResize,function(L,K){F(L,K)}):F(D.alsoResize)},stop:function(){var D=C(this).data("resizable"),E=D.options,F=function(G){C(G).each(function(){var H=C(this);H.css({position:H.data("resizable-alsoresize").position})})};if(D._revertToRelativePosition){D._revertToRelativePosition=false;typeof E.alsoResize=="object"&&!E.alsoResize.nodeType?C.each(E.alsoResize,function(G){F(G)}):F(E.alsoResize)}C(this).removeData("resizable-alsoresize")}});C.ui.plugin.add("resizable","animate",{stop:function(D){var E=C(this).data("resizable"),J=E.options,I=E._proportionallyResizeElements,H=I.length&&/textarea/i.test(I[0].nodeName),G=H&&C.ui.hasScroll(I[0],"left")?0:E.sizeDiff.height;H={width:E.size.width-(H?0:E.sizeDiff.width),height:E.size.height-G};G=parseInt(E.element.css("left"),10)+(E.position.left-E.originalPosition.left)||null;var F=parseInt(E.element.css("top"),10)+(E.position.top-E.originalPosition.top)||null;E.element.animate(C.extend(H,F&&G?{top:F,left:G}:{}),{duration:J.animateDuration,easing:J.animateEasing,step:function(){var K={width:parseInt(E.element.css("width"),10),height:parseInt(E.element.css("height"),10),top:parseInt(E.element.css("top"),10),left:parseInt(E.element.css("left"),10)};I&&I.length&&C(I[0]).css({width:K.width,height:K.height});E._updateCache(K);E._propagate("resize",D)}})}});C.ui.plugin.add("resizable","containment",{start:function(){var D=C(this).data("resizable"),E=D.element,J=D.options.containment;if(E=J instanceof C?J.get(0):/parent/.test(J)?E.parent().get(0):J){D.containerElement=C(E);if(/document/.test(J)||J==document){D.containerOffset={left:0,top:0};D.containerPosition={left:0,top:0};D.parentData={element:C(document),left:0,top:0,width:C(document).width(),height:C(document).height()||document.body.parentNode.scrollHeight}}else{var I=C(E),H=[];C(["Top","Right","Left","Bottom"]).each(function(L,K){H[L]=A(I.css("padding"+K))});D.containerOffset=I.offset();D.containerPosition=I.position();D.containerSize={height:I.innerHeight()-H[3],width:I.innerWidth()-H[1]};J=D.containerOffset;var G=D.containerSize.height,F=D.containerSize.width;F=C.ui.hasScroll(E,"left")?E.scrollWidth:F;G=C.ui.hasScroll(E)?E.scrollHeight:G;D.parentData={element:E,left:J.left,top:J.top,width:F,height:G}}}},resize:function(D){var E=C(this).data("resizable"),J=E.options,I=E.containerOffset,H=E.position;D=E._aspectRatio||D.shiftKey;var G={top:0,left:0},F=E.containerElement;if(F[0]!=document&&/static/.test(F.css("position"))){G=I}if(H.left<(E._helper?I.left:0)){E.size.width+=E._helper?E.position.left-I.left:E.position.left-G.left;if(D){E.size.height=E.size.width/J.aspectRatio}E.position.left=J.helper?I.left:0}if(H.top<(E._helper?I.top:0)){E.size.height+=E._helper?E.position.top-I.top:E.position.top;if(D){E.size.width=E.size.height*J.aspectRatio}E.position.top=E._helper?I.top:0}E.offset.left=E.parentData.left+E.position.left;E.offset.top=E.parentData.top+E.position.top;J=Math.abs((E._helper?E.offset.left-G.left:E.offset.left-G.left)+E.sizeDiff.width);I=Math.abs((E._helper?E.offset.top-G.top:E.offset.top-I.top)+E.sizeDiff.height);H=E.containerElement.get(0)==E.element.parent().get(0);G=/relative|absolute/.test(E.containerElement.css("position"));if(H&&G){J-=E.parentData.left}if(J+E.size.width>=E.parentData.width){E.size.width=E.parentData.width-J;if(D){E.size.height=E.size.width/E.aspectRatio}}if(I+E.size.height>=E.parentData.height){E.size.height=E.parentData.height-I;if(D){E.size.width=E.size.height*E.aspectRatio}}},stop:function(){var D=C(this).data("resizable"),E=D.options,K=D.containerOffset,J=D.containerPosition,I=D.containerElement,H=C(D.helper),G=H.offset(),F=H.outerWidth()-D.sizeDiff.width;H=H.outerHeight()-D.sizeDiff.height;D._helper&&!E.animate&&/relative/.test(I.css("position"))&&C(this).css({left:G.left-J.left-K.left,width:F,height:H});D._helper&&!E.animate&&/static/.test(I.css("position"))&&C(this).css({left:G.left-J.left-K.left,width:F,height:H})}});C.ui.plugin.add("resizable","ghost",{start:function(){var D=C(this).data("resizable"),E=D.options,F=D.size;D.ghost=D.originalElement.clone();D.ghost.css({opacity:0.25,display:"block",position:"relative",height:F.height,width:F.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof E.ghost=="string"?E.ghost:"");D.ghost.appendTo(D.helper)},resize:function(){var D=C(this).data("resizable");D.ghost&&D.ghost.css({position:"relative",height:D.size.height,width:D.size.width})},stop:function(){var D=C(this).data("resizable");D.ghost&&D.helper&&D.helper.get(0).removeChild(D.ghost.get(0))}});C.ui.plugin.add("resizable","grid",{resize:function(){var D=C(this).data("resizable"),E=D.options,J=D.size,I=D.originalSize,H=D.originalPosition,G=D.axis;E.grid=typeof E.grid=="number"?[E.grid,E.grid]:E.grid;var F=Math.round((J.width-I.width)/(E.grid[0]||1))*(E.grid[0]||1);E=Math.round((J.height-I.height)/(E.grid[1]||1))*(E.grid[1]||1);if(/^(se|s|e)$/.test(G)){D.size.width=I.width+F;D.size.height=I.height+E}else{if(/^(ne)$/.test(G)){D.size.width=I.width+F;D.size.height=I.height+E;D.position.top=H.top-E}else{if(/^(sw)$/.test(G)){D.size.width=I.width+F;D.size.height=I.height+E}else{D.size.width=I.width+F;D.size.height=I.height+E;D.position.top=H.top-E}D.position.left=H.left-F}}}});var A=function(D){return parseInt(D,10)||0},B=function(D){return !isNaN(parseInt(D,10))}})(jQuery);(function(A){A.widget("ui.selectable",A.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var C=this;this.element.addClass("ui-selectable");this.dragged=false;var B;this.refresh=function(){B=A(C.options.filter,C.element[0]);B.each(function(){var E=A(this),D=E.offset();A.data(this,"selectable-item",{element:this,$element:E,left:D.left,top:D.top,right:D.left+E.outerWidth(),bottom:D.top+E.outerHeight(),startselected:false,selected:E.hasClass("ui-selected"),selecting:E.hasClass("ui-selecting"),unselecting:E.hasClass("ui-unselecting")})})};this.refresh();this.selectees=B.addClass("ui-selectee");this._mouseInit();this.helper=A("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(D){var B=this;this.opos=[D.pageX,D.pageY];if(!this.options.disabled){var C=this.options;this.selectees=A(C.filter,this.element[0]);this._trigger("start",D);A(C.appendTo).append(this.helper);this.helper.css({left:D.clientX,top:D.clientY,width:0,height:0});C.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var E=A.data(this,"selectable-item");E.startselected=true;if(!D.metaKey){E.$element.removeClass("ui-selected");E.selected=false;E.$element.addClass("ui-unselecting");E.unselecting=true;B._trigger("unselecting",D,{unselecting:E.element})}});A(D.target).parents().andSelf().each(function(){var E=A.data(this,"selectable-item");if(E){var F=!D.metaKey||!E.$element.hasClass("ui-selected");E.$element.removeClass(F?"ui-unselecting":"ui-selected").addClass(F?"ui-selecting":"ui-unselecting");E.unselecting=!F;E.selecting=F;(E.selected=F)?B._trigger("selecting",D,{selecting:E.element}):B._trigger("unselecting",D,{unselecting:E.element});return false}})}},_mouseDrag:function(I){var G=this;this.dragged=true;if(!this.options.disabled){var H=this.options,B=this.opos[0],F=this.opos[1],E=I.pageX,D=I.pageY;if(B>E){var C=E;E=B;B=C}if(F>D){C=D;D=F;F=C}this.helper.css({left:B,top:F,width:E-B,height:D-F});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!(!J||J.element==G.element[0])){var K=false;if(H.tolerance=="touch"){K=!(J.left>E||J.right<B||J.top>D||J.bottom<F)}else{if(H.tolerance=="fit"){K=J.left>B&&J.right<E&&J.top>F&&J.bottom<D}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;G._trigger("selecting",I,{selecting:J.element})}}else{if(J.selecting){if(I.metaKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}G._trigger("unselecting",I,{unselecting:J.element})}}if(J.selected){if(!I.metaKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;G._trigger("unselecting",I,{unselecting:J.element})}}}}});return false}},_mouseStop:function(C){var B=this;this.dragged=false;A(".ui-unselecting",this.element[0]).each(function(){var D=A.data(this,"selectable-item");D.$element.removeClass("ui-unselecting");D.unselecting=false;D.startselected=false;B._trigger("unselected",C,{unselected:D.element})});A(".ui-selecting",this.element[0]).each(function(){var D=A.data(this,"selectable-item");D.$element.removeClass("ui-selecting").addClass("ui-selected");D.selecting=false;D.selected=true;D.startselected=true;B._trigger("selected",C,{selected:D.element})});this._trigger("stop",C);this.helper.remove();return false}});A.extend(A.ui.selectable,{version:"1.8.16"})})(jQuery);(function(A){A.widget("ui.sortable",A.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var B=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?B.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}return this},_setOption:function(C,B){if(C==="disabled"){this.options[C]=B;this.widget()[B?"addClass":"removeClass"]("ui-sortable-disabled")}else{A.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(C,B){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(C);var F=null,E=this;A(C.target).parents().each(function(){if(A.data(this,"sortable-item")==E){F=A(this);return false}});if(A.data(C.target,"sortable-item")==E){F=A(C.target)}if(!F){return false}if(this.options.handle&&!B){var D=false;A(this.options.handle,F).find("*").andSelf().each(function(){if(this==C.target){D=true}});if(!D){return false}}this.currentItem=F;this._removeCurrentsFromItems();return true},_mouseStart:function(C,B,E){B=this.options;var D=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(C);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:C.pageX-this.offset.left,top:C.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(C);this.originalPageX=C.pageX;this.originalPageY=C.pageY;B.cursorAt&&this._adjustOffsetFromHelper(B.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();B.containment&&this._setContainment();if(B.cursor){if(A("body").css("cursor")){this._storedCursor=A("body").css("cursor")}A("body").css("cursor",B.cursor)}if(B.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",B.opacity)}if(B.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",B.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",C,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!E){for(E=this.containers.length-1;E>=0;E--){this.containers[E]._trigger("activate",C,D._uiHash(this))}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(C);return true},_mouseDrag:function(C){this.position=this._generatePosition(C);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var B=this.options,F=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-C.pageY<B.scrollSensitivity){this.scrollParent[0].scrollTop=F=this.scrollParent[0].scrollTop+B.scrollSpeed}else{if(C.pageY-this.overflowOffset.top<B.scrollSensitivity){this.scrollParent[0].scrollTop=F=this.scrollParent[0].scrollTop-B.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-C.pageX<B.scrollSensitivity){this.scrollParent[0].scrollLeft=F=this.scrollParent[0].scrollLeft+B.scrollSpeed}else{if(C.pageX-this.overflowOffset.left<B.scrollSensitivity){this.scrollParent[0].scrollLeft=F=this.scrollParent[0].scrollLeft-B.scrollSpeed}}}else{if(C.pageY-A(document).scrollTop()<B.scrollSensitivity){F=A(document).scrollTop(A(document).scrollTop()-B.scrollSpeed)}else{if(A(window).height()-(C.pageY-A(document).scrollTop())<B.scrollSensitivity){F=A(document).scrollTop(A(document).scrollTop()+B.scrollSpeed)}}if(C.pageX-A(document).scrollLeft()<B.scrollSensitivity){F=A(document).scrollLeft(A(document).scrollLeft()-B.scrollSpeed)}else{if(A(window).width()-(C.pageX-A(document).scrollLeft())<B.scrollSensitivity){F=A(document).scrollLeft(A(document).scrollLeft()+B.scrollSpeed)}}}F!==false&&A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C)}this.positionAbs=this._convertPositionTo("absolute");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"}for(B=this.items.length-1;B>=0;B--){F=this.items[B];var E=F.item[0],D=this._intersectsWithPointer(F);if(D){if(E!=this.currentItem[0]&&this.placeholder[D==1?"next":"prev"]()[0]!=E&&!A.ui.contains(this.placeholder[0],E)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],E):true)){this.direction=D==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(F)){this._rearrange(C,F)}else{break}this._trigger("change",C,this._uiHash());break}}}this._contactContainers(C);A.ui.ddmanager&&A.ui.ddmanager.drag(this,C);this._trigger("sort",C,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,B){if(C){A.ui.ddmanager&&!this.options.dropBehaviour&&A.ui.ddmanager.drop(this,C);if(this.options.revert){var D=this;B=D.placeholder.offset();D.reverting=true;A(this.helper).animate({left:B.left-this.offset.parent.left-D.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:B.top-this.offset.parent.top-D.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){D._clear(C)})}else{this._clear(C,B)}return false}},cancel:function(){var C=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._trigger("deactivate",null,C._uiHash(this));if(this.containers[B].containerCache.over){this.containers[B]._trigger("out",null,C._uiHash(this));this.containers[B].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?A(this.domPosition.prev).after(this.currentItem):A(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(C){var B=this._getItemsAsjQuery(C&&C.connected),D=[];C=C||{};A(B).each(function(){var E=(A(C.item||this).attr(C.attribute||"id")||"").match(C.expression||/(.+)[-=_](.+)/);if(E){D.push((C.key||E[1]+"[]")+"="+(C.key&&C.expression?E[1]:E[2]))}});!D.length&&C.key&&D.push(C.key+"=");return D.join("&")},toArray:function(C){var B=this._getItemsAsjQuery(C&&C.connected),D=[];C=C||{};B.each(function(){D.push(A(C.item||this).attr(C.attribute||"id")||"")});return D},_intersectsWith:function(L){var K=this.positionAbs.left,J=K+this.helperProportions.width,I=this.positionAbs.top,H=I+this.helperProportions.height,G=L.left,F=G+L.width,E=L.top,C=E+L.height,D=this.offset.click.top,B=this.offset.click.left;D=I+D>E&&I+D<C&&K+B>G&&K+B<F;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>L[this.floating?"width":"height"]?D:G<K+this.helperProportions.width/2&&J-this.helperProportions.width/2<F&&E<I+this.helperProportions.height/2&&H-this.helperProportions.height/2<C},_intersectsWithPointer:function(C){var B=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,C.top,C.height);C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,C.left,C.width);B=B&&C;C=this._getDragVerticalDirection();var D=this._getDragHorizontalDirection();if(!B){return false}return this.floating?D&&D=="right"||C=="down"?2:1:C&&(C=="down"?2:1)},_intersectsWithSides:function(C){var B=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,C.top+C.height/2,C.height);C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,C.left+C.width/2,C.width);var E=this._getDragVerticalDirection(),D=this._getDragHorizontalDirection();return this.floating&&D?D=="right"&&C||D=="left"&&!C:E&&(E=="down"&&B||E=="up"&&!B)},_getDragVerticalDirection:function(){var B=this.positionAbs.top-this.lastPositionAbs.top;return B!=0&&(B>0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions();return this},_connectWith:function(){var B=this.options;return B.connectWith.constructor==String?[B.connectWith]:B.connectWith},_getItemsAsjQuery:function(C){var B=[],H=[],G=this._connectWith();if(G&&C){for(C=G.length-1;C>=0;C--){for(var F=A(G[C]),E=F.length-1;E>=0;E--){var D=A.data(F[E],"sortable");if(D&&D!=this&&!D.options.disabled){H.push([A.isFunction(D.options.items)?D.options.items.call(D.element):A(D.options.items,D.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),D])}}}}H.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(C=H.length-1;C>=0;C--){H[C][0].each(function(){B.push(this)})}return A(B)},_removeCurrentsFromItems:function(){for(var C=this.currentItem.find(":data(sortable-item)"),B=0;B<this.items.length;B++){for(var D=0;D<C.length;D++){C[D]==this.items[B].item[0]&&this.items.splice(B,1)}}},_refreshItems:function(C){this.items=[];this.containers=[this];var B=this.items,I=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],C,{item:this.currentItem}):A(this.options.items,this.element),this]],H=this._connectWith();if(H){for(var G=H.length-1;G>=0;G--){for(var F=A(H[G]),E=F.length-1;E>=0;E--){var D=A.data(F[E],"sortable");if(D&&D!=this&&!D.options.disabled){I.push([A.isFunction(D.options.items)?D.options.items.call(D.element[0],C,{item:this.currentItem}):A(D.options.items,D.element),D]);this.containers.push(D)}}}}for(G=I.length-1;G>=0;G--){C=I[G][1];H=I[G][0];E=0;for(F=H.length;E<F;E++){D=A(H[E]);D.data("sortable-item",C);B.push({item:D,instance:C,width:0,height:0,left:0,top:0})}}},refreshPositions:function(C){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var B=this.items.length-1;B>=0;B--){var E=this.items[B];if(!(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0])){var D=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!C){E.width=D.outerWidth();E.height=D.outerHeight()}D=D.offset();E.left=D.left;E.top=D.top}}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(B=this.containers.length-1;B>=0;B--){D=this.containers[B].element.offset();this.containers[B].containerCache.left=D.left;this.containers[B].containerCache.top=D.top;this.containers[B].containerCache.width=this.containers[B].element.outerWidth();this.containers[B].containerCache.height=this.containers[B].element.outerHeight()}}return this},_createPlaceholder:function(C){var B=C||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var D=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(D||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!D){F.style.visibility="hidden"}return F},update:function(G,F){if(!(D&&!E.forcePlaceholderSize)){F.height()||F.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10));F.width()||F.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(C){for(var B=null,H=null,G=this.containers.length-1;G>=0;G--){if(!A.ui.contains(this.currentItem[0],this.containers[G].element[0])){if(this._intersectsWith(this.containers[G].containerCache)){if(!(B&&A.ui.contains(this.containers[G].element[0],B.element[0]))){B=this.containers[G];H=G}}else{if(this.containers[G].containerCache.over){this.containers[G]._trigger("out",C,this._uiHash(this));this.containers[G].containerCache.over=0}}}}if(B){if(this.containers.length===1){this.containers[H]._trigger("over",C,this._uiHash(this));this.containers[H].containerCache.over=1}else{if(this.currentContainer!=this.containers[H]){B=10000;G=null;for(var F=this.positionAbs[this.containers[H].floating?"left":"top"],E=this.items.length-1;E>=0;E--){if(A.ui.contains(this.containers[H].element[0],this.items[E].item[0])){var D=this.items[E][this.containers[H].floating?"left":"top"];if(Math.abs(D-F)<B){B=Math.abs(D-F);G=this.items[E]}}}if(G||this.options.dropOnEmpty){this.currentContainer=this.containers[H];G?this._rearrange(C,G,null,true):this._rearrange(C,null,this.containers[H].element,true);this._trigger("change",C,this._uiHash());this.containers[H]._trigger("change",C,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[H]._trigger("over",C,this._uiHash(this));this.containers[H].containerCache.over=1}}}}},_createHelper:function(C){var B=this.options;C=A.isFunction(B.helper)?A(B.helper.apply(this.element[0],[C,this.currentItem])):B.helper=="clone"?this.currentItem.clone():this.currentItem;C.parents("body").length||A(B.appendTo!="parent"?B.appendTo:this.currentItem[0].parentNode)[0].appendChild(C[0]);if(C[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(C[0].style.width==""||B.forceHelperSize){C.width(this.currentItem.width())}if(C[0].style.height==""||B.forceHelperSize){C.height(this.currentItem.height())}return C},_adjustOffsetFromHelper:function(B){if(typeof B=="string"){B=B.split(" ")}if(A.isArray(B)){B={left:+B[0],top:+B[1]||0}}if("left" in B){this.offset.click.left=B.left+this.margins.left}if("right" in B){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if("top" in B){this.offset.click.top=B.top+this.margins.top}if("bottom" in B){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.currentItem.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var C=this.options;if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(C.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(C.containment)){var B=A(C.containment)[0];C=A(C.containment).offset();var D=A(B).css("overflow")!="hidden";this.containment=[C.left+(parseInt(A(B).css("borderLeftWidth"),10)||0)+(parseInt(A(B).css("paddingLeft"),10)||0)-this.margins.left,C.top+(parseInt(A(B).css("borderTopWidth"),10)||0)+(parseInt(A(B).css("paddingTop"),10)||0)-this.margins.top,C.left+(D?Math.max(B.scrollWidth,B.offsetWidth):B.offsetWidth)-(parseInt(A(B).css("borderLeftWidth"),10)||0)-(parseInt(A(B).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,C.top+(D?Math.max(B.scrollHeight,B.offsetHeight):B.offsetHeight)-(parseInt(A(B).css("borderTopWidth"),10)||0)-(parseInt(A(B).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(C,B){if(!B){B=this.position}C=C=="absolute"?1:-1;var E=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,D=/(html|body)/i.test(E[0].tagName);return{top:B.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():D?0:E.scrollTop())*C),left:B.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():D?0:E.scrollLeft())*C)}},_generatePosition:function(C){var B=this.options,G=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=/(html|body)/i.test(G[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var E=C.pageX,D=C.pageY;if(this.originalPosition){if(this.containment){if(C.pageX-this.offset.click.left<this.containment[0]){E=this.containment[0]+this.offset.click.left}if(C.pageY-this.offset.click.top<this.containment[1]){D=this.containment[1]+this.offset.click.top}if(C.pageX-this.offset.click.left>this.containment[2]){E=this.containment[2]+this.offset.click.left}if(C.pageY-this.offset.click.top>this.containment[3]){D=this.containment[3]+this.offset.click.top}}if(B.grid){D=this.originalPageY+Math.round((D-this.originalPageY)/B.grid[1])*B.grid[1];D=this.containment?!(D-this.offset.click.top<this.containment[1]||D-this.offset.click.top>this.containment[3])?D:!(D-this.offset.click.top<this.containment[1])?D-B.grid[1]:D+B.grid[1]:D;E=this.originalPageX+Math.round((E-this.originalPageX)/B.grid[0])*B.grid[0];E=this.containment?!(E-this.offset.click.left<this.containment[0]||E-this.offset.click.left>this.containment[2])?E:!(E-this.offset.click.left<this.containment[0])?E-B.grid[0]:E+B.grid[0]:E}}return{top:D-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():F?0:G.scrollTop()),left:E-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:G.scrollLeft())}},_rearrange:function(C,B,G,F){G?G[0].appendChild(this.placeholder[0]):B.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?B.item[0]:B.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var E=this,D=this.counter;window.setTimeout(function(){D==E.counter&&E.refreshPositions(!F)},0)},_clear:function(C,B){this.reverting=false;var E=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var D in this._storedCSS){if(this._storedCSS[D]=="auto"||this._storedCSS[D]=="static"){this._storedCSS[D]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!B&&E.push(function(F){this._trigger("receive",F,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!B){E.push(function(F){this._trigger("update",F,this._uiHash())})}if(!A.ui.contains(this.element[0],this.currentItem[0])){B||E.push(function(F){this._trigger("remove",F,this._uiHash())});for(D=this.containers.length-1;D>=0;D--){if(A.ui.contains(this.containers[D].element[0],this.currentItem[0])&&!B){E.push(function(F){return function(G){F._trigger("receive",G,this._uiHash(this))}}.call(this,this.containers[D]));E.push(function(F){return function(G){F._trigger("update",G,this._uiHash(this))}}.call(this,this.containers[D]))}}}for(D=this.containers.length-1;D>=0;D--){B||E.push(function(F){return function(G){F._trigger("deactivate",G,this._uiHash(this))}}.call(this,this.containers[D]));if(this.containers[D].containerCache.over){E.push(function(F){return function(G){F._trigger("out",G,this._uiHash(this))}}.call(this,this.containers[D]));this.containers[D].containerCache.over=0}}this._storedCursor&&A("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!B){this._trigger("beforeStop",C,this._uiHash());for(D=0;D<E.length;D++){E[D].call(this,C)}this._trigger("stop",C,this._uiHash())}return false}B||this._trigger("beforeStop",C,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!B){for(D=0;D<E.length;D++){E[D].call(this,C)}this._trigger("stop",C,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){A.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,originalPosition:B.originalPosition,offset:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}});A.extend(A.ui.sortable,{version:"1.8.16"})})(jQuery);(function(A){A.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var C=this,B=C.options;C.running=0;C.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");C.headers=C.element.find(B.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){B.disabled||A(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){B.disabled||A(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){B.disabled||A(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){B.disabled||A(this).removeClass("ui-state-focus")});C.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(B.navigation){var E=C.element.find("a").filter(B.navigationFilter).eq(0);if(E.length){var D=E.closest(".ui-accordion-header");C.active=D.length?D:E.closest(".ui-accordion-content").prev()}}C.active=C._findActive(C.active||B.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");C.active.next().addClass("ui-accordion-content-active");C._createIcons();C.resize();C.element.attr("role","tablist");C.headers.attr("role","tab").bind("keydown.accordion",function(F){return C._keydown(F)}).next().attr("role","tabpanel");C.headers.not(C.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();C.active.length?C.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):C.headers.eq(0).attr("tabIndex",0);A.browser.safari||C.headers.find("a").attr("tabIndex",-1);B.event&&C.headers.bind(B.event.split(" ").join(".accordion ")+".accordion",function(F){C._clickHandler.call(C,F,this);F.preventDefault()})},_createIcons:function(){var B=this.options;if(B.icons){A("<span></span>").addClass("ui-icon "+B.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(B.icons.header).toggleClass(B.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var C=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var B=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(C.autoHeight||C.fillHeight){B.css("height","")}return A.Widget.prototype.destroy.call(this)},_setOption:function(C,B){A.Widget.prototype._setOption.apply(this,arguments);C=="active"&&this.activate(B);if(C=="icons"){this._destroyIcons();B&&this._createIcons()}if(C=="disabled"){this.headers.add(this.headers.next())[B?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(C){if(!(this.options.disabled||C.altKey||C.ctrlKey)){var B=A.ui.keyCode,F=this.headers.length,D=this.headers.index(C.target),E=false;switch(C.keyCode){case B.RIGHT:case B.DOWN:E=this.headers[(D+1)%F];break;case B.LEFT:case B.UP:E=this.headers[(D-1+F)%F];break;case B.SPACE:case B.ENTER:this._clickHandler({target:C.target},C.target);C.preventDefault()}if(E){A(C.target).attr("tabIndex",-1);A(E).attr("tabIndex",0);E.focus();return false}return true}},resize:function(){var C=this.options,B;if(C.fillSpace){if(A.browser.msie){var D=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}B=this.element.parent().height();A.browser.msie&&this.element.parent().css("overflow",D);this.headers.each(function(){B-=A(this).outerHeight(true)});this.headers.next().each(function(){A(this).height(Math.max(0,B-A(this).innerHeight()+A(this).height()))}).css("overflow","auto")}else{if(C.autoHeight){B=0;this.headers.next().each(function(){B=Math.max(B,A(this).height("").height())}).height(B)}}return this},activate:function(B){this.options.active=B;B=this._findActive(B)[0];this._clickHandler({target:B},B);return this},_findActive:function(B){return B?typeof B==="number"?this.headers.filter(":eq("+B+")"):this.headers.not(this.headers.not(B)):B===false?A([]):this.headers.filter(":eq(0)")},_clickHandler:function(C,B){var I=this.options;if(!I.disabled){if(C.target){C=A(C.currentTarget||B);B=C[0]===this.active[0];I.active=I.collapsible&&B?false:this.headers.index(C);if(!(this.running||!I.collapsible&&B)){var E=this.active;D=C.next();F=this.active.next();H={options:I,newHeader:B&&I.collapsible?A([]):C,oldHeader:this.active,newContent:B&&I.collapsible?A([]):D,oldContent:F};var G=this.headers.index(this.active[0])>this.headers.index(C[0]);this.active=B?A([]):C;this._toggle(D,F,H,B,G);E.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(I.icons.headerSelected).addClass(I.icons.header);if(!B){C.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(I.icons.header).addClass(I.icons.headerSelected);C.next().addClass("ui-accordion-content-active")}}}else{if(I.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(I.icons.headerSelected).addClass(I.icons.header);this.active.next().addClass("ui-accordion-content-active");var F=this.active.next(),H={options:I,newHeader:A([]),oldHeader:I.active,newContent:A([]),oldContent:F},D=this.active=A([]);this._toggle(D,F,H)}}}},_toggle:function(K,J,I,E,G){var F=this,H=F.options;F.toShow=K;F.toHide=J;F.data=I;var C=function(){if(F){return F._completed.apply(F,arguments)}};F._trigger("changestart",null,F.data);F.running=J.size()===0?K.size():J.size();if(H.animated){I={};I=H.collapsible&&E?{toShow:A([]),toHide:J,complete:C,down:G,autoHeight:H.autoHeight||H.fillSpace}:{toShow:K,toHide:J,complete:C,down:G,autoHeight:H.autoHeight||H.fillSpace};if(!H.proxied){H.proxied=H.animated}if(!H.proxiedDuration){H.proxiedDuration=H.duration}H.animated=A.isFunction(H.proxied)?H.proxied(I):H.proxied;H.duration=A.isFunction(H.proxiedDuration)?H.proxiedDuration(I):H.proxiedDuration;E=A.ui.accordion.animations;var D=H.duration,B=H.animated;if(B&&!E[B]&&!A.easing[B]){B="slide"}E[B]||(E[B]=function(L){this.slide(L,{easing:B,duration:D||700})});E[B](I)}else{if(H.collapsible&&E){K.toggle()}else{J.hide();K.show()}C(true)}J.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();K.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(B){this.running=B?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className}this._trigger("change",null,this.data)}}});A.extend(A.ui.accordion,{version:"1.8.16",animations:{slide:function(C,B){C=A.extend({easing:"swing",duration:300},C,B);if(C.toHide.size()){if(C.toShow.size()){var H=C.toShow.css("overflow"),D=0,F={},E={},G;B=C.toShow;G=B[0].style.width;B.width(parseInt(B.parent().width(),10)-parseInt(B.css("paddingLeft"),10)-parseInt(B.css("paddingRight"),10)-(parseInt(B.css("borderLeftWidth"),10)||0)-(parseInt(B.css("borderRightWidth"),10)||0));A.each(["height","paddingTop","paddingBottom"],function(I,J){E[J]="hide";I=(""+A.css(C.toShow[0],J)).match(/^([\d+-.]+)(.*)$/);F[J]={value:I[1],unit:I[2]||"px"}});C.toShow.css({height:0,overflow:"hidden"}).show();C.toHide.filter(":hidden").each(C.complete).end().filter(":visible").animate(E,{step:function(I,J){if(J.prop=="height"){D=J.end-J.start===0?0:(J.now-J.start)/(J.end-J.start)}C.toShow[0].style[J.prop]=D*F[J.prop].value+F[J.prop].unit},duration:C.duration,easing:C.easing,complete:function(){C.autoHeight||C.toShow.css("height","");C.toShow.css({width:G,overflow:H});C.complete()}})}else{C.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},C)}}else{C.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},C)}},bounceslide:function(B){this.slide(B,{easing:B.down?"easeOutBounce":"swing",duration:B.down?1000:200})}}})})(jQuery);(function(E,B){var A={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},D={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},C=E.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};E.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(G){var F=E(this).css(G).offset().top;F<0&&E(this).css("top",G.top-F)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;var G=this,F=G.options,L=F.title||"&#160;",K=E.ui.dialog.getTitleId(G.element),I=(G.uiDialog=E("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+F.dialogClass).css({zIndex:F.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(M){if(F.closeOnEscape&&!M.isDefaultPrevented()&&M.keyCode&&M.keyCode===E.ui.keyCode.ESCAPE){G.close(M);M.preventDefault()}}).attr({role:"dialog","aria-labelledby":K}).mousedown(function(M){G.moveToTop(false,M)});G.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(I);var J=(G.uiDialogTitlebar=E("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(I),H=E('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){H.addClass("ui-state-hover")},function(){H.removeClass("ui-state-hover")}).focus(function(){H.addClass("ui-state-focus")}).blur(function(){H.removeClass("ui-state-focus")}).click(function(M){G.close(M);return false}).appendTo(J);(G.uiDialogTitlebarCloseText=E("<span></span>")).addClass("ui-icon ui-icon-closethick").text(F.closeText).appendTo(H);E("<span></span>").addClass("ui-dialog-title").attr("id",K).html(L).prependTo(J);if(E.isFunction(F.beforeclose)&&!E.isFunction(F.beforeClose)){F.beforeClose=F.beforeclose}J.find("*").add(J).disableSelection();F.draggable&&E.fn.draggable&&G._makeDraggable();F.resizable&&E.fn.resizable&&G._makeResizable();G._createButtons(F.buttons);G._isOpen=false;E.fn.bgiframe&&I.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var F=this;F.overlay&&F.overlay.destroy();F.uiDialog.hide();F.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");F.uiDialog.remove();F.originalTitle&&F.element.attr("title",F.originalTitle);return F},widget:function(){return this.uiDialog},close:function(G){var F=this,I,H;if(false!==F._trigger("beforeClose",G)){F.overlay&&F.overlay.destroy();F.uiDialog.unbind("keypress.ui-dialog");F._isOpen=false;if(F.options.hide){F.uiDialog.hide(F.options.hide,function(){F._trigger("close",G)})}else{F.uiDialog.hide();F._trigger("close",G)}E.ui.dialog.overlay.resize();if(F.options.modal){I=0;E(".ui-dialog").each(function(){if(this!==F.uiDialog[0]){H=E(this).css("z-index");isNaN(H)||(I=Math.max(I,H))}});E.ui.dialog.maxZ=I}return F}},isOpen:function(){return this._isOpen},moveToTop:function(G,F){var I=this,H=I.options;if(H.modal&&!G||!H.stack&&!H.modal){return I._trigger("focus",F)}if(H.zIndex>E.ui.dialog.maxZ){E.ui.dialog.maxZ=H.zIndex}if(I.overlay){E.ui.dialog.maxZ+=1;I.overlay.$el.css("z-index",E.ui.dialog.overlay.maxZ=E.ui.dialog.maxZ)}G={scrollTop:I.element.scrollTop(),scrollLeft:I.element.scrollLeft()};E.ui.dialog.maxZ+=1;I.uiDialog.css("z-index",E.ui.dialog.maxZ);I.element.attr(G);I._trigger("focus",F);return I},open:function(){if(!this._isOpen){var G=this,F=G.options,H=G.uiDialog;G.overlay=F.modal?new E.ui.dialog.overlay(G):null;G._size();G._position(F.position);H.show(F.show);G.moveToTop(true);F.modal&&H.bind("keypress.ui-dialog",function(K){if(K.keyCode===E.ui.keyCode.TAB){var I=E(":tabbable",this),J=I.filter(":first");I=I.filter(":last");if(K.target===I[0]&&!K.shiftKey){J.focus(1);return false}else{if(K.target===J[0]&&K.shiftKey){I.focus(1);return false}}}});E(G.element.find(":tabbable").get().concat(H.find(".ui-dialog-buttonpane :tabbable").get().concat(H.get()))).eq(0).focus();G._isOpen=true;G._trigger("open");return G}},_createButtons:function(G){var F=this,J=false,I=E("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),H=E("<div></div>").addClass("ui-dialog-buttonset").appendTo(I);F.uiDialog.find(".ui-dialog-buttonpane").remove();typeof G==="object"&&G!==null&&E.each(G,function(){return !(J=true)});if(J){E.each(G,function(M,L){L=E.isFunction(L)?{click:L,text:M}:L;var K=E('<button type="button"></button>').click(function(){L.click.apply(F.element[0],arguments)}).appendTo(H);E.each(L,function(O,N){if(O!=="click"){O in C?K[O](N):K.attr(O,N)}});E.fn.button&&K.button()});I.appendTo(F.uiDialog)}},_makeDraggable:function(){function G(K){return{position:K.position,offset:K.offset}}var F=this,J=F.options,I=E(document),H;F.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(L,K){H=J.height==="auto"?"auto":E(this).height();E(this).height(E(this).height()).addClass("ui-dialog-dragging");F._trigger("dragStart",L,G(K))},drag:function(L,K){F._trigger("drag",L,G(K))},stop:function(L,K){J.position=[K.position.left-I.scrollLeft(),K.position.top-I.scrollTop()];E(this).removeClass("ui-dialog-dragging").height(H);F._trigger("dragStop",L,G(K));E.ui.dialog.overlay.resize()}})},_makeResizable:function(G){function F(K){return{originalPosition:K.originalPosition,originalSize:K.originalSize,position:K.position,size:K.size}}G=G===B?this.options.resizable:G;var J=this,I=J.options,H=J.uiDialog.css("position");G=typeof G==="string"?G:"n,e,s,w,se,sw,ne,nw";J.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:J.element,maxWidth:I.maxWidth,maxHeight:I.maxHeight,minWidth:I.minWidth,minHeight:J._minHeight(),handles:G,start:function(L,K){E(this).addClass("ui-dialog-resizing");J._trigger("resizeStart",L,F(K))},resize:function(L,K){J._trigger("resize",L,F(K))},stop:function(L,K){E(this).removeClass("ui-dialog-resizing");I.height=E(this).height();I.width=E(this).width();J._trigger("resizeStop",L,F(K));E.ui.dialog.overlay.resize()}}).css("position",H).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var F=this.options;return F.height==="auto"?F.minHeight:Math.min(F.minHeight,F.height)},_position:function(G){var F=[],I=[0,0],H;if(G){if(typeof G==="string"||typeof G==="object"&&"0" in G){F=G.split?G.split(" "):[G[0],G[1]];if(F.length===1){F[1]=F[0]}E.each(["left","top"],function(J,K){if(+F[J]===F[J]){I[J]=F[J];F[J]=K}});G={my:F.join(" "),at:F.join(" "),offset:I.join(" ")}}G=E.extend({},E.ui.dialog.prototype.options.position,G)}else{G=E.ui.dialog.prototype.options.position}(H=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(E.extend({of:window},G));H||this.uiDialog.hide()},_setOptions:function(G){var F=this,I={},H=false;E.each(G,function(J,K){F._setOption(J,K);if(J in A){H=true}if(J in D){I[J]=K}});H&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",I)},_setOption:function(G,F){var J=this,I=J.uiDialog;switch(G){case"beforeclose":G="beforeClose";break;case"buttons":J._createButtons(F);break;case"closeText":J.uiDialogTitlebarCloseText.text(""+F);break;case"dialogClass":I.removeClass(J.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+F);break;case"disabled":F?I.addClass("ui-dialog-disabled"):I.removeClass("ui-dialog-disabled");break;case"draggable":var H=I.is(":data(draggable)");H&&!F&&I.draggable("destroy");!H&&F&&J._makeDraggable();break;case"position":J._position(F);break;case"resizable":(H=I.is(":data(resizable)"))&&!F&&I.resizable("destroy");H&&typeof F==="string"&&I.resizable("option","handles",F);!H&&F!==false&&J._makeResizable(F);break;case"title":E(".ui-dialog-title",J.uiDialogTitlebar).html(""+(F||"&#160;"));break}E.Widget.prototype._setOption.apply(J,arguments)},_size:function(){var G=this.options,F,I,H=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(G.minWidth>G.width){G.width=G.minWidth}F=this.uiDialog.css({height:"auto",width:G.width}).height();I=Math.max(0,G.minHeight-F);if(G.height==="auto"){if(E.support.minHeight){this.element.css({minHeight:I,height:"auto"})}else{this.uiDialog.show();G=this.element.css("height","auto").height();H||this.uiDialog.hide();this.element.height(Math.max(G,I))}}else{this.element.height(Math.max(G.height-F,0))}this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});E.extend(E.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(F){F=F.attr("id");if(!F){this.uuid+=1;F=this.uuid}return"ui-dialog-title-"+F},overlay:function(F){this.$el=E.ui.dialog.overlay.create(F)}});E.extend(E.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:E.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(F){return F+".dialog-overlay"}).join(" "),create:function(G){if(this.instances.length===0){setTimeout(function(){E.ui.dialog.overlay.instances.length&&E(document).bind(E.ui.dialog.overlay.events,function(H){if(E(H.target).zIndex()<E.ui.dialog.overlay.maxZ){return false}})},1);E(document).bind("keydown.dialog-overlay",function(H){if(G.options.closeOnEscape&&!H.isDefaultPrevented()&&H.keyCode&&H.keyCode===E.ui.keyCode.ESCAPE){G.close(H);H.preventDefault()}});E(window).bind("resize.dialog-overlay",E.ui.dialog.overlay.resize)}var F=(this.oldInstances.pop()||E("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});E.fn.bgiframe&&F.bgiframe();this.instances.push(F);return F},destroy:function(G){var F=E.inArray(G,this.instances);F!=-1&&this.oldInstances.push(this.instances.splice(F,1)[0]);this.instances.length===0&&E([document,window]).unbind(".dialog-overlay");G.remove();var H=0;E.each(this.instances,function(){H=Math.max(H,this.css("z-index"))});this.maxZ=H},height:function(){var G,F;if(E.browser.msie&&E.browser.version<7){G=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);F=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return G<F?E(window).height()+"px":G+"px"}else{return E(document).height()+"px"}},width:function(){var G,F;if(E.browser.msie){G=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);F=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return G<F?E(window).width()+"px":G+"px"}else{return E(document).width()+"px"}},resize:function(){var F=E([]);E.each(E.ui.dialog.overlay.instances,function(){F=F.add(this)});F.css({width:0,height:0}).css({width:E.ui.dialog.overlay.width(),height:E.ui.dialog.overlay.height()})}});E.extend(E.ui.dialog.overlay.prototype,{destroy:function(){E.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(A){A.widget("ui.slider",A.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var C=this,B=this.options,G=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),E=B.values&&B.values.length||1,F=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(B.disabled?" ui-slider-disabled ui-disabled":""));this.range=A([]);if(B.range){if(B.range===true){if(!B.values){B.values=[this._valueMin(),this._valueMin()]}if(B.values.length&&B.values.length!==2){B.values=[B.values[0],B.values[0]]}}this.range=A("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(B.range==="min"||B.range==="max"?" ui-slider-range-"+B.range:""))}for(var D=G.length;D<E;D+=1){F.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>")}this.handles=G.add(A(F.join("")).appendTo(C.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(H){H.preventDefault()}).hover(function(){B.disabled||A(this).addClass("ui-state-hover")},function(){A(this).removeClass("ui-state-hover")}).focus(function(){if(B.disabled){A(this).blur()}else{A(".ui-slider .ui-state-focus").removeClass("ui-state-focus");A(this).addClass("ui-state-focus")}}).blur(function(){A(this).removeClass("ui-state-focus")});this.handles.each(function(H){A(this).data("index.ui-slider-handle",H)});this.handles.keydown(function(M){var J=true,I=A(this).data("index.ui-slider-handle"),K,L,H;if(!C.options.disabled){switch(M.keyCode){case A.ui.keyCode.HOME:case A.ui.keyCode.END:case A.ui.keyCode.PAGE_UP:case A.ui.keyCode.PAGE_DOWN:case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:J=false;if(!C._keySliding){C._keySliding=true;A(this).addClass("ui-state-active");K=C._start(M,I);if(K===false){return }}break}H=C.options.step;K=C.options.values&&C.options.values.length?(L=C.values(I)):(L=C.value());switch(M.keyCode){case A.ui.keyCode.HOME:L=C._valueMin();break;case A.ui.keyCode.END:L=C._valueMax();break;case A.ui.keyCode.PAGE_UP:L=C._trimAlignValue(K+(C._valueMax()-C._valueMin())/5);break;case A.ui.keyCode.PAGE_DOWN:L=C._trimAlignValue(K-(C._valueMax()-C._valueMin())/5);break;case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:if(K===C._valueMax()){return }L=C._trimAlignValue(K+H);break;case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if(K===C._valueMin()){return }L=C._trimAlignValue(K-H);break}C._slide(M,I,L);return J}}).keyup(function(I){var H=A(this).data("index.ui-slider-handle");if(C._keySliding){C._keySliding=false;C._stop(I,H);C._change(I,H);A(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(C){var B=this.options,H,F,G,D,E;if(B.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();H=this._normValueFromMouse({x:C.pageX,y:C.pageY});F=this._valueMax()-this._valueMin()+1;D=this;this.handles.each(function(J){var I=Math.abs(H-D.values(J));if(F>I){F=I;G=A(this);E=J}});if(B.range===true&&this.values(1)===B.min){E+=1;G=A(this.handles[E])}if(this._start(C,E)===false){return false}this._mouseSliding=true;D._handleIndex=E;G.addClass("ui-state-active").focus();B=G.offset();this._clickOffset=!A(C.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:C.pageX-B.left-G.width()/2,top:C.pageY-B.top-G.height()/2-(parseInt(G.css("borderTopWidth"),10)||0)-(parseInt(G.css("borderBottomWidth"),10)||0)+(parseInt(G.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(C,E,H);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(C){var B=this._normValueFromMouse({x:C.pageX,y:C.pageY});this._slide(C,this._handleIndex,B);return false},_mouseStop:function(B){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(B,this._handleIndex);this._change(B,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(C){var B;if(this.orientation==="horizontal"){B=this.elementSize.width;C=C.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{B=this.elementSize.height;C=C.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}B=C/B;if(B>1){B=1}if(B<0){B=0}if(this.orientation==="vertical"){B=1-B}C=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+B*C)},_start:function(C,B){var D={handle:this.handles[B],value:this.value()};if(this.options.values&&this.options.values.length){D.value=this.values(B);D.values=this.values()}return this._trigger("start",C,D)},_slide:function(C,B,E){var D;if(this.options.values&&this.options.values.length){D=this.values(B?0:1);if(this.options.values.length===2&&this.options.range===true&&(B===0&&E>D||B===1&&E<D)){E=D}if(E!==this.values(B)){D=this.values();D[B]=E;C=this._trigger("slide",C,{handle:this.handles[B],value:E,values:D});this.values(B?0:1);C!==false&&this.values(B,E,true)}}else{if(E!==this.value()){C=this._trigger("slide",C,{handle:this.handles[B],value:E});C!==false&&this.value(E)}}},_stop:function(C,B){var D={handle:this.handles[B],value:this.value()};if(this.options.values&&this.options.values.length){D.value=this.values(B);D.values=this.values()}this._trigger("stop",C,D)},_change:function(C,B){if(!this._keySliding&&!this._mouseSliding){var D={handle:this.handles[B],value:this.value()};if(this.options.values&&this.options.values.length){D.value=this.values(B);D.values=this.values()}this._trigger("change",C,D)}},value:function(B){if(arguments.length){this.options.value=this._trimAlignValue(B);this._refreshValue();this._change(null,0)}else{return this._value()}},values:function(C,B){var F,D,E;if(arguments.length>1){this.options.values[C]=this._trimAlignValue(B);this._refreshValue();this._change(null,C)}else{if(arguments.length){if(A.isArray(arguments[0])){F=this.options.values;D=arguments[0];for(E=0;E<F.length;E+=1){F[E]=this._trimAlignValue(D[E]);this._change(null,E)}this._refreshValue()}else{return this.options.values&&this.options.values.length?this._values(C):this.value()}}else{return this._values()}}},_setOption:function(C,B){var E,D=0;if(A.isArray(this.options.values)){D=this.options.values.length}A.Widget.prototype._setOption.apply(this,arguments);switch(C){case"disabled":if(B){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(E=0;E<D;E+=1){this._change(null,E)}this._animateOff=false;break}},_value:function(){var B=this.options.value;return B=this._trimAlignValue(B)},_values:function(C){var B,D;if(arguments.length){B=this.options.values[C];return B=this._trimAlignValue(B)}else{B=this.options.values.slice();for(D=0;D<B.length;D+=1){B[D]=this._trimAlignValue(B[D])}return B}},_trimAlignValue:function(C){if(C<=this._valueMin()){return this._valueMin()}if(C>=this._valueMax()){return this._valueMax()}var B=this.options.step>0?this.options.step:1,D=(C-this._valueMin())%B;C=C-D;if(Math.abs(D)*2>=B){C+=D>0?B:-B}return parseFloat(C.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var K=this.options.range,J=this.options,I=this,G=!this._animateOff?J.animate:false,H,D={},F,C,B,E;if(this.options.values&&this.options.values.length){this.handles.each(function(L){H=(I.values(L)-I._valueMin())/(I._valueMax()-I._valueMin())*100;D[I.orientation==="horizontal"?"left":"bottom"]=H+"%";A(this).stop(1,1)[G?"animate":"css"](D,J.animate);if(I.options.range===true){if(I.orientation==="horizontal"){if(L===0){I.range.stop(1,1)[G?"animate":"css"]({left:H+"%"},J.animate)}if(L===1){I.range[G?"animate":"css"]({width:H-F+"%"},{queue:false,duration:J.animate})}}else{if(L===0){I.range.stop(1,1)[G?"animate":"css"]({bottom:H+"%"},J.animate)}if(L===1){I.range[G?"animate":"css"]({height:H-F+"%"},{queue:false,duration:J.animate})}}}F=H})}else{C=this.value();B=this._valueMin();E=this._valueMax();H=E!==B?(C-B)/(E-B)*100:0;D[I.orientation==="horizontal"?"left":"bottom"]=H+"%";this.handle.stop(1,1)[G?"animate":"css"](D,J.animate);if(K==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[G?"animate":"css"]({width:H+"%"},J.animate)}if(K==="max"&&this.orientation==="horizontal"){this.range[G?"animate":"css"]({width:100-H+"%"},{queue:false,duration:J.animate})}if(K==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[G?"animate":"css"]({height:H+"%"},J.animate)}if(K==="max"&&this.orientation==="vertical"){this.range[G?"animate":"css"]({height:100-H+"%"},{queue:false,duration:J.animate})}}}});A.extend(A.ui.slider,{version:"1.8.16"})})(jQuery);(function(F,E){function D(){return ++C}function B(){return ++A}var C=0,A=0;F.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(G,H){if(G=="selected"){this.options.collapsible&&H==this.options.selected||this.select(H)}else{this.options[G]=H;this._tabify()}},_tabId:function(G){return G.title&&G.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+D()},_sanitizeSelector:function(G){return G.replace(/:/g,"\\:")},_cookie:function(){var G=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+B());return F.cookie.apply(null,[G].concat(F.makeArray(arguments)))},_ui:function(G,H){return{tab:G,panel:H,index:this.anchors.index(G)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var G=F(this);G.html(G.data("label.tabs")).removeData("label.tabs")})},_tabify:function(P){function N(S,T){S.css("display","");!F.support.opacity&&T.opacity&&S[0].style.removeAttribute("filter")}var Q=this,O=this.options,M=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=F(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return F("a",this)[0]});this.panels=F([]);this.anchors.each(function(U,W){var T=F(W).attr("href"),S=T.split("#")[0],V;if(S&&(S===location.toString().split("#")[0]||(V=F("base")[0])&&S===V.href)){T=W.hash;W.href=T}if(M.test(T)){Q.panels=Q.panels.add(Q.element.find(Q._sanitizeSelector(T)))}else{if(T&&T!=="#"){F.data(W,"href.tabs",T);F.data(W,"load.tabs",T.replace(/#.*$/,""));T=Q._tabId(W);W.href="#"+T;W=Q.element.find("#"+T);if(!W.length){W=F(O.panelTemplate).attr("id",T).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(Q.panels[U-1]||Q.list);W.data("destroy.tabs",true)}Q.panels=Q.panels.add(W)}else{O.disabled.push(U)}}});if(P){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(O.selected===E){location.hash&&this.anchors.each(function(S,T){if(T.hash==location.hash){O.selected=S;return false}});if(typeof O.selected!=="number"&&O.cookie){O.selected=parseInt(Q._cookie(),10)}if(typeof O.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){O.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}O.selected=O.selected||(this.lis.length?0:-1)}else{if(O.selected===null){O.selected=-1}}O.selected=O.selected>=0&&this.anchors[O.selected]||O.selected<0?O.selected:0;O.disabled=F.unique(O.disabled.concat(F.map(this.lis.filter(".ui-state-disabled"),function(S){return Q.lis.index(S)}))).sort();F.inArray(O.selected,O.disabled)!=-1&&O.disabled.splice(F.inArray(O.selected,O.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(O.selected>=0&&this.anchors.length){Q.element.find(Q._sanitizeSelector(Q.anchors[O.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(O.selected).addClass("ui-tabs-selected ui-state-active");Q.element.queue("tabs",function(){Q._trigger("show",null,Q._ui(Q.anchors[O.selected],Q.element.find(Q._sanitizeSelector(Q.anchors[O.selected].hash))[0]))});this.load(O.selected)}F(window).bind("unload",function(){Q.lis.add(Q.anchors).unbind(".tabs");Q.lis=Q.anchors=Q.panels=null})}else{O.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[O.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");O.cookie&&this._cookie(O.selected,O.cookie);P=0;for(var L;L=this.lis[P];P++){F(L)[F.inArray(P,O.disabled)!=-1&&!F(L).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}O.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(O.event!=="mouseover"){var K=function(S,T){T.is(":not(.ui-state-disabled)")&&T.addClass("ui-state-"+S)},I=function(S,T){T.removeClass("ui-state-"+S)};this.lis.bind("mouseover.tabs",function(){K("hover",F(this))});this.lis.bind("mouseout.tabs",function(){I("hover",F(this))});this.anchors.bind("focus.tabs",function(){K("focus",F(this).closest("li"))});this.anchors.bind("blur.tabs",function(){I("focus",F(this).closest("li"))})}var J,H;if(O.fx){if(F.isArray(O.fx)){J=O.fx[0];H=O.fx[1]}else{J=H=O.fx}}var G=H?function(S,T){F(S).closest("li").addClass("ui-tabs-selected ui-state-active");T.hide().removeClass("ui-tabs-hide").animate(H,H.duration||"normal",function(){N(T,H);Q._trigger("show",null,Q._ui(S,T[0]))})}:function(S,T){F(S).closest("li").addClass("ui-tabs-selected ui-state-active");T.removeClass("ui-tabs-hide");Q._trigger("show",null,Q._ui(S,T[0]))},R=J?function(S,T){T.animate(J,J.duration||"normal",function(){Q.lis.removeClass("ui-tabs-selected ui-state-active");T.addClass("ui-tabs-hide");N(T,J);Q.element.dequeue("tabs")})}:function(S,T){Q.lis.removeClass("ui-tabs-selected ui-state-active");T.addClass("ui-tabs-hide");Q.element.dequeue("tabs")};this.anchors.bind(O.event+".tabs",function(){var U=this,V=F(U).closest("li"),T=Q.panels.filter(":not(.ui-tabs-hide)"),S=Q.element.find(Q._sanitizeSelector(U.hash));if(V.hasClass("ui-tabs-selected")&&!O.collapsible||V.hasClass("ui-state-disabled")||V.hasClass("ui-state-processing")||Q.panels.filter(":animated").length||Q._trigger("select",null,Q._ui(this,S[0]))===false){this.blur();return false}O.selected=Q.anchors.index(this);Q.abort();if(O.collapsible){if(V.hasClass("ui-tabs-selected")){O.selected=-1;O.cookie&&Q._cookie(O.selected,O.cookie);Q.element.queue("tabs",function(){R(U,T)}).dequeue("tabs");this.blur();return false}else{if(!T.length){O.cookie&&Q._cookie(O.selected,O.cookie);Q.element.queue("tabs",function(){G(U,S)});Q.load(Q.anchors.index(this));this.blur();return false}}}O.cookie&&Q._cookie(O.selected,O.cookie);if(S.length){T.length&&Q.element.queue("tabs",function(){R(U,T)});Q.element.queue("tabs",function(){G(U,S)});Q.load(Q.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}F.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(G){if(typeof G=="string"){G=this.anchors.index(this.anchors.filter("[href$="+G+"]"))}return G},destroy:function(){var G=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var I=F.data(this,"href.tabs");if(I){this.href=I}var H=F(this).unbind(".tabs");F.each(["href","load","cache"],function(K,J){H.removeData(J+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){F.data(this,"destroy.tabs")?F(this).remove():F(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});G.cookie&&this._cookie(null,G.cookie);return this},add:function(G,K,H){if(H===E){H=this.anchors.length}var L=this,J=this.options;K=F(J.tabTemplate.replace(/#\{href\}/g,G).replace(/#\{label\}/g,K));G=!G.indexOf("#")?G.replace("#",""):this._tabId(F("a",K)[0]);K.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var I=L.element.find("#"+G);I.length||(I=F(J.panelTemplate).attr("id",G).data("destroy.tabs",true));I.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(H>=this.lis.length){K.appendTo(this.list);I.appendTo(this.list[0].parentNode)}else{K.insertBefore(this.lis[H]);I.insertBefore(this.panels[H])}J.disabled=F.map(J.disabled,function(M){return M>=H?++M:M});this._tabify();if(this.anchors.length==1){J.selected=0;K.addClass("ui-tabs-selected ui-state-active");I.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){L._trigger("show",null,L._ui(L.anchors[0],L.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[H],this.panels[H]));return this},remove:function(G){G=this._getIndex(G);var I=this.options,H=this.lis.eq(G).remove(),J=this.panels.eq(G).remove();if(H.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(G+(G+1<this.anchors.length?1:-1))}I.disabled=F.map(F.grep(I.disabled,function(K){return K!=G}),function(K){return K>=G?--K:K});this._tabify();this._trigger("remove",null,this._ui(H.find("a")[0],J[0]));return this},enable:function(G){G=this._getIndex(G);var H=this.options;if(F.inArray(G,H.disabled)!=-1){this.lis.eq(G).removeClass("ui-state-disabled");H.disabled=F.grep(H.disabled,function(I){return I!=G});this._trigger("enable",null,this._ui(this.anchors[G],this.panels[G]));return this}},disable:function(G){G=this._getIndex(G);var H=this.options;if(G!=H.selected){this.lis.eq(G).addClass("ui-state-disabled");H.disabled.push(G);H.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[G],this.panels[G]))}return this},select:function(G){G=this._getIndex(G);if(G==-1){if(this.options.collapsible&&this.options.selected!=-1){G=this.options.selected}else{return this}}this.anchors.eq(G).trigger(this.options.event+".tabs");return this},load:function(G){G=this._getIndex(G);var K=this,H=this.options,L=this.anchors.eq(G)[0],J=F.data(L,"load.tabs");this.abort();if(!J||this.element.queue("tabs").length!==0&&F.data(L,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(G).addClass("ui-state-processing");if(H.spinner){var I=F("span",L);I.data("label.tabs",I.html()).html(H.spinner)}this.xhr=F.ajax(F.extend({},H.ajaxOptions,{url:J,success:function(N,O){K.element.find(K._sanitizeSelector(L.hash)).html(N);K._cleanup();H.cache&&F.data(L,"cache.tabs",true);K._trigger("load",null,K._ui(K.anchors[G],K.panels[G]));try{H.ajaxOptions.success(N,O)}catch(M){}},error:function(N,O){K._cleanup();K._trigger("load",null,K._ui(K.anchors[G],K.panels[G]));try{H.ajaxOptions.error(N,O,G,L)}catch(M){}}}));K.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(G,H){this.anchors.eq(G).removeData("cache.tabs").data("load.tabs",H);return this},length:function(){return this.anchors.length}});F.extend(F.ui.tabs,{version:"1.8.16"});F.extend(F.ui.tabs.prototype,{rotation:null,rotate:function(G,J){var H=this,K=this.options,I=H._rotate||(H._rotate=function(L){clearTimeout(H.rotation);H.rotation=setTimeout(function(){var M=K.selected;H.select(++M<H.anchors.length?M:0)},G);L&&L.stopPropagation()});J=H._unrotate||(H._unrotate=!J?function(L){L.clientX&&H.rotate(null)}:function(){t=K.selected;I()});if(G){this.element.bind("tabsshow",I);this.anchors.bind(K.event+".tabs",J);I()}else{clearTimeout(H.rotation);this.element.unbind("tabsshow",I);this.anchors.unbind(K.event+".tabs",J);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function(d,C){function M(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.bind("mouseout",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==C){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos){this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");H(e.settings,f);if(i!==null&&f.dateFormat!==C&&f.minDate===C){e.settings.minDate=this._formatDate(e,i)}if(g!==null&&f.dateFormat!==C&&f.maxDate===C){e.settings.maxDate=this._formatDate(e,g)}this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]);if(a=d.datepicker._get(b,"onSelect")){c=d.datepicker._formatDate(b);a.apply(b.input?b.input[0]:null,[c,b])}else{d.datepicker._hideDatepicker()}return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal){try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=d("input",a.parentNode)[0]}if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b){b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])}},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,a])}else{a.input&&a.input.trigger("change")}if(a.inline){this._updateDatepicker(a)}else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1<a.length&&a.charAt(A+1)==p)&&A++;return p},m=function(p){var D=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&D?4:p=="o"?3:2)+"}");p=b.substring(q).match(p);if(!p){throw"Missing number at position "+q}q+=p[0].length;return parseInt(p[0],10)},n=function(p,D,K){p=d.map(o(p)?K:D,function(w,x){return[[x,w]]}).sort(function(w,x){return -(w[1].length-x[1].length)});var E=-1;d.each(p,function(w,x){w=x[1];if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;return false}});if(E!=-1){return E+1}else{throw"Unknown name at position "+q}},s=function(){if(b.charAt(q)!=a.charAt(A)){throw"Unexpected literal at position "+q}q++},q=0,A=0;A<a.length;A++){if(k){if(a.charAt(A)=="'"&&!o("'")){k=false}else{s()}}else{switch(a.charAt(A)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":j=m("m");break;case"M":j=n("M",i,g);break;case"y":c=m("y");break;case"@":var v=new Date(m("@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case"!":v=new Date((m("!")-this._ticksTo1970)/10000);c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case"'":if(o("'")){s()}else{k=true}break;default:s()}}}if(q<b.length){throw"Extra/unparsed characters found in date: "+b.substring(q)}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e){break}j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l){throw"Invalid date"}return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},j=function(o,m,n,s){return i(o)?s[m]:n[m]},l="",u=false;if(b){for(var k=0;k<a.length;k++){if(u){if(a.charAt(k)=="'"&&!i("'")){u=false}else{l+=a.charAt(k)}}else{switch(a.charAt(k)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=j("D",b.getDay(),e,f);break;case"o":l+=g("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000),3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=j("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(k)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==C?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case"d":case"D":g+=parseInt(k[1],10);break;case"w":case"W":g+=parseInt(k[1],10)*7;break;case"m":case"M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case"y":case"Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":this._formatDate(a))}},_getDate:function(a){return !a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+B+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,s)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x<i[0];x++){var O="";this.maxRows=4;for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",y="";if(l){y+='<div class="ui-datepicker-group';if(i[1]>1){switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}}y+='">'}y+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+s[r]+'">'+q[r]+"</span></th>"}y+=z+"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,z)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q<z;Q++){y+="<tr>";var R=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(r)+"</td>";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(r.getTime()==P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!D?"":" "+I[1]+(r.getTime()==u.getTime()?" "+this._currentClass:"")+(r.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!F||D)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+B+".datepicker._selectDay('#"+a.id+"',"+r.getMonth()+","+r.getFullYear()+', this);return false;"')+">"+(F&&!D?"&#xa0;":L?'<span class="ui-state-default">'+r.getDate()+"</span>":'<a class="ui-state-default'+(r.getTime()==b.getTime()?" ui-state-highlight":"")+(r.getTime()==u.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+r.getDate()+"</a>")+"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+"</tr>"}g++;if(g>11){g=0;m++}y+="</tbody></table>"+(l?"</div>"+(i[0]>0&&G==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" >";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(k+=o+(h||!(j&&l)?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(h||!l){k+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" >";b<=g;b++){a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}a.yearshtml+="</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u){k+=(h||!(j&&l)?"&#xa0;":"")+o}k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length){return this}if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery);(function(A,B){A.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=A("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();A.Widget.prototype.destroy.apply(this,arguments)},value:function(C){if(C===B){return this._value()}this._setOption("value",C);return this},_setOption:function(C,D){if(C==="value"){this.options.value=D;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}A.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var C=this.options.value;if(typeof C!=="number"){C=0}return Math.min(this.options.max,Math.max(this.min,C))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var C=this.value(),D=this._percentage();if(this.oldValue!==C){this.oldValue=C;this._trigger("change")}this.valueDiv.toggle(C>this.min).toggleClass("ui-corner-right",C===this.options.max).width(D.toFixed(0)+"%");this.element.attr("aria-valuenow",C)}});A.extend(A.ui.progressbar,{version:"1.8.16"})})(jQuery);jQuery.effects||function(I,H){function E(N){var M;if(N&&N.constructor==Array&&N.length==3){return N}if(M=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(N)){return[parseInt(M[1],10),parseInt(M[2],10),parseInt(M[3],10)]}if(M=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(N)){return[parseFloat(M[1])*2.55,parseFloat(M[2])*2.55,parseFloat(M[3])*2.55]}if(M=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(N)){return[parseInt(M[1],16),parseInt(M[2],16),parseInt(M[3],16)]}if(M=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(N)){return[parseInt(M[1]+M[1],16),parseInt(M[2]+M[2],16),parseInt(M[3]+M[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(N)){return D.transparent}return D[I.trim(N).toLowerCase()]}function L(O,N){var M;do{M=I.curCSS(O,N);if(M!=""&&M!="transparent"||I.nodeName(O,"body")){break}N="backgroundColor"}while(O=O.parentNode);return E(M)}function C(){var Q=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,N={},M,P;if(Q&&Q.length&&Q[0]&&Q[Q[0]]){for(var O=Q.length;O--;){M=Q[O];if(typeof Q[M]=="string"){P=M.replace(/\-(\w)/g,function(S,R){return R.toUpperCase()});N[P]=Q[M]}}}else{for(M in Q){if(typeof Q[M]==="string"){N[M]=Q[M]}}}return N}function B(O){var N,M;for(N in O){M=O[N];if(M==null||I.isFunction(M)||N in K||/scrollbar/.test(N)||!/color/i.test(N)&&isNaN(parseFloat(M))){delete O[N]}}return O}function J(P,N){var M={_:0},O;for(O in N){if(P[O]!=N[O]){M[O]=N[O]}}return M}function G(P,N,M,O){if(typeof P=="object"){O=N;M=null;N=P;P=N.effect}if(I.isFunction(N)){O=N;M=null;N={}}if(typeof N=="number"||I.fx.speeds[N]){O=M;M=N;N={}}if(I.isFunction(M)){O=M;M=null}N=N||{};M=M||N.duration;M=I.fx.off?0:typeof M=="number"?M:M in I.fx.speeds?I.fx.speeds[M]:I.fx.speeds._default;O=O||N.complete;return[P,N,M,O]}function F(M){if(!M||typeof M==="number"||I.fx.speeds[M]){return true}if(typeof M==="string"&&!I.effects[M]){return true}return false}I.effects={};I.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(N,M){I.fx.step[M]=function(O){if(!O.colorInit){O.start=L(O.elem,M);O.end=E(O.end);O.colorInit=true}O.elem.style[M]="rgb("+Math.max(Math.min(parseInt(O.pos*(O.end[0]-O.start[0])+O.start[0],10),255),0)+","+Math.max(Math.min(parseInt(O.pos*(O.end[1]-O.start[1])+O.start[1],10),255),0)+","+Math.max(Math.min(parseInt(O.pos*(O.end[2]-O.start[2])+O.start[2],10),255),0)+")"}});var D={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},A=["add","remove","toggle"],K={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};I.effects.animateClass=function(P,N,M,O){if(I.isFunction(M)){O=M;M=null}return this.queue(function(){var U=I(this),T=U.attr("style")||" ",R=B(C.call(this)),S,Q=U.attr("class");I.each(A,function(V,W){P[W]&&U[W+"Class"](P[W])});S=B(C.call(this));U.attr("class",Q);U.animate(J(R,S),{queue:false,duration:N,easing:M,complete:function(){I.each(A,function(V,W){P[W]&&U[W+"Class"](P[W])});if(typeof U.attr("style")=="object"){U.attr("style").cssText="";U.attr("style").cssText=T}else{U.attr("style",T)}O&&O.apply(this,arguments);I.dequeue(this)}})})};I.fn.extend({_addClass:I.fn.addClass,addClass:function(P,N,M,O){return N?I.effects.animateClass.apply(this,[{add:P},N,M,O]):this._addClass(P)},_removeClass:I.fn.removeClass,removeClass:function(P,N,M,O){return N?I.effects.animateClass.apply(this,[{remove:P},N,M,O]):this._removeClass(P)},_toggleClass:I.fn.toggleClass,toggleClass:function(Q,N,M,P,O){return typeof N=="boolean"||N===H?M?I.effects.animateClass.apply(this,[N?{add:Q}:{remove:Q},M,P,O]):this._toggleClass(Q,N):I.effects.animateClass.apply(this,[{toggle:Q},N,M,P])},switchClass:function(Q,N,M,P,O){return I.effects.animateClass.apply(this,[{add:N,remove:Q},M,P,O])}});I.extend(I.effects,{version:"1.8.16",save:function(O,N){for(var M=0;M<N.length;M++){N[M]!==null&&O.data("ec.storage."+N[M],O[0].style[N[M]])}},restore:function(O,N){for(var M=0;M<N.length;M++){N[M]!==null&&O.css(N[M],O.data("ec.storage."+N[M]))}},setMode:function(N,M){if(M=="toggle"){M=N.is(":hidden")?"show":"hide"}return M},getBaseline:function(O,N){var M;switch(O[0]){case"top":M=0;break;case"middle":M=0.5;break;case"bottom":M=1;break;default:M=O[0]/N.height}switch(O[1]){case"left":O=0;break;case"center":O=0.5;break;case"right":O=1;break;default:O=O[1]/N.width}return{x:O,y:M}},createWrapper:function(P){if(P.parent().is(".ui-effects-wrapper")){return P.parent()}var N={width:P.outerWidth(true),height:P.outerHeight(true),"float":P.css("float")},M=I("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),O=document.activeElement;P.wrap(M);if(P[0]===O||I.contains(P[0],O)){I(O).focus()}M=P.parent();if(P.css("position")=="static"){M.css({position:"relative"});P.css({position:"relative"})}else{I.extend(N,{position:P.css("position"),zIndex:P.css("z-index")});I.each(["top","left","bottom","right"],function(R,Q){N[Q]=P.css(Q);if(isNaN(parseInt(N[Q],10))){N[Q]="auto"}});P.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return M.css(N).show()},removeWrapper:function(O){var N,M=document.activeElement;if(O.parent().is(".ui-effects-wrapper")){N=O.parent().replaceWith(O);if(O[0]===M||I.contains(O[0],M)){I(M).focus()}return N}return O},setTransition:function(P,N,M,O){O=O||{};I.each(N,function(R,Q){unit=P.cssUnit(Q);if(unit[0]>0){O[Q]=unit[0]*M+unit[1]}});return O}});I.fn.extend({effect:function(P){var N=G.apply(this,arguments),M={options:N[1],duration:N[2],callback:N[3]};N=M.options.mode;var O=I.effects[P];if(I.fx.off||!O){return N?this[N](M.duration,M.callback):this.each(function(){M.callback&&M.callback.call(this)})}return O.call(this,M)},_show:I.fn.show,show:function(N){if(F(N)){return this._show.apply(this,arguments)}else{var M=G.apply(this,arguments);M[1].mode="show";return this.effect.apply(this,M)}},_hide:I.fn.hide,hide:function(N){if(F(N)){return this._hide.apply(this,arguments)}else{var M=G.apply(this,arguments);M[1].mode="hide";return this.effect.apply(this,M)}},__toggle:I.fn.toggle,toggle:function(N){if(F(N)||typeof N==="boolean"||I.isFunction(N)){return this.__toggle.apply(this,arguments)}else{var M=G.apply(this,arguments);M[1].mode="toggle";return this.effect.apply(this,M)}},cssUnit:function(O){var N=this.css(O),M=[];I.each(["em","px","%","pt"],function(Q,P){if(N.indexOf(P)>0){M=[parseFloat(N),P]}});return M}});I.easing.jswing=I.easing.swing;I.extend(I.easing,{def:"easeOutQuad",swing:function(Q,N,M,P,O){return I.easing[I.easing.def](Q,N,M,P,O)},easeInQuad:function(Q,N,M,P,O){return P*(N/=O)*N+M},easeOutQuad:function(Q,N,M,P,O){return -P*(N/=O)*(N-2)+M},easeInOutQuad:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N+M}return -P/2*(--N*(N-2)-1)+M},easeInCubic:function(Q,N,M,P,O){return P*(N/=O)*N*N+M},easeOutCubic:function(Q,N,M,P,O){return P*((N=N/O-1)*N*N+1)+M},easeInOutCubic:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N*N+M}return P/2*((N-=2)*N*N+2)+M},easeInQuart:function(Q,N,M,P,O){return P*(N/=O)*N*N*N+M},easeOutQuart:function(Q,N,M,P,O){return -P*((N=N/O-1)*N*N*N-1)+M},easeInOutQuart:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N*N*N+M}return -P/2*((N-=2)*N*N*N-2)+M},easeInQuint:function(Q,N,M,P,O){return P*(N/=O)*N*N*N*N+M},easeOutQuint:function(Q,N,M,P,O){return P*((N=N/O-1)*N*N*N*N+1)+M},easeInOutQuint:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N*N*N*N+M}return P/2*((N-=2)*N*N*N*N+2)+M},easeInSine:function(Q,N,M,P,O){return -P*Math.cos(N/O*(Math.PI/2))+P+M},easeOutSine:function(Q,N,M,P,O){return P*Math.sin(N/O*(Math.PI/2))+M},easeInOutSine:function(Q,N,M,P,O){return -P/2*(Math.cos(Math.PI*N/O)-1)+M},easeInExpo:function(Q,N,M,P,O){return N==0?M:P*Math.pow(2,10*(N/O-1))+M},easeOutExpo:function(Q,N,M,P,O){return N==O?M+P:P*(-Math.pow(2,-10*N/O)+1)+M},easeInOutExpo:function(Q,N,M,P,O){if(N==0){return M}if(N==O){return M+P}if((N/=O/2)<1){return P/2*Math.pow(2,10*(N-1))+M}return P/2*(-Math.pow(2,-10*--N)+2)+M},easeInCirc:function(Q,N,M,P,O){return -P*(Math.sqrt(1-(N/=O)*N)-1)+M},easeOutCirc:function(Q,N,M,P,O){return P*Math.sqrt(1-(N=N/O-1)*N)+M},easeInOutCirc:function(Q,N,M,P,O){if((N/=O/2)<1){return -P/2*(Math.sqrt(1-N*N)-1)+M}return P/2*(Math.sqrt(1-(N-=2)*N)+1)+M},easeInElastic:function(S,N,M,R,Q){S=1.70158;var P=0,O=R;if(N==0){return M}if((N/=Q)==1){return M+R}P||(P=Q*0.3);if(O<Math.abs(R)){O=R;S=P/4}else{S=P/(2*Math.PI)*Math.asin(R/O)}return -(O*Math.pow(2,10*(N-=1))*Math.sin((N*Q-S)*2*Math.PI/P))+M},easeOutElastic:function(S,N,M,R,Q){S=1.70158;var P=0,O=R;if(N==0){return M}if((N/=Q)==1){return M+R}P||(P=Q*0.3);if(O<Math.abs(R)){O=R;S=P/4}else{S=P/(2*Math.PI)*Math.asin(R/O)}return O*Math.pow(2,-10*N)*Math.sin((N*Q-S)*2*Math.PI/P)+R+M},easeInOutElastic:function(S,N,M,R,Q){S=1.70158;var P=0,O=R;if(N==0){return M}if((N/=Q/2)==2){return M+R}P||(P=Q*0.3*1.5);if(O<Math.abs(R)){O=R;S=P/4}else{S=P/(2*Math.PI)*Math.asin(R/O)}if(N<1){return -0.5*O*Math.pow(2,10*(N-=1))*Math.sin((N*Q-S)*2*Math.PI/P)+M}return O*Math.pow(2,-10*(N-=1))*Math.sin((N*Q-S)*2*Math.PI/P)*0.5+R+M},easeInBack:function(R,N,M,Q,P,O){if(O==H){O=1.70158}return Q*(N/=P)*N*((O+1)*N-O)+M},easeOutBack:function(R,N,M,Q,P,O){if(O==H){O=1.70158}return Q*((N=N/P-1)*N*((O+1)*N+O)+1)+M},easeInOutBack:function(R,N,M,Q,P,O){if(O==H){O=1.70158}if((N/=P/2)<1){return Q/2*N*N*(((O*=1.525)+1)*N-O)+M}return Q/2*((N-=2)*N*(((O*=1.525)+1)*N+O)+2)+M},easeInBounce:function(Q,N,M,P,O){return P-I.easing.easeOutBounce(Q,O-N,0,P,O)+M},easeOutBounce:function(Q,N,M,P,O){return(N/=O)<1/2.75?P*7.5625*N*N+M:N<2/2.75?P*(7.5625*(N-=1.5/2.75)*N+0.75)+M:N<2.5/2.75?P*(7.5625*(N-=2.25/2.75)*N+0.9375)+M:P*(7.5625*(N-=2.625/2.75)*N+0.984375)+M},easeInOutBounce:function(Q,N,M,P,O){if(N<O/2){return I.easing.easeInBounce(Q,N*2,0,P,O)*0.5+M}return I.easing.easeOutBounce(Q,N*2-O,0,P,O)*0.5+P*0.5+M}})}(jQuery);jQuery.fn.reverse=[].reverse;(function(A){A.fn.hint=function(B){if(!B){B="blur"}return this.each(function(){var G=A(this),E=G.attr("title"),D=A(this.form),F=A(window);function C(){if(G.val()===E&&G.hasClass(B)){G.val("").removeClass(B)}}if(E){G.blur(function(){if(this.value===""){G.val(E).addClass(B)}}).focus(C).blur();D.submit(C)}})}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(B,C,A,E,D){return jQuery.easing[jQuery.easing.def](B,C,A,E,D)},easeInQuad:function(B,C,A,E,D){return E*(C/=D)*C+A},easeOutQuad:function(B,C,A,E,D){return -E*(C/=D)*(C-2)+A},easeInOutQuad:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C+A}return -E/2*((--C)*(C-2)-1)+A},easeInCubic:function(B,C,A,E,D){return E*(C/=D)*C*C+A},easeOutCubic:function(B,C,A,E,D){return E*((C=C/D-1)*C*C+1)+A},easeInOutCubic:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C+A}return E/2*((C-=2)*C*C+2)+A},easeInQuart:function(B,C,A,E,D){return E*(C/=D)*C*C*C+A},easeOutQuart:function(B,C,A,E,D){return -E*((C=C/D-1)*C*C*C-1)+A},easeInOutQuart:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C+A}return -E/2*((C-=2)*C*C*C-2)+A},easeInQuint:function(B,C,A,E,D){return E*(C/=D)*C*C*C*C+A},easeOutQuint:function(B,C,A,E,D){return E*((C=C/D-1)*C*C*C*C+1)+A},easeInOutQuint:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C*C+A}return E/2*((C-=2)*C*C*C*C+2)+A},easeInSine:function(B,C,A,E,D){return -E*Math.cos(C/D*(Math.PI/2))+E+A},easeOutSine:function(B,C,A,E,D){return E*Math.sin(C/D*(Math.PI/2))+A},easeInOutSine:function(B,C,A,E,D){return -E/2*(Math.cos(Math.PI*C/D)-1)+A},easeInExpo:function(B,C,A,E,D){return(C==0)?A:E*Math.pow(2,10*(C/D-1))+A},easeOutExpo:function(B,C,A,E,D){return(C==D)?A+E:E*(-Math.pow(2,-10*C/D)+1)+A},easeInOutExpo:function(B,C,A,E,D){if(C==0){return A}if(C==D){return A+E}if((C/=D/2)<1){return E/2*Math.pow(2,10*(C-1))+A}return E/2*(-Math.pow(2,-10*--C)+2)+A},easeInCirc:function(B,C,A,E,D){return -E*(Math.sqrt(1-(C/=D)*C)-1)+A},easeOutCirc:function(B,C,A,E,D){return E*Math.sqrt(1-(C=C/D-1)*C)+A},easeInOutCirc:function(B,C,A,E,D){if((C/=D/2)<1){return -E/2*(Math.sqrt(1-C*C)-1)+A}return E/2*(Math.sqrt(1-(C-=2)*C)+1)+A},easeInElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G)==1){return A+H}if(!F){F=G*0.3}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}return -(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A},easeOutElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G)==1){return A+H}if(!F){F=G*0.3}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}return C*Math.pow(2,-10*D)*Math.sin((D*G-E)*(2*Math.PI)/F)+H+A},easeInOutElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G/2)==2){return A+H}if(!F){F=G*(0.3*1.5)}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}if(D<1){return -0.5*(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A}return C*Math.pow(2,-10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F)*0.5+H+A},easeInBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}return F*(C/=E)*C*((D+1)*C-D)+A},easeOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}return F*((C=C/E-1)*C*((D+1)*C+D)+1)+A},easeInOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}if((C/=E/2)<1){return F/2*(C*C*(((D*=(1.525))+1)*C-D))+A}return F/2*((C-=2)*C*(((D*=(1.525))+1)*C+D)+2)+A},easeInBounce:function(B,C,A,E,D){return E-jQuery.easing.easeOutBounce(B,D-C,0,E,D)+A},easeOutBounce:function(B,C,A,E,D){if((C/=D)<(1/2.75)){return E*(7.5625*C*C)+A}else{if(C<(2/2.75)){return E*(7.5625*(C-=(1.5/2.75))*C+0.75)+A}else{if(C<(2.5/2.75)){return E*(7.5625*(C-=(2.25/2.75))*C+0.9375)+A}else{return E*(7.5625*(C-=(2.625/2.75))*C+0.984375)+A}}}},easeInOutBounce:function(B,C,A,E,D){if(C<D/2){return jQuery.easing.easeInBounce(B,C*2,0,E,D)*0.5+A}return jQuery.easing.easeOutBounce(B,C*2-D,0,E,D)*0.5+E*0.5+A}});(function(B){B.fn.jcarousel=function(D){return this.each(function(){new A(this,D)})};var C={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null};B.jcarousel=function(G,E){this.options=B.extend({},C,E||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?"left":"top";var K="",I=G.className.split(" ");for(var F=0;F<I.length;F++){if(I[F].indexOf("jcarousel-skin")!=-1){B(G).removeClass(I[F]);var K=I[F];break}}if(G.nodeName=="UL"||G.nodeName=="OL"){this.list=B(G);this.container=this.list.parent();if(this.container.hasClass("jcarousel-clip")){if(!this.container.parent().hasClass("jcarousel-container")){this.container=this.container.wrap("<div></div>")}this.container=this.container.parent()}else{if(!this.container.hasClass("jcarousel-container")){this.container=this.list.wrap("<div></div>").parent()}}}else{this.container=B(G);this.list=B(G).find(">ul,>ol,div>ul,div>ol")}if(K!=""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('<div class=" '+K+'"></div>')}this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass("jcarousel-clip")){this.clip=this.list.wrap("<div></div>").parent()}this.buttonPrev=B(".jcarousel-prev",this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null){this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev()}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext=B(".jcarousel-next",this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null){this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev()}this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip"));this.list.addClass(this.className("jcarousel-list"));this.container.addClass(this.className("jcarousel-container"));var H=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var J=this.list.children("li");var L=this;if(J.size()>0){var D=0,F=this.options.offset;J.each(function(){L.format(this,F++);D+=L.dimension(this,H)});this.list.css(this.wh,D+"px");if(!E||E.size===undefined){this.options.size=J.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){L.next()};this.funcPrev=function(){L.prev()};this.funcResize=function(){L.reload()};if(this.options.initCallback!=null){this.options.initCallback(this,"init")}if(B.browser.safari){this.buttons(false,false);B(window).bind("load",function(){L.setup()})}else{this.setup()}};var A=B.jcarousel;A.fn=A.prototype={jcarousel:"0.2.3"};A.fn.extend=A.extend=B.extend;A.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked){return }this.list.css(this.lt,this.pos(this.options.offset)+"px");var D=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(D,false);B(window).unbind("resize",this.funcResize).bind("resize",this.funcResize)},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");if(this.options.initCallback!=null){this.options.initCallback(this,"reset")}this.setup()},reload:function(){if(this.tail!=null&&this.inTail){this.list.css(this.lt,A.intval(this.list.css(this.lt))+this.tail)}this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null){this.options.reloadCallback(this)}if(this.options.visible!=null){var F=this;var G=Math.ceil(this.clipping()/this.options.visible),E=0,D=0;B("li",this.list).each(function(H){E+=F.dimension(this,G);if(H+1<F.first){D=E}});this.list.css(this.wh,E+"px");this.list.css(this.lt,-D+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(D){if(D!=undefined){this.options.size=D;if(!this.locked){this.buttons()}}return this.options.size},has:function(E,F){if(F==undefined||!F){F=E}if(this.options.size!==null&&F>this.options.size){F=this.options.size}for(var D=E;D<=F;D++){var G=this.get(D);if(!G.length||G.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(D){return B(".jcarousel-item-"+D,this.list)},add:function(G,L){var H=this.get(G),E=0,K=0;if(H.length==0){var J,H=this.create(G),F=A.intval(G);while(J=this.get(--F)){if(F<=0||J.length){F<=0?this.list.prepend(H):J.after(H);break}}}else{E=this.dimension(H)}H.removeClass(this.className("jcarousel-item-placeholder"));typeof L=="string"?H.html(L):H.empty().append(L);var I=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var D=this.dimension(H,I)-E;if(G>0&&G<this.first){this.list.css(this.lt,A.intval(this.list.css(this.lt))-D+"px")}this.list.css(this.wh,A.intval(this.list.css(this.wh))+D+"px");return H},remove:function(D){var E=this.get(D);if(!E.length||(D>=this.first&&D<=this.last)){return }var F=this.dimension(E);if(D<this.first){this.list.css(this.lt,A.intval(this.list.css(this.lt))+F+"px")}E.remove();this.list.css(this.wh,A.intval(this.list.css(this.wh))-F+"px")},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail){this.scrollTail(false)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll)}},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail){this.scrollTail(true)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll)}},scrollTail:function(D){if(this.locked||this.animating||!this.tail){return }var E=A.intval(this.list.css(this.lt));!D?E-=this.tail:E+=this.tail;this.inTail=!D;this.prevFirst=this.first;this.prevLast=this.last;this.animate(E)},scroll:function(E,D){if(this.locked||this.animating){return }this.animate(this.pos(E),D)},pos:function(Q){if(this.locked||this.animating){return }if(this.options.wrap!="circular"){Q=Q<1?1:(this.options.size&&Q>this.options.size?this.options.size:Q)}var N=this.first>Q;var E=A.intval(this.list.css(this.lt));var R=this.options.wrap!="circular"&&this.first<=1?1:this.first;var U=N?this.get(R):this.get(this.last);var P=N?R:R-1;var S=null,O=0,L=false,T=0;while(N?--P>=Q:++P<Q){S=this.get(P);L=!S.length;if(S.length==0){S=this.create(P).addClass(this.className("jcarousel-item-placeholder"));U[N?"before":"after"](S)}U=S;T=this.dimension(S);if(L){O+=T}if(this.first!=null&&(this.options.wrap=="circular"||(P>=1&&(this.options.size==null||P<=this.options.size)))){E=N?E+T:E-T}}var I=this.clipping();var K=[];var D=0,P=Q,J=0;var U=this.get(Q-1);while(++D){S=this.get(P);L=!S.length;if(S.length==0){S=this.create(P).addClass(this.className("jcarousel-item-placeholder"));U.length==0?this.list.prepend(S):U[N?"before":"after"](S)}U=S;var T=this.dimension(S);if(T==0){alert("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...");return 0}if(this.options.wrap!="circular"&&this.options.size!==null&&P>this.options.size){K.push(S)}else{if(L){O+=T}}J+=T;if(J>=I){break}P++}for(var H=0;H<K.length;H++){K[H].remove()}if(O>0){this.list.css(this.wh,this.dimension(this.list)+O+"px");if(N){E-=O;this.list.css(this.lt,A.intval(this.list.css(this.lt))-O+"px")}}var G=Q+D-1;if(this.options.wrap!="circular"&&this.options.size&&G>this.options.size){G=this.options.size}if(P>G){D=0,P=G,J=0;while(++D){var S=this.get(P--);if(!S.length){break}J+=this.dimension(S);if(J>=I){break}}}var F=G-D+1;if(this.options.wrap!="circular"&&F<1){F=1}if(this.inTail&&N){E+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&G==this.options.size&&(G-D+1)>=1){var M=A.margin(this.get(G),!this.options.vertical?"marginRight":"marginBottom");if((J-M)>I){this.tail=J-I-M}}while(Q-->F){E+=this.dimension(this.get(Q))}this.prevFirst=this.first;this.prevLast=this.last;this.first=F;this.last=G;return E},animate:function(G,D){if(this.locked||this.animating){return }this.animating=true;var E=this;var F=function(){E.animating=false;if(G==0){E.list.css(E.lt,0)}if(E.options.wrap=="both"||E.options.wrap=="last"||E.options.size==null||E.last<E.options.size){E.startAuto()}E.buttons();E.notify("onAfterAnimation")};this.notify("onBeforeAnimation");if(!this.options.animation||D==false){this.list.css(this.lt,G+"px");F()}else{var H=!this.options.vertical?{left:G}:{top:G};this.list.animate(H,this.options.animation,this.options.easing,F)}},startAuto:function(E){if(E!=undefined){this.options.auto=E}if(this.options.auto==0){return this.stopAuto()}if(this.timer!=null){return }var D=this;this.timer=setTimeout(function(){D.next()},this.options.auto*1000)},stopAuto:function(){if(this.timer==null){return }clearTimeout(this.timer);this.timer=null},buttons:function(F,E){if(F==undefined||F==null){var F=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!=null&&this.last>=this.options.size){F=this.tail!=null&&!this.inTail}}if(E==undefined||E==null){var E=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!=null&&this.first==1){E=this.tail!=null&&this.inTail}}var D=this;this.buttonNext[F?"bind":"unbind"](this.options.buttonNextEvent,this.funcNext)[F?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",F?false:true);this.buttonPrev[E?"bind":"unbind"](this.options.buttonPrevEvent,this.funcPrev)[E?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",E?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=F)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){D.options.buttonNextCallback(D,this,F)});this.buttonNext[0].jcarouselstate=F}if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=E)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){D.options.buttonPrevCallback(D,this,E)});this.buttonPrev[0].jcarouselstate=E}},notify:function(D){var E=this.prevFirst==null?"init":(this.prevFirst<this.first?"next":"prev");this.callback("itemLoadCallback",D,E);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",D,E,this.first);this.callback("itemFirstOutCallback",D,E,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",D,E,this.last);this.callback("itemLastOutCallback",D,E,this.prevLast)}this.callback("itemVisibleInCallback",D,E,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",D,E,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(H,K,D,I,G,F,E){if(this.options[H]==undefined||(typeof this.options[H]!="object"&&K!="onAfterAnimation")){return }var L=typeof this.options[H]=="object"?this.options[H][K]:this.options[H];if(!B.isFunction(L)){return }var M=this;if(I===undefined){L(M,D,K)}else{if(G===undefined){this.get(I).each(function(){L(M,this,I,D,K)})}else{for(var J=I;J<=G;J++){if(J!==null&&!(J>=F&&J<=E)){this.get(J).each(function(){L(M,this,J,D,K)})}}}}},create:function(D){return this.format("<li></li>",D)},format:function(F,E){var D=B(F).addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+E));D.attr("jcarouselindex",E);return D},className:function(D){return D+" "+D+(!this.options.vertical?"-horizontal":"-vertical")},dimension:function(G,H){var F=G.jquery!=undefined?G[0]:G;var E=!this.options.vertical?F.offsetWidth+A.margin(F,"marginLeft")+A.margin(F,"marginRight"):F.offsetHeight+A.margin(F,"marginTop")+A.margin(F,"marginBottom");if(H==undefined||E==H){return E}var D=!this.options.vertical?H-A.margin(F,"marginLeft")-A.margin(F,"marginRight"):H-A.margin(F,"marginTop")-A.margin(F,"marginBottom");B(F).css(this.wh,D+"px");return this.dimension(F)},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-A.intval(this.clip.css("borderLeftWidth"))-A.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-A.intval(this.clip.css("borderTopWidth"))-A.intval(this.clip.css("borderBottomWidth"))},index:function(D,E){if(E==undefined){E=this.options.size}return Math.round((((D-1)/E)-Math.floor((D-1)/E))*E)+1}});A.extend({defaults:function(D){return B.extend(C,D||{})},margin:function(H,G){if(!H){return 0}var F=H.jquery!=undefined?H[0]:H;if(G=="marginRight"&&B.browser.safari){var E={display:"block","float":"none",width:"auto"},D,I;B.swap(F,E,function(){D=F.offsetWidth});E.marginRight=0;B.swap(F,E,function(){I=F.offsetWidth});return I-D}return A.intval(B.css(F,G))},intval:function(D){D=parseInt(D);return isNaN(D)?0:D}})})(jQuery);
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.9995 (09-AUG-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function(I){var L="2.9995";if(I.support==undefined){I.support={opacity:!(I.browser.msie)}}function A(R){I.fn.cycle.debug&&F(R)}function F(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}I.expr[":"].paused=function(R){return R.cyclePause};I.fn.cycle=function(S,R){var T={s:this.selector,c:this.context};if(this.length===0&&S!="stop"){if(!I.isReady&&T.s){F("DOM not ready, queuing slideshow");I(function(){I(T.s,T.c).cycle(S,R)});return this}F("terminating; zero elements found by selector"+(I.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var X=N(this,S,R);if(X===false){return }X.updateActivePagerLink=X.updateActivePagerLink||I.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var Y=I(this);var Z=X.slideExpr?I(X.slideExpr,this):Y.children();var V=Z.get();var U=K(Y,Z,V,X,T);if(U===false){return }if(V.length<2){F("terminating; too few slides: "+V.length);return }var W=U.continuous?10:H(V[U.currSlide],V[U.nextSlide],U,!U.backwards);if(W){W+=(U.delay||0);if(W<10){W=10}A("first timeout: "+W);this.cycleTimeout=setTimeout(function(){E(V,U,0,!X.backwards)},W)}})};function M(R,U,T){var V=I(R).data("cycle.opts");var S=!!R.cyclePause;if(S&&V.paused){V.paused(R,V,U,T)}else{if(!S&&V.resumed){V.resumed(R,V,U,T)}}}function N(R,U,S){if(R.cycleStop==undefined){R.cycleStop=0}if(U===undefined||U===null){U={}}if(U.constructor==String){switch(U){case"destroy":case"stop":var W=I(R).data("cycle.opts");if(!W){return false}R.cycleStop++;if(R.cycleTimeout){clearTimeout(R.cycleTimeout)}R.cycleTimeout=0;W.elements&&I(W.elements).stop();I(R).removeData("cycle.opts");if(U=="destroy"){Q(W)}return false;case"toggle":R.cyclePause=(R.cyclePause===1)?0:1;V(R.cyclePause,S,R);M(R);return false;case"pause":R.cyclePause=1;M(R);return false;case"resume":R.cyclePause=0;V(false,S,R);M(R);return false;case"prev":case"next":var W=I(R).data("cycle.opts");if(!W){F('options not found, "prev/next" ignored');return false}I.fn.cycle[U](W);return false;default:U={fx:U}}return U}else{if(U.constructor==Number){var T=U;U=I(R).data("cycle.opts");if(!U){F("options not found, can not advance slide");return false}if(T<0||T>=U.elements.length){F("invalid slide index: "+T);return false}U.nextSlide=T;if(R.cycleTimeout){clearTimeout(R.cycleTimeout);R.cycleTimeout=0}if(typeof S=="string"){U.oneTimeFx=S}E(U.elements,U,1,T>=U.currSlide);return false}}return U;function V(Y,Z,X){if(!Y&&Z===true){var a=I(X).data("cycle.opts");if(!a){F("options not found, can not resume");return false}if(X.cycleTimeout){clearTimeout(X.cycleTimeout);X.cycleTimeout=0}E(a.elements,a,1,!a.backwards)}}}function B(R,S){if(!I.support.opacity&&S.cleartype&&R.style.filter){try{R.style.removeAttribute("filter")}catch(T){}}}function Q(R){if(R.next){I(R.next).unbind(R.prevNextEvent)}if(R.prev){I(R.prev).unbind(R.prevNextEvent)}if(R.pager||R.pagerAnchorBuilder){I.each(R.pagerAnchors||[],function(){this.unbind().remove()})}R.pagerAnchors=null;if(R.destroy){R.destroy(R)}}function K(Z,s,W,V,k){var f=I.extend({},I.fn.cycle.defaults,V||{},I.metadata?Z.metadata():I.meta?Z.data():{});var c=I.isFunction(Z.data)?Z.data(f.metaAttr):null;if(c){f=I.extend(f,c)}if(f.autostop){f.countdown=f.autostopCount||W.length}var S=Z[0];Z.data("cycle.opts",f);f.$cont=Z;f.stopCount=S.cycleStop;f.elements=W;f.before=f.before?[f.before]:[];f.after=f.after?[f.after]:[];if(!I.support.opacity&&f.cleartype){f.after.push(function(){B(this,f)})}if(f.continuous){f.after.push(function(){E(W,f,0,!f.backwards)})}O(f);if(!I.support.opacity&&f.cleartype&&!f.cleartypeNoBg){G(s)}if(Z.css("position")=="static"){Z.css("position","relative")}if(f.width){Z.width(f.width)}if(f.height&&f.height!="auto"){Z.height(f.height)}if(f.startingSlide){f.startingSlide=parseInt(f.startingSlide,10)}else{if(f.backwards){f.startingSlide=W.length-1}}if(f.random){f.randomMap=[];for(var q=0;q<W.length;q++){f.randomMap.push(q)}f.randomMap.sort(function(h,e){return Math.random()-0.5});f.randomIndex=1;f.startingSlide=f.randomMap[1]}else{if(f.startingSlide>=W.length){f.startingSlide=0}}f.currSlide=f.startingSlide||0;var Y=f.startingSlide;s.css({position:"absolute",top:0,left:0}).hide().each(function(e){var h;if(f.backwards){h=Y?e<=Y?W.length+(e-Y):Y-e:W.length-e}else{h=Y?e>=Y?W.length-(e-Y):Y-e:W.length-e}I(this).css("z-index",h)});I(W[Y]).css("opacity",1).show();B(W[Y],f);if(f.fit){if(!f.aspect){if(f.width){s.width(f.width)}if(f.height&&f.height!="auto"){s.height(f.height)}}else{s.each(function(){var h=I(this);var e=(f.aspect===true)?h.width()/h.height():f.aspect;if(f.width&&h.width()!=f.width){h.width(f.width);h.height(f.width/e)}if(f.height&&h.height()<f.height){h.height(f.height);h.width(f.height*e)}})}}if(f.center&&((!f.fit)||f.aspect)){s.each(function(){var e=I(this);e.css({"margin-left":f.width?((f.width-e.width())/2)+"px":0,"margin-top":f.height?((f.height-e.height())/2)+"px":0})})}if(f.center&&!f.fit&&!f.slideResize){s.each(function(){var e=I(this);e.css({"margin-left":f.width?((f.width-e.width())/2)+"px":0,"margin-top":f.height?((f.height-e.height())/2)+"px":0})})}var g=f.containerResize&&!Z.innerHeight();if(g){var X=0,d=0;for(var m=0;m<W.length;m++){var R=I(W[m]),u=R[0],b=R.outerWidth(),r=R.outerHeight();if(!b){b=u.offsetWidth||u.width||R.attr("width")}if(!r){r=u.offsetHeight||u.height||R.attr("height")}X=b>X?b:X;d=r>d?r:d}if(X>0&&d>0){Z.css({width:X+"px",height:d+"px"})}}var U=false;if(f.pause){Z.hover(function(){U=true;this.cyclePause++;M(S,true)},function(){U&&this.cyclePause--;M(S,true)})}if(C(f)===false){return false}var T=false;V.requeueAttempts=V.requeueAttempts||0;s.each(function(){var j=I(this);this.cycleH=(f.fit&&f.height)?f.height:(j.height()||this.offsetHeight||this.height||j.attr("height")||0);this.cycleW=(f.fit&&f.width)?f.width:(j.width()||this.offsetWidth||this.width||j.attr("width")||0);if(j.is("img")){var h=(I.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var o=(I.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var i=(I.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var e=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(h||o||i||e){if(k.s&&f.requeueOnImageNotLoaded&&++V.requeueAttempts<100){F(V.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){I(k.s,k.c).cycle(V)},f.requeueTimeout);T=true;return false}else{F("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(T){return false}f.cssBefore=f.cssBefore||{};f.cssAfter=f.cssAfter||{};f.cssFirst=f.cssFirst||{};f.animIn=f.animIn||{};f.animOut=f.animOut||{};s.not(":eq("+Y+")").css(f.cssBefore);I(s[Y]).css(f.cssFirst);if(f.timeout){f.timeout=parseInt(f.timeout,10);if(f.speed.constructor==String){f.speed=I.fx.speeds[f.speed]||parseInt(f.speed,10)}if(!f.sync){f.speed=f.speed/2}var l=f.fx=="none"?0:f.fx=="shuffle"?500:250;while((f.timeout-f.speed)<l){f.timeout+=f.speed}}if(f.easing){f.easeIn=f.easeOut=f.easing}if(!f.speedIn){f.speedIn=f.speed}if(!f.speedOut){f.speedOut=f.speed}f.slideCount=W.length;f.currSlide=f.lastSlide=Y;if(f.random){if(++f.randomIndex==W.length){f.randomIndex=0}f.nextSlide=f.randomMap[f.randomIndex]}else{if(f.backwards){f.nextSlide=f.startingSlide==0?(W.length-1):f.startingSlide-1}else{f.nextSlide=f.startingSlide>=(W.length-1)?0:f.startingSlide+1}}if(!f.multiFx){var n=I.fn.cycle.transitions[f.fx];if(I.isFunction(n)){n(Z,s,f)}else{if(f.fx!="custom"&&!f.multiFx){F("unknown transition: "+f.fx,"; slideshow terminating");return false}}}var a=s[Y];if(!f.skipInitializationCallbacks){if(f.before.length){f.before[0].apply(a,[a,a,f,true])}if(f.after.length){f.after[0].apply(a,[a,a,f,true])}}if(f.next){I(f.next).bind(f.prevNextEvent,function(){return P(f,1)})}if(f.prev){I(f.prev).bind(f.prevNextEvent,function(){return P(f,0)})}if(f.pager||f.pagerAnchorBuilder){D(W,f)}J(f,W);return f}function O(R){R.original={before:[],after:[]};R.original.cssBefore=I.extend({},R.cssBefore);R.original.cssAfter=I.extend({},R.cssAfter);R.original.animIn=I.extend({},R.animIn);R.original.animOut=I.extend({},R.animOut);I.each(R.before,function(){R.original.before.push(this)});I.each(R.after,function(){R.original.after.push(this)})}function C(X){var V,T,S=I.fn.cycle.transitions;if(X.fx.indexOf(",")>0){X.multiFx=true;X.fxs=X.fx.replace(/\s*/g,"").split(",");for(V=0;V<X.fxs.length;V++){var W=X.fxs[V];T=S[W];if(!T||!S.hasOwnProperty(W)||!I.isFunction(T)){F("discarding unknown transition: ",W);X.fxs.splice(V,1);V--}}if(!X.fxs.length){F("No valid transitions named; slideshow terminating.");return false}}else{if(X.fx=="all"){X.multiFx=true;X.fxs=[];for(p in S){T=S[p];if(S.hasOwnProperty(p)&&I.isFunction(T)){X.fxs.push(p)}}}}if(X.multiFx&&X.randomizeEffects){var U=Math.floor(Math.random()*20)+30;for(V=0;V<U;V++){var R=Math.floor(Math.random()*X.fxs.length);X.fxs.push(X.fxs.splice(R,1)[0])}A("randomized fx sequence: ",X.fxs)}return true}function J(S,R){S.addSlide=function(U,V){var T=I(U),W=T[0];if(!S.autostopCount){S.countdown++}R[V?"unshift":"push"](W);if(S.els){S.els[V?"unshift":"push"](W)}S.slideCount=R.length;T.css("position","absolute");T[V?"prependTo":"appendTo"](S.$cont);if(V){S.currSlide++;S.nextSlide++}if(!I.support.opacity&&S.cleartype&&!S.cleartypeNoBg){G(T)}if(S.fit&&S.width){T.width(S.width)}if(S.fit&&S.height&&S.height!="auto"){T.height(S.height)}W.cycleH=(S.fit&&S.height)?S.height:T.height();W.cycleW=(S.fit&&S.width)?S.width:T.width();T.css(S.cssBefore);if(S.pager||S.pagerAnchorBuilder){I.fn.cycle.createPagerAnchor(R.length-1,W,I(S.pager),R,S)}if(I.isFunction(S.onAddSlide)){S.onAddSlide(T)}else{T.hide()}}}I.fn.cycle.resetState=function(S,R){R=R||S.fx;S.before=[];S.after=[];S.cssBefore=I.extend({},S.original.cssBefore);S.cssAfter=I.extend({},S.original.cssAfter);S.animIn=I.extend({},S.original.animIn);S.animOut=I.extend({},S.original.animOut);S.fxFn=null;I.each(S.original.before,function(){S.before.push(this)});I.each(S.original.after,function(){S.after.push(this)});var T=I.fn.cycle.transitions[R];if(I.isFunction(T)){T(S.$cont,I(S.elements),S)}};function E(Y,R,X,a){if(X&&R.busy&&R.manualTrump){A("manualTrump in go(), stopping active transition");I(Y).stop(true,true);R.busy=0}if(R.busy){A("transition active, ignoring new tx request");return }var V=R.$cont[0],c=Y[R.currSlide],b=Y[R.nextSlide];if(V.cycleStop!=R.stopCount||V.cycleTimeout===0&&!X){return }if(!X&&!V.cyclePause&&!R.bounce&&((R.autostop&&(--R.countdown<=0))||(R.nowrap&&!R.random&&R.nextSlide<R.currSlide))){if(R.end){R.end(R)}return }var Z=false;if((X||!V.cyclePause)&&(R.nextSlide!=R.currSlide)){Z=true;var W=R.fx;c.cycleH=c.cycleH||I(c).height();c.cycleW=c.cycleW||I(c).width();b.cycleH=b.cycleH||I(b).height();b.cycleW=b.cycleW||I(b).width();if(R.multiFx){if(a&&(R.lastFx==undefined||++R.lastFx>=R.fxs.length)){R.lastFx=0}else{if(!a&&(R.lastFx==undefined||--R.lastFx<0)){R.lastFx=R.fxs.length-1}}W=R.fxs[R.lastFx]}if(R.oneTimeFx){W=R.oneTimeFx;R.oneTimeFx=null}I.fn.cycle.resetState(R,W);if(R.before.length){I.each(R.before,function(d,e){if(V.cycleStop!=R.stopCount){return }e.apply(b,[c,b,R,a])})}var T=function(){R.busy=0;I.each(R.after,function(d,e){if(V.cycleStop!=R.stopCount){return }e.apply(b,[c,b,R,a])})};A("tx firing("+W+"); currSlide: "+R.currSlide+"; nextSlide: "+R.nextSlide);R.busy=1;if(R.fxFn){R.fxFn(c,b,R,T,a,X&&R.fastOnEvent)}else{if(I.isFunction(I.fn.cycle[R.fx])){I.fn.cycle[R.fx](c,b,R,T,a,X&&R.fastOnEvent)}else{I.fn.cycle.custom(c,b,R,T,a,X&&R.fastOnEvent)}}}if(Z||R.nextSlide==R.currSlide){R.lastSlide=R.currSlide;if(R.random){R.currSlide=R.nextSlide;if(++R.randomIndex==Y.length){R.randomIndex=0}R.nextSlide=R.randomMap[R.randomIndex];if(R.nextSlide==R.currSlide){R.nextSlide=(R.currSlide==R.slideCount-1)?0:R.currSlide+1}}else{if(R.backwards){var U=(R.nextSlide-1)<0;if(U&&R.bounce){R.backwards=!R.backwards;R.nextSlide=1;R.currSlide=0}else{R.nextSlide=U?(Y.length-1):R.nextSlide-1;R.currSlide=U?0:R.nextSlide+1}}else{var U=(R.nextSlide+1)==Y.length;if(U&&R.bounce){R.backwards=!R.backwards;R.nextSlide=Y.length-2;R.currSlide=Y.length-1}else{R.nextSlide=U?0:R.nextSlide+1;R.currSlide=U?Y.length-1:R.nextSlide-1}}}}if(Z&&R.pager){R.updateActivePagerLink(R.pager,R.currSlide,R.activePagerClass)}var S=0;if(R.timeout&&!R.continuous){S=H(Y[R.currSlide],Y[R.nextSlide],R,a)}else{if(R.continuous&&V.cyclePause){S=10}}if(S>0){V.cycleTimeout=setTimeout(function(){E(Y,R,0,!R.backwards)},S)}}I.fn.cycle.updateActivePagerLink=function(R,T,S){I(R).each(function(){I(this).children().removeClass(S).eq(T).addClass(S)})};function H(V,T,U,S){if(U.timeoutFn){var R=U.timeoutFn.call(V,V,T,U,S);while(U.fx!="none"&&(R-U.speed)<250){R+=U.speed}A("calculated timeout: "+R+"; speed: "+U.speed);if(R!==false){return R}}return U.timeout}I.fn.cycle.next=function(R){P(R,1)};I.fn.cycle.prev=function(R){P(R,0)};function P(U,T){var X=T?1:-1;var S=U.elements;var W=U.$cont[0],V=W.cycleTimeout;if(V){clearTimeout(V);W.cycleTimeout=0}if(U.random&&X<0){U.randomIndex--;if(--U.randomIndex==-2){U.randomIndex=S.length-2}else{if(U.randomIndex==-1){U.randomIndex=S.length-1}}U.nextSlide=U.randomMap[U.randomIndex]}else{if(U.random){U.nextSlide=U.randomMap[U.randomIndex]}else{U.nextSlide=U.currSlide+X;if(U.nextSlide<0){if(U.nowrap){return false}U.nextSlide=S.length-1}else{if(U.nextSlide>=S.length){if(U.nowrap){return false}U.nextSlide=0}}}}var R=U.onPrevNextEvent||U.prevNextClick;if(I.isFunction(R)){R(X>0,U.nextSlide,S[U.nextSlide])}E(S,U,1,T);return false}function D(S,T){var R=I(T.pager);I.each(S,function(U,V){I.fn.cycle.createPagerAnchor(U,V,R,S,T)});T.updateActivePagerLink(T.pager,T.startingSlide,T.activePagerClass)}I.fn.cycle.createPagerAnchor=function(W,T,Y,V,S){var Z;if(I.isFunction(S.pagerAnchorBuilder)){Z=S.pagerAnchorBuilder(W,T);A("pagerAnchorBuilder("+W+", el) returned: "+Z)}else{Z='<a href="#">'+(W+1)+"</a>"}if(!Z){return }var U=I(Z);if(U.parents("body").length===0){var X=[];if(Y.length>1){Y.each(function(){var a=U.clone(true);I(this).append(a);X.push(a[0])});U=I(X)}else{U.appendTo(Y)}}S.pagerAnchors=S.pagerAnchors||[];S.pagerAnchors.push(U);var b=function(g){g.preventDefault();S.nextSlide=W;var f=S.$cont[0],d=f.cycleTimeout;if(d){clearTimeout(d);f.cycleTimeout=0}var a=S.onPagerEvent||S.pagerClick;if(I.isFunction(a)){a(S.nextSlide,V[S.nextSlide])}E(V,S,1,S.currSlide<W)};if(/mouseenter|mouseover/i.test(S.pagerEvent)){U.hover(b,function(){})}else{U.bind(S.pagerEvent,b)}if(!/^click/.test(S.pagerEvent)&&!S.allowPagerClickBubble){U.bind("click.cycle",function(){return false})}var c=S.$cont[0];var R=false;if(S.pauseOnPagerHover){U.hover(function(){R=true;c.cyclePause++;M(c,true,true)},function(){R&&c.cyclePause--;M(c,true,true)})}};I.fn.cycle.hopsFromLast=function(U,T){var S,R=U.lastSlide,V=U.currSlide;if(T){S=V>R?V-R:U.slideCount-R}else{S=V<R?R-V:R+U.slideCount-V}return S};function G(T){A("applying clearType background-color hack");function S(U){U=parseInt(U,10).toString(16);return U.length<2?"0"+U:U}function R(W){for(;W&&W.nodeName.toLowerCase()!="html";W=W.parentNode){var U=I.css(W,"background-color");if(U&&U.indexOf("rgb")>=0){var V=U.match(/\d+/g);return"#"+S(V[0])+S(V[1])+S(V[2])}if(U&&U!="transparent"){return U}}return"#ffffff"}T.each(function(){I(this).css("background-color",R(this))})}I.fn.cycle.commonReset=function(W,U,V,S,T,R){I(V.elements).not(W).hide();if(typeof V.cssBefore.opacity=="undefined"){V.cssBefore.opacity=1}V.cssBefore.display="block";if(V.slideResize&&S!==false&&U.cycleW>0){V.cssBefore.width=U.cycleW}if(V.slideResize&&T!==false&&U.cycleH>0){V.cssBefore.height=U.cycleH}V.cssAfter=V.cssAfter||{};V.cssAfter.display="none";I(W).css("zIndex",V.slideCount+(R===true?1:0));I(U).css("zIndex",V.slideCount+(R===true?0:1))};I.fn.cycle.custom=function(d,X,R,U,W,S){var c=I(d),Y=I(X);var T=R.speedIn,b=R.speedOut,V=R.easeIn,a=R.easeOut;Y.css(R.cssBefore);if(S){if(typeof S=="number"){T=b=S}else{T=b=1}V=a=null}var Z=function(){Y.animate(R.animIn,T,V,function(){U()})};c.animate(R.animOut,b,a,function(){c.css(R.cssAfter);if(!R.sync){Z()}});if(R.sync){Z()}};I.fn.cycle.transitions={fade:function(S,T,R){T.not(":eq("+R.currSlide+")").css("opacity",0);R.before.push(function(W,U,V){I.fn.cycle.commonReset(W,U,V);V.cssBefore.opacity=0});R.animIn={opacity:1};R.animOut={opacity:0};R.cssBefore={top:0,left:0}}};I.fn.cycle.ver=function(){return L};I.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!I.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(A){A.fn.cycle.transitions.none=function(C,D,B){B.fxFn=function(G,E,F,H){A(E).show();A(G).hide();H()}};A.fn.cycle.transitions.fadeout=function(C,D,B){D.not(":eq("+B.currSlide+")").css({display:"block",opacity:1});B.before.push(function(J,H,I,F,G,E){A(J).css("zIndex",I.slideCount+(!E===true?1:0));A(H).css("zIndex",I.slideCount+(!E===true?0:1))});B.animIn.opacity=1;B.animOut.opacity=0;B.cssBefore.opacity=1;B.cssBefore.display="block";B.cssAfter.zIndex=0};A.fn.cycle.transitions.scrollUp=function(D,E,C){D.css("overflow","hidden");C.before.push(A.fn.cycle.commonReset);var B=D.height();C.cssBefore.top=B;C.cssBefore.left=0;C.cssFirst.top=0;C.animIn.top=0;C.animOut.top=-B};A.fn.cycle.transitions.scrollDown=function(D,E,C){D.css("overflow","hidden");C.before.push(A.fn.cycle.commonReset);var B=D.height();C.cssFirst.top=0;C.cssBefore.top=-B;C.cssBefore.left=0;C.animIn.top=0;C.animOut.top=B};A.fn.cycle.transitions.scrollLeft=function(D,E,C){D.css("overflow","hidden");C.before.push(A.fn.cycle.commonReset);var B=D.width();C.cssFirst.left=0;C.cssBefore.left=B;C.cssBefore.top=0;C.animIn.left=0;C.animOut.left=0-B};A.fn.cycle.transitions.scrollRight=function(D,E,C){D.css("overflow","hidden");C.before.push(A.fn.cycle.commonReset);var B=D.width();C.cssFirst.left=0;C.cssBefore.left=-B;C.cssBefore.top=0;C.animIn.left=0;C.animOut.left=B};A.fn.cycle.transitions.scrollHorz=function(C,D,B){C.css("overflow","hidden").width();B.before.push(function(H,F,G,E){if(G.rev){E=!E}A.fn.cycle.commonReset(H,F,G);G.cssBefore.left=E?(F.cycleW-1):(1-F.cycleW);G.animOut.left=E?-H.cycleW:H.cycleW});B.cssFirst.left=0;B.cssBefore.top=0;B.animIn.left=0;B.animOut.top=0};A.fn.cycle.transitions.scrollVert=function(C,D,B){C.css("overflow","hidden");B.before.push(function(H,F,G,E){if(G.rev){E=!E}A.fn.cycle.commonReset(H,F,G);G.cssBefore.top=E?(1-F.cycleH):(F.cycleH-1);G.animOut.top=E?H.cycleH:-H.cycleH});B.cssFirst.top=0;B.cssBefore.left=0;B.animIn.top=0;B.animOut.left=0};A.fn.cycle.transitions.slideX=function(C,D,B){B.before.push(function(G,E,F){A(F.elements).not(G).hide();A.fn.cycle.commonReset(G,E,F,false,true);F.animIn.width=E.cycleW});B.cssBefore.left=0;B.cssBefore.top=0;B.cssBefore.width=0;B.animIn.width="show";B.animOut.width=0};A.fn.cycle.transitions.slideY=function(C,D,B){B.before.push(function(G,E,F){A(F.elements).not(G).hide();A.fn.cycle.commonReset(G,E,F,true,false);F.animIn.height=E.cycleH});B.cssBefore.left=0;B.cssBefore.top=0;B.cssBefore.height=0;B.animIn.height="show";B.animOut.height=0};A.fn.cycle.transitions.shuffle=function(E,F,D){var C,B=E.css("overflow","visible").width();F.css({left:0,top:0});D.before.push(function(I,G,H){A.fn.cycle.commonReset(I,G,H,true,true,true)});if(!D.speedAdjusted){D.speed=D.speed/2;D.speedAdjusted=true}D.random=0;D.shuffle=D.shuffle||{left:-B,top:15};D.els=[];for(C=0;C<F.length;C++){D.els.push(F[C])}for(C=0;C<D.currSlide;C++){D.els.push(D.els.shift())}D.fxFn=function(M,J,L,G,I){if(L.rev){I=!I}var H=I?A(M):A(J);A(J).css(L.cssBefore);var K=L.slideCount;H.animate(L.shuffle,L.speedIn,L.easeIn,function(){var O=A.fn.cycle.hopsFromLast(L,I);for(var P=0;P<O;P++){I?L.els.push(L.els.shift()):L.els.unshift(L.els.pop())}if(I){for(var Q=0,N=L.els.length;Q<N;Q++){A(L.els[Q]).css("z-index",N-Q+K)}}else{var R=A(M).css("z-index");H.css("z-index",parseInt(R,10)+1+K)}H.animate({left:0,top:0},L.speedOut,L.easeOut,function(){A(I?this:M).hide();if(G){G()}})})};A.extend(D.cssBefore,{display:"block",opacity:1,top:0,left:0})};A.fn.cycle.transitions.turnUp=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,true,false);F.cssBefore.top=E.cycleH;F.animIn.height=E.cycleH;F.animOut.width=E.cycleW});B.cssFirst.top=0;B.cssBefore.left=0;B.cssBefore.height=0;B.animIn.top=0;B.animOut.height=0};A.fn.cycle.transitions.turnDown=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,true,false);F.animIn.height=E.cycleH;F.animOut.top=G.cycleH});B.cssFirst.top=0;B.cssBefore.left=0;B.cssBefore.top=0;B.cssBefore.height=0;B.animOut.height=0};A.fn.cycle.transitions.turnLeft=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,false,true);F.cssBefore.left=E.cycleW;F.animIn.width=E.cycleW});B.cssBefore.top=0;B.cssBefore.width=0;B.animIn.left=0;B.animOut.width=0};A.fn.cycle.transitions.turnRight=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,false,true);F.animIn.width=E.cycleW;F.animOut.left=G.cycleW});A.extend(B.cssBefore,{top:0,left:0,width:0});B.animIn.left=0;B.animOut.width=0};A.fn.cycle.transitions.zoom=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,false,false,true);F.cssBefore.top=E.cycleH/2;F.cssBefore.left=E.cycleW/2;A.extend(F.animIn,{top:0,left:0,width:E.cycleW,height:E.cycleH});A.extend(F.animOut,{width:0,height:0,top:G.cycleH/2,left:G.cycleW/2})});B.cssFirst.top=0;B.cssFirst.left=0;B.cssBefore.width=0;B.cssBefore.height=0};A.fn.cycle.transitions.fadeZoom=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,false,false);F.cssBefore.left=E.cycleW/2;F.cssBefore.top=E.cycleH/2;A.extend(F.animIn,{top:0,left:0,width:E.cycleW,height:E.cycleH})});B.cssBefore.width=0;B.cssBefore.height=0;B.animOut.opacity=0};A.fn.cycle.transitions.blindX=function(D,E,C){var B=D.css("overflow","hidden").width();C.before.push(function(H,F,G){A.fn.cycle.commonReset(H,F,G);G.animIn.width=F.cycleW;G.animOut.left=H.cycleW});C.cssBefore.left=B;C.cssBefore.top=0;C.animIn.left=0;C.animOut.left=B};A.fn.cycle.transitions.blindY=function(D,E,C){var B=D.css("overflow","hidden").height();C.before.push(function(H,F,G){A.fn.cycle.commonReset(H,F,G);G.animIn.height=F.cycleH;G.animOut.top=H.cycleH});C.cssBefore.top=B;C.cssBefore.left=0;C.animIn.top=0;C.animOut.top=B};A.fn.cycle.transitions.blindZ=function(E,F,D){var C=E.css("overflow","hidden").height();var B=E.width();D.before.push(function(I,G,H){A.fn.cycle.commonReset(I,G,H);H.animIn.height=G.cycleH;H.animOut.top=I.cycleH});D.cssBefore.top=C;D.cssBefore.left=B;D.animIn.top=0;D.animIn.left=0;D.animOut.top=C;D.animOut.left=B};A.fn.cycle.transitions.growX=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,false,true);F.cssBefore.left=this.cycleW/2;F.animIn.left=0;F.animIn.width=this.cycleW;F.animOut.left=0});B.cssBefore.top=0;B.cssBefore.width=0};A.fn.cycle.transitions.growY=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,true,false);F.cssBefore.top=this.cycleH/2;F.animIn.top=0;F.animIn.height=this.cycleH;F.animOut.top=0});B.cssBefore.height=0;B.cssBefore.left=0};A.fn.cycle.transitions.curtainX=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,false,true,true);F.cssBefore.left=E.cycleW/2;F.animIn.left=0;F.animIn.width=this.cycleW;F.animOut.left=G.cycleW/2;F.animOut.width=0});B.cssBefore.top=0;B.cssBefore.width=0};A.fn.cycle.transitions.curtainY=function(C,D,B){B.before.push(function(G,E,F){A.fn.cycle.commonReset(G,E,F,true,false,true);F.cssBefore.top=E.cycleH/2;F.animIn.top=0;F.animIn.height=E.cycleH;F.animOut.top=G.cycleH/2;F.animOut.height=0});B.cssBefore.height=0;B.cssBefore.left=0};A.fn.cycle.transitions.cover=function(E,F,D){var G=D.direction||"left";var B=E.css("overflow","hidden").width();var C=E.height();D.before.push(function(J,H,I){A.fn.cycle.commonReset(J,H,I);if(G=="right"){I.cssBefore.left=-B}else{if(G=="up"){I.cssBefore.top=C}else{if(G=="down"){I.cssBefore.top=-C}else{I.cssBefore.left=B}}}});D.animIn.left=0;D.animIn.top=0;D.cssBefore.top=0;D.cssBefore.left=0};A.fn.cycle.transitions.uncover=function(E,F,D){var G=D.direction||"left";var B=E.css("overflow","hidden").width();var C=E.height();D.before.push(function(J,H,I){A.fn.cycle.commonReset(J,H,I,true,true,true);if(G=="right"){I.animOut.left=B}else{if(G=="up"){I.animOut.top=-C}else{if(G=="down"){I.animOut.top=C}else{I.animOut.left=-B}}}});D.animIn.left=0;D.animIn.top=0;D.cssBefore.top=0;D.cssBefore.left=0};A.fn.cycle.transitions.toss=function(E,F,D){var B=E.css("overflow","visible").width();var C=E.height();D.before.push(function(I,G,H){A.fn.cycle.commonReset(I,G,H,true,true,true);if(!H.animOut.left&&!H.animOut.top){A.extend(H.animOut,{left:B*2,top:-C/2,opacity:0})}else{H.animOut.opacity=0}});D.cssBefore.left=0;D.cssBefore.top=0;D.animIn.left=0};A.fn.cycle.transitions.wipe=function(M,I,C){var L=M.css("overflow","hidden").width();var G=M.height();C.cssBefore=C.cssBefore||{};var E;if(C.clip){if(/l2r/.test(C.clip)){E="rect(0px 0px "+G+"px 0px)"}else{if(/r2l/.test(C.clip)){E="rect(0px "+L+"px "+G+"px "+L+"px)"}else{if(/t2b/.test(C.clip)){E="rect(0px "+L+"px 0px 0px)"}else{if(/b2t/.test(C.clip)){E="rect("+G+"px "+L+"px "+G+"px 0px)"}else{if(/zoom/.test(C.clip)){var K=parseInt(G/2,10);var D=parseInt(L/2,10);E="rect("+K+"px "+D+"px "+K+"px "+D+"px)"}}}}}}C.cssBefore.clip=C.cssBefore.clip||E||"rect(0px 0px 0px 0px)";var H=C.cssBefore.clip.match(/(\d+)/g);var N=parseInt(H[0],10),B=parseInt(H[1],10),J=parseInt(H[2],10),F=parseInt(H[3],10);C.before.push(function(V,Q,T){if(V==Q){return }var P=A(V),O=A(Q);A.fn.cycle.commonReset(V,Q,T,true,true,false);T.cssAfter.display="block";var S=1,R=parseInt((T.speedIn/13),10)-1;(function U(){var X=N?N-parseInt(S*(N/R),10):0;var Y=F?F-parseInt(S*(F/R),10):0;var Z=J<G?J+parseInt(S*((G-J)/R||1),10):G;var W=B<L?B+parseInt(S*((L-B)/R||1),10):L;O.css({clip:"rect("+X+"px "+W+"px "+Z+"px "+Y+"px)"});(S++<=R)?setTimeout(U,13):P.css("display","none")})()});A.extend(C.cssBefore,{display:"block",opacity:1,top:0,left:0});C.animIn={left:0};C.animOut={left:0}}})(jQuery);(function(A){A.fn.tweet=function(F){var E=A.extend({username:null,list:null,favorites:false,query:null,avatar_size:null,count:3,fetch:null,page:1,retweets:true,intro_text:null,outro_text:null,join_text:null,auto_join_text_default:"i said,",auto_join_text_ed:"i",auto_join_text_ing:"i am",auto_join_text_reply:"i replied to",auto_join_text_url:"i was looking at",loading_text:null,refresh_interval:null,twitter_url:"twitter.com",twitter_api_url:"api.twitter.com",twitter_search_url:"search.twitter.com",template:"{avatar}{time}{join}{text}",comparator:function(H,G){return G.tweet_time-H.tweet_time},filter:function(G){return true}},F);A.fn.extend({linkUrl:function(){var G=[];var H=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi;this.each(function(){G.push(this.replace(H,function(J){var I=(/^[a-z]+:/i).test(J)?J:"http://"+J;return'<a target="_blank" href="'+I+'">'+J+"</a>"}))});return A(G)},linkUser:function(){var G=[];var H=/[\@]+(\w+)/gi;this.each(function(){G.push(this.replace(H,'@<a target="_blank" href="http://'+E.twitter_url+'/$1">$1</a>'))});return A(G)},linkHash:function(){var H=[];var I=/(?:^| )[\#]+([\w\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff\u0600-\u06ff]+)/gi;var G=(E.username&&E.username.length==1)?"&from="+E.username.join("%2BOR%2B"):"";this.each(function(){H.push(this.replace(I,' <a target="_blank" href="http://'+E.twitter_search_url+"/search?q=&tag=$1&lang=all"+G+'">#$1</a>'))});return A(H)},capAwesome:function(){var G=[];this.each(function(){G.push(this.replace(/\b(awesome)\b/gi,'<span class="awesome">$1</span>'))});return A(G)},capEpic:function(){var G=[];this.each(function(){G.push(this.replace(/\b(epic)\b/gi,'<span class="epic">$1</span>'))});return A(G)},makeHeart:function(){var G=[];this.each(function(){G.push(this.replace(/(&lt;)+[3]/gi,"<tt class='heart'>&#x2665;</tt>"))});return A(G)}});function B(G){return Date.parse(G.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i,"$1,$2$4$3"))}function D(G){var I=(arguments.length>1)?arguments[1]:new Date();var J=parseInt((I.getTime()-G)/1000,10);var H="";if(J<60){H=J+" seconds ago"}else{if(J<120){H="a minute ago"}else{if(J<(45*60)){H=(parseInt(J/60,10)).toString()+" minutes ago"}else{if(J<(2*60*60)){H="an hour ago"}else{if(J<(24*60*60)){H=""+(parseInt(J/3600,10)).toString()+" hours ago"}else{if(J<(48*60*60)){H="a day ago"}else{H=(parseInt(J/86400,10)).toString()+" days ago"}}}}}}return"about "+H}function C(){var H=("https:"==document.location.protocol?"https:":"http:");var G=(E.fetch===null)?E.count:E.fetch;if(E.list){return H+"//"+E.twitter_api_url+"/1/"+E.username[0]+"/lists/"+E.list+"/statuses.json?page="+E.page+"&per_page="+G+"&callback=?"}else{if(E.favorites){return H+"//"+E.twitter_api_url+"/favorites/"+E.username[0]+".json?page="+E.page+"&count="+E.count+"&callback=?"}else{if(E.query===null&&E.username.length==1){return H+"//"+E.twitter_api_url+"/1/statuses/user_timeline.json?screen_name="+E.username[0]+"&count="+G+(E.retweets?"&include_rts=1":"")+"&page="+E.page+"&callback=?"}else{var I=(E.query||"from:"+E.username.join(" OR from:"));return H+"//"+E.twitter_search_url+"/search.json?&q="+encodeURIComponent(I)+"&rpp="+G+"&page="+E.page+"&callback=?"}}}}return this.each(function(H,K){var J=A('<ul class="tweet_list">').appendTo(K);var I='<p class="tweet_intro">'+E.intro_text+"</p>";var G='<p class="tweet_outro">'+E.outro_text+"</p>";var M=A('<p class="loading">'+E.loading_text+"</p>");if(E.username&&typeof (E.username)=="string"){E.username=[E.username]}var L=function(P){if(typeof E.template==="string"){var N=E.template;for(var O in P){var Q=P[O];N=N.replace(new RegExp("{"+O+"}","g"),Q===null?"":Q)}return N}else{return E.template(P)}};if(E.loading_text){A(K).append(M)}A(K).bind("load",function(){A.getJSON(C(),function(N){if(E.loading_text){M.remove()}if(E.intro_text){J.before(I)}J.empty();var O=A.map(N.results||N,function(k){var h=E.join_text;if(E.join_text=="auto"){if(k.text.match(/^(@([A-Za-z0-9-_]+)) .*/i)){h=E.auto_join_text_reply}else{if(k.text.match(/(^\w+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+) .*/i)){h=E.auto_join_text_url}else{if(k.text.match(/^((\w+ed)|just) .*/im)){h=E.auto_join_text_ed}else{if(k.text.match(/^(\w*ing) .*/i)){h=E.auto_join_text_ing}else{h=E.auto_join_text_default}}}}}var X=k.from_user||k.user.screen_name;var f=k.source;var c="http://"+E.twitter_url+"/"+X;var Q=E.avatar_size;var Y=k.profile_image_url||k.user.profile_image_url;var l="http://"+E.twitter_url+"/"+X+"/status/"+k.id_str;var b=(typeof (k.retweeted_status)!="undefined");var R=b?k.retweeted_status.user.screen_name:null;var U=B(k.created_at);var n=D(U);var T=b?("RT @"+R+" "+k.retweeted_status.text):k.text;var Z=A([T]).linkUrl().linkUser().linkHash()[0];var m='<a class="tweet_user" href="'+c+'">'+X+"</a>";var d=((E.join_text)?('<span class="tweet_join"> '+h+" </span>"):" ");var j=(Q?('<a class="tweet_avatar" href="'+c+'"><img src="'+Y+'" height="'+Q+'" width="'+Q+'" alt="'+X+'\'s avatar" title="'+X+'\'s avatar" border="0"/></a>'):"");var W='<span class="tweet_time"><a href="'+l+'" title="view tweet on twitter">'+n+"</a></span>";var a='<span class="tweet_text">'+A([Z]).makeHeart().capAwesome().capEpic()[0]+"</span>";var i="http://"+E.twitter_url+"/intent/tweet?in_reply_to="+k.id_str;var e="http://"+E.twitter_url+"/intent/retweet?tweet_id="+k.id_str;var P="http://"+E.twitter_url+"/intent/favorite?tweet_id="+k.id_str;var V='<a class="tweet_action tweet_reply" href="'+i+'">reply</a>';var g='<a class="tweet_action tweet_retweet" href="'+e+'">retweet</a>';var S='<a class="tweet_action tweet_favorite" href="'+P+'">favorite</a>';return{item:k,screen_name:X,user_url:c,avatar_size:Q,avatar_url:Y,source:f,tweet_url:l,tweet_time:U,tweet_relative_time:n,tweet_raw_text:T,tweet_text:Z,retweet:b,retweeted_screen_name:R,user:m,join:d,avatar:j,time:W,text:a,reply_url:i,favorite_url:P,retweet_url:e,reply_action:V,favorite_action:S,retweet_action:g}});O=A.grep(O,E.filter).sort(E.comparator).slice(0,E.count);J.append(A.map(O,function(P){return"<li>"+L(P)+"</li>"}).join("")).children("li:first").addClass("tweet_first").end().children("li:odd").addClass("tweet_even").end().children("li:even").addClass("tweet_odd");if(E.outro_text){J.after(G)}A(K).trigger("loaded").trigger((O.length===0?"empty":"full"));if(E.refresh_interval){window.setTimeout(function(){A(K).trigger("load")},1000*E.refresh_interval)}})}).trigger("load")})}})(jQuery);var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();var _ga=_ga||{};var _gaq=_gaq||[];_ga.trackSocialEvent=function(A,C,B){if(typeof (pageTracker)==="object"){pageTracker._trackEvent(A,C,B)}};_ga.trackSocial=function(A){_ga.trackFacebook(A);_ga.trackTwitter(A)};_ga.trackFacebook=function(A){try{if(FB&&FB.Event&&FB.Event.subscribe){FB.Event.subscribe("edge.create",function(C){_ga.trackSocialEvent("facebook","recommend",C)});FB.Event.subscribe("edge.remove",function(C){_ga.trackSocialEvent("facebook","unlike",C)});FB.Event.subscribe("message.send",function(C){_ga.trackSocialEvent("facebook","send",C)})}}catch(B){}};_ga.trackTwitter=function(A){try{if(twttr&&twttr.events&&twttr.events.bind){twttr.events.bind("tweet",function(C){if(C){var D;if(C.target&&C.target.nodeName==="IFRAME"){D=_ga.extractParamFromUri_(C.target.src,"url")}_ga.trackSocialEvent("twitter","tweet",D)}})}}catch(B){}};_ga.extractParamFromUri_=function(B,D){if(!B){return }var A;B=B.split("#")[1];var C=decodeURI(B),F;D+="=";var E=C.split("&");for(A=0,F;F=E[A];A+=1){if(F.indexOf(D)===0){return unescape(F.split("=")[1])}}return };(function(B){var A=function(I,P){var G=B.extend({},B.fn.nivoSlider.defaults,P);var L={currentSlide:0,currentImage:"",totalSlides:0,randAnim:"",running:false,paused:false,stop:false};var D=B(I);D.data("nivo:vars",L);D.css("position","relative");D.addClass("nivoSlider");var E=D.children();E.each(function(){var T=B(this);var S="";if(!T.is("img")){if(T.is("a")){T.addClass("nivo-imageLink");S=T}T=T.find("img:first")}var R=T.width();if(R==0){R=T.attr("width")}var Q=T.height();if(Q==0){Q=T.attr("height")}if(R>D.width()){D.width(R)}if(Q>D.height()){D.height(Q)}if(S!=""){S.css("display","none")}T.css("display","none");L.totalSlides++});if(G.startSlide>0){if(G.startSlide>=L.totalSlides){G.startSlide=L.totalSlides-1}L.currentSlide=G.startSlide}if(B(E[L.currentSlide]).is("img")){L.currentImage=B(E[L.currentSlide])}else{L.currentImage=B(E[L.currentSlide]).find("img:first")}if(B(E[L.currentSlide]).is("a")){B(E[L.currentSlide]).css("display","block")}D.css("background","url("+L.currentImage.attr("src")+") no-repeat");for(var J=0;J<G.slices;J++){var N=Math.round(D.width()/G.slices);if(J==G.slices-1){D.append(B('<div class="nivo-slice"></div>').css({left:(N*J)+"px",width:(D.width()-(N*J))+"px"}))}else{D.append(B('<div class="nivo-slice"></div>').css({left:(N*J)+"px",width:N+"px"}))}}D.append(B('<div class="nivo-caption"><p></p></div>').css({display:"none",opacity:G.captionOpacity}));if(L.currentImage.attr("title")!=""){var M=L.currentImage.attr("title");if(M.substr(0,1)=="#"){M=B(M).html()}B(".nivo-caption p",D).html(M);B(".nivo-caption",D).fadeIn(G.animSpeed)}var C=0;if(!G.manualAdvance&&E.length>1){C=setInterval(function(){O(D,E,G,false)},G.pauseTime)}if(G.directionNav){D.append('<div class="nivo-directionNav"><a class="nivo-prevNav">Prev</a><a class="nivo-nextNav">Next</a></div>');if(G.directionNavHide){B(".nivo-directionNav",D).hide();D.hover(function(){B(".nivo-directionNav",D).show()},function(){B(".nivo-directionNav",D).hide()})}B("a.nivo-prevNav",D).live("click",function(){if(L.running){return false}clearInterval(C);C="";L.currentSlide-=2;O(D,E,G,"prev")});B("a.nivo-nextNav",D).live("click",function(){if(L.running){return false}clearInterval(C);C="";O(D,E,G,"next")})}if(G.controlNav){var K=B('<div class="nivo-controlNav"></div>');D.append(K);for(var J=0;J<E.length;J++){if(G.controlNavThumbs){var F=E.eq(J);if(!F.is("img")){F=F.find("img:first")}if(G.controlNavThumbsFromRel){K.append('<a class="nivo-control" rel="'+J+'"><img src="'+F.attr("rel")+'" alt="" /></a>')}else{K.append('<a class="nivo-control" rel="'+J+'"><img src="'+F.attr("src").replace(G.controlNavThumbsSearch,G.controlNavThumbsReplace)+'" alt="" /></a>')}}else{K.append('<a class="nivo-control" rel="'+J+'">'+(J+1)+"</a>")}}B(".nivo-controlNav a:eq("+L.currentSlide+")",D).addClass("active");B(".nivo-controlNav a",D).live("click",function(){if(L.running){return false}if(B(this).hasClass("active")){return false}clearInterval(C);C="";D.css("background","url("+L.currentImage.attr("src")+") no-repeat");L.currentSlide=B(this).attr("rel")-1;O(D,E,G,"control")})}if(G.keyboardNav){B(window).keypress(function(Q){if(Q.keyCode=="37"){if(L.running){return false}clearInterval(C);C="";L.currentSlide-=2;O(D,E,G,"prev")}if(Q.keyCode=="39"){if(L.running){return false}clearInterval(C);C="";O(D,E,G,"next")}})}if(G.pauseOnHover){D.hover(function(){L.paused=true;clearInterval(C);C=""},function(){L.paused=false;if(C==""&&!G.manualAdvance){C=setInterval(function(){O(D,E,G,false)},G.pauseTime)}})}D.bind("nivo:animFinished",function(){L.running=false;B(E).each(function(){if(B(this).is("a")){B(this).css("display","none")}});if(B(E[L.currentSlide]).is("a")){B(E[L.currentSlide]).css("display","block")}if(C==""&&!L.paused&&!G.manualAdvance){C=setInterval(function(){O(D,E,G,false)},G.pauseTime)}G.afterChange.call(this)});var O=function(Q,R,T,V){var W=Q.data("nivo:vars");if(W&&(W.currentSlide==W.totalSlides-1)){T.lastSlide.call(this)}if((!W||W.stop)&&!V){return false}T.beforeChange.call(this);if(!V){Q.css("background","url("+W.currentImage.attr("src")+") no-repeat")}else{if(V=="prev"){Q.css("background","url("+W.currentImage.attr("src")+") no-repeat")}if(V=="next"){Q.css("background","url("+W.currentImage.attr("src")+") no-repeat")}}W.currentSlide++;if(W.currentSlide==W.totalSlides){W.currentSlide=0;T.slideshowEnd.call(this)}if(W.currentSlide<0){W.currentSlide=(W.totalSlides-1)}if(B(R[W.currentSlide]).is("img")){W.currentImage=B(R[W.currentSlide])}else{W.currentImage=B(R[W.currentSlide]).find("img:first")}if(T.controlNav){B(".nivo-controlNav a",Q).removeClass("active");B(".nivo-controlNav a:eq("+W.currentSlide+")",Q).addClass("active")}if(W.currentImage.attr("title")!=""){var X=W.currentImage.attr("title");if(X.substr(0,1)=="#"){X=B(X).html()}if(B(".nivo-caption",Q).css("display")=="block"){B(".nivo-caption p",Q).fadeOut(T.animSpeed,function(){B(this).html(X);B(this).fadeIn(T.animSpeed)})}else{B(".nivo-caption p",Q).html(X)}B(".nivo-caption",Q).fadeIn(T.animSpeed)}else{B(".nivo-caption",Q).fadeOut(T.animSpeed)}var U=0;B(".nivo-slice",Q).each(function(){var b=Math.round(Q.width()/T.slices);B(this).css({height:"0px",opacity:"0",background:"url("+W.currentImage.attr("src")+") no-repeat -"+((b+(U*b))-b)+"px 0%"});U++});if(T.effect=="random"){var Y=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade");W.randAnim=Y[Math.floor(Math.random()*(Y.length+1))];if(W.randAnim==undefined){W.randAnim="fade"}}if(T.effect.indexOf(",")!=-1){var Y=T.effect.split(",");W.randAnim=B.trim(Y[Math.floor(Math.random()*Y.length)])}W.running=true;if(T.effect=="sliceDown"||T.effect=="sliceDownRight"||W.randAnim=="sliceDownRight"||T.effect=="sliceDownLeft"||W.randAnim=="sliceDownLeft"){var S=0;var U=0;var a=B(".nivo-slice",Q);if(T.effect=="sliceDownLeft"||W.randAnim=="sliceDownLeft"){a=B(".nivo-slice",Q)._reverse()}a.each(function(){var b=B(this);b.css("top","0px");if(U==T.slices-1){setTimeout(function(){b.animate({height:"100%",opacity:"1.0"},T.animSpeed,"",function(){Q.trigger("nivo:animFinished")})},(100+S))}else{setTimeout(function(){b.animate({height:"100%",opacity:"1.0"},T.animSpeed)},(100+S))}S+=50;U++})}else{if(T.effect=="sliceUp"||T.effect=="sliceUpRight"||W.randAnim=="sliceUpRight"||T.effect=="sliceUpLeft"||W.randAnim=="sliceUpLeft"){var S=0;var U=0;var a=B(".nivo-slice",Q);if(T.effect=="sliceUpLeft"||W.randAnim=="sliceUpLeft"){a=B(".nivo-slice",Q)._reverse()}a.each(function(){var b=B(this);b.css("bottom","0px");if(U==T.slices-1){setTimeout(function(){b.animate({height:"100%",opacity:"1.0"},T.animSpeed,"",function(){Q.trigger("nivo:animFinished")})},(100+S))}else{setTimeout(function(){b.animate({height:"100%",opacity:"1.0"},T.animSpeed)},(100+S))}S+=50;U++})}else{if(T.effect=="sliceUpDown"||T.effect=="sliceUpDownRight"||W.randAnim=="sliceUpDown"||T.effect=="sliceUpDownLeft"||W.randAnim=="sliceUpDownLeft"){var S=0;var U=0;var Z=0;var a=B(".nivo-slice",Q);if(T.effect=="sliceUpDownLeft"||W.randAnim=="sliceUpDownLeft"){a=B(".nivo-slice",Q)._reverse()}a.each(function(){var b=B(this);if(U==0){b.css("top","0px");U++}else{b.css("bottom","0px");U=0}if(Z==T.slices-1){setTimeout(function(){b.animate({height:"100%",opacity:"1.0"},T.animSpeed,"",function(){Q.trigger("nivo:animFinished")})},(100+S))}else{setTimeout(function(){b.animate({height:"100%",opacity:"1.0"},T.animSpeed)},(100+S))}S+=50;Z++})}else{if(T.effect=="fold"||W.randAnim=="fold"){var S=0;var U=0;B(".nivo-slice",Q).each(function(){var b=B(this);var c=b.width();b.css({top:"0px",height:"100%",width:"0px"});if(U==T.slices-1){setTimeout(function(){b.animate({width:c,opacity:"1.0"},T.animSpeed,"",function(){Q.trigger("nivo:animFinished")})},(100+S))}else{setTimeout(function(){b.animate({width:c,opacity:"1.0"},T.animSpeed)},(100+S))}S+=50;U++})}else{if(T.effect=="fade"||W.randAnim=="fade"){var U=0;B(".nivo-slice",Q).each(function(){B(this).css("height","100%");if(U==T.slices-1){B(this).animate({opacity:"1.0"},(T.animSpeed*2),"",function(){Q.trigger("nivo:animFinished")})}else{B(this).animate({opacity:"1.0"},(T.animSpeed*2))}U++})}}}}}};var H=function(Q){if(this.console&&typeof console.log!="undefined"){console.log(Q)}};this.stop=function(){if(!B(I).data("nivo:vars").stop){B(I).data("nivo:vars").stop=true;H("Stop Slider")}};this.start=function(){if(B(I).data("nivo:vars").stop){B(I).data("nivo:vars").stop=false;H("Start Slider")}};G.afterLoad.call(this)};B.fn.nivoSlider=function(C){return this.each(function(){var D=B(this);if(D.data("nivoslider")){return }var E=new A(this,C);D.data("nivoslider",E)})};B.fn.nivoSlider.defaults={effect:"fade",slices:15,animSpeed:500,pauseTime:3000,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};B.fn._reverse=[].reverse})(jQuery);(function(AB){var T=AB(window),AD,AS,S=-1,AK,AA,U,AC,Z,M,AG,AL=!window.XMLHttpRequest,AF=[],AM=document.documentElement,AN={},AE=new Image(),O=new Image(),Q,AX,AR,AI,P,AU,R,AV,X,N;AB(function(){AB("body").append(AB([Q=AB('<div id="lbOverlay" />')[0],AX=AB('<div id="lbCenter" />')[0],R=AB('<div id="lbBottomContainer" />')[0]]).css("display","none"));AR=AB('<div id="lbImage" />').appendTo(AX).append(AI=AB('<div style="position: relative;" />').append([P=AB('<a id="lbPrevLink" href="#" />').click(W)[0],AU=AB('<a id="lbNextLink" href="#" />').click(AT)[0]])[0])[0];AV=AB('<div id="lbBottom" />').appendTo(R).append([AB('<a id="lbCloseLink" href="#" />').add(Q).click(V)[0],X=AB('<div id="lbCaption" />')[0],N=AB('<div id="lbNumber" />')[0],AB('<div style="clear: both;" />')[0]])[0]});AB.slimbox=function(A,B,C){AD=AB.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},C);if(typeof A=="string"){A=[[A,B]];B=0}Z=T.scrollTop()+(T.height()/2);M=AD.initialWidth;AG=AD.initialHeight;AB(AX).css({top:Math.max(0,Z-(AG/2)),width:M,height:AG,marginLeft:-M/2}).show();AC=AL||(Q.currentStyle&&(Q.currentStyle.position!="fixed"));if(AC){Q.style.position="absolute"}AB(Q).css("opacity",AD.overlayOpacity).fadeIn(AD.overlayFadeDuration);Y();AO(1);AS=A;AD.loop=AD.loop&&(AS.length>1);return AW(B)};AB.fn.slimbox=function(D,A,B){A=A||function(E){return[E.href,E.title]};B=B||function(){return true};var C=this;return C.unbind("click").click(function(){var G=this,E=0,F,I=0,H;F=AB.grep(C,function(J,K){return B.call(G,J,K)});for(H=F.length;I<H;++I){if(F[I]==G){E=I}F[I]=A(F[I],I)}return AB.slimbox(F,E,D)})};function Y(){var A=T.scrollLeft(),B=T.width();AB([AX,R]).css("left",A+(B/2));if(AC){AB(Q).css({left:A,top:T.scrollTop(),width:B,height:T.height()})}}function AO(B){if(B){AB("object").add(AL?"select":"embed").each(function(D,C){AF[D]=[C,C.style.visibility];C.style.visibility="hidden"})}else{AB.each(AF,function(D,C){C[0].style.visibility=C[1]});AF=[]}var A=B?"bind":"unbind";T[A]("scroll resize",Y);AB(document)[A]("keydown",AJ)}function AJ(A){var B=A.keyCode,C=AB.inArray;return(C(B,AD.closeKeys)>=0)?V():(C(B,AD.nextKeys)>=0)?AT():(C(B,AD.previousKeys)>=0)?W():false}function W(){return AW(AA)}function AT(){return AW(U)}function AW(A){if(A>=0){S=A;AK=AS[S][0];AA=(S||(AD.loop?AS.length:0))-1;U=((S+1)%AS.length)||(AD.loop?0:-1);AH();AX.className="lbLoading";AN=new Image();AN.onload=AP;AN.src=AK}return false}function AP(){AX.className="";AB(AR).css({backgroundImage:"url("+AK+")",visibility:"hidden",display:""});AB(AI).width(AN.width);AB([AI,P,AU]).height(AN.height);AB(X).html(AS[S][1]||"");AB(N).html((((AS.length>1)&&AD.counterText)||"").replace(/{x}/,S+1).replace(/{y}/,AS.length));if(AA>=0){AE.src=AS[AA][0]}if(U>=0){O.src=AS[U][0]}M=AR.offsetWidth;AG=AR.offsetHeight;var A=Math.max(0,Z-(AG/2));if(AX.offsetHeight!=AG){AB(AX).animate({height:AG,top:A},AD.resizeDuration,AD.resizeEasing)}if(AX.offsetWidth!=M){AB(AX).animate({width:M,marginLeft:-M/2},AD.resizeDuration,AD.resizeEasing)}AB(AX).queue(function(){AB(R).css({width:M,top:A+AG,marginLeft:-M/2,visibility:"hidden",display:""});AB(AR).css({display:"none",visibility:"",opacity:""}).fadeIn(AD.imageFadeDuration,AQ)})}function AQ(){if(AA>=0){AB(P).show()}if(U>=0){AB(AU).show()}AB(AV).css("marginTop",-AV.offsetHeight).animate({marginTop:0},AD.captionAnimationDuration);R.style.visibility=""}function AH(){AN.onload=null;AN.src=AE.src=O.src=AK;AB([AX,AR,AV]).stop(true);AB([P,AU,AR,R]).hide()}function V(){if(S>=0){AH();S=AA=U=-1;AB(AX).hide();AB(Q).stop().fadeOut(AD.overlayFadeDuration,AO)}return false}})(jQuery);if(!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)){jQuery(function(A){A("a[rel^='lightbox-cats']").slimbox({},null,function(B){return(this==B)||((this.rel.length>8)&&(this.rel==B.rel))})})}(function(D){var C={perPage:5,startPage:1,atEnd:"loop"};D.fn.evtpaginate=function(J){return this.each(function(){var L=D.extend(true,{},C,J);var K=L.wrapper=D(this);K.bind("show.evtpaginate",function(N,M){H(L,M-1)});K.bind("next.evtpaginate",function(){F(L)});K.bind("prev.evtpaginate",function(){B(L)});K.bind("first.evtpaginate",function(){H(L,0)});K.bind("last.evtpaginate",function(){H(L,L.totalPages-1)});K.bind("refresh.evtpaginate",function(N,M){G(L,M)});E(L)})};function E(L){L.perPage=parseInt(L.perPage);L.items=L.wrapper.children();L.totalItems=L.items.size();L.totalPages=Math.ceil(L.totalItems/L.perPage);L.currentPage=parseInt(L.startPage)-1;L.first=A(L,L.currentPage);L.last=I(L,L.currentPage);L.pages=[];if(L.currentPage>L.totalPages-1){L.currentPage=L.totalPages-1}L.items.hide();for(var K=0;K<L.totalPages;K++){var J=K*L.perPage;L.pages[K]=L.items.slice(J,(J+L.perPage))}H(L,L.currentPage);L.wrapper.trigger("initialized.evtpaginate",[L.currentPage+1,L.totalPages])}function G(J,K){if(K!==undefined){D.extend(true,J,K)}J.startPage=parseInt(J.currentPage)+1;E(J)}function F(J){switch(J.atEnd){case"loop":H(J,(J.last?0:J.currentPage+1));break;default:H(J,(J.last?J.totalPages-1:J.currentPage+1));break}}function B(J){switch(J.atEnd){case"loop":H(J,(J.first?J.totalPages-1:J.currentPage-1));break;default:H(J,(J.first?0:J.currentPage-1));break}}function H(J,K){if(K>J.totalPages-1){K=J.totalPages-1}if(!J.pages[J.currentPage].is(":animated")){J.wrapper.trigger("started.evtpaginate",J.currentPage+1);D.fn.evtpaginate.swapPages(J,K,function(){J.currentPage=K;J.first=A(J,J.currentPage)?true:false;J.last=I(J,J.currentPage)?true:false;J.wrapper.trigger("finished.evtpaginate",[J.currentPage+1,J.first,J.last])})}}D.fn.evtpaginate.swapPages=function(J,L,K){J.pages[J.currentPage].hide();J.pages[L].show();K()};function A(K,J){return(J===0)}function I(K,J){return(J===K.totalPages-1)}})(jQuery);(function(A){A.fn.concertina=function(C){if(typeof (C)==="string"){if(C==="expandAll"){this.find(">.nav-concertina-item").removeClass("nav-selected").addClass("nav-selected").find(">.nav-concertina-content").show()}if(C==="closeAll"){this.find(">.nav-concertina-item").removeClass("nav-selected").find(">.nav-concertina-content").hide()}}else{var B={};if(C){A.extend(B,C)}this.find(">.nav-concertina-item>.nav-concertina-header").each(function(){var D=A(this).parent();var F=A(this);var E=A(this).next();if(!D.hasClass("nav-selected")){E.hide()}F.click(function(G){if(G.target.tagName.toLowerCase()!=="input"){if(D.hasClass("nav-selected")){E.slideUp(100);D.removeClass("nav-selected")}else{E.slideDown(100);D.addClass("nav-selected")}return false}})})}};A(function(){A(".nav-concertina").concertina()})})(jQuery);(function(P){var J,F,G,D,L="scroller-image-selected",N,B,I=1000,M=500;window.galleryCarousel={init:function(){O();P(".carousel-item-link").click(function(){var Q=P(this).attr("href");Q=Q.replace(/\#/g,"");A(P(this).parent());C(Q);return false})}};var H=function(Q){var R=P("#"+Q),S=R.children().children(".images-caption-content").outerHeight();R.children(".gallery-carousel-images-caption").stop(true,true).animate({height:S},M)},E=function(Q){var R=P("#"+Q);R.children(".gallery-carousel-images-caption").stop(true,false).animate({height:0},M)},K=function(Q){P(".gallery-next-image").bind("click",function(){if(!(P(this).hasClass("gallery-next-image-disabled"))){C(G.next().attr("id"));Q.scroll(P.jcarousel.intval(G.index()));P(".jcarousel-item").each(function(){if(P(this).index()===G.index()){A(P(this))}})}return false});P(".gallery-prev-image").bind("click",function(){if(!(P(this).hasClass("gallery-prev-image-disabled"))){C(G.prev().attr("id"));Q.scroll(P.jcarousel.intval(G.index()));P(".jcarousel-item").each(function(){if(P(this).index()===G.index()){A(P(this))}})}return false})},O=function(){J=P(".gallery-carousel-cycle");F=P(".carousel-wrapper");G=J.children("li:first-child");D=P(".jcarousel-item a");N=(J.children().size()-1);B=P(".gallery-carousel-scroller");P(".carousel-wrapper").jcarousel({auto:0,scroll:5,initCallback:K});J.cycle({fx:"fade",speed:I,before:function(S,R,T,Q){E(S.id)},after:function(S,R,T,Q){H(R.id)}});J.cycle("pause")},C=function(S){var R=P("#"+S),Q=R.index();J.cycle(Q);G=R;Q>=N?P(".gallery-next-image").addClass("gallery-next-image-disabled"):P(".gallery-next-image").removeClass("gallery-next-image-disabled");Q<=0?P(".gallery-prev-image").addClass("gallery-prev-image-disabled"):P(".gallery-prev-image").removeClass("gallery-prev-image-disabled")},A=function(Q){Q.siblings().removeClass(L);Q.addClass(L)}}(jQuery));
