text: /*!
   * 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 setCookie(e,t,n){var r=e+"="+t+"; path=/";if(n){var i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),r=r+"; expires="+i.toGMTString()}document.location.protocol=="https:"&&(r+="; Secure"),document.cookie=r}function getCookie(e){var t=e+"=",n=document.cookie.split(";");for(var r=0,i=n.length;r<i;r++){var s=n[r];while(s.charAt(0)==" ")s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null}function recordOutboundLink(e){return _gat._getTrackerByName()._trackEvent(this.href,"Outbound Links"),setTimeout('document.location = "'+this.href+'"',100),!1}(function(e,t){function n(t,n){var i=t.nodeName.toLowerCase();return"area"===i?(n=t.parentNode,i=n.name,!t.href||!i||n.nodeName.toLowerCase()!=="map"?!1:(t=e("img[usemap=#"+i+"]")[0],!!t&&r(t))):(/input|select|textarea|button|object/.test(i)?!t.disabled:"a"==i?t.href||n:n)&&r(t)}function r(t){return!e(t).parents().andSelf().filter(function(){return e.curCSS(this,"visibility")==="hidden"||e.expr.filters.hidden(this)}).length}e.ui=e.ui||{},e.ui.version||(e.extend(e.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}}),e.fn.extend({propAttr:e.fn.prop||e.fn.attr,_focus:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.curCSS(this,"position",1))&&/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length){n=e(this[0]);for(var r;n.length&&n[0]!==document;){r=n.css("position");if(r==="absolute"||r==="relative"||r==="fixed"){r=parseInt(n.css("zIndex"),10);if(!isNaN(r)&&r!==0)return r}n=n.parent()}}return 0},disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.each(["Width","Height"],function(n,r){function i(t,n,r,i){return e.each(s,function(){n-=parseFloat(e.curCSS(t,"padding"+this,!0))||0,r&&(n-=parseFloat(e.curCSS(t,"border"+this+"Width",!0))||0),i&&(n-=parseFloat(e.curCSS(t,"margin"+this,!0))||0)}),n}var s=r==="Width"?["Left","Right"]:["Top","Bottom"],o=r.toLowerCase(),u={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?u["inner"+r].call(this):this.each(function(){e(this).css(o,i(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?u["outer"+r].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,n)+"px")})}}),e.extend(e.expr[":"],{data:function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart"in n,t.removeChild(n).style.display="none"}),e.extend(e.ui,{plugin:{add:function(t,n,r){t=e.ui[t].prototype;for(var i in r)t.plugins[i]=t.plugins[i]||[],t.plugins[i].push([n,r[i]])},call:function(e,t,n){if((t=e.plugins[t])&&e.element[0].parentNode)for(var r=0;r<t.length;r++)e.options[t[r][0]]&&t[r][1].apply(e.element,n)}},contains:function(e,t){return document.compareDocumentPosition?e.compareDocumentPosition(t)&16:e!==t&&e.contains(t)},hasScroll:function(t,n){if(e(t).css("overflow")==="hidden")return!1;n=n&&n==="left"?"scrollLeft":"scrollTop";var r=!1;return t[n]>0?!0:(t[n]=1,r=t[n]>0,t[n]=0,r)},isOverAxis:function(e,t,n){return e>t&&e<t+n},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)}}))})(jQuery),function(e,t){if(e.cleanData){var n=e.cleanData;e.cleanData=function(t){for(var r=0,i;(i=t[r])!=null;r++)try{e(i).triggerHandler("remove")}catch(s){}n(t)}}else{var r=e.fn.remove;e.fn.remove=function(t,n){return this.each(function(){return n||(!t||e.filter(t,[this]).length)&&e("*",this).add([this]).each(function(){try{e(this).triggerHandler("remove")}catch(t){}}),r.call(e(this),t,n)})}}e.widget=function(t,n,r){var i=t.split(".")[0],s;t=t.split(".")[1],s=i+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][s]=function(n){return!!e.data(n,t)},e[i]=e[i]||{},e[i][t]=function(e,t){arguments.length&&this._createWidget(e,t)},n=new n,n.options=e.extend(!0,{},n.options),e[i][t].prototype=e.extend(!0,n,{namespace:i,widgetName:t,widgetEventPrefix:e[i][t].prototype.widgetEventPrefix||t,widgetBaseClass:s},r),e.widget.bridge(t,e[i][t])},e.widget.bridge=function(n,r){e.fn[n]=function(i){var s=typeof i=="string",o=Array.prototype.slice.call(arguments,1),u=this;return i=!s&&o.length?e.extend.apply(null,[!0,i].concat(o)):i,s&&i.charAt(0)==="_"?u:(s?this.each(function(){var r=e.data(this,n),s=r&&e.isFunction(r[i])?r[i].apply(r,o):r;if(s!==r&&s!==t)return u=s,!1}):this.each(function(){var t=e.data(this,n);t?t.option(i||{})._init():e.data(this,n,new r(i,this))}),u)}},e.Widget=function(e,t){arguments.length&&this._createWidget(e,t)},e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(t,n){e.data(n,this.widgetName,this),this.element=e(n),this.options=e.extend(!0,{},this.options,this._getCreateOptions(),t);var r=this;this.element.bind("remove."+this.widgetName,function(){r.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return e.metadata&&e.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(n,r){var i=n;if(arguments.length===0)return e.extend({},this.options);if(typeof n=="string"){if(r===t)return this.options[n];i={},i[n]=r}return this._setOptions(i),this},_setOptions:function(t){var n=this;return e.each(t,function(e,t){n._setOption(e,t)}),this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&this.widget()[t?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",t),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(t,n,r){var i=this.options[t];n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),r=r||{};if(n.originalEvent){t=e.event.props.length;for(var s;t;)s=e.event.props[--t],n[s]=n.originalEvent[s]}return this.element.trigger(n,r),!(e.isFunction(i)&&i.call(this.element[0],n,r)===!1||n.isDefaultPrevented())}}}(jQuery),function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=n.which==1,s=typeof this.options.cancel=="string"&&n.target.nodeName?e(n.target).closest(this.options.cancel).length:!1;if(!i||s||!this._mouseCapture(n))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(n)&&this._mouseDelayMet(n)){this._mouseStarted=this._mouseStart(n)!==!1;if(!this._mouseStarted)return n.preventDefault(),!0}return!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0}},_mouseMove:function(t){return!e.browser.msie||document.documentMode>=9||!!t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&((this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1)?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(e){e.ui=e.ui||{};var t=/left|center|right/,n=/top|center|bottom/,r=e.fn.position,i=e.fn.offset;e.fn.position=function(i){if(!i||!i.of)return r.apply(this,arguments);i=e.extend({},i);var s=e(i.of),u=s[0],a=(i.collision||"flip").split(" "),f=i.offset?i.offset.split(" "):[0,0],l,h,p;return u.nodeType===9?(l=s.width(),h=s.height(),p={top:0,left:0}):u.setTimeout?(l=s.width(),h=s.height(),p={top:s.scrollTop(),left:s.scrollLeft()}):u.preventDefault?(i.at="left top",l=h=0,p={top:i.of.pageY,left:i.of.pageX}):(l=s.outerWidth(),h=s.outerHeight(),p=s.offset()),e.each(["my","at"],function(){var e=(i[this]||"").split(" ");e.length===1&&(e=t.test(e[0])?e.concat(["center"]):n.test(e[0])?["center"].concat(e):["center","center"]),e[0]=t.test(e[0])?e[0]:"center",e[1]=n.test(e[1])?e[1]:"center",i[this]=e}),a.length===1&&(a[1]=a[0]),f[0]=parseInt(f[0],10)||0,f.length===1&&(f[1]=f[0]),f[1]=parseInt(f[1],10)||0,i.at[0]==="right"?p.left+=l:i.at[0]==="center"&&(p.left+=l/2),i.at[1]==="bottom"?p.top+=h:i.at[1]==="center"&&(p.top+=h/2),p.left+=f[0],p.top+=f[1],this.each(function(){var t=e(this),n=t.outerWidth(),r=t.outerHeight(),s=parseInt(e.curCSS(this,"marginLeft",!0))||0,o=parseInt(e.curCSS(this,"marginTop",!0))||0,u=n+s+(parseInt(e.curCSS(this,"marginRight",!0))||0),d=r+o+(parseInt(e.curCSS(this,"marginBottom",!0))||0),v=e.extend({},p),m;i.my[0]==="right"?v.left-=n:i.my[0]==="center"&&(v.left-=n/2),i.my[1]==="bottom"?v.top-=r:i.my[1]==="center"&&(v.top-=r/2),v.left=Math.round(v.left),v.top=Math.round(v.top),m={left:v.left-s,top:v.top-o},e.each(["left","top"],function(t,s){e.ui.position[a[t]]&&e.ui.position[a[t]][s](v,{targetWidth:l,targetHeight:h,elemWidth:n,elemHeight:r,collisionPosition:m,collisionWidth:u,collisionHeight:d,offset:f,my:i.my,at:i.at})}),e.fn.bgiframe&&t.bgiframe(),t.offset(e.extend(v,{using:i.using}))})},e.ui.position={fit:{left:function(t,n){var r=e(window);r=n.collisionPosition.left+n.collisionWidth-r.width()-r.scrollLeft(),t.left=r>0?t.left-r:Math.max(t.left-n.collisionPosition.left,t.left)},top:function(t,n){var r=e(window);r=n.collisionPosition.top+n.collisionHeight-r.height()-r.scrollTop(),t.top=r>0?t.top-r:Math.max(t.top-n.collisionPosition.top,t.top)}},flip:{left:function(t,n){if(n.at[0]!=="center"){var r=e(window);r=n.collisionPosition.left+n.collisionWidth-r.width()-r.scrollLeft();var i=n.my[0]==="left"?-n.elemWidth:n.my[0]==="right"?n.elemWidth:0,s=n.at[0]==="left"?n.targetWidth:-n.targetWidth,o=-2*n.offset[0];t.left+=n.collisionPosition.left<0?i+s+o:r>0?i+s+o:0}},top:function(t,n){if(n.at[1]!=="center"){var r=e(window);r=n.collisionPosition.top+n.collisionHeight-r.height()-r.scrollTop();var i=n.my[1]==="top"?-n.elemHeight:n.my[1]==="bottom"?n.elemHeight:0,s=n.at[1]==="top"?n.targetHeight:-n.targetHeight,o=-2*n.offset[1];t.top+=n.collisionPosition.top<0?i+s+o:r>0?i+s+o:0}}}},e.offset.setOffset||(e.offset.setOffset=function(t,n){/static/.test(e.curCSS(t,"position"))&&(t.style.position="relative");var r=e(t),i=r.offset(),s=parseInt(e.curCSS(t,"top",!0),10)||0,o=parseInt(e.curCSS(t,"left",!0),10)||0;i={top:n.top-i.top+s,left:n.left-i.left+o},"using"in n?n.using.call(t,i):r.css(i)},e.fn.offset=function(t){var n=this[0];return!n||!n.ownerDocument?null:t?this.each(function(){e.offset.setOffset(this,t)}):i.call(this)})}(jQuery),function(e){e.widget("ui.sortable",e.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,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 e=this.items.length-1;e>=0;e--)this.items[e].item.removeData("sortable-item");return this},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget()[n?"addClass":"removeClass"]("ui-sortable-disabled")):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var r=null,i=this;e(t.target).parents().each(function(){if(e.data(this,"sortable-item")==i)return r=e(this),!1}),e.data(t.target,"sortable-item")==i&&(r=e(t.target));if(!r)return!1;if(this.options.handle&&!n){var s=!1;e(this.options.handle,r).find("*").andSelf().each(function(){this==t.target&&(s=!0)});if(!s)return!1}return this.currentItem=r,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){n=this.options;var i=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),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"),e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",n.cursor)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,i._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}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(n=this.items.length-1;n>=0;n--){r=this.items[n];var i=r.item[0],s=this._intersectsWithPointer(r);if(s&&i!=this.currentItem[0]&&this.placeholder[s==1?"next":"prev"]()[0]!=i&&!e.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!e.ui.contains(this.element[0],i):!0)){this.direction=s==1?"down":"up";if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(r))break;this._rearrange(t,r),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this;n=r.placeholder.offset(),r.reverting=!0,e(this.helper).animate({left:n.left-this.offset.parent.left-r.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:n.top-this.offset.parent.top-r.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){var t=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 n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("deactivate",null,t._uiHash(this)),this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",null,t._uiHash(this)),this.containers[n].containerCache.over=0)}return 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(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left;return f=r+f>u&&r+f<a&&t+l>s&&t+l<o,this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:s<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&u<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<a},_intersectsWithPointer:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height);t=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=n&&t,t=this._getDragVerticalDirection();var r=this._getDragHorizontalDirection();return n?this.floating?r&&r=="right"||t=="down"?2:1:t&&(t=="down"?2:1):!1},_intersectsWithSides:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height);t=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width);var r=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?i=="right"&&t||i=="left"&&!t:r&&(r=="down"&&n||r=="up"&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return e!=0&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t)for(t=i.length-1;t>=0;t--)for(var s=e(i[t]),o=s.length-1;o>=0;o--){var u=e.data(s[o],"sortable");u&&u!=this&&!u.options.disabled&&r.push([e.isFunction(u.options.items)?u.options.items.call(u.element):e(u.options.items,u.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),u])}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(t=r.length-1;t>=0;t--)r[t][0].each(function(){n.push(this)});return e(n)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data(sortable-item)"),t=0;t<this.items.length;t++)for(var n=0;n<e.length;n++)e[n]==this.items[t].item[0]&&this.items.splice(t,1)},_refreshItems:function(t){this.items=[],this.containers=[this];var n=this.items,r=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],i=this._connectWith();if(i)for(var s=i.length-1;s>=0;s--)for(var o=e(i[s]),u=o.length-1;u>=0;u--){var a=e.data(o[u],"sortable");a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))}for(s=r.length-1;s>=0;s--){t=r[s][1],i=r[s][0],u=0;for(o=i.length;u<o;u++)a=e(i[u]),a.data("sortable-item",t),n.push({item:a,instance:t,width:0,height:0,left:0,top:0})}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var n=this.items.length-1;n>=0;n--){var r=this.items[n];if(r.instance==this.currentContainer||!this.currentContainer||r.item[0]==this.currentItem[0]){var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight()),i=i.offset(),r.left=i.left,r.top=i.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)i=this.containers[n].element.offset(),this.containers[n].containerCache.left=i.left,this.containers[n].containerCache.top=i.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n=t||this,r=n.options;if(!r.placeholder||r.placeholder.constructor==String){var i=r.placeholder;r.placeholder={element:function(){var t=e(document.createElement(n.currentItem[0].nodeName)).addClass(i||n.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return i||(t.style.visibility="hidden"),t},update:function(e,t){if(!i||!!r.forcePlaceholderSize)t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10))}}}n.placeholder=e(r.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),r.placeholder.update(n,n.placeholder)},_contactContainers:function(t){for(var n=null,r=null,i=this.containers.length-1;i>=0;i--)if(!e.ui.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(!n||!e.ui.contains(this.containers[i].element[0],n.element[0]))n=this.containers[i],r=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(n)if(this.containers.length===1)this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1;else if(this.currentContainer!=this.containers[r]){n=1e4,i=null;for(var s=this.positionAbs[this.containers[r].floating?"left":"top"],o=this.items.length-1;o>=0;o--)if(e.ui.contains(this.containers[r].element[0],this.items[o].item[0])){var u=this.items[o][this.containers[r].floating?"left":"top"];Math.abs(u-s)<n&&(n=Math.abs(u-s),i=this.items[o])}if(i||this.options.dropOnEmpty)this.currentContainer=this.containers[r],i?this._rearrange(t,i,null,!0):this._rearrange(t,null,this.containers[r].element,!0),this._trigger("change",t,this._uiHash()),this.containers[r]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1}},_createHelper:function(t){var n=this.options;return t=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):n.helper=="clone"?this.currentItem.clone():this.currentItem,t.parents("body").length||e(n.appendTo!="parent"?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(t[0]),t[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")}),(t[0].style.width==""||n.forceHelperSize)&&t.width(this.currentItem.width()),(t[0].style.height==""||n.forceHelperSize)&&t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.browser.msie)t={top:0,left:0};return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);if(t.containment=="document"||t.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0];t=e(t.containment).offset();var r=e(n).css("overflow")!="hidden";this.containment=[t.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,t.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,t.left+(r?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,t.top+(r?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position),t=t=="absolute"?1:-1;var r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*t+this.offset.parent.top*t-(e.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop())*t),left:n.left+this.offset.relative.left*t+this.offset.parent.left*t-(e.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())*t)}},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var s=t.pageX,o=t.pageY;return this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.
  containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(o=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?o-this.offset.click.top<this.containment[1]||o-this.offset.click.top>this.containment[3]?o-this.offset.click.top<this.containment[1]?o+n.grid[1]:o-n.grid[1]:o:o,s=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0],s=this.containment?s-this.offset.click.left<this.containment[0]||s-this.offset.click.left>this.containment[2]?s-this.offset.click.left<this.containment[0]?s+n.grid[0]:s-n.grid[0]:s:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(e.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(e.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this,s=this.counter;window.setTimeout(function(){s==i.counter&&i.refreshPositions(!r)},0)},_clear:function(t,n){this.reverting=!1;var r=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS)if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static")this._storedCSS[i]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!n&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!n&&r.push(function(e){this._trigger("update",e,this._uiHash())});if(!e.ui.contains(this.element[0],this.currentItem[0])){n||r.push(function(e){this._trigger("remove",e,this._uiHash())});for(i=this.containers.length-1;i>=0;i--)e.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!n&&(r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.containers[i])),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.containers[i])))}for(i=this.containers.length-1;i>=0;i--)n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return!1}n||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!n){for(i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}}),e.extend(e.ui.sortable,{version:"1.8.16"})}(jQuery),function(e){e.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var t=this,n=t.options;t.running=0,t.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),t.headers=t.element.find(n.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){n.disabled||e(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){n.disabled||e(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){n.disabled||e(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){n.disabled||e(this).removeClass("ui-state-focus")}),t.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(n.navigation){var r=t.element.find("a").filter(n.navigationFilter).eq(0);if(r.length){var i=r.closest(".ui-accordion-header");t.active=i.length?i:r.closest(".ui-accordion-content").prev()}}t.active=t._findActive(t.active||n.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),t.active.next().addClass("ui-accordion-content-active"),t._createIcons(),t.resize(),t.element.attr("role","tablist"),t.headers.attr("role","tab").bind("keydown.accordion",function(e){return t._keydown(e)}).next().attr("role","tabpanel"),t.headers.not(t.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),t.active.length?t.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):t.headers.eq(0).attr("tabIndex",0),e.browser.safari||t.headers.find("a").attr("tabIndex",-1),n.event&&t.headers.bind(n.event.split(" ").join(".accordion ")+".accordion",function(e){t._clickHandler.call(t,e,this),e.preventDefault()})},_createIcons:function(){var t=this.options;t.icons&&(e("<span></span>").addClass("ui-icon "+t.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(t.icons.header).toggleClass(t.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 t=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 n=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");return(t.autoHeight||t.fillHeight)&&n.css("height",""),e.Widget.prototype.destroy.call(this)},_setOption:function(t,n){e.Widget.prototype._setOption.apply(this,arguments),t=="active"&&this.activate(n),t=="icons"&&(this._destroyIcons(),n&&this._createIcons()),t=="disabled"&&this.headers.add(this.headers.next())[n?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(t){if(!(this.options.disabled||t.altKey||t.ctrlKey)){var n=e.ui.keyCode,r=this.headers.length,i=this.headers.index(t.target),s=!1;switch(t.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(i+1)%r];break;case n.LEFT:case n.UP:s=this.headers[(i-1+r)%r];break;case n.SPACE:case n.ENTER:this._clickHandler({target:t.target},t.target),t.preventDefault()}return s?(e(t.target).attr("tabIndex",-1),e(s).attr("tabIndex",0),s.focus(),!1):!0}},resize:function(){var t=this.options,n;if(t.fillSpace){if(e.browser.msie){var r=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}n=this.element.parent().height(),e.browser.msie&&this.element.parent().css("overflow",r),this.headers.each(function(){n-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")}else t.autoHeight&&(n=0,this.headers.next().each(function(){n=Math.max(n,e(this).height("").height())}).height(n));return this},activate:function(e){return this.options.active=e,e=this._findActive(e)[0],this._clickHandler({target:e},e),this},_findActive:function(t){return t?typeof t=="number"?this.headers.filter(":eq("+t+")"):this.headers.not(this.headers.not(t)):t===!1?e([]):this.headers.filter(":eq(0)")},_clickHandler:function(t,n){var r=this.options;if(!r.disabled)if(t.target){t=e(t.currentTarget||n),n=t[0]===this.active[0],r.active=r.collapsible&&n?!1:this.headers.index(t);if(!(this.running||!r.collapsible&&n)){var i=this.active;a=t.next(),o=this.active.next(),u={options:r,newHeader:n&&r.collapsible?e([]):t,oldHeader:this.active,newContent:n&&r.collapsible?e([]):a,oldContent:o};var s=this.headers.index(this.active[0])>this.headers.index(t[0]);this.active=n?e([]):t,this._toggle(a,o,u,n,s),i.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(r.icons.headerSelected).addClass(r.icons.header),n||(t.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(r.icons.header).addClass(r.icons.headerSelected),t.next().addClass("ui-accordion-content-active"))}}else if(r.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(r.icons.headerSelected).addClass(r.icons.header),this.active.next().addClass("ui-accordion-content-active");var o=this.active.next(),u={options:r,newHeader:e([]),oldHeader:r.active,newContent:e([]),oldContent:o},a=this.active=e([]);this._toggle(a,o,u)}},_toggle:function(t,n,r,i,s){var o=this,u=o.options;o.toShow=t,o.toHide=n,o.data=r;var a=function(){if(o)return o._completed.apply(o,arguments)};o._trigger("changestart",null,o.data),o.running=n.size()===0?t.size():n.size();if(u.animated){r={},r=u.collapsible&&i?{toShow:e([]),toHide:n,complete:a,down:s,autoHeight:u.autoHeight||u.fillSpace}:{toShow:t,toHide:n,complete:a,down:s,autoHeight:u.autoHeight||u.fillSpace},u.proxied||(u.proxied=u.animated),u.proxiedDuration||(u.proxiedDuration=u.duration),u.animated=e.isFunction(u.proxied)?u.proxied(r):u.proxied,u.duration=e.isFunction(u.proxiedDuration)?u.proxiedDuration(r):u.proxiedDuration,i=e.ui.accordion.animations;var f=u.duration,l=u.animated;l&&!i[l]&&!e.easing[l]&&(l="slide"),i[l]||(i[l]=function(e){this.slide(e,{easing:l,duration:f||700})}),i[l](r)}else u.collapsible&&i?t.toggle():(n.hide(),t.show()),a(!0);n.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),t.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(e){this.running=e?0:--this.running,this.running||(this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data))}}),e.extend(e.ui.accordion,{version:"1.8.16",animations:{slide:function(t,n){t=e.extend({easing:"swing",duration:300},t,n);if(t.toHide.size())if(t.toShow.size()){var r=t.toShow.css("overflow"),i=0,s={},o={},u;n=t.toShow,u=n[0].style.width,n.width(parseInt(n.parent().width(),10)-parseInt(n.css("paddingLeft"),10)-parseInt(n.css("paddingRight"),10)-(parseInt(n.css("borderLeftWidth"),10)||0)-(parseInt(n.css("borderRightWidth"),10)||0)),e.each(["height","paddingTop","paddingBottom"],function(n,r){o[r]="hide",n=(""+e.css(t.toShow[0],r)).match(/^([\d+-.]+)(.*)$/),s[r]={value:n[1],unit:n[2]||"px"}}),t.toShow.css({height:0,overflow:"hidden"}).show(),t.toHide.filter(":hidden").each(t.complete).end().filter(":visible").animate(o,{step:function(e,n){n.prop=="height"&&(i=n.end-n.start===0?0:(n.now-n.start)/(n.end-n.start)),t.toShow[0].style[n.prop]=i*s[n.prop].value+s[n.prop].unit},duration:t.duration,easing:t.easing,complete:function(){t.autoHeight||t.toShow.css("height",""),t.toShow.css({width:u,overflow:r}),t.complete()}})}else t.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},t);else t.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},t)},bounceslide:function(e){this.slide(e,{easing:e.down?"easeOutBounce":"swing",duration:e.down?1e3:200})}}})}(jQuery),function(e){var t=0;e.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var t=this,n=this.element[0].ownerDocument,r;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(n){if(!t.options.disabled&&!t.element.propAttr("readOnly")){r=!1;var i=e.ui.keyCode;switch(n.keyCode){case i.PAGE_UP:t._move("previousPage",n);break;case i.PAGE_DOWN:t._move("nextPage",n);break;case i.UP:t._move("previous",n),n.preventDefault();break;case i.DOWN:t._move("next",n),n.preventDefault();break;case i.ENTER:case i.NUMPAD_ENTER:t.menu.active&&(r=!0,n.preventDefault());case i.TAB:if(!t.menu.active)return;t.menu.select(n);break;case i.ESCAPE:t.element.val(t.term),t.close(n);break;default:clearTimeout(t.searching),t.searching=setTimeout(function(){t.term!=t.element.val()&&(t.selectedItem=null,t.search(null,n))},t.options.delay)}}}).bind("keypress.autocomplete",function(e){r&&(r=!1,e.preventDefault())}).bind("focus.autocomplete",function(){t.options.disabled||(t.selectedItem=null,t.previous=t.element.val())}).bind("blur.autocomplete",function(e){t.options.disabled||(clearTimeout(t.searching),t.closing=setTimeout(function(){t.close(e),t._change(e)},150))}),this._initSource(),this.response=function(){return t._response.apply(t,arguments)},this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",n)[0]).mousedown(function(n){var r=t.menu.element[0];e(n.target).closest(".ui-menu-item").length||setTimeout(function(){e(document).one("mousedown",function(n){n.target!==t.element[0]&&n.target!==r&&!e.ui.contains(r,n.target)&&t.close()})},1),setTimeout(function(){clearTimeout(t.closing)},13)}).menu({focus:function(e,n){n=n.item.data("item.autocomplete"),!1!==t._trigger("focus",e,{item:n})&&/^key/.test(e.originalEvent.type)&&t.element.val(n.value)},selected:function(e,r){var i=r.item.data("item.autocomplete"),s=t.previous;t.element[0]!==n.activeElement&&(t.element.focus(),t.previous=s,setTimeout(function(){t.previous=s,t.selectedItem=i},1)),!1!==t._trigger("select",e,{item:i})&&t.element.val(i.value),t.term=t.element.val(),t.close(e),t.selectedItem=i},blur:function(){t.menu.element.is(":visible")&&t.element.val()!==t.term&&t.element.val(t.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),e.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),e.Widget.prototype.destroy.call(this)},_setOption:function(t,n){e.Widget.prototype._setOption.apply(this,arguments),t==="source"&&this._initSource(),t==="appendTo"&&this.menu.element.appendTo(e(n||"body",this.element[0].ownerDocument)[0]),t==="disabled"&&n&&this.xhr&&this.xhr.abort()},_initSource:function(){var n=this,r,i;e.isArray(this.options.source)?(r=this.options.source,this.source=function(t,n){n(e.ui.autocomplete.filter(r,t.term))}):typeof this.options.source=="string"?(i=this.options.source,this.source=function(r,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:r,dataType:"json",autocompleteRequest:++t,success:function(e){this.autocompleteRequest===t&&s(e)},error:function(){this.autocompleteRequest===t&&s([])}})}):this.source=this.options.source},search:function(e,t){e=e!=null?e:this.element.val(),this.term=this.element.val();if(e.length<this.options.minLength)return this.close(t);clearTimeout(this.closing);if(this._trigger("search",t)!==!1)return this._search(e)},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:e},this.response)},_response:function(e){!this.options.disabled&&e&&e.length?(e=this._normalize(e),this._suggest(e),this._trigger("open")):this.close(),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(e){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",e))},_change:function(e){this.previous!==this.element.val()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return typeof t=="string"?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var n=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(n,t),this.menu.deactivate(),this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new e.Event("mouseover"))},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(t,n){var r=this;e.each(n,function(e,n){r._renderItem(t,n)})},_renderItem:function(t,n){return e("<li></li>").data("item.autocomplete",n).append(e("<a></a>").text(n.label)).appendTo(t)},_move:function(e,t){this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)?(this.element.val(this.term),this.menu.deactivate()):this.menu[e](t):this.search(null,t)},widget:function(){return this.menu.element}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}})}(jQuery),function(e){e.widget("ui.menu",{_create:function(){var t=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(n){e(n.target).closest(".ui-menu-item a").length&&(n.preventDefault(),t.select(n))}),this.refresh()},refresh:function(){var t=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(n){t.activate(n,e(this).parent())}).mouseleave(function(){t.deactivate()})},activate:function(e,t){this.deactivate();if(this.hasScroll()){var n=t.offset().top-this.element.offset().top,r=this.element.scrollTop(),i=this.element.height();n<0?this.element.scrollTop(r+n):n>=i&&this.element.scrollTop(r+n-i+t.height())}this.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",e,{item:t})},deactivate:function(){this.active&&(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,t,n){this.active?(e=this.active[e+"All"](".ui-menu-item").eq(0),e.length?this.activate(n,e):this.activate(n,this.element.children(t))):this.activate(n,this.element.children(t))},nextPage:function(t){if(this.hasScroll())if(!this.active||this.last())this.activate(t,this.element.children(".ui-menu-item:first"));else{var n=this.active.offset().top,r=this.element.height(),i=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-n-r+e(this).height();return t<10&&t>-10});i.length||(i=this.element.children(".ui-menu-item:last")),this.activate(t,i)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(t){if(this.hasScroll())if(!this.active||this.first())this.activate(t,this.element.children(".ui-menu-item:last"));else{var n=this.active.offset().top,r=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-n+r-e(this).height();return t<10&&t>-10}),result.length||(result=this.element.children(".ui-menu-item:first")),this.activate(t,result)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[e.fn.prop?"prop":"attr"]("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})}(jQuery),function(e,t){var n={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},r={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},i=e.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};e.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(t){var n=e(this).css(t).offset().top;n<0&&e(this).css("top",t.top-n)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var t=this,n=t.options,r=n.title||"&#160;",i=e.ui.dialog.getTitleId(t.element),s=(t.uiDialog=e("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+n.dialogClass).css({zIndex:n.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(r){n.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE&&(t.close(r),r.preventDefault())}).attr({role:"dialog","aria-labelledby":i}).mousedown(function(e){t.moveToTop(!1,e)});t.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s);var o=(t.uiDialogTitlebar=e("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(s),u=e('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){u.addClass("ui-state-hover")},function(){u.removeClass("ui-state-hover")}).focus(function(){u.addClass("ui-state-focus")}).blur(function(){u.removeClass("ui-state-focus")}).click(function(e){return t.close(e),!1}).appendTo(o);(t.uiDialogTitlebarCloseText=e("<span></span>")).addClass("ui-icon ui-icon-closethick").text(n.closeText).appendTo(u),e("<span></span>").addClass("ui-dialog-title").attr("id",i).html(r).prependTo(o),e.isFunction(n.beforeclose)&&!e.isFunction(n.beforeClose)&&(n.beforeClose=n.beforeclose),o.find("*").add(o).disableSelection(),n.draggable&&e.fn.draggable&&t._makeDraggable(),n.resizable&&e.fn.resizable&&t._makeResizable(),t._createButtons(n.buttons),t._isOpen=!1,e.fn.bgiframe&&s.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;return e.overlay&&e.overlay.destroy(),e.uiDialog.hide(),e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),e.uiDialog.remove(),e.originalTitle&&e.element.attr("title",e.originalTitle),e},widget:function(){return this.uiDialog},close:function(t){var n=this,r,i;if(!1!==n._trigger("beforeClose",t))return n.overlay&&n.overlay.destroy(),n.uiDialog.unbind("keypress.ui-dialog"),n._isOpen=!1,n.options.hide?n.uiDialog.hide(n.options.hide,function(){n._trigger("close",t)}):(n.uiDialog.hide(),n._trigger("close",t)),e.ui.dialog.overlay.resize(),n.options.modal&&(r=0,e(".ui-dialog").each(function(){this!==n.uiDialog[0]&&(i=e(this).css("z-index"),isNaN(i)||(r=Math.max(r,i)))}),e.ui.dialog.maxZ=r),n},isOpen:function(){return this._isOpen},moveToTop:function(t,n){var r=this,i=r.options;return i.modal&&!t||!i.stack&&!i.modal?r._trigger("focus",n):(i.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=i.zIndex),r.overlay&&(e.ui.dialog.maxZ+=1,r.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ)),t={scrollTop:r.element.scrollTop(),scrollLeft:r.element.scrollLeft()},e.ui.dialog.maxZ+=1,r.uiDialog.css("z-index",e.ui.dialog.maxZ),r.element.attr(t),r._trigger("focus",n),r)},open:function(){if(!this._isOpen){var t=this,n=t.options,r=t.uiDialog;return t.overlay=n.modal?new e.ui.dialog.overlay(t):null,t._size(),t._position(n.position),r.show(n.show),t.moveToTop(!0),n.modal&&r.bind("keypress.ui-dialog",function(t){if(t.keyCode===e.ui.keyCode.TAB){var n=e(":tabbable",this),r=n.filter(":first");n=n.filter(":last");if(t.target===n[0]&&!t.shiftKey)return r.focus(1),!1;if(t.target===r[0]&&t.shiftKey)return n.focus(1),!1}}),e(t.element.find(":tabbable").get().concat(r.find(".ui-dialog-buttonpane :tabbable").get().concat(r.get()))).eq(0).focus(),t._isOpen=!0,t._trigger("open"),t}},_createButtons:function(t){var n=this,r=!1,s=e("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),u=e("<div></div>").addClass("ui-dialog-buttonset").appendTo(s);n.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof t=="object"&&t!==null&&e.each(t,function(){return!(r=!0)}),r&&(e.each(t,function(t,r){r=e.isFunction(r)?{click:r,text:t}:r;var s=e('<button type="button"></button>').click(function(){r.click.apply(n.element[0],arguments)}).appendTo(u);e.each(r,function(e,t){e!=="click"&&(e in i?s[e](t):s.attr(e,t))}),e.fn.button&&s.button()}),s.appendTo(n.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var n=this,r=n.options,i=e(document),s;n.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,o){s=r.height==="auto"?"auto":e(this).height(),e(this).height(e(this).height()).addClass("ui-dialog-dragging"),n._trigger("dragStart",i,t(o))},drag:function(e,r){n._trigger("drag",e,t(r))},stop:function(o,u){r.position=[u.position.left-i.scrollLeft(),u.position.top-i.scrollTop()],e(this).removeClass("ui-dialog-dragging").height(s),n._trigger("dragStop",o,t(u)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(n){function r(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}n=n===t?this.options.resizable:n;var i=this,s=i.options,o=i.uiDialog.css("position");n=typeof n=="string"?n:"n,e,s,w,se,sw,ne,nw",i.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:i.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:i._minHeight(),handles:n,start:function(t,n){e(this).addClass("ui-dialog-resizing"),i._trigger("resizeStart",t,r(n))},resize:function(e,t){i._trigger("resize",e,r(t))},stop:function(t,n){e(this).removeClass("ui-dialog-resizing"),s.height=e(this).height(),s.width=e(this).width(),i._trigger("resizeStop",t,r(n)),e.ui.dialog.overlay.resize()}}).css("position",o).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var n=[],r=[0,0],i;if(t){if(typeof t=="string"||typeof t=="object"&&"0"in t)n=t.split?t.split(" "):[t[0],t[1]],n.length===1&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(r[e]=n[e],n[e]=t)}),t={my:n.join(" "),at:n.join(" "),offset:r.join(" ")};t=e.extend({},e.ui.dialog.prototype.options.position,t)}else t=e.ui.dialog.prototype.options.position;(i=this.uiDialog.is(":visible"))||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(e.extend({of:window},t)),i||this.uiDialog.hide()},_setOptions:function(t){var i=this,s={},o=!1;e.each(t,function(e,t){i._setOption(e,t),e in n&&(o=!0),e in r&&(s[e]=t)}),o&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,n){var r=this,i=r.uiDialog;switch(t){case"beforeclose":t="beforeClose";break;case"buttons":r._createButtons(n);break;case"closeText":r.uiDialogTitlebarCloseText.text(""+n);break;case"dialogClass":i.removeClass(r.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+n);break;case"disabled":n?i.addClass("ui-dialog-disabled"):i.removeClass("ui-dialog-disabled");break;case"draggable":var s=i.is(":data(draggable)");s&&!n&&i.draggable("destroy"),!s&&n&&r._makeDraggable();break;case"position":r._position(n);break;case"resizable":(s=i.is(":data(resizable)"))&&!n&&i.resizable("destroy"),s&&typeof n=="string"&&i.resizable("option","handles",n),!s&&n!==!1&&r._makeResizable(n);break;case"title":e(".ui-dialog-title",r.uiDialogTitlebar).html(""+(n||"&#160;"))}e.Widget.prototype._setOption.apply(r,arguments)},_size:function(){var t=this.options,n,r,i=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),t.minWidth>t.width&&(t.width=t.minWidth),n=this.uiDialog.css({height:"auto",width:t.width}).height(),r=Math.max(0,t.minHeight-n),t.height==="auto"?e.support.minHeight?this.element.css({minHeight:r,height:"auto"}):(this.uiDialog.show(),t=this.element.css("height","auto").height(),i||this.uiDialog.hide(),this.element.height(Math.max(t,r))):this.element.height(Math.max(t.height-n,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(e){return e=e.attr("id"),e||(this.uuid+=1,e=this.uuid),"ui-dialog-title-"+e},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){this.instances.length===0&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){if(e(t.target).zIndex()<e.ui.dialog.overlay.maxZ)return!1})},1),e(document).bind("keydown.dialog-overlay",function(n){t.options.closeOnEscape&&!n.isDefaultPrevented()&&n.keyCode&&n.keyCode===e.ui.keyCode.ESCAPE&&(t.close(n),n.preventDefault())}),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var n=(this.oldInstances.pop()||e("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return e.fn.bgiframe&&n.bgiframe(),this.instances.push(n),n},destroy:function(t){var n=e.inArray(t,this.instances);n!=-1&&this.oldInstances.push(this.instances.splice(n,1)[0]),this.instances.length===0&&e([document,window]).unbind(".dialog-overlay"),t.remove();var r=0;e.each(this.instances,function(){r=Math.max(r,this.css("z-index"))}),this.maxZ=r},height:function(){var t,n;return e.browser.msie&&e.browser.version<7?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),n=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),t<n?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,n;return e.browser.msie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),t<n?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.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(e){e.widget("ui.slider",e.ui.mouse,{widgetEventPrefix:"slide",options
  :{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t=this,n=this.options,r=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),i=n.values&&n.values.length||1,s=[];this._mouseSliding=this._keySliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(n.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),n.range&&(n.range===!0&&(n.values||(n.values=[this._valueMin(),this._valueMin()]),n.values.length&&n.values.length!==2&&(n.values=[n.values[0],n.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(n.range==="min"||n.range==="max"?" ui-slider-range-"+n.range:"")));for(var o=r.length;o<i;o+=1)s.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");this.handles=r.add(e(s.join("")).appendTo(t.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){n.disabled||e(this).addClass("ui-state-hover")},function(){e(this).removeClass("ui-state-hover")}).focus(function(){n.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("index.ui-slider-handle",t)}),this.handles.keydown(function(n){var r=!0,i=e(this).data("index.ui-slider-handle"),s,o,u;if(!t.options.disabled){switch(n.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:r=!1;if(!t._keySliding){t._keySliding=!0,e(this).addClass("ui-state-active"),s=t._start(n,i);if(s===!1)return}}u=t.options.step,s=t.options.values&&t.options.values.length?o=t.values(i):o=t.value();switch(n.keyCode){case e.ui.keyCode.HOME:o=t._valueMin();break;case e.ui.keyCode.END:o=t._valueMax();break;case e.ui.keyCode.PAGE_UP:o=t._trimAlignValue(s+(t._valueMax()-t._valueMin())/5);break;case e.ui.keyCode.PAGE_DOWN:o=t._trimAlignValue(s-(t._valueMax()-t._valueMin())/5);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===t._valueMax())return;o=t._trimAlignValue(s+u);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===t._valueMin())return;o=t._trimAlignValue(s-u)}return t._slide(n,i,o),r}}).keyup(function(n){var r=e(this).data("index.ui-slider-handle");t._keySliding&&(t._keySliding=!1,t._stop(n,r),t._change(n,r),e(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return 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(),this},_mouseCapture:function(t){var n=this.options,r,i,s,o,u;return n.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),r=this._normValueFromMouse({x:t.pageX,y:t.pageY}),i=this._valueMax()-this._valueMin()+1,o=this,this.handles.each(function(t){var n=Math.abs(r-o.values(t));i>n&&(i=n,s=e(this),u=t)}),n.range===!0&&this.values(1)===n.min&&(u+=1,s=e(this.handles[u])),this._start(t,u)===!1?!1:(this._mouseSliding=!0,o._handleIndex=u,s.addClass("ui-state-active").focus(),n=s.offset(),this._clickOffset=e(t.target).parents().andSelf().is(".ui-slider-handle")?{left:t.pageX-n.left-s.width()/2,top:t.pageY-n.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)}:{left:0,top:0},this.handles.hasClass("ui-state-hover")||this._slide(t,u,r),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t=this._normValueFromMouse({x:e.pageX,y:e.pageY});return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._clickOffset=this._handleIndex=null,this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var t;return this.orientation==="horizontal"?(t=this.elementSize.width,e=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=e/t,t>1&&(t=1),t<0&&(t=0),this.orientation==="vertical"&&(t=1-t),e=this._valueMax()-this._valueMin(),this._trimAlignValue(this._valueMin()+t*e)},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)},_slide:function(e,t,n){var r;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n<r)&&(n=r),n!==this.values(t)&&(r=this.values(),r[t]=n,e=this._trigger("slide",e,{handle:this.handles[t],value:n,values:r}),this.values(t?0:1),e!==!1&&this.values(t,n,!0))):n!==this.value()&&(e=this._trigger("slide",e,{handle:this.handles[t],value:n}),e!==!1&&this.value(n))},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)}},value:function(e){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(t,n){var r,i,s;if(arguments.length>1)this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);else{if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();r=this.options.values,i=arguments[0];for(s=0;s<r.length;s+=1)r[s]=this._trimAlignValue(i[s]),this._change(null,s);this._refreshValue()}},_setOption:function(t,n){var r,i=0;e.isArray(this.options.values)&&(i=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments);switch(t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),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=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(r=0;r<i;r+=1)this._change(null,r);this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);t=this.options.values.slice();for(n=0;n<t.length;n+=1)t[n]=this._trimAlignValue(t[n]);return t},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t;return e-=n,Math.abs(n)*2>=t&&(e+=n>0?t:-t),parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t=this.options.range,n=this.options,r=this,i=this._animateOff?!1:n.animate,s,o={},u,a,f,l;this.options.values&&this.options.values.length?this.handles.each(function(t){s=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,o[r.orientation==="horizontal"?"left":"bottom"]=s+"%",e(this).stop(1,1)[i?"animate":"css"](o,n.animate),r.options.range===!0&&(r.orientation==="horizontal"?(t===0&&r.range.stop(1,1)[i?"animate":"css"]({left:s+"%"},n.animate),t===1&&r.range[i?"animate":"css"]({width:s-u+"%"},{queue:!1,duration:n.animate})):(t===0&&r.range.stop(1,1)[i?"animate":"css"]({bottom:s+"%"},n.animate),t===1&&r.range[i?"animate":"css"]({height:s-u+"%"},{queue:!1,duration:n.animate}))),u=s}):(a=this.value(),f=this._valueMin(),l=this._valueMax(),s=l!==f?(a-f)/(l-f)*100:0,o[r.orientation==="horizontal"?"left":"bottom"]=s+"%",this.handle.stop(1,1)[i?"animate":"css"](o,n.animate),t==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[i?"animate":"css"]({width:s+"%"},n.animate),t==="max"&&this.orientation==="horizontal"&&this.range[i?"animate":"css"]({width:100-s+"%"},{queue:!1,duration:n.animate}),t==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[i?"animate":"css"]({height:s+"%"},n.animate),t==="max"&&this.orientation==="vertical"&&this.range[i?"animate":"css"]({height:100-s+"%"},{queue:!1,duration:n.animate}))}}),e.extend(e.ui.slider,{version:"1.8.16"})}(jQuery),jQuery.effects||function(e,t){function n(t){var n;return t&&t.constructor==Array&&t.length==3?t:(n=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))?[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)]:(n=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))?[parseFloat(n[1])*2.55,parseFloat(n[2])*2.55,parseFloat(n[3])*2.55]:(n=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:(n=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))?[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(t)?f.transparent:f[e.trim(t).toLowerCase()]}function r(t,r){var i;do{i=e.curCSS(t,r);if(i!=""&&i!="transparent"||e.nodeName(t,"body"))break;r="backgroundColor"}while(t=t.parentNode);return n(i)}function i(){var e=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,t={},n,r;if(e&&e.length&&e[0]&&e[e[0]])for(var i=e.length;i--;)n=e[i],typeof e[n]=="string"&&(r=n.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),t[r]=e[n]);else for(n in e)typeof e[n]=="string"&&(t[n]=e[n]);return t}function s(t){var n,r;for(n in t)r=t[n],(r==null||e.isFunction(r)||n in c||/scrollbar/.test(n)||!/color/i.test(n)&&isNaN(parseFloat(r)))&&delete t[n];return t}function o(e,t){var n={_:0},r;for(r in t)e[r]!=t[r]&&(n[r]=t[r]);return n}function u(t,n,r,i){typeof t=="object"&&(i=n,r=null,n=t,t=n.effect),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n=n||{},r=r||n.duration,r=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,i=i||n.complete,[t,n,r,i]}function a(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects[t]?!0:!1}e.effects={},e.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(t,i){e.fx.step[i]=function(e){e.colorInit||(e.start=r(e.elem,i),e.end=n(e.end),e.colorInit=!0),e.elem.style[i]="rgb("+Math.max(Math.min(parseInt(e.pos*(e.end[0]-e.start[0])+e.start[0],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[1]-e.start[1])+e.start[1],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[2]-e.start[2])+e.start[2],10),255),0)+")"}});var f={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]},l=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.effects.animateClass=function(t,n,r,u){return e.isFunction(r)&&(u=r,r=null),this.queue(function(){var a=e(this),f=a.attr("style")||" ",c=s(i.call(this)),h,v=a.attr("class");e.each(l,function(e,n){t[n]&&a[n+"Class"](t[n])}),h=s(i.call(this)),a.attr("class",v),a.animate(o(c,h),{queue:!1,duration:n,easing:r,complete:function(){e.each(l,function(e,n){t[n]&&a[n+"Class"](t[n])}),typeof a.attr("style")=="object"?(a.attr("style").cssText="",a.attr("style").cssText=f):a.attr("style",f),u&&u.apply(this,arguments),e.dequeue(this)}})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.apply(this,[{add:t},n,r,i]):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.apply(this,[{remove:t},n,r,i]):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.apply(this,[r?{add:n}:{remove:n},i,s,o]):this._toggleClass(n,r):e.effects.animateClass.apply(this,[{toggle:n},r,i,s])},switchClass:function(t,n,r,i,s){return e.effects.animateClass.apply(this,[{add:n,remove:t},r,i,s])}}),e.extend(e.effects,{version:"1.8.16",save:function(e,t){for(var n=0;n<t.length;n++)t[n]!==null&&e.data("ec.storage."+t[n],e[0].style[t[n]])},restore:function(e,t){for(var n=0;n<t.length;n++)t[n]!==null&&e.css(t[n],e.data("ec.storage."+t[n]))},setMode:function(e,t){return t=="toggle"&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":e=0;break;case"center":e=.5;break;case"right":e=1;break;default:e=e[1]/t.width}return{x:e,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},r=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i=document.activeElement;return t.wrap(r),(t[0]===i||e.contains(t[0],i))&&e(i).focus(),r=t.parent(),t.css("position")=="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),r.css(n).show()},removeWrapper:function(t){var n,r=document.activeElement;return t.parent().is(".ui-effects-wrapper")?(n=t.parent().replaceWith(t),(t[0]===r||e.contains(t[0],r))&&e(r).focus(),n):t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){unit=t.cssUnit(n),unit[0]>0&&(i[n]=unit[0]*r+unit[1])}),i}}),e.fn.extend({effect:function(t){var n=u.apply(this,arguments),r={options:n[1],duration:n[2],callback:n[3]};n=r.options.mode;var i=e.effects[t];return e.fx.off||!i?n?this[n](r.duration,r.callback):this.each(function(){r.callback&&r.callback.call(this)}):i.call(this,r)},_show:e.fn.show,show:function(e){if(a(e))return this._show.apply(this,arguments);var t=u.apply(this,arguments);return t[1].mode="show",this.effect.apply(this,t)},_hide:e.fn.hide,hide:function(e){if(a(e))return this._hide.apply(this,arguments);var t=u.apply(this,arguments);return t[1].mode="hide",this.effect.apply(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(a(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=u.apply(this,arguments);return n[1].mode="toggle",this.effect.apply(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}}),e.easing.jswing=e.easing.swing,e.extend(e.easing,{def:"easeOutQuad",swing:function(t,n,r,i,s){return e.easing[e.easing.def](t,n,r,i,s)},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeOutCubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t+n:r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutQuart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t+n:-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t*t+n:r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+n},easeOutSine:function(e,t,n,r,i){return r*Math.sin(t/i*(Math.PI/2))+n},easeInOutSine:function(e,t,n,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+n},easeInExpo:function(e,t,n,r,i){return t==0?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},easeInOutExpo:function(e,t,n,r,i){return t==0?n:t==i?n+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+n:r/2*(-Math.pow(2,-10*--t)+2)+n},easeInCirc:function(e,t,n,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+n},easeOutCirc:function(e,t,n,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+n},easeInOutCirc:function(e,t,n,r,i){return(t/=i/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+n:r/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,r,i){e=1.70158;var s=0,o=r;return t==0?n:(t/=i)==1?n+r:(s||(s=i*.3),o<Math.abs(r)?(o=r,e=s/4):e=s/(2*Math.PI)*Math.asin(r/o),-(o*Math.pow(2,10*(t-=1))*Math.sin((t*i-e)*2*Math.PI/s))+n)},easeOutElastic:function(e,t,n,r,i){e=1.70158;var s=0,o=r;return t==0?n:(t/=i)==1?n+r:(s||(s=i*.3),o<Math.abs(r)?(o=r,e=s/4):e=s/(2*Math.PI)*Math.asin(r/o),o*Math.pow(2,-10*t)*Math.sin((t*i-e)*2*Math.PI/s)+r+n)},easeInOutElastic:function(e,t,n,r,i){e=1.70158;var s=0,o=r;return t==0?n:(t/=i/2)==2?n+r:(s||(s=i*.3*1.5),o<Math.abs(r)?(o=r,e=s/4):e=s/(2*Math.PI)*Math.asin(r/o),t<1?-0.5*o*Math.pow(2,10*(t-=1))*Math.sin((t*i-e)*2*Math.PI/s)+n:o*Math.pow(2,-10*(t-=1))*Math.sin((t*i-e)*2*Math.PI/s)*.5+r+n)},easeInBack:function(e,n,r,i,s,o){return o==t&&(o=1.70158),i*(n/=s)*n*((o+1)*n-o)+r},easeOutBack:function(e,n,r,i,s,o){return o==t&&(o=1.70158),i*((n=n/s-1)*n*((o+1)*n+o)+1)+r},easeInOutBack:function(e,n,r,i,s,o){return o==t&&(o=1.70158),(n/=s/2)<1?i/2*n*n*(((o*=1.525)+1)*n-o)+r:i/2*((n-=2)*n*(((o*=1.525)+1)*n+o)+2)+r},easeInBounce:function(t,n,r,i,s){return i-e.easing.easeOutBounce(t,s-n,0,i,s)+r},easeOutBounce:function(e,t,n,r,i){return(t/=i)<1/2.75?r*7.5625*t*t+n:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+n:r*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutBounce:function(t,n,r,i,s){return n<s/2?e.easing.easeInBounce(t,n*2,0,i,s)*.5+r:e.easing.easeOutBounce(t,n*2-s,0,i,s)*.5+i*.5+r}})}(jQuery),function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=function(e){e=e.replace(/\x0d\x0a/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t},r=function(e){var t="",n=0,r=c1=c2=0;while(n<e.length)r=e.charCodeAt(n),r<128?(t+=String.fromCharCode(r),n++):r>191&&r<224?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((r&31)<<6|c2&63),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63),n+=3);return t};e.extend({base64Encode:function(e){var r="",i,s,o,u,a,f,l,c=0;e=n(e);while(c<e.length)i=e.charCodeAt(c++),s=e.charCodeAt(c++),o=e.charCodeAt(c++),u=i>>2,a=(i&3)<<4|s>>4,f=(s&15)<<2|o>>6,l=o&63,isNaN(s)?f=l=64:isNaN(o)&&(l=64),r=r+t.charAt(u)+t.charAt(a)+t.charAt(f)+t.charAt(l);return r},base64Decode:function(e){var n="",i,s,o,u,a,f,l,c=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(c<e.length)u=t.indexOf(e.charAt(c++)),a=t.indexOf(e.charAt(c++)),f=t.indexOf(e.charAt(c++)),l=t.indexOf(e.charAt(c++)),i=u<<2|a>>4,s=(a&15)<<4|f>>2,o=(f&3)<<6|l,n+=String.fromCharCode(i),f!=64&&(n+=String.fromCharCode(s)),l!=64&&(n+=String.fromCharCode(o));return n=r(n),n}})}(jQuery),function(e){var t=function(){var e=function(){};return e.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(e,t,n,r){r||(this.context=t,this.buffer=[]);if(!this.includes("",e)){if(r)return e;this.send(e);return}e=this.render_pragmas(e);var i=this.render_section(e,t,n);if(r)return this.render_tags(i,t,n,r);this.render_tags(i,t,n,r)},send:function(e){e!=""&&this.buffer.push(e)},render_pragmas:function(e){if(!this.includes("%",e))return e;var t=this,n=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);return e.replace(n,function(e,n,r){if(!t.pragmas_implemented[n])throw{message:"This implementation of mustache doesn't understand the '"+n+"' pragma"};t.pragmas[n]={};if(r){var i=r.split("=");t.pragmas[n][i[0]]=i[1]}return""})},render_partial:function(e,t,n){e=this.trim(e);if(!n||n[e]===undefined)throw{message:"unknown_partial '"+e+"'"};return typeof t[e]!="object"?this.render(n[e],t,n,!0):this.render(n[e],t[e],n,!0)},render_section:function(e,t,n){if(!this.includes("#",e)&&!this.includes("^",e))return e;var r=this,i=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");return e.replace(i,function(e,i,s,o){var u=r.find(s,t);if(i=="^")return!u||r.is_array(u)&&u.length===0?r.render(o,t,n,!0):"";if(i=="#")return r.is_array(u)?r.map(u,function(e){return r.render(o,r.create_context(e),n,!0)}).join(""):r.is_object(u)?r.render(o,r.create_context(u),n,!0):typeof u=="function"?u.call(t,o,function(e){return r.render(e,t,n,!0)}):u?r.render(o,t,n,!0):""})},render_tags:function(e,t,n,r){var i=this,s=function(){return new RegExp(i.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+i.ctag+"+","g")},o=s(),u=function(e,r,u){switch(r){case"!":return"";case"=":return i.set_delimiters(u),o=s(),"";case">":return i.render_partial(u,t,n);case"{":return i.find(u,t);default:return i.escape(i.find(u,t))}},a=e.split("\n");for(var f=0;f<a.length;f++)a[f]=a[f].replace(o,u,this),r||this.send(a[f]);if(r)return a.join("\n")},set_delimiters:function(e){var t=e.split(" ");this.otag=this.escape_regex(t[0]),this.ctag=this.escape_regex(t[1])},escape_regex:function(e){if(!arguments.callee.sRE){var t=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+t.join("|\\")+")","g")}return e.replace(arguments.callee.sRE,"\\$1")},find:function(e,t){function n(e){return e===!1||e===0||e}e=this.trim(e);var r;return n(t[e])?r=t[e]:n(this.context[e])&&(r=this.context[e]),typeof r=="function"?r.apply(t):r!==undefined?r:""},includes:function(e,t){return t.indexOf(this.otag+e)!=-1},escape:function(e){return e=String(e===null?"":e),e.replace(/&(?!\w+;)|["'<>\\]/g,function(e){switch(e){case"&":return"&amp;";case"\\":return"\\\\";case'"':return"&quot;";case"'":return"&#39;";case"<":return"&lt;";case">":return"&gt;";default:return e}})},create_context:function(e){if(this.is_object(e))return e;var t=".";this.pragmas["IMPLICIT-ITERATOR"]&&(t=this.pragmas["IMPLICIT-ITERATOR"].iterator);var n={};return n[t]=e,n},is_object:function(e){return e&&typeof e=="object"},is_array:function(e){return Object.prototype.toString.call(e)==="[object Array]"},trim:function(e){return e.replace(/^\s*|\s*$/g,"")},map:function(e,t){if(typeof e.map=="function")return e.map(t);var n=[],r=e.length;for(var i=0;i<r;i++)n.push(t(e[i]));return n}},{name:"mustache.js",version:"0.3.1-dev",to_html:function(t,n,r,i){var s=new e;i&&(s.send=i),s.render(t,n,r);if(!i)return s.buffer.join("\n")}}}();e.mustache=function(e,n,r){return t.to_html(e,n,r)}}(jQuery);var swfobject=function(){function C(){if(b)return;try{var e=a.getElementsByTagName("body")[0].appendChild(U("span"));e.parentNode.removeChild(e)}catch(t){return}b=!0;var n=c.length;for(var r=0;r<n;r++)c[r]()}function k(e){b?e():c[c.length]=e}function L(t){if(typeof u.addEventListener!=e)u.addEventListener("load",t,!1);else if(typeof a.addEventListener!=e)a.addEventListener("load",t,!1);else if(typeof u.attachEvent!=e)z(u,"onload",t);else if(typeof u.onload=="function"){var n=u.onload;u.onload=function(){n(),t()}}else u.onload=t}function A(){l?O():M()}function O(){var n=a.getElementsByTagName("body")[0],r=U(t);r.setAttribute("type",i);var s=n.appendChild(r);if(s){var o=0;(function(){if(typeof s.GetVariable!=e){var t=s.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),T.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(o<10){o++,setTimeout(arguments.callee,10);return}n.removeChild(r),s=null,M()})()}else M()}function M(){var t=h.length;if(t>0)for(var n=0;n<t;n++){var r=h[n].id,i=h[n].callbackFn,s={success:!1,id:r};if(T.pv[0]>0){var o=R(r);if(o)if(W(h[n].swfVersion)&&!(T.wk&&T.wk<312))V(r,!0),i&&(s.success=!0,s.ref=_(r),i(s));else if(h[n].expressInstall&&D()){var u={};u.data=h[n].expressInstall,u.width=o.getAttribute("width")||"0",u.height=o.getAttribute("height")||"0",o.getAttribute("class")&&(u.styleclass=o.getAttribute("class")),o.getAttribute("align")&&(u.align=o.getAttribute("align"));var a={},f=o.getElementsByTagName("param"),l=f.length;for(var c=0;c<l;c++)f[c].getAttribute("name").toLowerCase()!="movie"&&(a[f[c].getAttribute("name")]=f[c].getAttribute("value"));P(u,a,r,i)}else H(o),i&&i(s)}else{V(r,!0);if(i){var p=_(r);p&&typeof p.SetVariable!=e&&(s.success=!0,s.ref=p),i(s)}}}}function _(n){var r=null,i=R(n);if(i&&i.nodeName=="OBJECT")if(typeof i.SetVariable!=e)r=i;else{var s=i.getElementsByTagName(t)[0];s&&(r=s)}return r}function D(){return!w&&W("6.0.65")&&(T.win||T.mac)&&!(T.wk&&T.wk<312)}function P(t,n,r,i){w=!0,g=i||null,y={success:!1,id:r};var o=R(r);if(o){o.nodeName=="OBJECT"?(v=B(o),m=null):(v=o,m=r),t.id=s;if(typeof t.width==e||!/%$/.test(t.width)&&parseInt(t.width,10)<310)t.width="310";if(typeof t.height==e||!/%$/.test(t.height)&&parseInt(t.height,10)<137)t.height="137";a.title=a.title.slice(0,47)+" - Flash Player Installation";var f=T.ie&&T.win?"ActiveX":"PlugIn",l="MMredirectURL="+u.location.toString().replace(/&/g,"%26")+"&MMplayerType="+f+"&MMdoctitle="+a.title;typeof n.flashvars!=e?n.flashvars+="&"+l:n.flashvars=l;if(T.ie&&T.win&&o.readyState!=4){var c=U("div");r+="SWFObjectNew",c.setAttribute("id",r),o.parentNode.insertBefore(c,o),o.style.display="none",function(){o.readyState==4?o.parentNode.removeChild(o):setTimeout(arguments.callee,10)}()}j(t,n,r)}}function H(e){if(T.ie&&T.win&&e.readyState!=4){var t=U("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(B(e),t),e.style.display="none",function(){e.readyState==4?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(B(e),e)}function B(e){var n=U("div");if(T.win&&T.ie)n.innerHTML=e.innerHTML;else{var r=e.getElementsByTagName(t)[0];if(r){var i=r.childNodes;if(i){var s=i.length;for(var o=0;o<s;o++)(i[o].nodeType!=1||i[o].nodeName!="PARAM")&&i[o].nodeType!=8&&n.appendChild(i[o].cloneNode(!0))}}}return n}function j(n,r,s){var o,u=R(s);if(T.wk&&T.wk<312)return o;if(u){typeof n.id==e&&(n.id=s);if(T.ie&&T.win){var a="";for(var f in n)n[f]!=Object.prototype[f]&&(f.toLowerCase()=="data"?r.movie=n[f]:f.toLowerCase()=="styleclass"?a+=' class="'+n[f]+'"':f.toLowerCase()!="classid"&&(a+=" "+f+'="'+n[f]+'"'));var l="";for(var c in r)r[c]!=Object.prototype[c]&&(l+='<param name="'+c+'" value="'+r[c]+'" />');u.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+a+">"+l+"</object>",p[p.length]=n.id,o=R(n.id)}else{var h=U(t);h.setAttribute("type",i);for(var d in n)n[d]!=Object.prototype[d]&&(d.toLowerCase()=="styleclass"?h.setAttribute("class",n[d]):d.toLowerCase()!="classid"&&h.setAttribute(d,n[d]));for(var v in r)r[v]!=Object.prototype[v]&&v.toLowerCase()!="movie"&&F(h,v,r[v]);u.parentNode.replaceChild(h,u),o=h}}return o}function F(e,t,n){var r=U("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function I(e){var t=R(e);t&&t.nodeName=="OBJECT"&&(T.ie&&T.win?(t.style.display="none",function(){t.readyState==4?q(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function q(e){var t=R(e);if(t){for(var n in t)typeof t[n]=="function"&&(t[n]=null);t.parentNode.removeChild(t)}}function R(e){var t=null;try{t=a.getElementById(e)}catch(n){}return t}function U(e){return a.createElement(e)}function z(e,t,n){e.attachEvent(t,n),d[d.length]=[e,t,n]}function W(e){var t=T.pv,n=e.split(".");return n[0]=parseInt(n[0],10),n[1]=parseInt(n[1],10)||0,n[2]=parseInt(n[2],10)||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]?!0:!1}function X(n,r,i,s){if(T.ie&&T.mac)return;var o=a.getElementsByTagName("head")[0];if(!o)return;var u=i&&typeof i=="string"?i:"screen";s&&(E=null,S=null);if(!E||S!=u){var f=U("style");f.setAttribute("type","text/css"),f.setAttribute("media",u),E=o.appendChild(f),T.ie&&T.win&&typeof a.styleSheets!=e&&a.styleSheets.length>0&&(E=a.styleSheets[a.styleSheets.length-1]),S=u}T.ie&&T.win?E&&typeof E.addRule==t&&E.addRule(n,r):E&&typeof a.createTextNode!=e&&E.appendChild(a.createTextNode(n+" {"+r+"}"))}function V(e,t){if(!x)return;var n=t?"visible":"hidden";b&&R(e)?R(e).style.visibility=n:X("#"+e,"visibility:"+n)}function $(t){var n=/[\\\"<>\.;]/,r=n.exec(t)!=null;return r&&typeof encodeURIComponent!=e?encodeURIComponent(t):t}var e="undefined",t="object",n="Shockwave Flash",r="ShockwaveFlash.ShockwaveFlash",i="application/x-shockwave-flash",s="SWFObjectExprInst",o="onreadystatechange",u=window,a=document,f=navigator,l=!1,c=[A],h=[],p=[],d=[],v,m,g,y,b=!1,w=!1,E,S,x=!0,T=function(){var s=typeof a.getElementById!=e&&typeof a.getElementsByTagName!=e&&typeof a.createElement!=e,o=f.userAgent.toLowerCase(),c=f.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(o),p=c?/mac/.test(c):/mac/.test(o),d=/webkit/.test(o)?parseFloat(o.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,v=!1,m=[0,0,0],g=null;if(typeof f.plugins!=e&&typeof f.plugins[n]==t)g=f.plugins[n].description,g&&(typeof f.mimeTypes==e||!f.mimeTypes[i]||!!f.mimeTypes[i].enabledPlugin)&&(l=!0,v=!1,g=g.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),m[0]=parseInt(g.replace(/^(.*)\..*$/,"$1"),10),m[1]=parseInt(g.replace(/^.*\.(.*)\s.*$/,"$1"),10),m[2]=/[a-zA-Z]/.test(g)?parseInt(g.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof u.ActiveXObject!=e)try{var y=new ActiveXObject(r);y&&(g=y.GetVariable("$version"),g&&(v=!0,g=g.split(" ")[1].split(","),m=[parseInt(g[0],10),parseInt(g[1],10),parseInt(g[2],10)]))}catch(b){}return{w3:s,pv:m,wk:d,ie:v,win:h,mac:p}}(),N=function(){if(!T.w3)return;(typeof a.readyState!=e&&a.readyState=="complete"||typeof a.readyState==e&&(a.getElementsByTagName("body")[0]||a.body))&&C(),b||(typeof a.addEventListener!=e&&a.addEventListener("DOMContentLoaded",C,!1),T.ie&&T.win&&(a.attachEvent(o,function(){a.readyState=="complete"&&(a.detachEvent(o,arguments.callee),C())}),u==top&&function(){if(b)return;try{a.documentElement.doScroll("left")}catch(e){setTimeout(arguments.callee,0);return}C()}()),T.wk&&function(){if(b)return;if(!/loaded|complete/.test(a.readyState)){setTimeout(arguments.callee,0);return}C()}(),L(C))}(),J=function(){T.ie&&T.win&&window.attachEvent("onunload",function(){var e=d.length;for(var t=0;t<e;t++)d[t][0].detachEvent(d[t][1],d[t][2]);var n=p.length;for(var r=0;r<n;r++)I(p[r]);for(var i in T)T[i]=null;T=null;for(var s in swfobject)swfobject[s]=null;swfobject=null})}();return{registerObject:function(e,t,n,r){if(T.w3&&e&&t){var i={};i.id=e,i.swfVersion=t,i.expressInstall=n,i.callbackFn=r,h[h.length]=i,V(e,!1)}else r&&r({success:!1,id:e})},getObjectById:function(e){if(T.w3)return _(e)},embedSWF:function(n,r,i,s,o,u,a,f,l
  ,c){var h={success:!1,id:r};T.w3&&!(T.wk&&T.wk<312)&&n&&r&&i&&s&&o?(V(r,!1),k(function(){i+="",s+="";var p={};if(l&&typeof l===t)for(var d in l)p[d]=l[d];p.data=n,p.width=i,p.height=s;var v={};if(f&&typeof f===t)for(var m in f)v[m]=f[m];if(a&&typeof a===t)for(var g in a)typeof v.flashvars!=e?v.flashvars+="&"+g+"="+a[g]:v.flashvars=g+"="+a[g];if(W(o)){var y=j(p,v,r);p.id==r&&V(r,!0),h.success=!0,h.ref=y}else{if(u&&D()){p.data=u,P(p,v,r,c);return}V(r,!0)}c&&c(h)})):c&&c(h)},switchOffAutoHideShow:function(){x=!1},ua:T,getFlashPlayerVersion:function(){return{major:T.pv[0],minor:T.pv[1],release:T.pv[2]}},hasFlashPlayerVersion:W,createSWF:function(e,t,n){return T.w3?j(e,t,n):undefined},showExpressInstall:function(e,t,n,r){T.w3&&D()&&P(e,t,n,r)},removeSWF:function(e){T.w3&&I(e)},createCSS:function(e,t,n,r){T.w3&&X(e,t,n,r)},addDomLoadEvent:k,addLoadEvent:L,getQueryParamValue:function(e){var t=a.location.search||a.location.hash;if(t){/\?/.test(t)&&(t=t.split("?")[1]);if(e==null)return $(t);var n=t.split("&");for(var r=0;r<n.length;r++)if(n[r].substring(0,n[r].indexOf("="))==e)return $(n[r].substring(n[r].indexOf("=")+1))}return""},expressInstallCallback:function(){if(w){var e=R(s);e&&v&&(e.parentNode.replaceChild(v,e),m&&(V(m,!0),T.ie&&T.win&&(v.style.display="block")),g&&g(y)),w=!1}}}}();window.NOMENSA=window.NOMENSA||{},window.NOMENSA.player=window.NOMENSA.player||{},window.NOMENSA.player.YoutubePlayer=function(e){this.config=e,this.config.playerVars={controls:0,showinfo:0,origin:window.location.protocol+"//"+window.location.hostname,rel:0}},window.NOMENSA.player.YoutubePlayer.apiLoaded=!1,window.NOMENSA.player.YoutubePlayer.prototype={getYTOptions:function(){var e=this,t={height:this.config.flashHeight,width:this.config.flashWidth,videoId:this.config.media,events:{onReady:function(t){e.$html.find("iframe").attr({id:e.config.id,role:"presentation"}),e.onPlayerReady(t)},onStateChange:function(t){e.onPlayerStateChange(t.data)}}};return t.playerVars=this.config.playerVars,this.config.repeat&&(t.playerVars.playlist=this.config.media),t},init:function(){return typeof window.postMessage!="undefined"?function(e){var t=document.createElement("script"),n=document.getElementsByTagName("script")[0],r=this;this.$html=this.assembleHTML(),this.config.captions&&this.getCaptions(),e.html(this.$html),window.NOMENSA.player.PlayerDaemon.addPlayer(this),window.NOMENSA.player.YoutubePlayer.apiLoaded?this.player=YT.Player("player-"+player.config.id,getOptions(player)):typeof window.onYouTubeIframeAPIReady=="undefined"&&(window.onYouTubeIframeAPIReady=function(){window.NOMENSA.player.PlayerDaemon.map(function(e){typeof e.getYTOptions!="undefined"&&(e.player=new YT.Player("player-"+e.config.id,e.getYTOptions()))}),window.NOMENSA.player.YoutubePlayer.apiLoaded=!0},t.src="//www.youtube.com/iframe_api",n.parentNode.insertBefore(t,n))}:function(e){var t=this;this.$html=this.assembleHTML(),this.config.captions&&this.getCaptions(),e.html(this.$html),window.NOMENSA.player.PlayerDaemon.addPlayer(this),window.NOMENSA.player.stateHandlers[this.config.id]=function(e){var n=window.NOMENSA.player.PlayerDaemon.getPlayer(t.config.id);n.onPlayerStateChange(e)},window.onYouTubePlayerReady=function(e){var n=window.NOMENSA.player.PlayerDaemon.getPlayer(e),r=document.getElementById(n.config.id);n.player=r,n.cue(),n.getPlayer().addEventListener("onStateChange","window.NOMENSA.player.stateHandlers."+t.config.id),n.onPlayerReady()}}}(),state:{ended:0,playing:1,paused:2,unstarted:-1},onPlayerReady:function(){var e=[],t;return function(n){var r=e.length;if(typeof n=="function")e.push(n);else{if(r===0)return!1;for(t=0;t<r;t++)e[t].apply(this,arguments)}}}(),onPlayerStateChange:function(e){e==1?(this.play(),this.config.buttons.toggle&&this.$html.find(".play").removeClass("play").addClass("pause").text("Pause")):this.config.repeat&&e==0&&this.play()},getFlashVars:function(){var e={controlbar:"none",file:this.config.media};return this.config.image!=""&&(e.image=this.config.image),this.config.repeat&&(e.repeat=this.config.repeat),e},getFlashParams:function(){return{allowScriptAccess:"always",wmode:"transparent"}},generateFlashPlayer:function(e){var t=this,n=this.getFlashVars(),r=this.getFlashParams(),i={id:this.config.id,name:this.config.id},s=$("<"+this.config.flashContainer+" />").attr("id","player-"+this.config.id).addClass("flashReplace").html('This content requires Macromedia Flash Player. You can <a href="http://get.adobe.com/flashplayer/">install or upgrade the Adobe Flash Player here</a>.'),o=$("<span />").addClass("video"),u=this.getURL();return setTimeout(function(){swfobject.embedSWF(u,s.attr("id"),t.config.flashWidth,t.config.flashHeight,"9.0.115",null,n,r,i,t.config.swfCallback),$.browser.mozilla&&parseInt($.browser.version,10)>=2&&t.$html.find("object").attr("tabindex","-1")},0),e.append(o.append(s)),e},generateVideoPlayer:function(e){if(typeof window.postMessage=="undefined")return this.generateFlashPlayer(e);var t=$("<"+this.config.flashContainer+" />").attr("id","player-"+this.config.id),n=$("<span />").addClass("video");return e.append(n.append(t)),e},getPlayer:function(){return this.player},is_html5:!1,play:function(){this.player.playVideo(),this.setSliderTimeout(),this.config.captionsOn&&this.captions&&this.setCaptionTimeout()},pause:function(){this.player.pauseVideo(),this.clearSliderTimeout(),this.config.captionsOn&&this.captions&&this.clearCaptionTimeout()},ffwd:function(){var e=this.getCurrentTime()+this.config.playerSkip,t=this.getDuration();e>t&&(e=t),this.seek(e)},rewd:function(){var e=this.getCurrentTime()-this.config.playerSkip;e<0&&(e=0),this.seek(e)},mute:function(){var e=this.$html.find("button.mute");this.player.isMuted()?(this.player.unMute(),e.hasClass("muted")&&e.removeClass("muted")):(this.player.mute(),e.addClass("muted"))},volup:function(){var e=this.player.getVolume();e>=100?e=100:e+=this.config.volumeStep,this.player.setVolume(e),this.updateVolume(e)},voldwn:function(){var e=this.player.getVolume();e<=0?e=0:e-=this.config.volumeStep,this.player.setVolume(e),this.updateVolume(e)},getDuration:function(){return this.player.getDuration()},getCurrentTime:function(){return this.player.getCurrentTime()},getBytesLoaded:function(){return this.player.getVideoBytesLoaded()},getBytesTotal:function(){return this.player.getVideoBytesTotal()},seek:function(e){this.player.seekTo(e,!0),this.config.captionsOn&&this.captions&&(this.$html.find(".caption").remove(),this.clearCaptionTimeout(),this.setCaptionTimeout(),this.getPreviousCaption())},cue:function(){this.player.cueVideoById(this.config.media)},toggleCaptions:function(){var e=this,t=this.$html.find(".captions");t.hasClass("captions-off")?(t.removeClass("captions-off").addClass("captions-on"),e.getPreviousCaption(),e.setCaptionTimeout(),e.config.captionsOn=!0):(t.removeClass("captions-on").addClass("captions-off"),e.clearCaptionTimeout(),e.$html.find(".caption").remove(),e.config.captionsOn=!1)}},window.NOMENSA=window.NOMENSA||{},window.NOMENSA.player=window.NOMENSA.player||{},window.NOMENSA.player.MediaplayerDecorator=function(e){var t=e;this.config=t.config,this.player=t.player,this.state=t.state;for(var n in t)typeof t[n]=="function"&&(this[n]=function(e){return function(){return t[e].apply(this,arguments)}}(n))},window.NOMENSA.player.MediaplayerDecorator.prototype.generatePlayerContainer=function(){var e=$("<"+this.config.playerContainer+" />").css(this.config.playerStyles).addClass("player-container");return $.browser.msie&&e.addClass("player-container-ie player-container-ie-"+$.browser.version.substring(0,1)),e},window.NOMENSA.player.MediaplayerDecorator.prototype.assembleHTML=function(){var e=this.generatePlayerContainer(),t=this.generateVideoPlayer(e),n=t.append(this.getControls());return n},window.NOMENSA.player.MediaplayerDecorator.prototype.getURL=function(){return[this.config.url,this.config.id].join("")},window.NOMENSA.player.MediaplayerDecorator.prototype.createButton=function(e,t){var n=0,r=[e,this.config.id].join("-"),i=$("<button />").append(t).addClass(e).attr({title:e,id:r}).addClass("ui-corner-all ui-state-default").hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).click(function(e){e.preventDefault()});return i},window.NOMENSA.player.MediaplayerDecorator.prototype.getFuncControls=function(){var e=this,t=$("<div>");t[0].className="player-controls";var n=[];if(e.config.buttons.toggle){var r=e.createButton("play","Play").attr({"aria-live":"assertive"}).click(function(){$(this).hasClass("play")?($(this).removeClass("play").addClass("pause").attr({title:"Pause",id:"pause-"+e.config.id}).text("Pause"),e.play()):($(this).removeClass("pause").addClass("play").attr({title:"Play",id:"play-"+e.config.id}).text("Play"),e.pause())});n.push(r)}else{var i=e.createButton("play","Play").click(function(){e.play()}),s=e.createButton("pause","Pause").click(function(){e.pause()});n.push(i),n.push(s)}if(e.config.buttons.rewind){var o=e.createButton("rewind","Rewind").click(function(){e.rewd()});n.push(o)}if(e.config.buttons.forward){var u=e.createButton("forward","Forward").click(function(){e.ffwd()});n.push(u)}if(e.config.captions){var a=e.createButton("captions","Captions").click(function(){e.toggleCaptions()}),f=e.config.captionsOn==1?"captions-on":"captions-off";a.addClass(f),n.push(a)}for(var l=0;l<n.length;l+=1)t[0].appendChild(n[l][0]);return t},window.NOMENSA.player.MediaplayerDecorator.prototype.getVolControls=function(){var e=this,t=$("<div>").addClass("volume-controls"),n=e.createButton("mute","Mute").click(function(){e.mute()}),r=e.createButton("vol-up",'+<span class="ui-helper-hidden-accessible"> Volume Up</span>').click(function(){e.volup()}),i=e.createButton("vol-down",'-<span class="ui-helper-hidden-accessible"> Volume Down</span>').click(function(){e.voldwn()}),s=$("<span />").attr({id:"vol-"+e.config.id,"class":"vol-display"}).text("100%"),o=[n,i,r,s];for(var u=0;u<o.length;u+=1)t[0].appendChild(o[u][0]);return t},window.NOMENSA.player.MediaplayerDecorator.prototype.getSliderBar=function(){var e=$("<span />").addClass("ui-helper-hidden-accessible").html("<p>The timeline slider below uses WAI ARIA. Please use the documentation for your screen reader to find out more.</p>"),t=$("<span />").addClass("current-time").attr({id:"current-"+this.config.id}).text("00:00:00"),n=this.getSlider(),r=$("<span />").addClass("duration-time").attr({id:"duration-"+this.config.id}).text("00:00:00"),i=$("<div />").addClass("timer-bar").append(e),s=[t,n,r];for(var o=0;o<s.length;o+=1)i[0].appendChild(s[o][0]);return i},window.NOMENSA.player.MediaplayerDecorator.prototype.getSlider=function(){var e=this,t=$("<span />").attr("id","slider-"+this.config.id).slider({orientation:"horizontal",change:function(t,n){var r=n.value,i=r/100*e.getDuration();e.seek(i)}});t.find("a.ui-slider-handle").attr({role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0","aria-valuetext":"0 percent",title:"Slider Control"});var n=$("<span />").addClass("progress-bar").attr({id:"progress-bar-"+this.config.id,tabindex:"-1"}).addClass("ui-progressbar-value ui-widget-header ui-corner-left").css({width:"0%",height:"95%"}),r=$("<span />").attr({id:"loaded-bar-"+this.config.id,tabindex:"-1"}).addClass("loaded-bar ui-progressbar-value ui-widget-header ui-corner-left").css({height:"95%",width:"0%"});return t.append(n,r)},window.NOMENSA.player.MediaplayerDecorator.prototype.setSliderTimeout=function(){var e=this;e.sliderInterval==undefined&&(e.sliderInterval=setInterval(function(){e.updateSlider()},e.config.sliderTimeout))},window.NOMENSA.player.MediaplayerDecorator.prototype.clearSliderTimeout=function(){var e=this;e.sliderInterval!=undefined&&(e.sliderInterval=clearInterval(e.sliderInterval))},window.NOMENSA.player.MediaplayerDecorator.prototype.updateSlider=function(){var e=typeof this.duration!="undefined"?this.duration:this.getDuration(),t=typeof this.duration_found=="boolean"?this.duration_found:!1,n=this.getCurrentTime(),r=0;e>0?(r=n/e*100,r=parseInt(r,10)):e=0,t||($("#duration-"+this.config.id).html(this.formatTime(parseInt(e,10))),this.duration_found=!0),$("#slider-"+this.config.id).find("a.ui-slider-handle").attr({"aria-valuenow":r,"aria-valuetext":r.toString()+" percent"}).css("left",r.toString()+"%"),$("#progress-bar-"+this.config.id).attr({"aria-valuenow":r,"aria-valuetext":r.toString()+" percent"}).css("width",r.toString()+"%"),this.updateLoaderBar(),this.updateTime(n)},window.NOMENSA.player.MediaplayerDecorator.prototype.updateLoaderBar=function(){var e=this.getBytesLoaded()/this.getBytesTotal()*100;e=parseInt(e,10),isFinite(e)||(e=0),$("#loaded-bar-"+this.config.id).attr({"aria-valuetext":e.toString()+" percent","aria-valuenow":e}).css("width",e.toString()+"%")},window.NOMENSA.player.MediaplayerDecorator.prototype.formatTime=function(e){var t=0,n=0,r=0;e>=60?(n=parseInt(e/60,10),r=e-n*60,n>=60&&(t=parseInt(n/60,10),n-=parseInt(t*60,10))):r=e;var i=[t,n,r];for(var s=0;s<i.length;s+=1)i[s]=i[s]<10?"0"+i[s].toString():i[s].toString();return i.join(":")},window.NOMENSA.player.MediaplayerDecorator.prototype.updateTime=function(e){var t=this.formatTime(parseInt(e,10));this.$html.find("#current-"+this.config.id).html(t)},window.NOMENSA.player.MediaplayerDecorator.prototype.getControls=function(){var e=$("<span />").addClass("ui-corner-bottom").addClass("control-bar"),t=$("<a />").attr("href","http://www.nomensa.com?ref=logo").html("Accessible Media Player by Nomensa").addClass("logo");e.append(t);var n=this.getFuncControls(),r=this.getVolControls(),i=this.getSliderBar(),s=[n,r,i];for(var o=0;o<s.length;o+=1)e[0].appendChild(s[o][0]);return e},window.NOMENSA.player.MediaplayerDecorator.prototype.updateVolume=function(e){$("#vol-"+this.config.id).text(e.toString()+"%");var t=this.$html.find("button.mute");e==0?t.addClass("muted"):t.hasClass("muted")&&t.removeClass("muted")},window.NOMENSA.player.MediaplayerDecorator.prototype.getCaptions=function(){var e=this;if(e.config.captions){var t=[];$.ajax({url:e.config.captions,success:function(t){$(t).find("p").length>0&&(e.captions=$(t).find("p"))}})}},window.NOMENSA.player.MediaplayerDecorator.prototype.toggleCaptions=function(){var e=this,t=this.$html.find(".captions");t.hasClass("captions-off")?(t.removeClass("captions-off").addClass("captions-on"),e.getPreviousCaption(),e.setCaptionTimeout(),e.config.captionsOn=!0):(t.removeClass("captions-on").addClass("captions-off"),e.clearCaptionTimeout(),e.$html.find(".caption").remove(),e.config.captionsOn=!1)},window.NOMENSA.player.MediaplayerDecorator.prototype.syncCaptions=function(){var e;if(this.captions){var t=this.getCurrentTime();t=this.formatTime(parseInt(t,10)),e=this.captions.filter('[begin="'+t+'"]'),e.length==1&&this.insertCaption(e)}},window.NOMENSA.player.MediaplayerDecorator.prototype.insertCaption=function(e){if(this.$html.find(".caption").length==1)this.$html.find(".caption").text(e.text());else{var t=$("<div>").text(e.text());t[0].className="caption",this.$html.find(".video").prepend(t)}},window.NOMENSA.player.MediaplayerDecorator.prototype.getPreviousCaption=function(e){var t;e==undefined&&(e=this.getCurrentTime());var n=this.formatTime(parseInt(e,10));if(this.captions){t=this.captions.filter('[begin="'+n+'"]');while(t.length!=1&&e>0)e--,n=this.formatTime(parseInt(e,10)),t=this.captions.filter('[begin="'+n+'"]');t.length==1&&this.insertCaption(t)}},window.NOMENSA.player.MediaplayerDecorator.prototype.destroyPlayerInstance=function(){return!1},window.NOMENSA.player.MediaplayerDecorator.prototype.destroy=function(){this.clearSliderTimeout(),this.clearCaptionTimeout(),this.destroyPlayerInstance(),this.$html.remove()},window.NOMENSA.player.MediaplayerDecorator.prototype.setCaptionTimeout=function(){var e=this;e.captionInterval==undefined&&(e.captionInterval=setInterval(function(){e.syncCaptions()},500))},window.NOMENSA.player.MediaplayerDecorator.prototype.clearCaptionTimeout=function(){this.captionInterval!=undefined&&(this.captionInterval=clearInterval(this.captionInterval))},window.NOMENSA=window.NOMENSA||{},window.NOMENSA.player=window.NOMENSA.player||{},jQuery(function(e){e(window).resize(function(){e(".player-container").each(function(){e(this).width()>580?e(this).addClass("player-wide"):e(this).removeClass("player-wide")})})}),typeof window.postMessage=="undefined"&&(window.NOMENSA.player.stateHandlers={}),window.NOMENSA.player.PlayerManager=function(){var e={};this.getPlayer=function(t){return e[t]!=undefined?e[t]:null},this.addPlayer=function(t){return e[t.config.id]=t,!0},this.removePlayer=function(t){e[t]!=undefined&&(e[t].destroy(),delete e[t])},this.map=function(t){var n;for(n in e)t(e[n])}},window.NOMENSA.player.PlayerDaemon=new window.NOMENSA.player.PlayerManager;var html5_methods={play:function(){this.player.play(),this.setSliderTimeout(),this.config.captionsOn&&this.captions&&this.setCaptionTimeout()},pause:function(){this.player.pause(),this.clearSliderTimeout(),this.config.captionsOn&&this.captions&&this.clearCaptionTimeout()},ffwd:function(){var e=this.getCurrentTime()+this.config.playerSkip;this.seek(e)},rewd:function(){var e=this.getCurrentTime()-this.config.playerSkip;e<0&&(e=0),this.seek(e)},mute:function(){var e=this.$html.find("button.mute");this.player.muted?(this.player.muted=!1,e.hasClass("muted")&&e.removeClass("muted")):(this.player.muted=!0,e.addClass("muted"))},volup:function(){var e=this.player.volume*100;e<100-this.config.volumeStep?e+=this.config.volumeStep:e=100,this.player.volume=e/100,this.updateVolume(Math.round(e))},voldwn:function(){var e=this.player.volume*100;e>this.config.volumeStep?e-=this.config.volumeStep:e=0,this.player.volume=e/100,this.updateVolume(Math.round(e))},getDuration:function(){return this.player.duration},getCurrentTime:function(){return this.player.currentTime},getBytesLoaded:function(){return this.player.buffered.end(0)},getBytesTotal:function(){return this.player.duration},seek:function(e){this.player.currentTime=e},cue:function(){return}};(function(e){e.fn.player=function(t,n){function c(t){this.config=i,e.extend(!0,this,l,n),this.is_html5=!1;var r=u(this);r&&s(r.mimetype,r.container)&&this.config.useHtml5?(this.is_html5=!0,this.$html=this.assembleHTML5(r.container,r.mimetype),e.extend(this,html5_methods)):this.$html=this.assembleHTML(),this.config.captions&&this.getCaptions()}var r={id:"media_player",url:window.location.protocol+"//www.youtube.com/apiplayer?enablejsapi=1&version=3&playerapiid=",media:"8LiQ-bLJaM4",repeat:!1,captions:null,captionsOn:!0,flashWidth:"100%",flashHeight:"300px",playerStyles:{height:"100%",width:"100%"},sliderTimeout:350,flashContainer:"span",playerContainer:"span",image:"",playerSkip:10,volumeStep:10,buttons:{forward:!0,rewind:!0,toggle:!0},logoURL:"http://www.nomensa.com?ref=logo",useHtml5:!0,swfCallback:null},i=e.extend(!0,{},r,t),s=function(e,t){var n=document.createElement(t);if(n.canPlayType!=undefined){var r=n.canPlayType(e);if(r.toLowerCase()=="maybe"||r.toLowerCase()=="probably")return!0}return!1},o=function(e){var t="",n="video";switch(e){case"mp4":t='video/mp4; codecs="avc1.42E01E, mp4a.40.2"';break;case"m4v":t='video/mp4; codecs="avc1.42E01E, mp4a.40.2"';break;case"ogg":t='video/ogg; codecs="theora, vorbis"';break;case"ogv":t='video/ogg; codecs="theora, vorbis"';break;case"webm":t='video/webm; codecs="vp8, vorbis"';break;case"mp3":t="audio/mpeg",n="audio"}return{mimetype:t,container:n}},u=function(e){var t=e.config.media,n=t.lastIndexOf(".");if(n!=-1){var r=t.substring(n+1),i=o(r);return i}return null},f=function(){return e.browser.mozilla?parseInt(e.browser.version,10)>=2?!0:!1:!1},l={generatePlayerContainer:function(){var t=e("<"+this.config.playerContainer+" />").css(this.config.playerStyles).addClass("player-container");return e.browser.msie&&t.addClass("player-container-ie player-container-ie-"+e.browser.version.substring(0,1)),t},getFlashVars:function(){var e={controlbar:"none",file:this.config.media};return this.config.image!=""&&(e.image=this.config.image),this.config.repeat&&(e.repeat=this.config.repeat),e},getFlashParams:function(){return{allowScriptAccess:"always",wmode:"transparent"}},getURL:function(){return[this.config.url,this.config.id].join("")},generateFlashPlayer:function(t){var n=this,r=this.getFlashVars(),i=this.getFlashParams(),s={id:this.config.id,name:this.config.id},o=e("<"+this.config.flashContainer+" />").attr("id","player-"+this.config.id).addClass("flashReplace").html('This content requires Macromedia Flash Player. You can <a href="http://get.adobe.com/flashplayer/">install or upgrade the Adobe Flash Player here</a>.'),u=e("<span />").addClass("video"),l=this.getURL();return setTimeout(function(){swfobject.embedSWF(l,o.attr("id"),n.config.flashWidth,n.config.flashHeight,"9.0.115",null,r,i,s,n.config.swfCallback),f()&&n.$html.find("object").attr("tabindex","-1")},0),t.append(u.append(o)),t},generateHTML5Player:function(t,n,r){var i=e("<span />");i[0].className="video";var s=e("<"+n+" />").attr({id:this.config.id,src:this.config.media,type:r}).css({width:"100%",height:"50%"});return e.trim(this.config.image)!=""&&s.attr({poster:e.trim(this.config.image)}),t.append(i.append(s))},createButton:function(t,n){var r=0,i=[t,this.config.id].join("-"),s=e("<button />").append(n).addClass(t).attr({title:t,id:i}).addClass("ui-corner-all ui-state-default").hover(function(){e(this).addClass("ui-state-hover")},function(){e(this).removeClass("ui-state-hover")}).focus(function(){e(this).addClass("ui-state-focus")}).blur(function(){e(this).removeClass("ui-state-focus")}).click(function(e){e.preventDefault()});return s},getFuncControls:function(){var t=this,n=e("<div>");n[0].className="player-controls";var r=[];if(t.config.buttons.toggle){var i=t.createButton("play","Play").attr({"aria-live":"assertive"}).click(function(){e(this).hasClass("play")?(e(this).removeClass("play").addClass("pause").attr({title:"Pause",id:"pause-"+t.config.id}).text("Pause"),t.play()):(e(this).removeClass("pause").addClass("play").attr({title:"Play",id:"play-"+t.config.id}).text("Play"),t.pause())});r.push(i)}else{var s=t.createButton("play","Play").click(function(){t.play()}),o=t.createButton("pause","Pause").click(function(){t.pause()});r.push(s),r.push(o)}if(t.config.buttons.rewind){var u=t.createButton("rewind","Rewind").click(function(){t.rewd()});r.push(u)}if(t.config.buttons.forward){var f=t.createButton("forward","Forward").click(function(){t.ffwd()});r.push(f)}if(t.config.captions){var l=t.createButton("captions","Captions").click(function(){t.toggleCaptions()}),c=t.config.captionsOn==1?"captions-on":"captions-off";l.addClass(c),r.push(l)}var h;for(h=0;h<r.length;h+=1)n[0].appendChild(r[h][0]);return n},getVolControls:function(){var t=this,n=e("<div>").addClass("volume-controls"),r=t.createButton("mute","Mute").click(function(){t.mute()}),i=t.createButton("vol-up",'+<span class="ui-helper-hidden-accessible"> Volume Up</span>').click(function(){t.volup()}),s=t.createButton("vol-down",'-<span class="ui-helper-hidden-accessible"> Volume Down</span>').click(function(){t.voldwn()}),o=e("<span />").attr({id:"vol-"+t.config.id,"class":"vol-display"}).text("100%"),u=[r,s,i,o],f;for(f=0;f<u.length;f+=1)n[0].appendChild(u[f][0]);return n},getSliderBar:function(){var t=e("<span />").addClass("ui-helper-hidden-accessible").html("<p>The timeline slider below uses WAI ARIA. Please use the documentation for your screen reader to find out more.</p>"),n=e("<span />").addClass("current-time").attr({id:"current-"+this.config.id}).text("00:00:00"),r=this.getSlider(),i=e("<span />").addClass("duration-time").attr({id:"duration-"+this.config.id}).text("00:00:00"),s=e("<div />").addClass("timer-bar").append(t),o=[n,r,i],u;for(u=0;u<o.length;u+=1)s[0].appendChild(o[u][0]);return s},getSlider:function(){var t=this,n=e("<span />").attr("id","slider-"+this.config.id).slider({orientation:"horizontal",change:function(e,n){var r=n.value,i=r/100*t.getDuration();t.seek(i)}});n.find("a.ui-slider-handle").attr({role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0","aria-valuetext":"0 percent",title:"Slider Control"});var r=e("<span />").addClass("progress-bar").attr({id:"progress-bar-"+this.config.id,tabindex:"-1"}).addClass("ui-progressbar-value ui-widget-header ui-corner-left").css({width:"0%",height:"95%"}),i=e("<span />").attr({id:"loaded-bar-"+this.config.id,tabindex:"-1"}).addClass("loaded-bar ui-progressbar-value ui-widget-header ui-corner-left").css({height:"95%",width:"0%"});return n.append(r,i)},setSliderTimeout:function(){var e=this;e.sliderInterval==undefined&&(e.sliderInterval=setInterval(function(){e.updateSlider()},e.config.sliderTimeout))},clearSliderTimeout:function(){var e=this;e.sliderInterval!=undefined&&(e.sliderInterval=clearInterval(e.sliderInterval))},updateSlider:function(){var t=typeof this.duration!="undefined"?this.duration:this.getDuration(),n=typeof this.duration_found=="boolean"?this.duration_found:!1,r=this.getCurrentTime(),i=0;t>0?(i=r/t*100,i=parseInt(i,10)):t=0,n||(e("#duration-"+this.config.id).html(this.formatTime(parseInt(t,10))),this.duration_found=!0),e("#slider-"+this.config.id).find("a.ui-slider-handle").attr({"aria-valuenow":i,"aria-valuetext":i.toString()+" percent"}).css("left",i.toString()+"%"),e("#progress-bar-"+this.config.id).attr({"aria-valuenow":i,"aria-valuetext":i.toString()+" percent"}).css("width",i.toString()+"%"),this.updateLoaderBar(),this.updateTime(r)},updateLoaderBar:function(){var t=this.getBytesLoaded()/this.getBytesTotal()*100;t=parseInt(t,10),isFinite(t)||(t=0),e("#loaded-bar-"+this.config.id).attr({"aria-valuetext":t.toString()+" percent","aria-valuenow":t}).css("width",t.toString()+"%")},formatTime:function(e){var t=0,n=0,r=0;e>=60?(n=parseInt(e/60,10),r=e-n*60,n>=60&&(t=parseInt(n/60,10),n-=parseInt(t*60,10))):r=e;var i=[t,n,r],s;for(s=0;s<i.length;s+=1)i[s]=i[s]<10?"0"+i[s].toString():i[s].toString();return i.join(":")},updateTime:function(e){var t=this.formatTime(parseInt(e,10));this.$html.find("#current-"+this.config.id).html(t)},getControls:function(){var t=e("<span />").addClass("ui-corner-bottom").addClass("control-bar"),n=e("<a />").attr("href","http://www.nomensa.com?ref=logo").html("Accessible Media Player by Nomensa").addClass("logo");t.append(n);var r=this.getFuncControls(),i=this.getVolControls(),s=this.getSliderBar(),o=[r,i,s],u;for(u=0;u<o.length;u+=1)t[0].appendChild(o[u][0]);return t},assembleHTML:function(){var e=this.generatePlayerContainer(),t=this.generateFlashPlayer(e),n=t.append(this.getControls());return n},assembleHTML5:function(e,t){var n=this.generatePlayerContainer(),r=this.generateHTML5Player(n,e,t),i=r.append(this.getControls());return i},updateVolume:function(t){e("#vol-"+this.config.id).text(t.toString()+"%");var n=this.$html.find("button.mute");t==0?n.addClass("muted"):n.hasClass("muted")&&n.removeClass("muted")},getCaptions:function(){var t=this;if(t.config.captions){var n=[];e.ajax({url:t.config.captions,success:function(n){e(n).find("p").length>0&&(t.captions=e(n).find("p"))}})}},syncCaptions:function(){var e;if(this.captions){var t=this.getCurrentTime();t=this.formatTime(parseInt(t,10)),e=this.captions.filter('[begin="'+t+'"]'),e.length==1&&this.insertCaption(e)}},insertCaption:function(t){if(this.$html.find(".caption").length==1)this.$html.find(".caption").text(t.text());else{var n=e("<div>").text(t.text());n[0].className="caption",this.$html.find(".video").prepend(n)}},getPreviousCaption:function(e){var t;e==undefined&&(e=this.getCurrentTime());var n=this.formatTime(parseInt(e,10));if(this.captions){t=this.captions.filter('[begin="'+n+'"]');while(t.length!=1&&e>0)e--,n=this.formatTime(parseInt(e,10)),t=this.captions.filter('[begin="'+n+'"]');t.length==1&&this.insertCaption(t)}},destroyPlayerInstance:function(){return!1},destroy:function(){this.clearSliderTimeout(),this.clearCaptionTimeout(),this.destroyPlayerInstance(),this.$html.remove()},setCaptionTimeout:function(){var e=this;e.captionInterval==undefined&&(e.captionInterval=setInterval(function(){e.syncCaptions()},500))},clearCaptionTimeout:function(){this.captionInterval!=undefined&&(this.captionInterval=clearInterval(this.captionInterval))},play:function(){this.player.playVideo(),this.setSliderTimeout(),this.config.captionsOn&&this.captions&&this.setCaptionTimeout()},pause:function(){this.player.pauseVideo(),this.clearSliderTimeout(),this.config.captionsOn&&this.captions&&this.clearCaptionTimeout()},ffwd:function(){var e=this.getCurrentTime()+this.config.playerSkip;this.seek(e)},rewd:function(){var e=this.getCurrentTime()-this.config.playerSkip;e<0&&(e=0),this.seek(e)},mute:function(){var e=this.$html.find("button.mute");this.player.isMuted()?(this.player.unMute(),e.hasClass("muted")&&e.removeClass("muted")):(this.player.mute(),e.addClass("muted"))},volup:function(){var e=this.player.getVolume();e<100-this.config.volumeStep?e+=this.config.volumeStep:e=100,this.player.setVolume(e),this.updateVolume(e)},voldwn:function(){var e=this.player.getVolume();e>this.config.volumeStep?e-=this.config.volumeStep:e=0,this.player.setVolume(e),this.updateVolume(e)},getDuration:function(){return this.player.getDuration()},getCurrentTime:function(){return this.player.getCurrentTime()},getBytesLoaded:function(){return this.player.getVideoBytesLoaded()},getBytesTotal:function(){return this.player.getVideoBytesTotal()},seek:function(e){this.player.seekTo(e),this.config.captionsOn&&this.captions&&(this.$html.find(".caption").remove(),this.clearCaptionTimeout(),this.setCaptionTimeout(),this.getPreviousCaption())},cue:function(){this.player.cueVideoById(this.config.media)},toggleCaptions:function(){var e=this,t=this.$html.find(".captions");t.hasClass("captions-off")?(t.removeClass("captions-off").addClass("captions-on"),e.getPreviousCaption(),e.setCaptionTimeout(),e.config.captionsOn=!0):(t.removeClass("captions-on").addClass("captions-off"),e.clearCaptionTimeout(),e.$html.find(".caption").remove(),e.config.captionsOn=!1)}};return this.each(function(t){var n=e(this),r,s,o=function(e){e.$html.width()>580&&e.$html.addClass("player-wide"),e.is_html5&&(e.player=document.getElementById(e.config.id))};i.url.match(/^(http|https)\:\/\/www\.youtube\.com/)?(r=new window.NOMENSA.player.YoutubePlayer(i),s=new window.NOMENSA.player.MediaplayerDecorator(r),s.onPlayerReady(function(){o(s),this.getPlayer().setLoop(!0)}),s.init(n)):(s=new c(t),n.html(s.$html),o(s),window.NOMENSA.player.PlayerDaemon.addPlayer(s))})}})(jQuery),function(e){var t=e.suchi=e.suchi||{};t.laggards={IE9:/^Mozilla\/5\.0 \(compatible; MSIE 9\.0; Windows NT \d\.\d(.*)\)$/g,IE8:/^Mozilla\/4\.0 \(compatible; MSIE 8\.0; Windows NT \d\.\d(.*)\)$/g,IE7:/^Mozilla\/4\.0 \(compatible; MSIE 7\.0; Windows NT \d\.\d(.*)\)$/g,IE6:/^Mozilla\/4\.0 \(compatible; MSIE 6\.0; Windows NT \d\.\d(.*)\)$/g,FF36:/^Mozilla\/5\.0 \((Windows|Macintosh); U;(.*)rv\:1\.9\.2.(\d{1,2})\)( Gecko\/(\d{8}))? Firefox\/3\.6(\.\d{1,2})?( \(.+\))?$/g,CR_recent:/^Mozilla\/5\.0 \((Windows NT|Macintosh)(;)?( .*)\) AppleWebKit\/53\d\.\d{1,2} \(KHTML, like Gecko\) Chrome\/(16|17|18|19|20|21|22|23)\.0\.\d{3,4}\.\d{1,2} Safari\/53\d\.\d{1,2}$/g,FF_recent:/^Mozilla\/5\.0 \((Windows NT \d\.\d|Macintosh); (.*)rv\:(9|10|11|12|13|14|15|16)\.0(\.\d{1,2})?\) Gecko\/\d{8} Firefox\/(9|10|11|12|13|14|15|16)\.0(\.\d{1,2})?$/g,SAF51:/^Mozilla\/5\.0 \((Windows NT \d\.\d|Macintosh)(.*)\) AppleWebKit\/534\.\d{2}(\.\d{1,2})? \(KHTML, like Gecko\) Version\/5\.1\.\d Safari\/534\.\d{2}(\.\d{1,2})?$/g},t.isOld=function(e){if(typeof e!="string")return!1;for(var t in this.laggards)if(e.match(this.laggards[t]))return!0;return!1}}(this),function(){"use strict";var e=this,t=e.jQuery;typeof e.GOVUK=="undefined"&&(e.GOVUK={});var n={_pollingId:null,_isPolling:!1,_hasScrollEvt:!1,_els:[],addEl:function(r,i){var s;if(!r.length)return;s=parseInt(r.css("top"),10),s=isNaN(s)?0:s,n.updateFooterTop(),t(e).on("govuk.pageSizeChanged",n.updateFooterTop);var o=t("<div></div>");o.insertBefore(r);var u=o.offset().top-o.position().top;o.remove();var a={$fixedEl:r,height:i+s,fixedTop:i+u,state:"fixed"};n._els.push(a),n.initTimeout()},updateFooterTop:function(){var e=t(".js-footer:eq(0)");if(e.length===0)return 0;n.footerTop=e.offset().top-10},initTimeout:function(){n._hasScrollEvt===!1&&(t(window).scroll(n.onScroll),n._hasScrollEvt=!0)},onScroll:function(){n._isPolling===!1&&n.startPolling()},startPolling:function(){return window.requestAnimationFrame?function(){var e=function(){n.checkScroll(),n._isPolling===!0&&n.startPolling()};n._pollingId=window.requestAnimationFrame(e),n._isPolling=!0}:function(){n._pollingId=window.setInterval(n.checkScroll,16),n._isPolling=!0}}(),stopPolling
  :function(){return window.requestAnimationFrame?function(){window.cancelAnimationFrame(n._pollingId),n._isPolling=!1}:function(){window.clearInterval(n._pollingId),n._isPolling=!1}}(),checkScroll:function(){var e=t(window).scrollTop();if(e<n.cachedScrollTop+2&&e>n.cachedScrollTop-2){n.stopPolling();return}n.cachedScrollTop=e,t.each(n._els,function(t,r){var i=e+r.height;i>n.footerTop?n.stick(r):n.unstick(r)})},stick:function(e){e.state==="fixed"&&e.$fixedEl.css("position")==="fixed"&&(e.$fixedEl.css({position:"absolute",top:n.footerTop-e.fixedTop}),e.state="absolute")},unstick:function(e){e.state==="absolute"&&(e.$fixedEl.css({position:"",top:""}),e.state="fixed")}};e.GOVUK.stopScrollingAtFooter=n,t(e).load(function(){t(e).trigger("govuk.pageSizeChanged")})}.call(this),function(){"use strict";var e=this,t=e.jQuery;typeof e.GOVUK=="undefined"&&(e.GOVUK={});var n={cookieNameTakenSurvey:"govuk_takenUserSatisfactionSurvey",setCookieTakenSurvey:function(){setCookie(n.cookieNameTakenSurvey,!0,120),t("#user-satisfaction-survey").removeClass("visible")},appendCurrentPathToSurveyUrl:function(){var t=document.getElementById("take-survey"),n=t.getAttribute("href")+"?c="+e.location.pathname;t.setAttribute("href",n)},setEventHandlers:function(){var e=t("#survey-no-thanks"),r=t("#take-survey");e.click(function(e){return n.setCookieTakenSurvey(),e.stopPropagation(),!1}),r.click(n.setCookieTakenSurvey)},showSurveyBar:function(){if(getCookie(n.cookieNameTakenSurvey)==="true"||n.otherNotificationVisible())return;n.setEventHandlers(),n.appendCurrentPathToSurveyUrl(),t("#user-satisfaction-survey").addClass("visible")},otherNotificationVisible:function(){return t("#banner-notification:visible, #global-cookie-message:visible, #global-browser-prompt:visible").length>0},randomlyShowSurveyBar:function(){if(t("#user-satisfaction-survey").length<=0)return;Math.floor(Math.random()*50)===0&&n.showSurveyBar()}};e.GOVUK.userSatisfaction=n}.call(this),$(function(){typeof window.GOVUK=="undefined"&&(window.GOVUK={}),GOVUK.addCookieMessage=function(){function s(){var e=i?"related-"+i:"related";r&&(e+="-with-cookie"),n.length&&e!=="related"&&n.addClass(e)}var e,t=$("#global-cookie-message"),n=$("#wrapper .related-positioning"),r=t.length&&getCookie("seen_cookie_message")===null,i=$(".beta-notice").length?"beta":null;s,r&&(n.length&&typeof GOVUK.stopScrollingAtFooter!="undefined"&&GOVUK.stopScrollingAtFooter.updateFooterTop(),t.show(),setCookie("seen_cookie_message","yes",28)),s()}});var Alphagov={daysInMsec:function(e){return e*24*60*60*1e3},cookie_domain:function(){var e=document.location.host.split(":")[0].split(".").slice(-3);return"."+e.join(".")},read_cookie:function(e){var t=null;if(document.cookie&&document.cookie!==""){var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=jQuery.trim(n[r]);if(i.substring(0,e.length+1)==e+"="){t=decodeURIComponent(i.substring(e.length+1));break}}}return t},delete_cookie:function(e){if(document.cookie&&document.cookie!==""){var t=new Date;t.setTime(t.getTime()-Alphagov.daysInMsec(1)),document.cookie=e+"=; expires="+t.toGMTString()+"; domain="+Alphagov.cookie_domain()+"; path=/"}},write_cookie:function(e,t){var n=new Date;n.setTime(n.getTime()+Alphagov.daysInMsec(120)),document.cookie=e+"="+encodeURIComponent(t)+"; expires="+n.toGMTString()+"; domain="+Alphagov.cookie_domain()+"; path=/"}};$(document).ready(function(){$(".print-link a").attr("target","_blank"),$(".js-header-toggle").on("click",function(e){e.preventDefault(),$($(e.target).attr("href")).toggleClass("js-visible"),$(this).toggleClass("js-hidden")});var e=$(".js-search-focus");e.each(function(e,t){$(t).val()!==""&&$(t).addClass("focus")}),e.on("focus",function(e){$(e.target).addClass("focus")}),e.on("blur",function(e){$(e.target).val()===""&&$(e.target).removeClass("focus")}),$("nav").delegate("a","click",function(){var e,t=$(this).attr("href");t.charAt(0)==="#"?e=t:t.indexOf("#")>0&&(e="#"+t.split("#")[1]),$(e).length==1&&$("html, body").animate({scrollTop:$(e).offset().top-$("#global-header").height()},10)}),$.browser.msie&&$.browser.version<8&&($(".button").not("a").on("click focus",function(e){$(this).addClass("button-active")}).on("blur",function(e){$(this).removeClass("button-active")}),$(".button").on("mouseover",function(e){$(this).addClass("button-hover")}).on("mouseout",function(e){$(this).removeClass("button-hover")})),function(){var e=window.navigator.userAgent.match(/(\(Windows[\s\w\.]+\))[\/\(\s\w\.\,\)]+(Version\/[\d\.]+)\s(Safari\/[\d\.]+)/)!==null,t;e&&(t=$("<style type='text/css' media='print'>@font-face {font-family: nta !important;src: local('Arial') !important;}</style>"),document.getElementsByTagName("head")[0].appendChild(t[0]))}();if(window.GOVUK){GOVUK.addCookieMessage&&GOVUK.addCookieMessage();if(GOVUK.userSatisfaction){var t=window.location.pathname;function n(e,t){return e.indexOf(t)>-1}!n(t,"/done")&&!n(t,"/transaction-finished")&&!n(t,"/driving-transaction-finished")&&GOVUK.userSatisfaction.randomlyShowSurveyBar()}}});var ReportAProblem={showErrorMessage:function(e){var t="<h2>Sorry, we're unable to receive your message right now.</h2> <p>We have other ways for you to provide feedback on the <a href='/feedback'>support page</a>.</p>";$(".report-a-problem-container").html(t)},promptUserToEnterValidData:function(){ReportAProblem.enableSubmitButton(),$('<p class="error-notification">Please enter details of what you were doing.</p>').insertAfter(".report-a-problem-container h2")},disableSubmitButton:function(){$(".report-a-problem-container .button").attr("disabled",!0)},enableSubmitButton:function(){$(".report-a-problem-container .button").attr("disabled",!1)},showConfirmation:function(e){$(".report-a-problem-container").html(e.message)},submit:function(){return $(".report-a-problem-container .error-notification").remove(),ReportAProblem.disableSubmitButton(),$.ajax({type:"POST",url:"/feedback",dataType:"json",data:$(".report-a-problem-container form").serialize(),success:ReportAProblem.showConfirmation,error:function(e,t){if(t==="error"||!e.responseText)e.status==422?ReportAProblem.promptUserToEnterValidData():ReportAProblem.showErrorMessage()},statusCode:{500:ReportAProblem.showErrorMessage}}),!1}};$(document).ready(function(){$(".report-a-problem-toggle a").on("click",function(){return $(".report-a-problem-container").toggle(),!1});var e=$(".report-a-problem-container form, .report-a-problem form");e.append('<input type="hidden" name="javascript_enabled" value="true"/>'),e.append($('<input type="hidden" name="referrer">').val(document.referrer||"unknown")),$(".report-a-problem-container form").submit(ReportAProblem.submit)});var BetaPopup={maskOpacity:.6,popup:function(e,t,n){$("body").append("<div id='mask' class='popover-mask'></div>").append("<div id='popup' class="+t+"></div>");var n=n||"#header-global h1 a",r=$("#popup"),i=$(window),s=$("#mask"),o=i.height(),u=i.width();r.append(e),s.fadeTo("fast",this.maskOpacity).height(o).width(u),r.delay(100).fadeIn("fast",function(){r.find("h2").attr("tabindex",-1).focus()}).on("keydown",function(e){e.which==27&&closePopup()}).on("click",".close",function(){return closePopup(),!1}),closePopup=function(){r.fadeOut(400,function(){s.slideUp("fast",function(){$(this).remove(),r.remove()})}),$(n).focus()}}},AlphaGeo={location:!1,full_location:!1,initialize:function(){var e=AlphaGeo.read_and_parse_json_cookie("govukgeo");e.current_location&&(AlphaGeo.location={lat:e.current_location.lat,lon:e.current_location.lon},AlphaGeo.full_location=e),AlphaGeo.location&&(AlphaGeo.full_location?$(AlphaGeo).trigger("location-completed",AlphaGeo.full_location):AlphaGeo.lookup_full_location(function(){$(AlphaGeo).trigger("location-completed",AlphaGeo.full_location)})),$(AlphaGeo).bind("location-completed",function(e,t){AlphaGeo.save_location_to_cookie(t)})},read_and_parse_json_cookie:function(e){var t=Alphagov.read_cookie(e);if(t){var n=$.base64Decode(t),r=jQuery.parseJSON(n);return r}return!1},lookup_full_location:function(e){$.ajax({url:"/locator.json",dataType:"json",data:AlphaGeo.location,type:"POST",success:function(t){if(t.location_error||t.current_location.locality===!1)return $(AlphaGeo).trigger("location-failed"),!1;AlphaGeo.full_location=t,e()}})},locate:function(e){AlphaGeo.location={postcode:e},AlphaGeo.lookup_full_location(function(){$(AlphaGeo).trigger("location-completed",AlphaGeo.full_location)})},notify:function(){AlphaGeo.full_location&&$(AlphaGeo).trigger("location-completed",AlphaGeo.full_location)},geolocate:function(){navigator.geolocation?($(AlphaGeo).trigger("geolocation-started"),AlphaGeo.browser_geolocate(),$(AlphaGeo).bind("geolocation-completed",function(e,t){AlphaGeo.location=t,AlphaGeo.lookup_full_location(function(){$(AlphaGeo).trigger("location-completed",AlphaGeo.full_location)})})):$(AlphaGeo).trigger("geolocation-failed")},browser_geolocate:function(){navigator.geolocation.getCurrentPosition(function(e){coordinates={lat:e.coords.latitude,lon:e.coords.longitude},$(AlphaGeo).trigger("geolocation-completed",coordinates)},function(){$(AlphaGeo).trigger("geolocation-failed")})},save_location_to_cookie:function(){var e=$.base64Encode(JSON.stringify(AlphaGeo.full_location));Alphagov.write_cookie("govukgeo",e)},remove:function(){Alphagov.delete_cookie("govukgeo"),AlphaGeo.location=!1,AlphaGeo.full_location=!1,$(AlphaGeo).trigger("location-removed")}},AlphaGeoForm=function(e){function o(){var e=navigator.userAgent,t=e.match(/Windows/)!==null,n=e.match(/Safari/),r;return!t||!n?!0:(r=e.match(/Version\/([\d\.]+)/),r===null?!0:(r=parseFloat(r[1]),r>=5&&r<=5.1?!1:!0))}function u(e){$(s).each(function(e,t){t.hide().css("visibility","hidden")}),e.show().css("visibility","visible")}function a(){$('<p class="cookie-container"><span class="sets-cookie"><a href="/help/cookies/#locationcookies" title="This form sets a location cookie">Sets a cookie</a></span></p>').appendTo(n)}var t=$(e),n=t.find(".ask_location"),r=t.find(".finding_location"),i=t.find(".found_location"),s=[n,r,i];t.find(".location_error").addClass("hidden").text(""),AlphaGeo.full_location?(i.find("strong, a span.friendly-name").text(AlphaGeo.full_location.current_location.locality),u(i)):u(n),navigator.geolocation&&o()?($('<p class="geolocate-me">or <a href="#">locate me automatically</a></p>').appendTo(n),a(),$(".geolocate-me a").live("click",function(e){e.preventDefault(),AlphaGeo.geolocate()}),$(AlphaGeo).bind("geolocation-started",function(){t.find(".location_error").addClass("hidden").text(""),u(r)}),$(AlphaGeo).bind("geolocation-failed",function(){u(n)})):a(),$("a.change-location").live("click",function(e){e.preventDefault(),AlphaGeo.remove()}),$(AlphaGeo).bind("location-completed",function(e,r){t.find(".location_error").addClass("hidden").text(""),i.find("strong, a span.friendly-name").text(r.current_location.locality),n.find("input[type=submit]").removeAttr("disabled"),u(i)}),$(AlphaGeo).bind("location-failed",function(e,r){t.find(".location_error").text("Please enter a valid postcode.").removeClass("hidden"),n.find("input[type=submit]").removeAttr("disabled"),u(n)}),$(AlphaGeo).bind("location-removed",function(e,t){i.find("strong, a span.friendly-name").text(""),n.find("input.postcode").val(""),u(n)}),t.live("submit",function(e){e.preventDefault(),t.find("input[type=submit]").attr("disabled","disabled"),AlphaGeo.locate(t.find("input.postcode").val())})};$(document).ready(function(){AlphaGeo.initialize()}),jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyIframeSrc:undefined,historyNeedIframe:jQuery.browser.msie&&(jQuery.browser.version<8||document.documentMode<8),historyInit:function(e,t){jQuery.historyCallback=e,t&&(jQuery.historyIframeSrc=t);var n=location.hash.replace(/\?.*$/,"");jQuery.historyCurrentHash=n;if(jQuery.historyNeedIframe){jQuery.historyCurrentHash==""&&(jQuery.historyCurrentHash="#"),jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;" src="javascript:false;"></iframe>');var r=jQuery("#jQuery_history")[0],i=r.contentWindow.document;i.open(),i.close(),i.location.hash=n}else jQuery.browser.safari&&(jQuery.historyBackStack=[],jQuery.historyBackStack.length=history.length,jQuery.historyForwardStack=[],jQuery.lastHistoryLength=history.length,jQuery.isFirst=!0);n&&jQuery.historyCallback(n.replace(/^#/,"")),setInterval(jQuery.historyCheck,100)},historyAddHistory:function(e){jQuery.historyBackStack.push(e),jQuery.historyForwardStack.length=0,this.isFirst=!0},historyCheck:function(){if(jQuery.historyNeedIframe){var e=jQuery("#jQuery_history")[0],t=e.contentDocument||e.contentWindow.document,n=t.location.hash.replace(/\?.*$/,"");n!=jQuery.historyCurrentHash&&(location.hash=n,jQuery.historyCurrentHash=n,jQuery.historyCallback(n.replace(/^#/,"")))}else if(jQuery.browser.safari){jQuery.lastHistoryLength==history.length&&jQuery.historyBackStack.length>jQuery.lastHistoryLength&&jQuery.historyBackStack.shift();if(!jQuery.dontCheck){var r=history.length-jQuery.historyBackStack.length;jQuery.lastHistoryLength=history.length;if(r){jQuery.isFirst=!1;if(r<0)for(var i=0;i<Math.abs(r);i++)jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());else for(var i=0;i<r;i++)jQuery.historyBackStack.push(jQuery.historyForwardStack.shift());var s=jQuery.historyBackStack[jQuery.historyBackStack.length-1];s!=undefined&&(jQuery.historyCurrentHash=location.hash.replace(/\?.*$/,""),jQuery.historyCallback(s))}else if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(location.hash){var n=location.hash;jQuery.historyCallback(location.hash.replace(/^#/,""))}else{var n="";jQuery.historyCallback("")}jQuery.isFirst=!0}}}else{var n=location.hash.replace(/\?.*$/,"");n!=jQuery.historyCurrentHash&&(jQuery.historyCurrentHash=n,jQuery.historyCallback(n.replace(/^#/,"")))}},historyLoad:function(e){var t;e=decodeURIComponent(e.replace(/\?.*$/,"")),jQuery.browser.safari?t=e:(t="#"+e,location.hash=t),jQuery.historyCurrentHash=t;if(jQuery.historyNeedIframe){var n=jQuery("#jQuery_history")[0],r=n.contentWindow.document;r.open(),r.close(),r.location.hash=t,jQuery.lastHistoryLength=history.length,jQuery.historyCallback(e)}else if(jQuery.browser.safari){jQuery.dontCheck=!0,this.historyAddHistory(e);var i=function(){jQuery.dontCheck=!1};window.setTimeout(i,200),jQuery.historyCallback(e),location.hash=t}else jQuery.historyCallback(e)}}),jQuery.fn.tabs=function(e){var t=$.extend({trackState:!0,srcPath:"jQuery.history.blank.html",autoRotate:!1,alwaysScrollToTop:!0,selected:null,wrapperTag:"section",defaultTab:null,containerTag:"div",scrollOnload:!1},e),n="tabset",r=function(e){var r=n,i=e.closest(t.containerTag);return i.hasClass("programme-progression")?e.closest(t.containerTag).css("float")==="none"&&(r="accordion"):e.find("li").css("float")==="none"&&(r="accordion"),r==="accordion"?t.defaultTab===null&&(t.defaultTab=-1):t.defaultTab===null&&(t.defaultTab=0),r},i=function(e,t){return n==="accordion"?e.find("header.js-heading-tab"):t.find("li")},s=function(e,n,r){var i=n.find("li"),s=n.closest(t.containerTag).parent(),u,a,f;$.each(i,function(e){var n=$(this).find("a"),r=n.attr("href").split("#")[1],i=$('<a href="#'+r+'" class="tab-shiftlink">Return to top of section ↑</a>');u=s.find("#"+r),a=u.find("header"),a.length?a=a.remove():a=$("<header><h1 /></header>"),a.addClass("js-heading-tab").removeClass("visuallyhidden"),a.children().html("").append(n),f=u.find(".inner"),f.length?f.addClass("js-tab-pane"):f=$('<div class="inner js-tab-pane" />').html(u.html()),f.attr("id",r),u.replaceWith($("<"+t.wrapperTag+" />").append(f)),u=f.parent(),u.prepend(a).attr("id",r),u.addClass("js-tab-container"),f.append(i)}),n.closest(t.containerTag).remove()};return $(this).each(function(){function h(r,i){if(t.trackState&&!i){var s=r.attr("href").split("#")[1];$.historyLoad(s)}else{c.find("a").attr("aria-selected",!1).attr("tabindex",-1),n==="accordion"?c.find("a").closest(".js-heading-tab").removeClass("active"):c.find("a").parent().filter(".active").removeClass("active"),r.attr("aria-selected",!0).attr("tabindex",0),n==="accordion"?r.closest(".js-heading-tab").addClass("active"):r.parent().addClass("active"),a.find(".tabs-panel-selected").attr("aria-hidden",!0).attr("aria-expanded",!1).removeClass("tabs-panel-selected").hide();var s=r.attr("href").split("#")[1];$("#"+s+l).addClass("tabs-panel-selected").attr("aria-hidden",!1).attr("aria-expanded",!0).show(),t.selected=c.find("a").index(r),e.trigger("tabChanged",s)}}function p(e){c.find("a").attr("aria-selected",!1).attr("tabindex",-1),c.find("a").closest(".js-heading-tab").removeClass("active"),a.find(".tabs-panel-selected").attr("aria-hidden",!0).attr("aria-expanded",!1).removeClass("tabs-panel-selected").hide()}function d(e,n){var r=e||window.location.hash;r.indexOf("#")==0&&(r=r.split("#")[1]);var i=c.find("a[href$=#"+r+"]");return i.size()>0?(h(i,!0),t.scrollOnload&&n&&window.setTimeout(function(){$(document).scrollTop(i.offset().top)},0)):t.defaultTab>-1&&h(c.find("a").eq(t.defaultTab),!0),!!i.size()}var e=$(this),u=e.find(".js-tabs ul, .js-tabs ol");if(u.length===0)return e;var a=$(".js-tab-content"),f="tab-",l="-enhanced";a.addClass("tabs-body").attr("aria-live","polite"),n=r(u),n==="accordion"?s(e,u):u.addClass("tabs-nav").attr("role","tablist"),a.find(".js-tab-pane").each(function(){$(this).addClass("tabs-panel").attr("role","tabpanel").attr("aria-hidden",!0).attr("aria-expanded",!1).attr("aria-labelledby",f+$(this).attr("id")).attr("id",$(this).attr("id")+l).hide()});var c=i(a,u);c.find("a").each(function(e){var t=$(this).attr("href").split("#")[1];$(this).attr("role","tab").attr("id",f+t).attr("aria-controls",t).attr("aria-flowto",t)}),e.on("keydown",function(e){if(e.keyCode<$.ui.keyCode.PAGE_UP||e.keyCode>$.ui.keyCode.DOWN)return;var n,r;switch(e.keyCode){case $.ui.keyCode.RIGHT:e.preventDefault(),n=t.selected+1;break;case $.ui.keyCode.DOWN:n=t.selected+1;break;case $.ui.keyCode.UP:n=t.selected-1;break;case $.ui.keyCode.LEFT:n=t.selected-1;break;case $.ui.keyCode.END:n=c.length-1;break;case $.ui.keyCode.HOME:n=0;break;case $.ui.keyCode.PAGE_UP:if(!e.ctrlKey)return;n=t.selected+1;break;case $.ui.keyCode.PAGE_DOWN:if(!e.ctrlKey)return;n=t.selected+1;if(!e.ctrlKey)return;n=t.selected-1}return e.preventDefault(),e.stopPropagation(),n!==undefined&&(n=n>=c.length?0:n<0?c.length-1:n,r=c.find("a").eq(n),r.focus(),t.selected=n),!1}),e.bind("click keydown focus",function(){t.autoRotate&&clearInterval(tabRotator)}),t.trackState&&$.historyInit(d,t.srcPath),d(null,!0),c.on("click","a",function(){return $(this).closest(".js-heading-tab").hasClass("active")?p($(this)):h($(this)),$(this).focus(),!1}),t.alwaysScrollToTop&&$(window)[0].scrollTo(0,0),typeof GOVUK.stopScrollingAtFooter!="undefined"&&GOVUK.stopScrollingAtFooter.updateFooterTop()})},$(function(){var e=e||{},t=function(){this.$navbar=$("div.article-container aside nav.page-navigation"),this.$navlist=this.$navbar.find("ol"),this.$showAllLink=$('<a href="#" class="show-all-parts">Show all parts of this guide</a>'),this.$pageHeader=$(".multi-page article header h1 span"),this.init()};t.prototype={init:function(){if(this.$navbar.closest("aside").css("float")!=="none")return;this.setup()},control:function(e){var t=$(e.target),n=this;return t.hasClass("show-all-parts-open")?(t.removeClass("show-all-parts-open"),t.text(t.text().replace(/Hide/,"Show")),n.$navbar.removeClass("page-navigation-open"),n.$navbar.addClass("page-navigation-closed")):(t.addClass("show-all-parts-open"),t.text(t.text().replace(/Show/,"Hide")),n.$navbar.removeClass("page-navigation-closed"),n.$navbar.addClass("page-navigation-open")),!1},setup:function(){var e=this,t=this.$navlist.find("li").length,n=this.$navlist.find("li.active").index()+1;this.$showAllLink.insertBefore(this.$navbar),this.$navbar.prepend(this.$navbar.find("ol").remove()),this.$pageHeader.length&&this.$pageHeader.html(this.$pageHeader.html().replace(/Part\s(\d+)/,"Part $1 of "+this.$navlist.find("li").length)),this.$showAllLink.on("click",function(t){return e.control(t),!1}),this.$navbar.addClass("page-navigation-closed")}},e.guideTabs=new t}),$(function(){"use strict";function e(){var e=$('<div id="global-browser-prompt"></div>'),t=$("<p>For a safer, faster, better experience online you should upgrade your browser.</p>"),n=$('<a href="https://gov.uk/support/browsers">Find out more about browsers</a>'),r=$('<a href="#" class="dismiss" title="Dismiss this message">Close</a>');return e.append(t.append(n,r))}if(getCookie("seen_cookie_message")){if(suchi.isOld(navigator.userAgent)&&getCookie("govuk_not_first_visit")!==null&&getCookie("govuk_browser_upgrade_dismissed")===null){var t=e();$("#global-cookie-message").after(t),t.show(),t.on("click",".dismiss",function(e){t.hide(),setCookie("govuk_browser_upgrade_dismissed","yes",14)})}setCookie("govuk_not_first_visit","yes",28)}});var GOVUK=GOVUK||{};GOVUK.Analytics=GOVUK.Analytics||{},GOVUK.Analytics.internalSiteEvents=function(){var e="GDS_successEvents",t=[],n=function(){var n=Alphagov.read_cookie(e);n?n=jQuery.parseJSON(jQuery.base64Decode(n)):n=[],t=n},r=function(){n(),$(t).each(function(){GOVUK.sendToAnalytics(this)}),t=[],Alphagov.delete_cookie(e)},i=function(n){t.push(n),Alphagov.write_cookie(e,jQuery.base64Encode(JSON.stringify(t)))};return{push:i,sendAll:r}}(),GOVUK.Analytics.entryTokens=function(){var e="GDS_analyticsTokens",t=function(e,t){return $.inArray(e,t)!==-1},n=function(){return GOVUK.Analytics.getSlug(document.URL,GOVUK.Analytics.Trackers[GOVUK.Analytics.Format].slugLocation)},r=function(){var r=JSON.parse(Alphagov.read_cookie(e));r||(r=[]),t(n(),r)||(r.push(n()),Alphagov.write_cookie(e,JSON.stringify(r)))},i=function(){var t=JSON.parse(Alphagov.read_cookie(e)),r=$.inArray(n(),t);r!==-1&&(t.splice(r,1),Alphagov.write_cookie(e,JSON.stringify(t)))},s=function(){var r=JSON.parse(Alphagov.read_cookie(e));return t(n(),r)};return{assignToken:r,revokeToken:i,tokenExists:s}}();var GOVUK=GOVUK||{};GOVUK.Analytics=GOVUK.Analytics||{},GOVUK.Analytics.Trackers={},GOVUK.Analytics.trackingPrefixes={MAINSTREAM:"MS_",INSIDE_GOV:"IG_"},GOVUK.Analytics.Tracker=function(e,t,n){var r=n;return r.prefix=e,r.slugLocation=t,r},GOVUK.Analytics.Trackers.guide=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.MAINSTREAM,0,function(e){e.trackTimeBasedSuccess(7e3),e.trackInternalLinks($("#content a"))}),GOVUK.Analytics.Trackers.transaction=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.MAINSTREAM,0,function(e){e.trackInternalLinks($("#content a")),e.trackLinks($("#get-started a"))}),GOVUK.Analytics.Trackers.programme=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.MAINSTREAM,0,function(e){e.trackTimeBasedSuccess(7e3),e.trackInternalLinks($("#content a"))}),GOVUK.Analytics.Trackers.answer=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.MAINSTREAM,0,function(e){e.trackTimeBasedSuccess(7e3),e.trackInternalLinks($("#content a"))}),GOVUK.Analytics.Trackers.smart_answer=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.MAINSTREAM,0,function(e){GOVUK.Analytics.Trackers.smart_answer.isAjaxNavigation()?$(document).bind("smartanswerOutcome",e.trackSuccessFunc(!1)):$(function(){$("article.outcome").length===1&&e.trackSuccess(!0)})});var browserSupportsHtml5HistoryApi=browserSupportsHtml5HistoryApi||function(){return!!(history&&history.replaceState&&history.pushState)};GOVUK.Analytics.Trackers.smart_answer.isAjaxNavigation=browserSupportsHtml5HistoryApi,GOVUK.Analytics.Trackers.smart_answer.shouldTrackEntry=function(){return GOVUK.Analytics.isRootOfArtefact(document.URL,GOVUK.Analytics.Trackers.smart_answer.slugLocation)},GOVUK.Analytics.Trackers.smart_answer.shouldTrackSuccess=function(){return GOVUK.Analytics.Trackers.smart_answer.isAjaxNavigation()?GOVUK.Analytics.entryTokens.tokenExists()&&!GOVUK.Analytics.isRootOfArtefact(document.URL,GOVUK.Analytics.Trackers.smart_answer.slugLocation):GOVUK.Analytics.entryTokens.tokenExists()&&$("article.outcome").length===1},GOVUK.Analytics.Trackers.policy=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.INSIDE_GOV,2,function(e){e.trackTimeBasedSuccess(3e4),e.trackInternalLinks($("#page a").filter(function(){return!GOVUK.Analytics.isLinkToFragmentInCurrentDocument(this)}))}),GOVUK.Analytics.Trackers.detailed_guidance=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.INSIDE_GOV,0,function(e){e.trackTimeBasedSuccess(3e4),e.trackInternalLinks($("#page a"))}),GOVUK.Analytics.Trackers.news=new GOVUK.Analytics.Tracker(GOVUK.Analytics.trackingPrefixes.INSIDE_GOV,2,function(e){e.trackInternalLinks($("#page a")),e.trackTimeBasedSuccess(3e4)});var GOVUK=GOVUK||{};GOVUK.Analytics=GOVUK.Analytics||{};var _gaq=_gaq||[];GOVUK.sendToAnalytics=function(e){_gaq.push(e)},GOVUK.Analytics.isTheSameArtefact=function(e,t,n){var r=function(e){return e.split("/").slice(0,4+n).join("/")},i=r(e).replace(/#.*$/,""),s=r(t).replace(/#.*$/,"");return i===s},GOVUK.Analytics.getSlug=function(e,t){return e.split("/")[3+t].split("#")[0].split("?")[0]},GOVUK.Analytics.isRootOfArtefact=function(e,t){return e.replace(/\/$/,"").split("/").slice(3+t).length===1},GOVUK.Analytics.isLinkToFragmentInCurrentDocument=function(e){var t=e.href.split("#")[0]===document.URL.split("#")[0],n=e.hash!=="";return t&&n},GOVUK.Analytics.startAnalytics=function(){var e=13,t=!1,n="none",r=GOVUK.Analytics.Format,i=GOVUK.Analytics.Trackers[r],s=function(e,t){return typeof e=="function"?e():t},o=function(e,t){var r=GOVUK.Analytics.getSlug(document.URL,i.slugLocation);return["_trackEvent",n+GOVUK.Analytics.Format,r,e,0,t]},u=function(){if(t)return;t=!0;var e=o("Success",!1);GOVUK.Analytics.isLinkToFragmentInCurrentDocument(this)?GOVUK.sendToAnalytics(e):GOVUK.Analytics.internalSiteEvents.push(e)},a=function(t,n){t.each(function(){var t=$(this);this.hostname===window.location.hostname&&(t.click(u),t.keydown(function(t){t.which===e&&u.call(this,t)}))})},f={trackSuccessFunc:function(e){return e===undefined&&(e=!1),function(){f.trackSuccess(e)}},trackSuccess:function(e){e===undefined&&(e=!1);if(t)return;t=!0,GOVUK.sendToAnalytics(o("Success",e))},trackInternalLinks:function(e){a(e,!1)},trackLinks:function(e){a(e,!0)},trackTimeBasedSuccess:function(e){setTimeout(f.trackSuccessFunc(!0),e)}};GOVUK.Analytics.Trackers[r]!==undefined&&(n=GOVUK.Analytics.Trackers[r].prefix);if(typeof i=="function"){var l=GOVUK.Analytics.isTheSameArtefact(document.URL,document.referrer,i.slugLocation);s(i.shouldTrackEntry,!l)&&(GOVUK.sendToAnalytics(o("Entry",!0)),GOVUK.Analytics.entryTokens.assignToken()),s(i.shouldTrackSuccess,!l)&&(i(f),GOVUK.Analytics.entryTokens.revokeToken())}return GOVUK.Analytics.internalSiteEvents.sendAll(),f},$(GOVUK.Analytics.startAnalytics),function(){var e=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/__utm.gif";e+="?utmwv=5.3.9",e+="&utmn="+Math.floor(Math.random()*parseInt("0x7fffffff",16)),e+="&utmhn="+encodeURIComponent(document.location.hostname),e+="&utmp="+encodeURIComponent("/print"+document.location.pathname),e+="&utmac=UA-26179049-1",e+="&utmcc=__utma%3D999.999.999.999.999.1%3B";var t=document.createElement("style");t.setAttribute("type","text/css");var n=document.createTextNode("@media print { body:after { content: url("+e+"); } body { *background: url("+e+") no-repeat; }}");t.styleSheet?t.styleSheet.cssText=n.nodeValue:t.appendChild(n);var r=document.getElementsByTagName("head")[0];r&&r.appendChild(t)}();