/* generated Fri Feb 10 17:19:53 EST 2012 */

Profiler={isEnabled:function(){return true},init:function(){this._startTime=new Date();this.searchVertical=null;this.eventTimes={};this.eventApplySubtypes={};this.searchTypes={};return this},clearAll:function(){this.clearAllPoints();this.clearAllMetrics();return this.init()},markPoint:function(a){var b=this.getCurrentPoints();if(b==null){b={}}b[a]=new Date().getTime();this.saveCurrentPoints(b)},getPoint:function(a){var b=this.getCurrentPoints();if(b){return b[a]}return null},clearPoint:function(a){var b=this.getCurrentPoints();if(b){delete b[a];this.saveCurrentPoints(b)}},clearAllPoints:function(){this.saveCurrentPoints(null)},setMetric:function(b,a,d){var c=this.getCurrentMetrics();if(c==null){c={}}c[b+"__"+a]=d;this.saveCurrentMetrics(c)},clearMetric:function(b,a){var c=this.getCurrentMetrics();if(c){delete c[b+"__"+a];this.saveCurrentMetrics(c)}},getAllMetrics:function(){var a=this.getCurrentMetrics();return a},clearAllMetrics:function(){this.saveCurrentMetrics(null)},pushCurrentMetrics:function(c){var b=this.getCurrentMetrics();if(b!=null){this.clearAll();var a="/s/performanceMonitor";if(c){a+="/"+c}jq.post(a,b)}},markSearchStart:function(){this.clearAll();this.markPoint("s0000")},setSearchVertical:function(a){if(a=="flight"){this.searchVertical="fs"}else{if(a=="hotel"){this.searchVertical="hs"}else{if(a=="car"){this.searchVertical="cs"}else{this.searchVertical=null}}}},markSharedSearch:function(){this.searchTypes.s=true},markCachedSearch:function(){this.searchTypes.c=true},markFastSearch:function(){this.searchTypes.fast=true},markNormalSearch:function(){this.searchTypes.n=true},addEvent:function(a,c,b){if(c===undefined){c=new Date().getTime()}this.eventTimes[a]=c;if(b===undefined){this.eventApplySubtypes[a]=true}else{this.eventApplySubtypes[a]=b}},computeSearchMetrics:function(){var a=this.getPoint("s0000");if(!a||!this.searchVertical){return false}this.addEvent("ph",this._startTime);if(R9ResultsRendered){this.addEvent("rrr",R9ResultsRendered.getTime(),true)}if(R9InlineResultsRendered){this.addEvent("rr",R9InlineResultsRendered.getTime(),true)}else{if(R9ResultsRendered){this.addEvent("rr",R9ResultsRendered.getTime(),true)}}R9ResultsRendered=R9InlineResultsRendered=null;for(eventName in this.eventTimes){metricName=this.searchVertical+"_"+eventName;metricValue=this.eventTimes[eventName]-a;if(metricValue<0){if(window.R9Admin){alert(metricName+" was really fast: "+metricValue+" millis.")}return false}this.setMetric(metricName,"ms",metricValue);if(this.eventApplySubtypes[eventName]){if(jq.isEmptyObject(this.searchTypes)){this.markNormalSearch()}for(searchType in this.searchTypes){this.setMetric(searchType+"_"+metricName,"ms",metricValue)}}}if(__st){var b=new Date().getTime()-this._startTime.getTime();this.setMetric("rtp","ms",__st+b);this.setMetric(this.searchVertical+"_rtp","ms",__st+b)}return true},constants:{pointsCookieName:"profilerPoints",metricsCookieName:"profilerMetrics"},saveCurrentMetrics:function(a){this.saveCurrentValues(a,this.constants.metricsCookieName)},saveCurrentPoints:function(a){this.saveCurrentValues(a,this.constants.pointsCookieName)},getCurrentMetrics:function(){return this.getCurrentValues(this.constants.metricsCookieName)},getCurrentPoints:function(){return this.getCurrentValues(this.constants.pointsCookieName)},getCurrentValues:function(cookieName){var json=jq.cookie(cookieName);if(json!=null){var currentValues=eval(json);return currentValues}return null},saveCurrentValues:function(a,e){var d=null;if(a){d="({";var c=true;for(name in a){if(!c){d+=", "}var b=a[name];if(typeof(b)=="string"){d+='"'+name+'": "'+b+'"'}else{d+='"'+name+'": '+b}c=false}d+="})"}jq.cookie(e,d,{path:"/"})}}.init();function profilerSubmit(a){if(!Profiler.isEnabled()||!Streaming.done){return}if(a){window.setTimeout("profilerSubmit()",a);return}if(Profiler.computeSearchMetrics()){if(window.Streaming){Profiler.setMetric("spc","count",Streaming.pollCount)}if(window.Streaming){Streaming.dbg("PS SSST")}setSitesSearchedText();Profiler.pushCurrentMetrics(searchid);if(window.Streaming){Streaming.dbg("PS POST")}}else{if(window.Streaming){Streaming.dbg("PS NTD")}}}function setSitesSearchedText(){var c="";var a=Profiler.getAllMetrics();if(a){c+="<b>Profiler Metrics:</b><br/>";for(var d in a){c+=d+"="+a[d]+"<br/>"}}function b(){var e=jq("#kayak_pm_0001");if(e.length){e[0].innerHTML=c}return e.length}b()||jq("#fs_outer_sitessearched").one("lazyLoad",b);return true}
/*!
 * jQuery JavaScript Library v1.6.4
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Mon Sep 12 18:54:48 2011 -0400
 */
(function(a9,M){var ar=a9.document,bs=a9.navigator,bj=a9.location;var b=(function(){var bD=function(bZ,b0){return new bD.fn.init(bZ,b0,bB)},bT=a9.jQuery,bF=a9.$,bB,bX=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bL=/\S/,bH=/^\s+/,bC=/\s+$/,bG=/\d/,by=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bM=/^[\],:{}\s]*$/,bV=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bO=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bI=/(?:^|:|,)(?:\s*\[)+/g,bw=/(webkit)[ \/]([\w.]+)/,bQ=/(opera)(?:.*version)?[ \/]([\w.]+)/,bP=/(msie) ([\w.]+)/,bR=/(mozilla)(?:.*? rv:([\w.]+))?/,bz=/-([a-z]|[0-9])/ig,bY=/^-ms-/,bS=function(bZ,b0){return(b0+"").toUpperCase()},bW=bs.userAgent,bU,bA,e,bK=Object.prototype.toString,bE=Object.prototype.hasOwnProperty,bx=Array.prototype.push,bJ=Array.prototype.slice,bN=String.prototype.trim,bt=Array.prototype.indexOf,bv={};bD.fn=bD.prototype={constructor:bD,init:function(bZ,b3,b2){var b1,b4,b0,b5;if(!bZ){return this}if(bZ.nodeType){this.context=this[0]=bZ;this.length=1;return this}if(bZ==="body"&&!b3&&ar.body){this.context=ar;this[0]=ar.body;this.selector=bZ;this.length=1;return this}if(typeof bZ==="string"){if(bZ.charAt(0)==="<"&&bZ.charAt(bZ.length-1)===">"&&bZ.length>=3){b1=[null,bZ,null]}else{b1=bX.exec(bZ)}if(b1&&(b1[1]||!b3)){if(b1[1]){b3=b3 instanceof bD?b3[0]:b3;b5=(b3?b3.ownerDocument||b3:ar);b0=by.exec(bZ);if(b0){if(bD.isPlainObject(b3)){bZ=[ar.createElement(b0[1])];bD.fn.attr.call(bZ,b3,true)}else{bZ=[b5.createElement(b0[1])]}}else{b0=bD.buildFragment([b1[1]],[b5]);bZ=(b0.cacheable?bD.clone(b0.fragment):b0.fragment).childNodes}return bD.merge(this,bZ)}else{b4=ar.getElementById(b1[2]);if(b4&&b4.parentNode){if(b4.id!==b1[2]){return b2.find(bZ)}this.length=1;this[0]=b4}this.context=ar;this.selector=bZ;return this}}else{if(!b3||b3.jquery){return(b3||b2).find(bZ)}else{return this.constructor(b3).find(bZ)}}}else{if(bD.isFunction(bZ)){return b2.ready(bZ)}}if(bZ.selector!==M){this.selector=bZ.selector;this.context=bZ.context}return bD.makeArray(bZ,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return bJ.call(this,0)},get:function(bZ){return bZ==null?this.toArray():(bZ<0?this[this.length+bZ]:this[bZ])},pushStack:function(b0,b2,bZ){var b1=this.constructor();if(bD.isArray(b0)){bx.apply(b1,b0)}else{bD.merge(b1,b0)}b1.prevObject=this;b1.context=this.context;if(b2==="find"){b1.selector=this.selector+(this.selector?" ":"")+bZ}else{if(b2){b1.selector=this.selector+"."+b2+"("+bZ+")"}}return b1},each:function(b0,bZ){return bD.each(this,b0,bZ)},ready:function(bZ){bD.bindReady();bA.done(bZ);return this},eq:function(bZ){return bZ===-1?this.slice(bZ):this.slice(bZ,+bZ+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bJ.apply(this,arguments),"slice",bJ.call(arguments).join(","))},map:function(bZ){return this.pushStack(bD.map(this,function(b1,b0){return bZ.call(b1,b0,b1)}))},end:function(){return this.prevObject||this.constructor(null)},push:bx,sort:[].sort,splice:[].splice};bD.fn.init.prototype=bD.fn;bD.extend=bD.fn.extend=function(){var b8,b1,bZ,b0,b5,b6,b4=arguments[0]||{},b3=1,b2=arguments.length,b7=false;if(typeof b4==="boolean"){b7=b4;b4=arguments[1]||{};b3=2}if(typeof b4!=="object"&&!bD.isFunction(b4)){b4={}}if(b2===b3){b4=this;--b3}for(;b3<b2;b3++){if((b8=arguments[b3])!=null){for(b1 in b8){bZ=b4[b1];b0=b8[b1];if(b4===b0){continue}if(b7&&b0&&(bD.isPlainObject(b0)||(b5=bD.isArray(b0)))){if(b5){b5=false;b6=bZ&&bD.isArray(bZ)?bZ:[]}else{b6=bZ&&bD.isPlainObject(bZ)?bZ:{}}b4[b1]=bD.extend(b7,b6,b0)}else{if(b0!==M){b4[b1]=b0}}}}}return b4};bD.extend({noConflict:function(bZ){if(a9.$===bD){a9.$=bF}if(bZ&&a9.jQuery===bD){a9.jQuery=bT}return bD},isReady:false,readyWait:1,holdReady:function(bZ){if(bZ){bD.readyWait++}else{bD.ready(true)}},ready:function(bZ){if((bZ===true&&!--bD.readyWait)||(bZ!==true&&!bD.isReady)){if(!ar.body){return setTimeout(bD.ready,1)}bD.isReady=true;if(bZ!==true&&--bD.readyWait>0){return}bA.resolveWith(ar,[bD]);if(bD.fn.trigger){bD(ar).trigger("ready").unbind("ready")}}},bindReady:function(){if(bA){return}bA=bD._Deferred();if(ar.readyState==="complete"){return setTimeout(bD.ready,1)}if(ar.addEventListener){ar.addEventListener("DOMContentLoaded",e,false);a9.addEventListener("load",bD.ready,false)}else{if(ar.attachEvent){ar.attachEvent("onreadystatechange",e);a9.attachEvent("onload",bD.ready);var bZ=false;try{bZ=a9.frameElement==null}catch(b0){}if(ar.documentElement.doScroll&&bZ){bu()}}}},isFunction:function(bZ){return bD.type(bZ)==="function"},isArray:Array.isArray||function(bZ){return bD.type(bZ)==="array"},isWindow:function(bZ){return bZ&&typeof bZ==="object"&&"setInterval" in bZ},isNaN:function(bZ){return bZ==null||!bG.test(bZ)||isNaN(bZ)},type:function(bZ){return bZ==null?String(bZ):bv[bK.call(bZ)]||"object"},isPlainObject:function(b1){if(!b1||bD.type(b1)!=="object"||b1.nodeType||bD.isWindow(b1)){return false}try{if(b1.constructor&&!bE.call(b1,"constructor")&&!bE.call(b1.constructor.prototype,"isPrototypeOf")){return false}}catch(b0){return false}var bZ;for(bZ in b1){}return bZ===M||bE.call(b1,bZ)},isEmptyObject:function(b0){for(var bZ in b0){return false}return true},error:function(bZ){throw bZ},parseJSON:function(bZ){if(typeof bZ!=="string"||!bZ){return null}bZ=bD.trim(bZ);if(a9.JSON&&a9.JSON.parse){return a9.JSON.parse(bZ)}if(bM.test(bZ.replace(bV,"@").replace(bO,"]").replace(bI,""))){return(new Function("return "+bZ))()}bD.error("Invalid JSON: "+bZ)},parseXML:function(b1){var bZ,b0;try{if(a9.DOMParser){b0=new DOMParser();bZ=b0.parseFromString(b1,"text/xml")}else{bZ=new ActiveXObject("Microsoft.XMLDOM");bZ.async="false";bZ.loadXML(b1)}}catch(b2){bZ=M}if(!bZ||!bZ.documentElement||bZ.getElementsByTagName("parsererror").length){bD.error("Invalid XML: "+b1)}return bZ},noop:function(){},globalEval:function(bZ){if(bZ&&bL.test(bZ)){(a9.execScript||function(b0){a9["eval"].call(a9,b0)})(bZ)}},camelCase:function(bZ){return bZ.replace(bY,"ms-").replace(bz,bS)},nodeName:function(b0,bZ){return b0.nodeName&&b0.nodeName.toUpperCase()===bZ.toUpperCase()},each:function(b2,b5,b1){var b0,b3=0,b4=b2.length,bZ=b4===M||bD.isFunction(b2);if(b1){if(bZ){for(b0 in b2){if(b5.apply(b2[b0],b1)===false){break}}}else{for(;b3<b4;){if(b5.apply(b2[b3++],b1)===false){break}}}}else{if(bZ){for(b0 in b2){if(b5.call(b2[b0],b0,b2[b0])===false){break}}}else{for(;b3<b4;){if(b5.call(b2[b3],b3,b2[b3++])===false){break}}}}return b2},trim:bN?function(bZ){return bZ==null?"":bN.call(bZ)}:function(bZ){return bZ==null?"":bZ.toString().replace(bH,"").replace(bC,"")},makeArray:function(b2,b0){var bZ=b0||[];if(b2!=null){var b1=bD.type(b2);if(b2.length==null||b1==="string"||b1==="function"||b1==="regexp"||bD.isWindow(b2)){bx.call(bZ,b2)}else{bD.merge(bZ,b2)}}return bZ},inArray:function(b1,b2){if(!b2){return -1}if(bt){return bt.call(b2,b1)}for(var bZ=0,b0=b2.length;bZ<b0;bZ++){if(b2[bZ]===b1){return bZ}}return -1},merge:function(b3,b1){var b2=b3.length,b0=0;if(typeof b1.length==="number"){for(var bZ=b1.length;b0<bZ;b0++){b3[b2++]=b1[b0]}}else{while(b1[b0]!==M){b3[b2++]=b1[b0++]}}b3.length=b2;return b3},grep:function(b0,b5,bZ){var b1=[],b4;bZ=!!bZ;for(var b2=0,b3=b0.length;b2<b3;b2++){b4=!!b5(b0[b2],b2);if(bZ!==b4){b1.push(b0[b2])}}return b1},map:function(bZ,b6,b7){var b4,b5,b3=[],b1=0,b0=bZ.length,b2=bZ instanceof bD||b0!==M&&typeof b0==="number"&&((b0>0&&bZ[0]&&bZ[b0-1])||b0===0||bD.isArray(bZ));if(b2){for(;b1<b0;b1++){b4=b6(bZ[b1],b1,b7);if(b4!=null){b3[b3.length]=b4}}}else{for(b5 in bZ){b4=b6(bZ[b5],b5,b7);if(b4!=null){b3[b3.length]=b4}}}return b3.concat.apply([],b3)},guid:1,proxy:function(b3,b2){if(typeof b2==="string"){var b1=b3[b2];b2=b3;b3=b1}if(!bD.isFunction(b3)){return M}var bZ=bJ.call(arguments,2),b0=function(){return b3.apply(b2,bZ.concat(bJ.call(arguments)))};b0.guid=b3.guid=b3.guid||b0.guid||bD.guid++;return b0},access:function(bZ,b7,b5,b1,b4,b6){var b0=bZ.length;if(typeof b7==="object"){for(var b2 in b7){bD.access(bZ,b2,b7[b2],b1,b4,b5)}return bZ}if(b5!==M){b1=!b6&&b1&&bD.isFunction(b5);for(var b3=0;b3<b0;b3++){b4(bZ[b3],b7,b1?b5.call(bZ[b3],b3,b4(bZ[b3],b7)):b5,b6)}return bZ}return b0?b4(bZ[0],b7):M},now:function(){return(new Date()).getTime()},uaMatch:function(b0){b0=b0.toLowerCase();var bZ=bw.exec(b0)||bQ.exec(b0)||bP.exec(b0)||b0.indexOf("compatible")<0&&bR.exec(b0)||[];return{browser:bZ[1]||"",version:bZ[2]||"0"}},sub:function(){function bZ(b2,b3){return new bZ.fn.init(b2,b3)}bD.extend(true,bZ,this);bZ.superclass=this;bZ.fn=bZ.prototype=this();bZ.fn.constructor=bZ;bZ.sub=this.sub;bZ.fn.init=function b1(b2,b3){if(b3&&b3 instanceof bD&&!(b3 instanceof bZ)){b3=bZ(b3)}return bD.fn.init.call(this,b2,b3,b0)};bZ.fn.init.prototype=bZ.fn;var b0=bZ(ar);return bZ},browser:{}});bD.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b0,bZ){bv["[object "+bZ+"]"]=bZ.toLowerCase()});bU=bD.uaMatch(bW);if(bU.browser){bD.browser[bU.browser]=true;bD.browser.version=bU.version}if(bD.browser.webkit){bD.browser.safari=true}if(bL.test("\xA0")){bH=/^[\s\xA0]+/;bC=/[\s\xA0]+$/}bB=bD(ar);if(ar.addEventListener){e=function(){ar.removeEventListener("DOMContentLoaded",e,false);bD.ready()}}else{if(ar.attachEvent){e=function(){if(ar.readyState==="complete"){ar.detachEvent("onreadystatechange",e);bD.ready()}}}}function bu(){if(bD.isReady){return}try{ar.documentElement.doScroll("left")}catch(bZ){setTimeout(bu,1);return}bD.ready()}return bD})();var a="done fail isResolved isRejected promise then always pipe".split(" "),aG=[].slice;b.extend({_Deferred:function(){var bv=[],bw,bt,bu,e={done:function(){if(!bu){var by=arguments,bz,bC,bB,bA,bx;if(bw){bx=bw;bw=0}for(bz=0,bC=by.length;bz<bC;bz++){bB=by[bz];bA=b.type(bB);if(bA==="array"){e.done.apply(e,bB)}else{if(bA==="function"){bv.push(bB)}}}if(bx){e.resolveWith(bx[0],bx[1])}}return this},resolveWith:function(by,bx){if(!bu&&!bw&&!bt){bx=bx||[];bt=1;try{while(bv[0]){bv.shift().apply(by,bx)}}finally{bw=[by,bx];bt=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return !!(bt||bw)},cancel:function(){bu=1;bv=[];return this}};return e},Deferred:function(bt){var e=b._Deferred(),bv=b._Deferred(),bu;b.extend(e,{then:function(bx,bw){e.done(bx).fail(bw);return this},always:function(){return e.done.apply(e,arguments).fail.apply(this,arguments)},fail:bv.done,rejectWith:bv.resolveWith,reject:bv.resolve,isRejected:bv.isResolved,pipe:function(bx,bw){return b.Deferred(function(by){b.each({done:[bx,"resolve"],fail:[bw,"reject"]},function(bA,bD){var bz=bD[0],bC=bD[1],bB;if(b.isFunction(bz)){e[bA](function(){bB=bz.apply(this,arguments);if(bB&&b.isFunction(bB.promise)){bB.promise().then(by.resolve,by.reject)}else{by[bC+"With"](this===e?by:this,[bB])}})}else{e[bA](by[bC])}})}).promise()},promise:function(bx){if(bx==null){if(bu){return bu}bu=bx={}}var bw=a.length;while(bw--){bx[a[bw]]=e[a[bw]]}return bx}});e.done(bv.cancel).fail(e.cancel);delete e.cancel;if(bt){bt.call(e,e)}return e},when:function(by){var bt=arguments,bu=0,bx=bt.length,bw=bx,e=bx<=1&&by&&b.isFunction(by.promise)?by:b.Deferred();function bv(bz){return function(bA){bt[bz]=arguments.length>1?aG.call(arguments,0):bA;if(!(--bw)){e.resolveWith(e,aG.call(bt,0))}}}if(bx>1){for(;bu<bx;bu++){if(bt[bu]&&b.isFunction(bt[bu].promise)){bt[bu].promise().then(bv(bu),e.reject)}else{--bw}}if(!bw){e.resolveWith(e,bt)}}else{if(e!==by){e.resolveWith(e,bx?[by]:[])}}return e.promise()}});b.support=(function(){var bD=ar.createElement("div"),bK=ar.documentElement,bw,bL,bE,bu,bC,bx,bA,bt,bB,bF,bz,bJ,bH,bv,by,bG,bM;bD.setAttribute("className","t");bD.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";bw=bD.getElementsByTagName("*");bL=bD.getElementsByTagName("a")[0];if(!bw||!bw.length||!bL){return{}}bE=ar.createElement("select");bu=bE.appendChild(ar.createElement("option"));bC=bD.getElementsByTagName("input")[0];bA={leadingWhitespace:(bD.firstChild.nodeType===3),tbody:!bD.getElementsByTagName("tbody").length,htmlSerialize:!!bD.getElementsByTagName("link").length,style:/top/.test(bL.getAttribute("style")),hrefNormalized:(bL.getAttribute("href")==="/a"),opacity:/^0.55$/.test(bL.style.opacity),cssFloat:!!bL.style.cssFloat,checkOn:(bC.value==="on"),optSelected:bu.selected,getSetAttribute:bD.className!=="t",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bC.checked=true;bA.noCloneChecked=bC.cloneNode(true).checked;bE.disabled=true;bA.optDisabled=!bu.disabled;try{delete bD.test}catch(bI){bA.deleteExpando=false}if(!bD.addEventListener&&bD.attachEvent&&bD.fireEvent){bD.attachEvent("onclick",function(){bA.noCloneEvent=false});bD.cloneNode(true).fireEvent("onclick")}bC=ar.createElement("input");bC.value="t";bC.setAttribute("type","radio");bA.radioValue=bC.value==="t";bC.setAttribute("checked","checked");bD.appendChild(bC);bt=ar.createDocumentFragment();bt.appendChild(bD.firstChild);bA.checkClone=bt.cloneNode(true).cloneNode(true).lastChild.checked;bD.innerHTML="";bD.style.width=bD.style.paddingLeft="1px";bB=ar.getElementsByTagName("body")[0];bz=ar.createElement(bB?"div":"body");bJ={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};if(bB){b.extend(bJ,{position:"absolute",left:"-1000px",top:"-1000px"})}for(bG in bJ){bz.style[bG]=bJ[bG]}bz.appendChild(bD);bF=bB||bK;bF.insertBefore(bz,bF.firstChild);bA.appendChecked=bC.checked;bA.boxModel=bD.offsetWidth===2;if("zoom" in bD.style){bD.style.display="inline";bD.style.zoom=1;bA.inlineBlockNeedsLayout=(bD.offsetWidth===2);bD.style.display="";bD.innerHTML="<div style='width:4px;'></div>";bA.shrinkWrapBlocks=(bD.offsetWidth!==2)}bD.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bH=bD.getElementsByTagName("td");bM=(bH[0].offsetHeight===0);bH[0].style.display="";bH[1].style.display="none";bA.reliableHiddenOffsets=bM&&(bH[0].offsetHeight===0);bD.innerHTML="";if(ar.defaultView&&ar.defaultView.getComputedStyle){bx=ar.createElement("div");bx.style.width="0";bx.style.marginRight="0";bD.appendChild(bx);bA.reliableMarginRight=(parseInt((ar.defaultView.getComputedStyle(bx,null)||{marginRight:0}).marginRight,10)||0)===0}bz.innerHTML="";bF.removeChild(bz);if(bD.attachEvent){for(bG in {submit:1,change:1,focusin:1}){by="on"+bG;bM=(by in bD);if(!bM){bD.setAttribute(by,"return;");bM=(typeof bD[by]==="function")}bA[bG+"Bubbles"]=bM}}bz=bt=bE=bu=bB=bx=bD=bC=null;return bA})();b.boxModel=b.support.boxModel;var aN=/^(?:\{.*\}|\[.*\])$/,ax=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!U(e)},data:function(bv,bt,bx,bw){if(!b.acceptData(bv)){return}var by,bA,bB=b.expando,bz=typeof bt==="string",bC=bv.nodeType,e=bC?b.cache:bv,bu=bC?bv[b.expando]:bv[b.expando]&&b.expando;if((!bu||(bw&&bu&&(e[bu]&&!e[bu][bB])))&&bz&&bx===M){return}if(!bu){if(bC){bv[b.expando]=bu=++b.uuid}else{bu=b.expando}}if(!e[bu]){e[bu]={};if(!bC){e[bu].toJSON=b.noop}}if(typeof bt==="object"||typeof bt==="function"){if(bw){e[bu][bB]=b.extend(e[bu][bB],bt)}else{e[bu]=b.extend(e[bu],bt)}}by=e[bu];if(bw){if(!by[bB]){by[bB]={}}by=by[bB]}if(bx!==M){by[b.camelCase(bt)]=bx}if(bt==="events"&&!by[bt]){return by[bB]&&by[bB].events}if(bz){bA=by[bt];if(bA==null){bA=by[b.camelCase(bt)]}}else{bA=by}return bA},removeData:function(bw,bu,bx){if(!b.acceptData(bw)){return}var by,bz=b.expando,bA=bw.nodeType,bt=bA?b.cache:bw,bv=bA?bw[b.expando]:b.expando;if(!bt[bv]){return}if(bu){by=bx?bt[bv][bz]:bt[bv];if(by){if(!by[bu]){bu=b.camelCase(bu)}delete by[bu];if(!U(by)){return}}}if(bx){delete bt[bv][bz];if(!U(bt[bv])){return}}var e=bt[bv][bz];if(b.support.deleteExpando||!bt.setInterval){delete bt[bv]}else{bt[bv]=null}if(e){bt[bv]={};if(!bA){bt[bv].toJSON=b.noop}bt[bv][bz]=e}else{if(bA){if(b.support.deleteExpando){delete bw[b.expando]}else{if(bw.removeAttribute){bw.removeAttribute(b.expando)}else{bw[b.expando]=null}}}}},_data:function(bt,e,bu){return b.data(bt,e,bu,true)},acceptData:function(bt){if(bt.nodeName){var e=b.noData[bt.nodeName.toLowerCase()];if(e){return !(e===true||bt.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(bw,by){var bx=null;if(typeof bw==="undefined"){if(this.length){bx=b.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,bu;for(var bv=0,bt=e.length;bv<bt;bv++){bu=e[bv].name;if(bu.indexOf("data-")===0){bu=b.camelCase(bu.substring(5));a3(this[0],bu,bx[bu])}}}}return bx}else{if(typeof bw==="object"){return this.each(function(){b.data(this,bw)})}}var bz=bw.split(".");bz[1]=bz[1]?"."+bz[1]:"";if(by===M){bx=this.triggerHandler("getData"+bz[1]+"!",[bz[0]]);if(bx===M&&this.length){bx=b.data(this[0],bw);bx=a3(this[0],bw,bx)}return bx===M&&bz[1]?this.data(bz[0]):bx}else{return this.each(function(){var bB=b(this),bA=[bz[0],by];bB.triggerHandler("setData"+bz[1]+"!",bA);b.data(this,bw,by);bB.triggerHandler("changeData"+bz[1]+"!",bA)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a3(bv,bu,bw){if(bw===M&&bv.nodeType===1){var bt="data-"+bu.replace(ax,"-$1").toLowerCase();bw=bv.getAttribute(bt);if(typeof bw==="string"){try{bw=bw==="true"?true:bw==="false"?false:bw==="null"?null:!b.isNaN(bw)?parseFloat(bw):aN.test(bw)?b.parseJSON(bw):bw}catch(bx){}b.data(bv,bu,bw)}else{bw=M}}return bw}function U(bt){for(var e in bt){if(e!=="toJSON"){return false}}return true}function bf(bw,bv,by){var bu=bv+"defer",bt=bv+"queue",e=bv+"mark",bx=b.data(bw,bu,M,true);if(bx&&(by==="queue"||!b.data(bw,bt,M,true))&&(by==="mark"||!b.data(bw,e,M,true))){setTimeout(function(){if(!b.data(bw,bt,M,true)&&!b.data(bw,e,M,true)){b.removeData(bw,bu,true);bx.resolve()}},0)}}b.extend({_mark:function(bt,e){if(bt){e=(e||"fx")+"mark";b.data(bt,e,(b.data(bt,e,M,true)||0)+1,true)}},_unmark:function(bw,bv,bt){if(bw!==true){bt=bv;bv=bw;bw=false}if(bv){bt=bt||"fx";var e=bt+"mark",bu=bw?0:((b.data(bv,e,M,true)||1)-1);if(bu){b.data(bv,e,bu,true)}else{b.removeData(bv,e,true);bf(bv,bt,"mark")}}},queue:function(bt,e,bv){if(bt){e=(e||"fx")+"queue";var bu=b.data(bt,e,M,true);if(bv){if(!bu||b.isArray(bv)){bu=b.data(bt,e,b.makeArray(bv),true)}else{bu.push(bv)}}return bu||[]}},dequeue:function(bv,bu){bu=bu||"fx";var e=b.queue(bv,bu),bt=e.shift(),bw;if(bt==="inprogress"){bt=e.shift()}if(bt){if(bu==="fx"){e.unshift("inprogress")}bt.call(bv,function(){b.dequeue(bv,bu)})}if(!e.length){b.removeData(bv,bu+"queue",true);bf(bv,bu,"queue")}}});b.fn.extend({queue:function(e,bt){if(typeof e!=="string"){bt=e;e="fx"}if(bt===M){return b.queue(this[0],e)}return this.each(function(){var bu=b.queue(this,e,bt);if(e==="fx"&&bu[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(bt,e){bt=b.fx?b.fx.speeds[bt]||bt:bt;e=e||"fx";return this.queue(e,function(){var bu=this;setTimeout(function(){b.dequeue(bu,e)},bt)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bB,bu){if(typeof bB!=="string"){bu=bB;bB=M}bB=bB||"fx";var e=b.Deferred(),bt=this,bw=bt.length,bz=1,bx=bB+"defer",by=bB+"queue",bA=bB+"mark",bv;function bC(){if(!(--bz)){e.resolveWith(bt,[bt])}}while(bw--){if((bv=b.data(bt[bw],bx,M,true)||(b.data(bt[bw],by,M,true)||b.data(bt[bw],bA,M,true))&&b.data(bt[bw],bx,b._Deferred(),true))){bz++;bv.done(bC)}}bC();return e.promise()}});var aL=/[\n\t\r]/g,ad=/\s+/,aP=/\r/g,g=/^(?:button|input)$/i,F=/^(?:button|input|object|select|textarea)$/i,m=/^a(?:rea)?$/i,al=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,bc,aW;b.fn.extend({attr:function(e,bt){return b.access(this,e,bt,true,b.attr)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,bt){return b.access(this,e,bt,true,b.prop)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=M;delete this[e]}catch(bt){}})},addClass:function(bw){var by,bu,bt,bv,bx,bz,e;if(b.isFunction(bw)){return this.each(function(bA){b(this).addClass(bw.call(this,bA,this.className))})}if(bw&&typeof bw==="string"){by=bw.split(ad);for(bu=0,bt=this.length;bu<bt;bu++){bv=this[bu];if(bv.nodeType===1){if(!bv.className&&by.length===1){bv.className=bw}else{bx=" "+bv.className+" ";for(bz=0,e=by.length;bz<e;bz++){if(!~bx.indexOf(" "+by[bz]+" ")){bx+=by[bz]+" "}}bv.className=b.trim(bx)}}}}return this},removeClass:function(bx){var by,bu,bt,bw,bv,bz,e;if(b.isFunction(bx)){return this.each(function(bA){b(this).removeClass(bx.call(this,bA,this.className))})}if((bx&&typeof bx==="string")||bx===M){by=(bx||"").split(ad);for(bu=0,bt=this.length;bu<bt;bu++){bw=this[bu];if(bw.nodeType===1&&bw.className){if(bx){bv=(" "+bw.className+" ").replace(aL," ");for(bz=0,e=by.length;bz<e;bz++){bv=bv.replace(" "+by[bz]+" "," ")}bw.className=b.trim(bv)}else{bw.className=""}}}}return this},toggleClass:function(bv,bt){var bu=typeof bv,e=typeof bt==="boolean";if(b.isFunction(bv)){return this.each(function(bw){b(this).toggleClass(bv.call(this,bw,this.className,bt),bt)})}return this.each(function(){if(bu==="string"){var by,bx=0,bw=b(this),bz=bt,bA=bv.split(ad);while((by=bA[bx++])){bz=e?bz:!bw.hasClass(by);bw[bz?"addClass":"removeClass"](by)}}else{if(bu==="undefined"||bu==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bv===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bv=" "+e+" ";for(var bu=0,bt=this.length;bu<bt;bu++){if(this[bu].nodeType===1&&(" "+this[bu].className+" ").replace(aL," ").indexOf(bv)>-1){return true}}return false},val:function(bv){var e,bt,bu=this[0];if(!arguments.length){if(bu){e=b.valHooks[bu.nodeName.toLowerCase()]||b.valHooks[bu.type];if(e&&"get" in e&&(bt=e.get(bu,"value"))!==M){return bt}bt=bu.value;return typeof bt==="string"?bt.replace(aP,""):bt==null?"":bt}return M}var bw=b.isFunction(bv);return this.each(function(by){var bx=b(this),bz;if(this.nodeType!==1){return}if(bw){bz=bv.call(this,by,bx.val())}else{bz=bv}if(bz==null){bz=""}else{if(typeof bz==="number"){bz+=""}else{if(b.isArray(bz)){bz=b.map(bz,function(bA){return bA==null?"":bA+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bz,"value")===M){this.value=bz}})}});b.extend({valHooks:{option:{get:function(e){var bt=e.attributes.value;return !bt||bt.specified?e.value:e.text}},select:{get:function(e){var by,bw=e.selectedIndex,bz=[],bA=e.options,bv=e.type==="select-one";if(bw<0){return null}for(var bt=bv?bw:0,bx=bv?bw+1:bA.length;bt<bx;bt++){var bu=bA[bt];if(bu.selected&&(b.support.optDisabled?!bu.disabled:bu.getAttribute("disabled")===null)&&(!bu.parentNode.disabled||!b.nodeName(bu.parentNode,"optgroup"))){by=b(bu).val();if(bv){return by}bz.push(by)}}if(bv&&!bz.length&&bA.length){return b(bA[bw]).val()}return bz},set:function(bt,bu){var e=b.makeArray(bu);b(bt).find("option").each(function(){this.selected=b.inArray(b(this).val(),e)>=0});if(!e.length){bt.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attrFix:{tabindex:"tabIndex"},attr:function(by,bv,bz,bx){var bt=by.nodeType;if(!by||bt===3||bt===8||bt===2){return M}if(bx&&bv in b.attrFn){return b(by)[bv](bz)}if(!("getAttribute" in by)){return b.prop(by,bv,bz)}var bu,e,bw=bt!==1||!b.isXMLDoc(by);if(bw){bv=b.attrFix[bv]||bv;e=b.attrHooks[bv];if(!e){if(al.test(bv)){e=aW}else{if(bc){e=bc}}}}if(bz!==M){if(bz===null){b.removeAttr(by,bv);return M}else{if(e&&"set" in e&&bw&&(bu=e.set(by,bz,bv))!==M){return bu}else{by.setAttribute(bv,""+bz);return bz}}}else{if(e&&"get" in e&&bw&&(bu=e.get(by,bv))!==null){return bu}else{bu=by.getAttribute(bv);return bu===null?M:bu}}},removeAttr:function(bt,e){var bu;if(bt.nodeType===1){e=b.attrFix[e]||e;b.attr(bt,e,"");bt.removeAttribute(e);if(al.test(e)&&(bu=b.propFix[e]||e) in bt){bt[bu]=false}}},attrHooks:{type:{set:function(e,bt){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&bt==="radio"&&b.nodeName(e,"input")){var bu=e.value;e.setAttribute("type",bt);if(bu){e.value=bu}return bt}}}},value:{get:function(bt,e){if(bc&&b.nodeName(bt,"button")){return bc.get(bt,e)}return e in bt?bt.value:null},set:function(bt,bu,e){if(bc&&b.nodeName(bt,"button")){return bc.set(bt,bu,e)}bt.value=bu}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(bx,bv,by){var bt=bx.nodeType;if(!bx||bt===3||bt===8||bt===2){return M}var bu,e,bw=bt!==1||!b.isXMLDoc(bx);if(bw){bv=b.propFix[bv]||bv;e=b.propHooks[bv]}if(by!==M){if(e&&"set" in e&&(bu=e.set(bx,by,bv))!==M){return bu}else{return(bx[bv]=by)}}else{if(e&&"get" in e&&(bu=e.get(bx,bv))!==null){return bu}else{return bx[bv]}}},propHooks:{tabIndex:{get:function(bt){var e=bt.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):F.test(bt.nodeName)||m.test(bt.nodeName)&&bt.href?0:M}}}});b.attrHooks.tabIndex=b.propHooks.tabIndex;aW={get:function(bt,e){var bu;return b.prop(bt,e)===true||(bu=bt.getAttributeNode(e))&&bu.nodeValue!==false?e.toLowerCase():M},set:function(bt,bv,e){var bu;if(bv===false){b.removeAttr(bt,e)}else{bu=b.propFix[e]||e;if(bu in bt){bt[bu]=true}bt.setAttribute(e,e.toLowerCase())}return e}};if(!b.support.getSetAttribute){bc=b.valHooks.button={get:function(bu,bt){var e;e=bu.getAttributeNode(bt);return e&&e.nodeValue!==""?e.nodeValue:M},set:function(bu,bv,bt){var e=bu.getAttributeNode(bt);if(!e){e=ar.createAttribute(bt);bu.setAttributeNode(e)}return(e.nodeValue=bv+"")}};b.each(["width","height"],function(bt,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bu,bv){if(bv===""){bu.setAttribute(e,"auto");return bv}}})})}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(bt,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bv){var bu=bv.getAttribute(e,2);return bu===null?M:bu}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||M},set:function(e,bt){return(e.style.cssText=""+bt)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(bt){var e=bt.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,bt){if(b.isArray(bt)){return(e.checked=b.inArray(b(e).val(),bt)>=0)}}})});var aY=/\.(.*)$/,bb=/^(?:textarea|input|select)$/i,P=/\./g,bg=/ /g,aD=/[^\w\s.|`]/g,I=function(e){return e.replace(aD,"\\$&")};b.event={add:function(bv,bz,bE,bx){if(bv.nodeType===3||bv.nodeType===8){return}if(bE===false){bE=bi}else{if(!bE){return}}var bt,bD;if(bE.handler){bt=bE;bE=bt.handler}if(!bE.guid){bE.guid=b.guid++}var bA=b._data(bv);if(!bA){return}var bF=bA.events,by=bA.handle;if(!bF){bA.events=bF={}}if(!by){bA.handle=by=function(bG){return typeof b!=="undefined"&&(!bG||b.event.triggered!==bG.type)?b.event.handle.apply(by.elem,arguments):M}}by.elem=bv;bz=bz.split(" ");var bC,bw=0,e;while((bC=bz[bw++])){bD=bt?b.extend({},bt):{handler:bE,data:bx};if(bC.indexOf(".")>-1){e=bC.split(".");bC=e.shift();bD.namespace=e.slice(0).sort().join(".")}else{e=[];bD.namespace=""}bD.type=bC;if(!bD.guid){bD.guid=bE.guid}var bu=bF[bC],bB=b.event.special[bC]||{};if(!bu){bu=bF[bC]=[];if(!bB.setup||bB.setup.call(bv,bx,e,by)===false){if(bv.addEventListener){bv.addEventListener(bC,by,false)}else{if(bv.attachEvent){bv.attachEvent("on"+bC,by)}}}}if(bB.add){bB.add.call(bv,bD);if(!bD.handler.guid){bD.handler.guid=bE.guid}}bu.push(bD);b.event.global[bC]=true}bv=null},global:{},remove:function(bH,bC,bu,by){if(bH.nodeType===3||bH.nodeType===8){return}if(bu===false){bu=bi}var bK,bx,bz,bE,bF=0,bv,bA,bD,bw,bB,e,bJ,bG=b.hasData(bH)&&b._data(bH),bt=bG&&bG.events;if(!bG||!bt){return}if(bC&&bC.type){bu=bC.handler;bC=bC.type}if(!bC||typeof bC==="string"&&bC.charAt(0)==="."){bC=bC||"";for(bx in bt){b.event.remove(bH,bx+bC)}return}bC=bC.split(" ");while((bx=bC[bF++])){bJ=bx;e=null;bv=bx.indexOf(".")<0;bA=[];if(!bv){bA=bx.split(".");bx=bA.shift();bD=new RegExp("(^|\\.)"+b.map(bA.slice(0).sort(),I).join("\\.(?:.*\\.)?")+"(\\.|$)")}bB=bt[bx];if(!bB){continue}if(!bu){for(bE=0;bE<bB.length;bE++){e=bB[bE];if(bv||bD.test(e.namespace)){b.event.remove(bH,bJ,e.handler,bE);bB.splice(bE--,1)}}continue}bw=b.event.special[bx]||{};for(bE=by||0;bE<bB.length;bE++){e=bB[bE];if(bu.guid===e.guid){if(bv||bD.test(e.namespace)){if(by==null){bB.splice(bE--,1)}if(bw.remove){bw.remove.call(bH,e)}}if(by!=null){break}}}if(bB.length===0||by!=null&&bB.length===1){if(!bw.teardown||bw.teardown.call(bH,bA)===false){b.removeEvent(bH,bx,bG.handle)}bK=null;delete bt[bx]}}if(b.isEmptyObject(bt)){var bI=bG.handle;if(bI){bI.elem=null}delete bG.events;delete bG.handle;if(b.isEmptyObject(bG)){b.removeData(bH,M,true)}}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(e,bz,bx,bE){var bC=e.type||e,bu=[],bt;if(bC.indexOf("!")>=0){bC=bC.slice(0,-1);bt=true}if(bC.indexOf(".")>=0){bu=bC.split(".");bC=bu.shift();bu.sort()}if((!bx||b.event.customEvent[bC])&&!b.event.global[bC]){return}e=typeof e==="object"?e[b.expando]?e:new b.Event(bC,e):new b.Event(bC);e.type=bC;e.exclusive=bt;e.namespace=bu.join(".");e.namespace_re=new RegExp("(^|\\.)"+bu.join("\\.(?:.*\\.)?")+"(\\.|$)");if(bE||!bx){e.preventDefault();e.stopPropagation()}if(!bx){b.each(b.cache,function(){var bG=b.expando,bF=this[bG];if(bF&&bF.events&&bF.events[bC]){b.event.trigger(e,bz,bF.handle.elem)}});return}if(bx.nodeType===3||bx.nodeType===8){return}e.result=M;e.target=bx;bz=bz!=null?b.makeArray(bz):[];bz.unshift(e);var bD=bx,bv=bC.indexOf(":")<0?"on"+bC:"";do{var bA=b._data(bD,"handle");e.currentTarget=bD;if(bA){bA.apply(bD,bz)}if(bv&&b.acceptData(bD)&&bD[bv]&&bD[bv].apply(bD,bz)===false){e.result=false;e.preventDefault()}bD=bD.parentNode||bD.ownerDocument||bD===e.target.ownerDocument&&a9}while(bD&&!e.isPropagationStopped());if(!e.isDefaultPrevented()){var bw,bB=b.event.special[bC]||{};if((!bB._default||bB._default.call(bx.ownerDocument,e)===false)&&!(bC==="click"&&b.nodeName(bx,"a"))&&b.acceptData(bx)){try{if(bv&&bx[bC]){bw=bx[bv];if(bw){bx[bv]=null}b.event.triggered=bC;bx[bC]()}}catch(by){}if(bw){bx[bv]=bw}b.event.triggered=M}}return e.result},handle:function(bz){bz=b.event.fix(bz||a9.event);var bt=((b._data(this,"events")||{})[bz.type]||[]).slice(0),by=!bz.exclusive&&!bz.namespace,bw=Array.prototype.slice.call(arguments,0);bw[0]=bz;bz.currentTarget=this;for(var bv=0,e=bt.length;bv<e;bv++){var bx=bt[bv];if(by||bz.namespace_re.test(bx.namespace)){bz.handler=bx.handler;bz.data=bx.data;bz.handleObj=bx;var bu=bx.handler.apply(this,bw);if(bu!==M){bz.result=bu;if(bu===false){bz.preventDefault();bz.stopPropagation()}}if(bz.isImmediatePropagationStopped()){break}}}return bz.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(bw){if(bw[b.expando]){return bw}var bt=bw;bw=b.Event(bt);for(var bu=this.props.length,by;bu;){by=this.props[--bu];bw[by]=bt[by]}if(!bw.target){bw.target=bw.srcElement||ar}if(bw.target.nodeType===3){bw.target=bw.target.parentNode}if(!bw.relatedTarget&&bw.fromElement){bw.relatedTarget=bw.fromElement===bw.target?bw.toElement:bw.fromElement}if(bw.pageX==null&&bw.clientX!=null){var bv=bw.target.ownerDocument||ar,bx=bv.documentElement,e=bv.body;bw.pageX=bw.clientX+(bx&&bx.scrollLeft||e&&e.scrollLeft||0)-(bx&&bx.clientLeft||e&&e.clientLeft||0);bw.pageY=bw.clientY+(bx&&bx.scrollTop||e&&e.scrollTop||0)-(bx&&bx.clientTop||e&&e.clientTop||0)}if(bw.which==null&&(bw.charCode!=null||bw.keyCode!=null)){bw.which=bw.charCode!=null?bw.charCode:bw.keyCode}if(!bw.metaKey&&bw.ctrlKey){bw.metaKey=bw.ctrlKey}if(!bw.which&&bw.button!==M){bw.which=(bw.button&1?1:(bw.button&2?3:(bw.button&4?2:0)))}return bw},guid:100000000,proxy:b.proxy,special:{ready:{setup:b.bindReady,teardown:b.noop},live:{add:function(e){b.event.add(this,q(e.origType,e.selector),b.extend({},e,{handler:ai,guid:e.handler.guid}))},remove:function(e){b.event.remove(this,q(e.origType,e.selector),e)}},beforeunload:{setup:function(bu,bt,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(bt,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}};b.removeEvent=ar.removeEventListener?function(bt,e,bu){if(bt.removeEventListener){bt.removeEventListener(e,bu,false)}}:function(bt,e,bu){if(bt.detachEvent){bt.detachEvent("on"+e,bu)}};b.Event=function(bt,e){if(!this.preventDefault){return new b.Event(bt,e)}if(bt&&bt.type){this.originalEvent=bt;this.type=bt.type;this.isDefaultPrevented=(bt.defaultPrevented||bt.returnValue===false||bt.getPreventDefault&&bt.getPreventDefault())?i:bi}else{this.type=bt}if(e){b.extend(this,e)}this.timeStamp=b.now();this[b.expando]=true};function bi(){return false}function i(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var bt=this.originalEvent;if(!bt){return}if(bt.preventDefault){bt.preventDefault()}else{bt.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=i;var bt=this.originalEvent;if(!bt){return}if(bt.stopPropagation){bt.stopPropagation()}bt.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:bi,isPropagationStopped:bi,isImmediatePropagationStopped:bi};var ac=function(bu){var bv=bu.relatedTarget,e=false,bt=bu.type;bu.type=bu.data;if(bv!==this){if(bv){e=b.contains(this,bv)}if(!e){b.event.handle.apply(this,arguments);bu.type=bt}}},aT=function(e){e.type=e.data;b.event.handle.apply(this,arguments)};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bt,e){b.event.special[bt]={setup:function(bu){b.event.add(this,e,bu&&bu.selector?aT:ac,bt)},teardown:function(bu){b.event.remove(this,e,bu&&bu.selector?aT:ac)}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(bt,e){if(!b.nodeName(this,"form")){b.event.add(this,"click.specialSubmit",function(bw){var bv=bw.target,bu=b.nodeName(bv,"input")||b.nodeName(bv,"button")?bv.type:"";if((bu==="submit"||bu==="image")&&b(bv).closest("form").length){aV("submit",this,arguments)}});b.event.add(this,"keypress.specialSubmit",function(bw){var bv=bw.target,bu=b.nodeName(bv,"input")||b.nodeName(bv,"button")?bv.type:"";if((bu==="text"||bu==="password")&&b(bv).closest("form").length&&bw.keyCode===13){aV("submit",this,arguments)}})}else{return false}},teardown:function(e){b.event.remove(this,".specialSubmit")}}}if(!b.support.changeBubbles){var bl,l=function(bt){var e=b.nodeName(bt,"input")?bt.type:"",bu=bt.value;if(e==="radio"||e==="checkbox"){bu=bt.checked}else{if(e==="select-multiple"){bu=bt.selectedIndex>-1?b.map(bt.options,function(bv){return bv.selected}).join("-"):""}else{if(b.nodeName(bt,"select")){bu=bt.selectedIndex}}}return bu},aa=function aa(bv){var bt=bv.target,bu,bw;if(!bb.test(bt.nodeName)||bt.readOnly){return}bu=b._data(bt,"_change_data");bw=l(bt);if(bv.type!=="focusout"||bt.type!=="radio"){b._data(bt,"_change_data",bw)}if(bu===M||bw===bu){return}if(bu!=null||bw){bv.type="change";bv.liveFired=M;b.event.trigger(bv,arguments[1],bt)}};b.event.special.change={filters:{focusout:aa,beforedeactivate:aa,click:function(bv){var bu=bv.target,bt=b.nodeName(bu,"input")?bu.type:"";if(bt==="radio"||bt==="checkbox"||b.nodeName(bu,"select")){aa.call(this,bv)}},keydown:function(bv){var bu=bv.target,bt=b.nodeName(bu,"input")?bu.type:"";if((bv.keyCode===13&&!b.nodeName(bu,"textarea"))||(bv.keyCode===32&&(bt==="checkbox"||bt==="radio"))||bt==="select-multiple"){aa.call(this,bv)}},beforeactivate:function(bu){var bt=bu.target;b._data(bt,"_change_data",l(bt))}},setup:function(bu,bt){if(this.type==="file"){return false}for(var e in bl){b.event.add(this,e+".specialChange",bl[e])}return bb.test(this.nodeName)},teardown:function(e){b.event.remove(this,".specialChange");return bb.test(this.nodeName)}};bl=b.event.special.change.filters;bl.focus=bl.beforeactivate}function aV(bt,bv,e){var bu=b.extend({},e[0]);bu.type=bt;bu.originalEvent={};bu.liveFired=M;b.event.handle.call(bv,bu);if(bu.isDefaultPrevented()){e[0].preventDefault()}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bv,e){var bt=0;b.event.special[e]={setup:function(){if(bt++===0){ar.addEventListener(bv,bu,true)}},teardown:function(){if(--bt===0){ar.removeEventListener(bv,bu,true)}}};function bu(bw){var bx=b.event.fix(bw);bx.type=e;bx.originalEvent={};b.event.trigger(bx,null,bx.target);if(bx.isDefaultPrevented()){bw.preventDefault()}}})}b.each(["bind","one"],function(bt,e){b.fn[e]=function(bz,bA,by){var bx;if(typeof bz==="object"){for(var bw in bz){this[e](bw,bA,bz[bw],by)}return this}if(arguments.length===2||bA===false){by=bA;bA=M}if(e==="one"){bx=function(bB){b(this).unbind(bB,bx);return by.apply(this,arguments)};bx.guid=by.guid||b.guid++}else{bx=by}if(bz==="unload"&&e!=="one"){this.one(bz,bA,by)}else{for(var bv=0,bu=this.length;bv<bu;bv++){b.event.add(this[bv],bz,bx,bA)}}return this}});b.fn.extend({unbind:function(bw,bv){if(typeof bw==="object"&&!bw.preventDefault){for(var bu in bw){this.unbind(bu,bw[bu])}}else{for(var bt=0,e=this.length;bt<e;bt++){b.event.remove(this[bt],bw,bv)}}return this},delegate:function(e,bt,bv,bu){return this.live(bt,bv,bu,e)},undelegate:function(e,bt,bu){if(arguments.length===0){return this.unbind("live")}else{return this.die(bt,null,bu,e)}},trigger:function(e,bt){return this.each(function(){b.event.trigger(e,bt,this)})},triggerHandler:function(e,bt){if(this[0]){return b.event.trigger(e,bt,this[0],true)}},toggle:function(bv){var bt=arguments,e=bv.guid||b.guid++,bu=0,bw=function(bx){var by=(b.data(this,"lastToggle"+bv.guid)||0)%bu;b.data(this,"lastToggle"+bv.guid,by+1);bx.preventDefault();return bt[by].apply(this,arguments)||false};bw.guid=e;while(bu<bt.length){bt[bu++].guid=e}return this.click(bw)},hover:function(e,bt){return this.mouseenter(e).mouseleave(bt||e)}});var aR={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};b.each(["live","die"],function(bt,e){b.fn[e]=function(bD,bA,bF,bw){var bE,bB=0,bC,bv,bH,by=bw||this.selector,bu=bw?this:b(this.context);if(typeof bD==="object"&&!bD.preventDefault){for(var bG in bD){bu[e](bG,bA,bD[bG],by)}return this}if(e==="die"&&!bD&&bw&&bw.charAt(0)==="."){bu.unbind(bw);return this}if(bA===false||b.isFunction(bA)){bF=bA||bi;bA=M}bD=(bD||"").split(" ");while((bE=bD[bB++])!=null){bC=aY.exec(bE);bv="";if(bC){bv=bC[0];bE=bE.replace(aY,"")}if(bE==="hover"){bD.push("mouseenter"+bv,"mouseleave"+bv);continue}bH=bE;if(aR[bE]){bD.push(aR[bE]+bv);bE=bE+bv}else{bE=(aR[bE]||bE)+bv}if(e==="live"){for(var bz=0,bx=bu.length;bz<bx;bz++){b.event.add(bu[bz],"live."+q(bE,by),{data:bA,selector:by,handler:bF,origType:bE,origHandler:bF,preType:bH})}}else{bu.unbind("live."+q(bE,by),bF)}}return this}});function ai(bD){var bA,bv,bJ,bx,e,bF,bC,bE,bB,bI,bz,by,bH,bG=[],bw=[],bt=b._data(this,"events");if(bD.liveFired===this||!bt||!bt.live||bD.target.disabled||bD.button&&bD.type==="click"){return}if(bD.namespace){by=new RegExp("(^|\\.)"+bD.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")}bD.liveFired=this;var bu=bt.live.slice(0);for(bC=0;bC<bu.length;bC++){e=bu[bC];if(e.origType.replace(aY,"")===bD.type){bw.push(e.selector)}else{bu.splice(bC--,1)}}bx=b(bD.target).closest(bw,bD.currentTarget);for(bE=0,bB=bx.length;bE<bB;bE++){bz=bx[bE];for(bC=0;bC<bu.length;bC++){e=bu[bC];if(bz.selector===e.selector&&(!by||by.test(e.namespace))&&!bz.elem.disabled){bF=bz.elem;bJ=null;if(e.preType==="mouseenter"||e.preType==="mouseleave"){bD.type=e.preType;bJ=b(bD.relatedTarget).closest(e.selector)[0];if(bJ&&b.contains(bF,bJ)){bJ=bF}}if(!bJ||bJ!==bF){bG.push({elem:bF,handleObj:e,level:bz.level})}}}}for(bE=0,bB=bG.length;bE<bB;bE++){bx=bG[bE];if(bv&&bx.level>bv){break}bD.currentTarget=bx.elem;bD.data=bx.handleObj.data;bD.handleObj=bx.handleObj;bH=bx.handleObj.origHandler.apply(bx.elem,arguments);if(bH===false||bD.isPropagationStopped()){bv=bx.level;if(bH===false){bA=false}if(bD.isImmediatePropagationStopped()){break}}}return bA}function q(bt,e){return(bt&&bt!=="*"?bt+".":"")+e.replace(P,"`").replace(bg,"&")}b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),function(bt,e){b.fn[e]=function(bv,bu){if(bu==null){bu=bv;bv=null}return arguments.length>0?this.bind(e,bv,bu):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}});
/*!
 * Sizzle CSS Selector Engine
 *  Copyright 2011, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var bD=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bE=0,bH=Object.prototype.toString,by=false,bx=true,bF=/\\/g,bL=/\W/;[0,0].sort(function(){bx=false;return 0});var bv=function(bQ,e,bT,bU){bT=bT||[];e=e||ar;var bW=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bQ||typeof bQ!=="string"){return bT}var bN,bY,b1,bM,bX,b0,bZ,bS,bP=true,bO=bv.isXML(e),bR=[],bV=bQ;do{bD.exec("");bN=bD.exec(bV);if(bN){bV=bN[3];bR.push(bN[1]);if(bN[2]){bM=bN[3];break}}}while(bN);if(bR.length>1&&bz.exec(bQ)){if(bR.length===2&&bA.relative[bR[0]]){bY=bI(bR[0]+bR[1],e)}else{bY=bA.relative[bR[0]]?[e]:bv(bR.shift(),e);while(bR.length){bQ=bR.shift();if(bA.relative[bQ]){bQ+=bR.shift()}bY=bI(bQ,bY)}}}else{if(!bU&&bR.length>1&&e.nodeType===9&&!bO&&bA.match.ID.test(bR[0])&&!bA.match.ID.test(bR[bR.length-1])){bX=bv.find(bR.shift(),e,bO);e=bX.expr?bv.filter(bX.expr,bX.set)[0]:bX.set[0]}if(e){bX=bU?{expr:bR.pop(),set:bB(bU)}:bv.find(bR.pop(),bR.length===1&&(bR[0]==="~"||bR[0]==="+")&&e.parentNode?e.parentNode:e,bO);bY=bX.expr?bv.filter(bX.expr,bX.set):bX.set;if(bR.length>0){b1=bB(bY)}else{bP=false}while(bR.length){b0=bR.pop();bZ=b0;if(!bA.relative[b0]){b0=""}else{bZ=bR.pop()}if(bZ==null){bZ=e}bA.relative[b0](b1,bZ,bO)}}else{b1=bR=[]}}if(!b1){b1=bY}if(!b1){bv.error(b0||bQ)}if(bH.call(b1)==="[object Array]"){if(!bP){bT.push.apply(bT,b1)}else{if(e&&e.nodeType===1){for(bS=0;b1[bS]!=null;bS++){if(b1[bS]&&(b1[bS]===true||b1[bS].nodeType===1&&bv.contains(e,b1[bS]))){bT.push(bY[bS])}}}else{for(bS=0;b1[bS]!=null;bS++){if(b1[bS]&&b1[bS].nodeType===1){bT.push(bY[bS])}}}}}else{bB(b1,bT)}if(bM){bv(bM,bW,bT,bU);bv.uniqueSort(bT)}return bT};bv.uniqueSort=function(bM){if(bG){by=bx;bM.sort(bG);if(by){for(var e=1;e<bM.length;e++){if(bM[e]===bM[e-1]){bM.splice(e--,1)}}}}return bM};bv.matches=function(e,bM){return bv(e,null,null,bM)};bv.matchesSelector=function(e,bM){return bv(bM,null,null,[e]).length>0};bv.find=function(bS,e,bT){var bR;if(!bS){return[]}for(var bO=0,bN=bA.order.length;bO<bN;bO++){var bP,bQ=bA.order[bO];if((bP=bA.leftMatch[bQ].exec(bS))){var bM=bP[1];bP.splice(1,1);if(bM.substr(bM.length-1)!=="\\"){bP[1]=(bP[1]||"").replace(bF,"");bR=bA.find[bQ](bP,e,bT);if(bR!=null){bS=bS.replace(bA.match[bQ],"");break}}}}if(!bR){bR=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bR,expr:bS}};bv.filter=function(bW,bV,bZ,bP){var bR,e,bN=bW,b1=[],bT=bV,bS=bV&&bV[0]&&bv.isXML(bV[0]);while(bW&&bV.length){for(var bU in bA.filter){if((bR=bA.leftMatch[bU].exec(bW))!=null&&bR[2]){var b0,bY,bM=bA.filter[bU],bO=bR[1];e=false;bR.splice(1,1);if(bO.substr(bO.length-1)==="\\"){continue}if(bT===b1){b1=[]}if(bA.preFilter[bU]){bR=bA.preFilter[bU](bR,bT,bZ,b1,bP,bS);if(!bR){e=b0=true}else{if(bR===true){continue}}}if(bR){for(var bQ=0;(bY=bT[bQ])!=null;bQ++){if(bY){b0=bM(bY,bR,bQ,bT);var bX=bP^!!b0;if(bZ&&b0!=null){if(bX){e=true}else{bT[bQ]=false}}else{if(bX){b1.push(bY);e=true}}}}}if(b0!==M){if(!bZ){bT=b1}bW=bW.replace(bA.match[bU],"");if(!e){return[]}break}}}if(bW===bN){if(e==null){bv.error(bW)}else{break}}bN=bW}return bT};bv.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var bA=bv.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bR,bM){var bO=typeof bM==="string",bQ=bO&&!bL.test(bM),bS=bO&&!bQ;if(bQ){bM=bM.toLowerCase()}for(var bN=0,e=bR.length,bP;bN<e;bN++){if((bP=bR[bN])){while((bP=bP.previousSibling)&&bP.nodeType!==1){}bR[bN]=bS||bP&&bP.nodeName.toLowerCase()===bM?bP||false:bP===bM}}if(bS){bv.filter(bM,bR,true)}},">":function(bR,bM){var bQ,bP=typeof bM==="string",bN=0,e=bR.length;if(bP&&!bL.test(bM)){bM=bM.toLowerCase();for(;bN<e;bN++){bQ=bR[bN];if(bQ){var bO=bQ.parentNode;bR[bN]=bO.nodeName.toLowerCase()===bM?bO:false}}}else{for(;bN<e;bN++){bQ=bR[bN];if(bQ){bR[bN]=bP?bQ.parentNode:bQ.parentNode===bM}}if(bP){bv.filter(bM,bR,true)}}},"":function(bO,bM,bQ){var bP,bN=bE++,e=bJ;if(typeof bM==="string"&&!bL.test(bM)){bM=bM.toLowerCase();bP=bM;e=bt}e("parentNode",bM,bN,bO,bP,bQ)},"~":function(bO,bM,bQ){var bP,bN=bE++,e=bJ;if(typeof bM==="string"&&!bL.test(bM)){bM=bM.toLowerCase();bP=bM;e=bt}e("previousSibling",bM,bN,bO,bP,bQ)}},find:{ID:function(bM,bN,bO){if(typeof bN.getElementById!=="undefined"&&!bO){var e=bN.getElementById(bM[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bN,bQ){if(typeof bQ.getElementsByName!=="undefined"){var bM=[],bP=bQ.getElementsByName(bN[1]);for(var bO=0,e=bP.length;bO<e;bO++){if(bP[bO].getAttribute("name")===bN[1]){bM.push(bP[bO])}}return bM.length===0?null:bM}},TAG:function(e,bM){if(typeof bM.getElementsByTagName!=="undefined"){return bM.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bO,bM,bN,e,bR,bS){bO=" "+bO[1].replace(bF,"")+" ";if(bS){return bO}for(var bP=0,bQ;(bQ=bM[bP])!=null;bP++){if(bQ){if(bR^(bQ.className&&(" "+bQ.className+" ").replace(/[\t\n\r]/g," ").indexOf(bO)>=0)){if(!bN){e.push(bQ)}}else{if(bN){bM[bP]=false}}}}return false},ID:function(e){return e[1].replace(bF,"")},TAG:function(bM,e){return bM[1].replace(bF,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bv.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bM=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bM[1]+(bM[2]||1))-0;e[3]=bM[3]-0}else{if(e[2]){bv.error(e[0])}}e[0]=bE++;return e},ATTR:function(bP,bM,bN,e,bQ,bR){var bO=bP[1]=bP[1].replace(bF,"");if(!bR&&bA.attrMap[bO]){bP[1]=bA.attrMap[bO]}bP[4]=(bP[4]||bP[5]||"").replace(bF,"");if(bP[2]==="~="){bP[4]=" "+bP[4]+" "}return bP},PSEUDO:function(bP,bM,bN,e,bQ){if(bP[1]==="not"){if((bD.exec(bP[3])||"").length>1||/^\w/.test(bP[3])){bP[3]=bv(bP[3],null,null,bM)}else{var bO=bv.filter(bP[3],bM,bN,true^bQ);if(!bN){e.push.apply(e,bO)}return false}}else{if(bA.match.POS.test(bP[0])||bA.match.CHILD.test(bP[0])){return true}}return bP},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bN,bM,e){return !!bv(e[3],bN).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bN){var e=bN.getAttribute("type"),bM=bN.type;return bN.nodeName.toLowerCase()==="input"&&"text"===bM&&(e===bM||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bM){var e=bM.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bM.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bM){var e=bM.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bM.type},button:function(bM){var e=bM.nodeName.toLowerCase();return e==="input"&&"button"===bM.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bM,e){return e===0},last:function(bN,bM,e,bO){return bM===bO.length-1},even:function(bM,e){return e%2===0},odd:function(bM,e){return e%2===1},lt:function(bN,bM,e){return bM<e[3]-0},gt:function(bN,bM,e){return bM>e[3]-0},nth:function(bN,bM,e){return e[3]-0===bM},eq:function(bN,bM,e){return e[3]-0===bM}},filter:{PSEUDO:function(bN,bS,bR,bT){var e=bS[1],bM=bA.filters[e];if(bM){return bM(bN,bR,bS,bT)}else{if(e==="contains"){return(bN.textContent||bN.innerText||bv.getText([bN])||"").indexOf(bS[3])>=0}else{if(e==="not"){var bO=bS[3];for(var bQ=0,bP=bO.length;bQ<bP;bQ++){if(bO[bQ]===bN){return false}}return true}else{bv.error(e)}}}},CHILD:function(e,bO){var bR=bO[1],bM=e;switch(bR){case"only":case"first":while((bM=bM.previousSibling)){if(bM.nodeType===1){return false}}if(bR==="first"){return true}bM=e;case"last":while((bM=bM.nextSibling)){if(bM.nodeType===1){return false}}return true;case"nth":var bN=bO[2],bU=bO[3];if(bN===1&&bU===0){return true}var bQ=bO[0],bT=e.parentNode;if(bT&&(bT.sizcache!==bQ||!e.nodeIndex)){var bP=0;for(bM=bT.firstChild;bM;bM=bM.nextSibling){if(bM.nodeType===1){bM.nodeIndex=++bP}}bT.sizcache=bQ}var bS=e.nodeIndex-bU;if(bN===0){return bS===0}else{return(bS%bN===0&&bS/bN>=0)}}},ID:function(bM,e){return bM.nodeType===1&&bM.getAttribute("id")===e},TAG:function(bM,e){return(e==="*"&&bM.nodeType===1)||bM.nodeName.toLowerCase()===e},CLASS:function(bM,e){return(" "+(bM.className||bM.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bQ,bO){var bN=bO[1],e=bA.attrHandle[bN]?bA.attrHandle[bN](bQ):bQ[bN]!=null?bQ[bN]:bQ.getAttribute(bN),bR=e+"",bP=bO[2],bM=bO[4];return e==null?bP==="!=":bP==="="?bR===bM:bP==="*="?bR.indexOf(bM)>=0:bP==="~="?(" "+bR+" ").indexOf(bM)>=0:!bM?bR&&e!==false:bP==="!="?bR!==bM:bP==="^="?bR.indexOf(bM)===0:bP==="$="?bR.substr(bR.length-bM.length)===bM:bP==="|="?bR===bM||bR.substr(0,bM.length+1)===bM+"-":false},POS:function(bP,bM,bN,bQ){var e=bM[2],bO=bA.setFilters[e];if(bO){return bO(bP,bN,bM,bQ)}}}};var bz=bA.match.POS,bu=function(bM,e){return"\\"+(e-0+1)};for(var bw in bA.match){bA.match[bw]=new RegExp(bA.match[bw].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bA.leftMatch[bw]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bA.match[bw].source.replace(/\\(\d+)/g,bu))}var bB=function(bM,e){bM=Array.prototype.slice.call(bM,0);if(e){e.push.apply(e,bM);return e}return bM};try{Array.prototype.slice.call(ar.documentElement.childNodes,0)[0].nodeType}catch(bK){bB=function(bP,bO){var bN=0,bM=bO||[];if(bH.call(bP)==="[object Array]"){Array.prototype.push.apply(bM,bP)}else{if(typeof bP.length==="number"){for(var e=bP.length;bN<e;bN++){bM.push(bP[bN])}}else{for(;bP[bN];bN++){bM.push(bP[bN])}}}return bM}}var bG,bC;if(ar.documentElement.compareDocumentPosition){bG=function(bM,e){if(bM===e){by=true;return 0}if(!bM.compareDocumentPosition||!e.compareDocumentPosition){return bM.compareDocumentPosition?-1:1}return bM.compareDocumentPosition(e)&4?-1:1}}else{bG=function(bT,bS){if(bT===bS){by=true;return 0}else{if(bT.sourceIndex&&bS.sourceIndex){return bT.sourceIndex-bS.sourceIndex}}var bQ,bM,bN=[],e=[],bP=bT.parentNode,bR=bS.parentNode,bU=bP;if(bP===bR){return bC(bT,bS)}else{if(!bP){return -1}else{if(!bR){return 1}}}while(bU){bN.unshift(bU);bU=bU.parentNode}bU=bR;while(bU){e.unshift(bU);bU=bU.parentNode}bQ=bN.length;bM=e.length;for(var bO=0;bO<bQ&&bO<bM;bO++){if(bN[bO]!==e[bO]){return bC(bN[bO],e[bO])}}return bO===bQ?bC(bT,e[bO],-1):bC(bN[bO],bS,1)};bC=function(bM,e,bN){if(bM===e){return bN}var bO=bM.nextSibling;while(bO){if(bO===e){return -1}bO=bO.nextSibling}return 1}}bv.getText=function(e){var bM="",bO;for(var bN=0;e[bN];bN++){bO=e[bN];if(bO.nodeType===3||bO.nodeType===4){bM+=bO.nodeValue}else{if(bO.nodeType!==8){bM+=bv.getText(bO.childNodes)}}}return bM};(function(){var bM=ar.createElement("div"),bN="script"+(new Date()).getTime(),e=ar.documentElement;bM.innerHTML="<a name='"+bN+"'/>";e.insertBefore(bM,e.firstChild);if(ar.getElementById(bN)){bA.find.ID=function(bP,bQ,bR){if(typeof bQ.getElementById!=="undefined"&&!bR){var bO=bQ.getElementById(bP[1]);return bO?bO.id===bP[1]||typeof bO.getAttributeNode!=="undefined"&&bO.getAttributeNode("id").nodeValue===bP[1]?[bO]:M:[]}};bA.filter.ID=function(bQ,bO){var bP=typeof bQ.getAttributeNode!=="undefined"&&bQ.getAttributeNode("id");return bQ.nodeType===1&&bP&&bP.nodeValue===bO}}e.removeChild(bM);e=bM=null})();(function(){var e=ar.createElement("div");e.appendChild(ar.createComment(""));if(e.getElementsByTagName("*").length>0){bA.find.TAG=function(bM,bQ){var bP=bQ.getElementsByTagName(bM[1]);if(bM[1]==="*"){var bO=[];for(var bN=0;bP[bN];bN++){if(bP[bN].nodeType===1){bO.push(bP[bN])}}bP=bO}return bP}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bA.attrHandle.href=function(bM){return bM.getAttribute("href",2)}}e=null})();if(ar.querySelectorAll){(function(){var e=bv,bO=ar.createElement("div"),bN="__sizzle__";bO.innerHTML="<p class='TEST'></p>";if(bO.querySelectorAll&&bO.querySelectorAll(".TEST").length===0){return}bv=function(bZ,bQ,bU,bY){bQ=bQ||ar;if(!bY&&!bv.isXML(bQ)){var bX=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(bZ);if(bX&&(bQ.nodeType===1||bQ.nodeType===9)){if(bX[1]){return bB(bQ.getElementsByTagName(bZ),bU)}else{if(bX[2]&&bA.find.CLASS&&bQ.getElementsByClassName){return bB(bQ.getElementsByClassName(bX[2]),bU)}}}if(bQ.nodeType===9){if(bZ==="body"&&bQ.body){return bB([bQ.body],bU)}else{if(bX&&bX[3]){var bT=bQ.getElementById(bX[3]);if(bT&&bT.parentNode){if(bT.id===bX[3]){return bB([bT],bU)}}else{return bB([],bU)}}}try{return bB(bQ.querySelectorAll(bZ),bU)}catch(bV){}}else{if(bQ.nodeType===1&&bQ.nodeName.toLowerCase()!=="object"){var bR=bQ,bS=bQ.getAttribute("id"),bP=bS||bN,b1=bQ.parentNode,b0=/^\s*[+~]/.test(bZ);if(!bS){bQ.setAttribute("id",bP)}else{bP=bP.replace(/'/g,"\\$&")}if(b0&&b1){bQ=bQ.parentNode}try{if(!b0||b1){return bB(bQ.querySelectorAll("[id='"+bP+"'] "+bZ),bU)}}catch(bW){}finally{if(!bS){bR.removeAttribute("id")}}}}}return e(bZ,bQ,bU,bY)};for(var bM in e){bv[bM]=e[bM]}bO=null})()}(function(){var e=ar.documentElement,bN=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bN){var bP=!bN.call(ar.createElement("div"),"div"),bM=false;try{bN.call(ar.documentElement,"[test!='']:sizzle")}catch(bO){bM=true}bv.matchesSelector=function(bR,bT){bT=bT.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bv.isXML(bR)){try{if(bM||!bA.match.PSEUDO.test(bT)&&!/!=/.test(bT)){var bQ=bN.call(bR,bT);if(bQ||!bP||bR.document&&bR.document.nodeType!==11){return bQ}}}catch(bS){}}return bv(bT,null,null,[bR]).length>0}}})();(function(){var e=ar.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bA.order.splice(1,0,"CLASS");bA.find.CLASS=function(bM,bN,bO){if(typeof bN.getElementsByClassName!=="undefined"&&!bO){return bN.getElementsByClassName(bM[1])}};e=null})();function bt(bM,bR,bQ,bU,bS,bT){for(var bO=0,bN=bU.length;bO<bN;bO++){var e=bU[bO];if(e){var bP=false;e=e[bM];while(e){if(e.sizcache===bQ){bP=bU[e.sizset];break}if(e.nodeType===1&&!bT){e.sizcache=bQ;e.sizset=bO}if(e.nodeName.toLowerCase()===bR){bP=e;break}e=e[bM]}bU[bO]=bP}}}function bJ(bM,bR,bQ,bU,bS,bT){for(var bO=0,bN=bU.length;bO<bN;bO++){var e=bU[bO];if(e){var bP=false;e=e[bM];while(e){if(e.sizcache===bQ){bP=bU[e.sizset];break}if(e.nodeType===1){if(!bT){e.sizcache=bQ;e.sizset=bO}if(typeof bR!=="string"){if(e===bR){bP=true;break}}else{if(bv.filter(bR,[e]).length>0){bP=e;break}}}e=e[bM]}bU[bO]=bP}}}if(ar.documentElement.contains){bv.contains=function(bM,e){return bM!==e&&(bM.contains?bM.contains(e):true)}}else{if(ar.documentElement.compareDocumentPosition){bv.contains=function(bM,e){return !!(bM.compareDocumentPosition(e)&16)}}else{bv.contains=function(){return false}}}bv.isXML=function(e){var bM=(e?e.ownerDocument||e:0).documentElement;return bM?bM.nodeName!=="HTML":false};var bI=function(e,bS){var bQ,bO=[],bP="",bN=bS.nodeType?[bS]:bS;while((bQ=bA.match.PSEUDO.exec(e))){bP+=bQ[0];e=e.replace(bA.match.PSEUDO,"")}e=bA.relative[e]?e+"*":e;for(var bR=0,bM=bN.length;bR<bM;bR++){bv(e,bN[bR],bO)}return bv.filter(bP,bO)};b.find=bv;b.expr=bv.selectors;b.expr[":"]=b.expr.filters;b.unique=bv.uniqueSort;b.text=bv.getText;b.isXMLDoc=bv.isXML;b.contains=bv.contains})();var Z=/Until$/,an=/^(?:parents|prevUntil|prevAll)/,a7=/,/,bo=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,J=b.expr.match.POS,av={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bu=this,bw,bt;if(typeof e!=="string"){return b(e).filter(function(){for(bw=0,bt=bu.length;bw<bt;bw++){if(b.contains(bu[bw],this)){return true}}})}var bv=this.pushStack("","find",e),by,bz,bx;for(bw=0,bt=this.length;bw<bt;bw++){by=bv.length;b.find(e,this[bw],bv);if(bw>0){for(bz=by;bz<bv.length;bz++){for(bx=0;bx<by;bx++){if(bv[bx]===bv[bz]){bv.splice(bz--,1);break}}}}}return bv},has:function(bt){var e=b(bt);return this.filter(function(){for(var bv=0,bu=e.length;bv<bu;bv++){if(b.contains(this,e[bv])){return true}}})},not:function(e){return this.pushStack(aC(this,e,false),"not",e)},filter:function(e){return this.pushStack(aC(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(bC,bt){var bz=[],bw,bu,bB=this[0];if(b.isArray(bC)){var by,bv,bx={},e=1;if(bB&&bC.length){for(bw=0,bu=bC.length;bw<bu;bw++){bv=bC[bw];if(!bx[bv]){bx[bv]=J.test(bv)?b(bv,bt||this.context):bv}}while(bB&&bB.ownerDocument&&bB!==bt){for(bv in bx){by=bx[bv];if(by.jquery?by.index(bB)>-1:b(bB).is(by)){bz.push({selector:bv,elem:bB,level:e})}}bB=bB.parentNode;e++}}return bz}var bA=J.test(bC)||typeof bC!=="string"?b(bC,bt||this.context):0;for(bw=0,bu=this.length;bw<bu;bw++){bB=this[bw];while(bB){if(bA?bA.index(bB)>-1:b.find.matchesSelector(bB,bC)){bz.push(bB);break}else{bB=bB.parentNode;if(!bB||!bB.ownerDocument||bB===bt||bB.nodeType===11){break}}}}bz=bz.length>1?b.unique(bz):bz;return this.pushStack(bz,"closest",bC)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bt){var bv=typeof e==="string"?b(e,bt):b.makeArray(e&&e.nodeType?[e]:e),bu=b.merge(this.get(),bv);return this.pushStack(E(bv[0])||E(bu[0])?bu:b.unique(bu))},andSelf:function(){return this.add(this.prevObject)}});function E(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bt){var e=bt.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bt,e,bu){return b.dir(bt,"parentNode",bu)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bt,e,bu){return b.dir(bt,"nextSibling",bu)},prevUntil:function(bt,e,bu){return b.dir(bt,"previousSibling",bu)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bt){b.fn[e]=function(bx,bu){var bw=b.map(this,bt,bx),bv=R.call(arguments);if(!Z.test(e)){bu=bx}if(bu&&typeof bu==="string"){bw=b.filter(bu,bw)}bw=this.length>1&&!av[e]?b.unique(bw):bw;if((this.length>1||a7.test(bu))&&an.test(e)){bw=bw.reverse()}return this.pushStack(bw,e,bv.join(","))}});b.extend({filter:function(bu,e,bt){if(bt){bu=":not("+bu+")"}return e.length===1?b.find.matchesSelector(e[0],bu)?[e[0]]:[]:b.find.matches(bu,e)},dir:function(bu,bt,bw){var e=[],bv=bu[bt];while(bv&&bv.nodeType!==9&&(bw===M||bv.nodeType!==1||!b(bv).is(bw))){if(bv.nodeType===1){e.push(bv)}bv=bv[bt]}return e},nth:function(bw,e,bu,bv){e=e||1;var bt=0;for(;bw;bw=bw[bu]){if(bw.nodeType===1&&++bt===e){break}}return bw},sibling:function(bu,bt){var e=[];for(;bu;bu=bu.nextSibling){if(bu.nodeType===1&&bu!==bt){e.push(bu)}}return e}});function aC(bv,bu,e){bu=bu||0;if(b.isFunction(bu)){return b.grep(bv,function(bx,bw){var by=!!bu.call(bx,bw,bx);return by===e})}else{if(bu.nodeType){return b.grep(bv,function(bx,bw){return(bx===bu)===e})}else{if(typeof bu==="string"){var bt=b.grep(bv,function(bw){return bw.nodeType===1});if(bo.test(bu)){return b.filter(bu,bt,!e)}else{bu=b.filter(bu,bt)}}}}return b.grep(bv,function(bx,bw){return(b.inArray(bx,bu)>=0)===e})}var ae=/ jQuery\d+="(?:\d+|null)"/g,ao=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,y=/<tbody/i,W=/<|&#?\w+;/,Q=/<(?:script|object|embed|option|style)/i,o=/checked\s*(?:[^=]|=\s*.checked.)/i,bk=/\/(java|ecma)script/i,aK=/^\s*<!(?:\[CDATA\[|\-\-)/,au={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};au.optgroup=au.option;au.tbody=au.tfoot=au.colgroup=au.caption=au.thead;au.th=au.td;if(!b.support.htmlSerialize){au._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bu){var bt=b(this);bt.text(e.call(this,bu,bt.text()))})}if(typeof e!=="object"&&e!==M){return this.empty().append((this[0]&&this[0].ownerDocument||ar).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bu){b(this).wrapAll(e.call(this,bu))})}if(this[0]){var bt=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bt.insertBefore(this[0])}bt.map(function(){var bu=this;while(bu.firstChild&&bu.firstChild.nodeType===1){bu=bu.firstChild}return bu}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bt){b(this).wrapInner(e.call(this,bt))})}return this.each(function(){var bt=b(this),bu=bt.contents();if(bu.length){bu.wrapAll(e)}else{bt.append(e)}})},wrap:function(e){return this.each(function(){b(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bt){this.parentNode.insertBefore(bt,this)})}else{if(arguments.length){var e=b(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bt){this.parentNode.insertBefore(bt,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b(arguments[0]).toArray());return e}}},remove:function(e,bv){for(var bt=0,bu;(bu=this[bt])!=null;bt++){if(!e||b.filter(e,[bu]).length){if(!bv&&bu.nodeType===1){b.cleanData(bu.getElementsByTagName("*"));b.cleanData([bu])}if(bu.parentNode){bu.parentNode.removeChild(bu)}}}return this},empty:function(){for(var e=0,bt;(bt=this[e])!=null;e++){if(bt.nodeType===1){b.cleanData(bt.getElementsByTagName("*"))}while(bt.firstChild){bt.removeChild(bt.firstChild)}}return this},clone:function(bt,e){bt=bt==null?false:bt;e=e==null?bt:e;return this.map(function(){return b.clone(this,bt,e)})},html:function(bv){if(bv===M){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ae,""):null}else{if(typeof bv==="string"&&!Q.test(bv)&&(b.support.leadingWhitespace||!ao.test(bv))&&!au[(d.exec(bv)||["",""])[1].toLowerCase()]){bv=bv.replace(T,"<$1></$2>");try{for(var bu=0,bt=this.length;bu<bt;bu++){if(this[bu].nodeType===1){b.cleanData(this[bu].getElementsByTagName("*"));this[bu].innerHTML=bv}}}catch(bw){this.empty().append(bv)}}else{if(b.isFunction(bv)){this.each(function(bx){var e=b(this);e.html(bv.call(this,bx,e.html()))})}else{this.empty().append(bv)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bv){var bu=b(this),bt=bu.html();bu.replaceWith(e.call(this,bv,bt))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bu=this.nextSibling,bt=this.parentNode;b(this).remove();if(bu){b(bu).before(e)}else{b(bt).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bz,bD,bC){var bv,bw,by,bB,bA=bz[0],bt=[];if(!b.support.checkClone&&arguments.length===3&&typeof bA==="string"&&o.test(bA)){return this.each(function(){b(this).domManip(bz,bD,bC,true)})}if(b.isFunction(bA)){return this.each(function(bF){var bE=b(this);bz[0]=bA.call(this,bF,bD?bE.html():M);bE.domManip(bz,bD,bC)})}if(this[0]){bB=bA&&bA.parentNode;if(b.support.parentNode&&bB&&bB.nodeType===11&&bB.childNodes.length===this.length){bv={fragment:bB}}else{bv=b.buildFragment(bz,this,bt)}by=bv.fragment;if(by.childNodes.length===1){bw=by=by.firstChild}else{bw=by.firstChild}if(bw){bD=bD&&b.nodeName(bw,"tr");for(var bu=0,e=this.length,bx=e-1;bu<e;bu++){bC.call(bD?a8(this[bu],bw):this[bu],bv.cacheable||(e>1&&bu<bx)?b.clone(by,true,true):by)}}if(bt.length){b.each(bt,bn)}}return this}});function a8(e,bt){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function v(e,bz){if(bz.nodeType!==1||!b.hasData(e)){return}var by=b.expando,bv=b.data(e),bw=b.data(bz,bv);if((bv=bv[by])){var bA=bv.events;bw=bw[by]=b.extend({},bv);if(bA){delete bw.handle;bw.events={};for(var bx in bA){for(var bu=0,bt=bA[bx].length;bu<bt;bu++){b.event.add(bz,bx+(bA[bx][bu].namespace?".":"")+bA[bx][bu].namespace,bA[bx][bu],bA[bx][bu].data)}}}}}function af(bt,e){var bu;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bt)}bu=e.nodeName.toLowerCase();if(bu==="object"){e.outerHTML=bt.outerHTML}else{if(bu==="input"&&(bt.type==="checkbox"||bt.type==="radio")){if(bt.checked){e.defaultChecked=e.checked=bt.checked}if(e.value!==bt.value){e.value=bt.value}}else{if(bu==="option"){e.selected=bt.defaultSelected}else{if(bu==="input"||bu==="textarea"){e.defaultValue=bt.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bx,bv,bt){var bw,e,bu,by;if(bv&&bv[0]){by=bv[0].ownerDocument||bv[0]}if(!by.createDocumentFragment){by=ar}if(bx.length===1&&typeof bx[0]==="string"&&bx[0].length<512&&by===ar&&bx[0].charAt(0)==="<"&&!Q.test(bx[0])&&(b.support.checkClone||!o.test(bx[0]))){e=true;bu=b.fragments[bx[0]];if(bu&&bu!==1){bw=bu}}if(!bw){bw=by.createDocumentFragment();b.clean(bx,by,bw,bt)}if(e){b.fragments[bx[0]]=bu?bw:1}return{fragment:bw,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bt){b.fn[e]=function(bu){var bx=[],bA=b(bu),bz=this.length===1&&this[0].parentNode;if(bz&&bz.nodeType===11&&bz.childNodes.length===1&&bA.length===1){bA[bt](this[0]);return this}else{for(var by=0,bv=bA.length;by<bv;by++){var bw=(by>0?this.clone(true):this).get();b(bA[by])[bt](bw);bx=bx.concat(bw)}return this.pushStack(bx,e,bA.selector)}}});function bd(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")}else{if("querySelectorAll" in e){return e.querySelectorAll("*")}else{return[]}}}function aw(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function G(e){if(b.nodeName(e,"input")){aw(e)}else{if("getElementsByTagName" in e){b.grep(e.getElementsByTagName("input"),aw)}}}b.extend({clone:function(bw,by,bu){var bx=bw.cloneNode(true),e,bt,bv;if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(bw.nodeType===1||bw.nodeType===11)&&!b.isXMLDoc(bw)){af(bw,bx);e=bd(bw);bt=bd(bx);for(bv=0;e[bv];++bv){if(bt[bv]){af(e[bv],bt[bv])}}}if(by){v(bw,bx);if(bu){e=bd(bw);bt=bd(bx);for(bv=0;e[bv];++bv){v(e[bv],bt[bv])}}}e=bt=null;return bx},clean:function(bu,bw,bF,by){var bD;bw=bw||ar;if(typeof bw.createElement==="undefined"){bw=bw.ownerDocument||bw[0]&&bw[0].ownerDocument||ar}var bG=[],bz;for(var bC=0,bx;(bx=bu[bC])!=null;bC++){if(typeof bx==="number"){bx+=""}if(!bx){continue}if(typeof bx==="string"){if(!W.test(bx)){bx=bw.createTextNode(bx)}else{bx=bx.replace(T,"<$1></$2>");var bI=(d.exec(bx)||["",""])[1].toLowerCase(),bv=au[bI]||au._default,bB=bv[0],bt=bw.createElement("div");bt.innerHTML=bv[1]+bx+bv[2];while(bB--){bt=bt.lastChild}if(!b.support.tbody){var e=y.test(bx),bA=bI==="table"&&!e?bt.firstChild&&bt.firstChild.childNodes:bv[1]==="<table>"&&!e?bt.childNodes:[];for(bz=bA.length-1;bz>=0;--bz){if(b.nodeName(bA[bz],"tbody")&&!bA[bz].childNodes.length){bA[bz].parentNode.removeChild(bA[bz])}}}if(!b.support.leadingWhitespace&&ao.test(bx)){bt.insertBefore(bw.createTextNode(ao.exec(bx)[0]),bt.firstChild)}bx=bt.childNodes}}var bE;if(!b.support.appendChecked){if(bx[0]&&typeof(bE=bx.length)==="number"){for(bz=0;bz<bE;bz++){G(bx[bz])}}else{G(bx)}}if(bx.nodeType){bG.push(bx)}else{bG=b.merge(bG,bx)}}if(bF){bD=function(bJ){return !bJ.type||bk.test(bJ.type)};for(bC=0;bG[bC];bC++){if(by&&b.nodeName(bG[bC],"script")&&(!bG[bC].type||bG[bC].type.toLowerCase()==="text/javascript")){by.push(bG[bC].parentNode?bG[bC].parentNode.removeChild(bG[bC]):bG[bC])}else{if(bG[bC].nodeType===1){var bH=b.grep(bG[bC].getElementsByTagName("script"),bD);bG.splice.apply(bG,[bC+1,0].concat(bH))}bF.appendChild(bG[bC])}}}return bG},cleanData:function(bt){var bw,bu,e=b.cache,bB=b.expando,bz=b.event.special,by=b.support.deleteExpando;for(var bx=0,bv;(bv=bt[bx])!=null;bx++){if(bv.nodeName&&b.noData[bv.nodeName.toLowerCase()]){continue}bu=bv[b.expando];if(bu){bw=e[bu]&&e[bu][bB];if(bw&&bw.events){for(var bA in bw.events){if(bz[bA]){b.event.remove(bv,bA)}else{b.removeEvent(bv,bA,bw.handle)}}if(bw.handle){bw.handle.elem=null}}if(by){delete bv[b.expando]}else{if(bv.removeAttribute){bv.removeAttribute(b.expando)}}delete e[bu]}}}});function bn(e,bt){if(bt.src){b.ajax({url:bt.src,async:false,dataType:"script"})}else{b.globalEval((bt.text||bt.textContent||bt.innerHTML||"").replace(aK,"/*$0*/"))}if(bt.parentNode){bt.parentNode.removeChild(bt)}}var ah=/alpha\([^)]*\)/i,aq=/opacity=([^)]*)/,B=/([A-Z]|^ms)/g,ba=/^-?\d+(?:px)?$/i,bm=/^-?\d/,K=/^([\-+])=([\-+.\de]+)/,a5={position:"absolute",visibility:"hidden",display:"block"},ak=["Left","Right"],a0=["Top","Bottom"],X,aF,aU;b.fn.css=function(e,bt){if(arguments.length===2&&bt===M){return this}return b.access(this,e,bt,true,function(bv,bu,bw){return bw!==M?b.style(bv,bu,bw):b.css(bv,bu)})};b.extend({cssHooks:{opacity:{get:function(bu,bt){if(bt){var e=X(bu,"opacity","opacity");return e===""?"1":e}else{return bu.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bv,bu,bB,bw){if(!bv||bv.nodeType===3||bv.nodeType===8||!bv.style){return}var bz,bA,bx=b.camelCase(bu),bt=bv.style,bC=b.cssHooks[bx];bu=b.cssProps[bx]||bx;if(bB!==M){bA=typeof bB;if(bA==="string"&&(bz=K.exec(bB))){bB=(+(bz[1]+1)*+bz[2])+parseFloat(b.css(bv,bu));bA="number"}if(bB==null||bA==="number"&&isNaN(bB)){return}if(bA==="number"&&!b.cssNumber[bx]){bB+="px"}if(!bC||!("set" in bC)||(bB=bC.set(bv,bB))!==M){try{bt[bu]=bB}catch(by){}}}else{if(bC&&"get" in bC&&(bz=bC.get(bv,false,bw))!==M){return bz}return bt[bu]}},css:function(bw,bv,bt){var bu,e;bv=b.camelCase(bv);e=b.cssHooks[bv];bv=b.cssProps[bv]||bv;if(bv==="cssFloat"){bv="float"}if(e&&"get" in e&&(bu=e.get(bw,true,bt))!==M){return bu}else{if(X){return X(bw,bv)}}},swap:function(bv,bu,bw){var e={};for(var bt in bu){e[bt]=bv.style[bt];bv.style[bt]=bu[bt]}bw.call(bv);for(bt in bu){bv.style[bt]=e[bt]}}});b.curCSS=b.css;b.each(["height","width"],function(bt,e){b.cssHooks[e]={get:function(bw,bv,bu){var bx;if(bv){if(bw.offsetWidth!==0){return p(bw,e,bu)}else{b.swap(bw,a5,function(){bx=p(bw,e,bu)})}return bx}},set:function(bu,bv){if(ba.test(bv)){bv=parseFloat(bv);if(bv>=0){return bv+"px"}}else{return bv}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bt,e){return aq.test((e&&bt.currentStyle?bt.currentStyle.filter:bt.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(bw,bx){var bv=bw.style,bt=bw.currentStyle,e=b.isNaN(bx)?"":"alpha(opacity="+bx*100+")",bu=bt&&bt.filter||bv.filter||"";bv.zoom=1;if(bx>=1&&b.trim(bu.replace(ah,""))===""){bv.removeAttribute("filter");if(bt&&!bt.filter){return}}bv.filter=ah.test(bu)?bu.replace(ah,e):bu+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bu,bt){var e;b.swap(bu,{display:"inline-block"},function(){if(bt){e=X(bu,"margin-right","marginRight")}else{e=bu.style.marginRight}});return e}}}});if(ar.defaultView&&ar.defaultView.getComputedStyle){aF=function(bw,bu){var bt,bv,e;bu=bu.replace(B,"-$1").toLowerCase();if(!(bv=bw.ownerDocument.defaultView)){return M}if((e=bv.getComputedStyle(bw,null))){bt=e.getPropertyValue(bu);if(bt===""&&!b.contains(bw.ownerDocument.documentElement,bw)){bt=b.style(bw,bu)}}return bt}}if(ar.documentElement.currentStyle){aU=function(bw,bu){var bx,bt=bw.currentStyle&&bw.currentStyle[bu],e=bw.runtimeStyle&&bw.runtimeStyle[bu],bv=bw.style;if(!ba.test(bt)&&bm.test(bt)){bx=bv.left;if(e){bw.runtimeStyle.left=bw.currentStyle.left}bv.left=bu==="fontSize"?"1em":(bt||0);bt=bv.pixelLeft+"px";bv.left=bx;if(e){bw.runtimeStyle.left=e}}return bt===""?"auto":bt}}X=aF||aU;function p(bu,bt,e){var bw=bt==="width"?bu.offsetWidth:bu.offsetHeight,bv=bt==="width"?ak:a0;if(bw>0){if(e!=="border"){b.each(bv,function(){if(!e){bw-=parseFloat(b.css(bu,"padding"+this))||0}if(e==="margin"){bw+=parseFloat(b.css(bu,e+this))||0}else{bw-=parseFloat(b.css(bu,"border"+this+"Width"))||0}})}return bw+"px"}bw=X(bu,bt,bt);if(bw<0||bw==null){bw=bu.style[bt]||0}bw=parseFloat(bw)||0;if(e){b.each(bv,function(){bw+=parseFloat(b.css(bu,"padding"+this))||0;if(e!=="padding"){bw+=parseFloat(b.css(bu,"border"+this+"Width"))||0}if(e==="margin"){bw+=parseFloat(b.css(bu,e+this))||0}})}return bw+"px"}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bu){var bt=bu.offsetWidth,e=bu.offsetHeight;return(bt===0&&e===0)||(!b.support.reliableHiddenOffsets&&(bu.style.display||b.css(bu,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var j=/%20/g,am=/\[\]$/,br=/\r?\n/g,bp=/#.*$/,aA=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aX=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aM=/^(?:GET|HEAD)$/,c=/^\/\//,N=/\?/,a4=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,r=/^(?:select|textarea)/i,h=/\s+/,bq=/([?&])_=[^&]*/,L=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,C=b.fn.load,Y={},s={},aB,u,aQ=["*/"]+["*"];try{aB=bj.href}catch(at){aB=ar.createElement("a");aB.href="";aB=aB.href}u=L.exec(aB.toLowerCase())||[];function f(e){return function(bw,by){if(typeof bw!=="string"){by=bw;bw="*"}if(b.isFunction(by)){var bv=bw.toLowerCase().split(h),bu=0,bx=bv.length,bt,bz,bA;for(;bu<bx;bu++){bt=bv[bu];bA=/^\+/.test(bt);if(bA){bt=bt.substr(1)||"*"}bz=e[bt]=e[bt]||[];bz[bA?"unshift":"push"](by)}}}}function aS(bt,bC,bx,bB,bz,bv){bz=bz||bC.dataTypes[0];bv=bv||{};bv[bz]=true;var by=bt[bz],bu=0,e=by?by.length:0,bw=(bt===Y),bA;for(;bu<e&&(bw||!bA);bu++){bA=by[bu](bC,bx,bB);if(typeof bA==="string"){if(!bw||bv[bA]){bA=M}else{bC.dataTypes.unshift(bA);bA=aS(bt,bC,bx,bB,bA,bv)}}}if((bw||!bA)&&!bv["*"]){bA=aS(bt,bC,bx,bB,"*",bv)}return bA}function aj(bu,bv){var bt,e,bw=b.ajaxSettings.flatOptions||{};for(bt in bv){if(bv[bt]!==M){(bw[bt]?bu:(e||(e={})))[bt]=bv[bt]}}if(e){b.extend(true,bu,e)}}b.fn.extend({load:function(bu,bx,by){if(typeof bu!=="string"&&C){return C.apply(this,arguments)}else{if(!this.length){return this}}var bw=bu.indexOf(" ");if(bw>=0){var e=bu.slice(bw,bu.length);bu=bu.slice(0,bw)}var bv="GET";if(bx){if(b.isFunction(bx)){by=bx;bx=M}else{if(typeof bx==="object"){bx=b.param(bx,b.ajaxSettings.traditional);bv="POST"}}}var bt=this;b.ajax({url:bu,type:bv,dataType:"html",data:bx,complete:function(bA,bz,bB){bB=bA.responseText;if(bA.isResolved()){bA.done(function(bC){bB=bC});bt.html(e?b("<div>").append(bB.replace(a4,"")).find(e):bB)}if(by){bt.each(by,[bB,bz,bA])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||r.test(this.nodeName)||aX.test(this.type))}).map(function(e,bt){var bu=b(this).val();return bu==null?null:b.isArray(bu)?b.map(bu,function(bw,bv){return{name:bt.name,value:bw.replace(br,"\r\n")}}):{name:bt.name,value:bu.replace(br,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bt){b.fn[bt]=function(bu){return this.bind(bt,bu)}});b.each(["get","post"],function(e,bt){b[bt]=function(bu,bw,bx,bv){if(b.isFunction(bw)){bv=bv||bx;bx=bw;bw=M}return b.ajax({type:bt,url:bu,data:bw,success:bx,dataType:bv})}});b.extend({getScript:function(e,bt){return b.get(e,M,bt,"script")},getJSON:function(e,bt,bu){return b.get(e,bt,bu,"json")},ajaxSetup:function(bt,e){if(e){aj(bt,b.ajaxSettings)}else{e=bt;bt=b.ajaxSettings}aj(bt,e);return bt},ajaxSettings:{url:aB,isLocal:aJ.test(u[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aQ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a9.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(Y),ajaxTransport:f(s),ajax:function(bx,bv){if(typeof bx==="object"){bv=bx;bx=M}bv=bv||{};var bB=b.ajaxSetup({},bv),bQ=bB.context||bB,bE=bQ!==bB&&(bQ.nodeType||bQ instanceof b)?b(bQ):b.event,bP=b.Deferred(),bL=b._Deferred(),bz=bB.statusCode||{},bA,bF={},bM={},bO,bw,bJ,bC,bG,by=0,bu,bI,bH={readyState:0,setRequestHeader:function(bR,bS){if(!by){var e=bR.toLowerCase();bR=bM[e]=bM[e]||bR;bF[bR]=bS}return this},getAllResponseHeaders:function(){return by===2?bO:null},getResponseHeader:function(bR){var e;if(by===2){if(!bw){bw={};while((e=aA.exec(bO))){bw[e[1].toLowerCase()]=e[2]}}e=bw[bR.toLowerCase()]}return e===M?null:e},overrideMimeType:function(e){if(!by){bB.mimeType=e}return this},abort:function(e){e=e||"abort";if(bJ){bJ.abort(e)}bD(0,e);return this}};function bD(bX,bS,bY,bU){if(by===2){return}by=2;if(bC){clearTimeout(bC)}bJ=M;bO=bU||"";bH.readyState=bX>0?4:0;var bR,b2,b1,bV=bS,bW=bY?bh(bB,bH,bY):M,bT,b0;if(bX>=200&&bX<300||bX===304){if(bB.ifModified){if((bT=bH.getResponseHeader("Last-Modified"))){b.lastModified[bA]=bT}if((b0=bH.getResponseHeader("Etag"))){b.etag[bA]=b0}}if(bX===304){bV="notmodified";bR=true}else{try{b2=H(bB,bW);bV="success";bR=true}catch(bZ){bV="parsererror";b1=bZ}}}else{b1=bV;if(!bV||bX){bV="error";if(bX<0){bX=0}}}bH.status=bX;bH.statusText=""+(bS||bV);if(bR){bP.resolveWith(bQ,[b2,bV,bH])}else{bP.rejectWith(bQ,[bH,bV,b1])}bH.statusCode(bz);bz=M;if(bu){bE.trigger("ajax"+(bR?"Success":"Error"),[bH,bB,bR?b2:b1])}bL.resolveWith(bQ,[bH,bV]);if(bu){bE.trigger("ajaxComplete",[bH,bB]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bP.promise(bH);bH.success=bH.done;bH.error=bH.fail;bH.complete=bL.done;bH.statusCode=function(bR){if(bR){var e;if(by<2){for(e in bR){bz[e]=[bz[e],bR[e]]}}else{e=bR[bH.status];bH.then(e,e)}}return this};bB.url=((bx||bB.url)+"").replace(bp,"").replace(c,u[1]+"//");bB.dataTypes=b.trim(bB.dataType||"*").toLowerCase().split(h);if(bB.crossDomain==null){bG=L.exec(bB.url.toLowerCase());bB.crossDomain=!!(bG&&(bG[1]!=u[1]||bG[2]!=u[2]||(bG[3]||(bG[1]==="http:"?80:443))!=(u[3]||(u[1]==="http:"?80:443))))}if(bB.data&&bB.processData&&typeof bB.data!=="string"){bB.data=b.param(bB.data,bB.traditional)}aS(Y,bB,bv,bH);if(by===2){return false}bu=bB.global;bB.type=bB.type.toUpperCase();bB.hasContent=!aM.test(bB.type);if(bu&&b.active++===0){b.event.trigger("ajaxStart")}if(!bB.hasContent){if(bB.data){bB.url+=(N.test(bB.url)?"&":"?")+bB.data;delete bB.data}bA=bB.url;if(bB.cache===false){var bt=b.now(),bN=bB.url.replace(bq,"$1_="+bt);bB.url=bN+((bN===bB.url)?(N.test(bB.url)?"&":"?")+"_="+bt:"")}}if(bB.data&&bB.hasContent&&bB.contentType!==false||bv.contentType){bH.setRequestHeader("Content-Type",bB.contentType)}if(bB.ifModified){bA=bA||bB.url;if(b.lastModified[bA]){bH.setRequestHeader("If-Modified-Since",b.lastModified[bA])}if(b.etag[bA]){bH.setRequestHeader("If-None-Match",b.etag[bA])}}bH.setRequestHeader("Accept",bB.dataTypes[0]&&bB.accepts[bB.dataTypes[0]]?bB.accepts[bB.dataTypes[0]]+(bB.dataTypes[0]!=="*"?", "+aQ+"; q=0.01":""):bB.accepts["*"]);for(bI in bB.headers){bH.setRequestHeader(bI,bB.headers[bI])}if(bB.beforeSend&&(bB.beforeSend.call(bQ,bH,bB)===false||by===2)){bH.abort();return false}for(bI in {success:1,error:1,complete:1}){bH[bI](bB[bI])}bJ=aS(s,bB,bv,bH);if(!bJ){bD(-1,"No Transport")}else{bH.readyState=1;if(bu){bE.trigger("ajaxSend",[bH,bB])}if(bB.async&&bB.timeout>0){bC=setTimeout(function(){bH.abort("timeout")},bB.timeout)}try{by=1;bJ.send(bF,bD)}catch(bK){if(by<2){bD(-1,bK)}else{b.error(bK)}}}return bH},param:function(e,bu){var bt=[],bw=function(bx,by){by=b.isFunction(by)?by():by;bt[bt.length]=encodeURIComponent(bx)+"="+encodeURIComponent(by)};if(bu===M){bu=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){bw(this.name,this.value)})}else{for(var bv in e){x(bv,e[bv],bu,bw)}}return bt.join("&").replace(j,"+")}});function x(bu,bw,bt,bv){if(b.isArray(bw)){b.each(bw,function(by,bx){if(bt||am.test(bu)){bv(bu,bx)}else{x(bu+"["+(typeof bx==="object"||b.isArray(bx)?by:"")+"]",bx,bt,bv)}})}else{if(!bt&&bw!=null&&typeof bw==="object"){for(var e in bw){x(bu+"["+e+"]",bw[e],bt,bv)}}else{bv(bu,bw)}}}b.extend({active:0,lastModified:{},etag:{}});function bh(bB,bA,bx){var bt=bB.contents,bz=bB.dataTypes,bu=bB.responseFields,bw,by,bv,e;for(by in bu){if(by in bx){bA[bu[by]]=bx[by]}}while(bz[0]==="*"){bz.shift();if(bw===M){bw=bB.mimeType||bA.getResponseHeader("content-type")}}if(bw){for(by in bt){if(bt[by]&&bt[by].test(bw)){bz.unshift(by);break}}}if(bz[0] in bx){bv=bz[0]}else{for(by in bx){if(!bz[0]||bB.converters[by+" "+bz[0]]){bv=by;break}if(!e){e=by}}bv=bv||e}if(bv){if(bv!==bz[0]){bz.unshift(bv)}return bx[bv]}}function H(bF,bx){if(bF.dataFilter){bx=bF.dataFilter(bx,bF.dataType)}var bB=bF.dataTypes,bE={},by,bC,bu=bB.length,bz,bA=bB[0],bv,bw,bD,bt,e;for(by=1;by<bu;by++){if(by===1){for(bC in bF.converters){if(typeof bC==="string"){bE[bC.toLowerCase()]=bF.converters[bC]}}}bv=bA;bA=bB[by];if(bA==="*"){bA=bv}else{if(bv!=="*"&&bv!==bA){bw=bv+" "+bA;bD=bE[bw]||bE["* "+bA];if(!bD){e=M;for(bt in bE){bz=bt.split(" ");if(bz[0]===bv||bz[0]==="*"){e=bE[bz[1]+" "+bA];if(e){bt=bE[bt];if(bt===true){bD=e}else{if(e===true){bD=bt}}break}}}}if(!(bD||e)){b.error("No conversion from "+bw.replace(" "," to "))}if(bD!==true){bx=bD?bD(bx):e(bt(bx))}}}}return bx}var az=b.now(),w=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(az++)}});b.ajaxPrefilter("json jsonp",function(bB,by,bA){var bv=bB.contentType==="application/x-www-form-urlencoded"&&(typeof bB.data==="string");if(bB.dataTypes[0]==="jsonp"||bB.jsonp!==false&&(w.test(bB.url)||bv&&w.test(bB.data))){var bz,bu=bB.jsonpCallback=b.isFunction(bB.jsonpCallback)?bB.jsonpCallback():bB.jsonpCallback,bx=a9[bu],e=bB.url,bw=bB.data,bt="$1"+bu+"$2";if(bB.jsonp!==false){e=e.replace(w,bt);if(bB.url===e){if(bv){bw=bw.replace(w,bt)}if(bB.data===bw){e+=(/\?/.test(e)?"&":"?")+bB.jsonp+"="+bu}}}bB.url=e;bB.data=bw;a9[bu]=function(bC){bz=[bC]};bA.always(function(){a9[bu]=bx;if(bz&&b.isFunction(bx)){a9[bu](bz[0])}});bB.converters["script json"]=function(){if(!bz){b.error(bu+" was not called")}return bz[0]};bB.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===M){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bu){if(bu.crossDomain){var e,bt=ar.head||ar.getElementsByTagName("head")[0]||ar.documentElement;return{send:function(bv,bw){e=ar.createElement("script");e.async="async";if(bu.scriptCharset){e.charset=bu.scriptCharset}e.src=bu.url;e.onload=e.onreadystatechange=function(by,bx){if(bx||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bt&&e.parentNode){bt.removeChild(e)}e=M;if(!bx){bw(200,"success")}}};bt.insertBefore(e,bt.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var D=a9.ActiveXObject?function(){for(var e in O){O[e](0,1)}}:false,A=0,O;function aI(){try{return new a9.XMLHttpRequest()}catch(bt){}}function ag(){try{return new a9.ActiveXObject("Microsoft.XMLHTTP")}catch(bt){}}b.ajaxSettings.xhr=a9.ActiveXObject?function(){return !this.isLocal&&aI()||ag()}:aI;(function(e){b.extend(b.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(b.ajaxSettings.xhr());if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var bt;return{send:function(bz,bu){var by=e.xhr(),bx,bw;if(e.username){by.open(e.type,e.url,e.async,e.username,e.password)}else{by.open(e.type,e.url,e.async)}if(e.xhrFields){for(bw in e.xhrFields){by[bw]=e.xhrFields[bw]}}if(e.mimeType&&by.overrideMimeType){by.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bz["X-Requested-With"]){bz["X-Requested-With"]="XMLHttpRequest"}try{for(bw in bz){by.setRequestHeader(bw,bz[bw])}}catch(bv){}by.send((e.hasContent&&e.data)||null);bt=function(bI,bC){var bD,bB,bA,bG,bF;try{if(bt&&(bC||by.readyState===4)){bt=M;if(bx){by.onreadystatechange=b.noop;if(D){delete O[bx]}}if(bC){if(by.readyState!==4){by.abort()}}else{bD=by.status;bA=by.getAllResponseHeaders();bG={};bF=by.responseXML;if(bF&&bF.documentElement){bG.xml=bF}bG.text=by.responseText;try{bB=by.statusText}catch(bH){bB=""}if(!bD&&e.isLocal&&!e.crossDomain){bD=bG.text?200:404}else{if(bD===1223){bD=204}}}}}catch(bE){if(!bC){bu(-1,bE)}}if(bG){bu(bD,bB,bG,bA)}};if(!e.async||by.readyState===4){bt()}else{bx=++A;if(D){if(!O){O={};b(a9).unload(D)}O[bx]=bt}by.onreadystatechange=bt}},abort:function(){if(bt){bt(0,1)}}}}})}var S={},a6,n,ay=/^(?:toggle|show|hide)$/,aO=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,a1,aE=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a2;b.fn.extend({show:function(bv,by,bx){var bu,bw;if(bv||bv===0){return this.animate(aZ("show",3),bv,by,bx)}else{for(var bt=0,e=this.length;bt<e;bt++){bu=this[bt];if(bu.style){bw=bu.style.display;if(!b._data(bu,"olddisplay")&&bw==="none"){bw=bu.style.display=""}if(bw===""&&b.css(bu,"display")==="none"){b._data(bu,"olddisplay",z(bu.nodeName))}}}for(bt=0;bt<e;bt++){bu=this[bt];if(bu.style){bw=bu.style.display;if(bw===""||bw==="none"){bu.style.display=b._data(bu,"olddisplay")||""}}}return this}},hide:function(bu,bx,bw){if(bu||bu===0){return this.animate(aZ("hide",3),bu,bx,bw)}else{for(var bt=0,e=this.length;bt<e;bt++){if(this[bt].style){var bv=b.css(this[bt],"display");if(bv!=="none"&&!b._data(this[bt],"olddisplay")){b._data(this[bt],"olddisplay",bv)}}}for(bt=0;bt<e;bt++){if(this[bt].style){this[bt].style.display="none"}}return this}},_toggle:b.fn.toggle,toggle:function(bu,bt,bv){var e=typeof bu==="boolean";if(b.isFunction(bu)&&b.isFunction(bt)){this._toggle.apply(this,arguments)}else{if(bu==null||e){this.each(function(){var bw=e?bu:b(this).is(":hidden");b(this)[bw?"show":"hide"]()})}else{this.animate(aZ("toggle",3),bu,bt,bv)}}return this},fadeTo:function(e,bv,bu,bt){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bv},e,bu,bt)},animate:function(bw,bt,bv,bu){var e=b.speed(bt,bv,bu);if(b.isEmptyObject(bw)){return this.each(e.complete,[false])}bw=b.extend({},bw);return this[e.queue===false?"each":"queue"](function(){if(e.queue===false){b._mark(this)}var bA=b.extend({},e),bH=this.nodeType===1,bE=bH&&b(this).is(":hidden"),bx,bB,bz,bG,bF,bD,by,bC,bI;bA.animatedProperties={};for(bz in bw){bx=b.camelCase(bz);if(bz!==bx){bw[bx]=bw[bz];delete bw[bz]}bB=bw[bx];if(b.isArray(bB)){bA.animatedProperties[bx]=bB[1];bB=bw[bx]=bB[0]}else{bA.animatedProperties[bx]=bA.specialEasing&&bA.specialEasing[bx]||bA.easing||"swing"}if(bB==="hide"&&bE||bB==="show"&&!bE){return bA.complete.call(this)}if(bH&&(bx==="height"||bx==="width")){bA.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout){this.style.display="inline-block"}else{bG=z(this.nodeName);if(bG==="inline"){this.style.display="inline-block"}else{this.style.display="inline";this.style.zoom=1}}}}}if(bA.overflow!=null){this.style.overflow="hidden"}for(bz in bw){bF=new b.fx(this,bA,bz);bB=bw[bz];if(ay.test(bB)){bF[bB==="toggle"?bE?"show":"hide":bB]()}else{bD=aO.exec(bB);by=bF.cur();if(bD){bC=parseFloat(bD[2]);bI=bD[3]||(b.cssNumber[bz]?"":"px");if(bI!=="px"){b.style(this,bz,(bC||1)+bI);by=((bC||1)/bF.cur())*by;b.style(this,bz,by+bI)}if(bD[1]){bC=((bD[1]==="-="?-1:1)*bC)+by}bF.custom(by,bC,bI)}else{bF.custom(by,bB,"")}}}return true})},stop:function(bt,e){if(bt){this.queue([])}this.each(function(){var bv=b.timers,bu=bv.length;if(!e){b._unmark(true,this)}while(bu--){if(bv[bu].elem===this){if(e){bv[bu](true)}bv.splice(bu,1)}}});if(!e){this.dequeue()}return this}});function be(){setTimeout(ap,0);return(a2=b.now())}function ap(){a2=M}function aZ(bt,e){var bu={};b.each(aE.concat.apply([],aE.slice(0,e)),function(){bu[this]=bt});return bu}b.each({slideDown:aZ("show",1),slideUp:aZ("hide",1),slideToggle:aZ("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bt){b.fn[e]=function(bu,bw,bv){return this.animate(bt,bu,bw,bv)}});b.extend({speed:function(bu,bv,bt){var e=bu&&typeof bu==="object"?b.extend({},bu):{complete:bt||!bt&&bv||b.isFunction(bu)&&bu,duration:bu,easing:bt&&bv||bv&&!b.isFunction(bv)&&bv};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;e.old=e.complete;e.complete=function(bw){if(b.isFunction(e.old)){e.old.call(this)}if(e.queue!==false){b.dequeue(this)}else{if(bw!==false){b._unmark(this)}}};return e},easing:{linear:function(bu,bv,e,bt){return e+bt*bu},swing:function(bu,bv,e,bt){return((-Math.cos(bu*Math.PI)/2)+0.5)*bt+e}},timers:[],fx:function(bt,e,bu){this.options=e;this.elem=bt;this.prop=bu;e.orig=e.orig||{}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,bt=b.css(this.elem,this.prop);return isNaN(e=parseFloat(bt))?!bt||bt==="auto"?0:bt:e},custom:function(bx,bw,bv){var e=this,bu=b.fx;this.startTime=a2||be();this.start=bx;this.end=bw;this.unit=bv||this.unit||(b.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;function bt(by){return e.step(by)}bt.elem=this.elem;if(bt()&&b.timers.push(bt)&&!a1){a1=setInterval(bu.tick,bu.interval)}},show:function(){this.options.orig[this.prop]=b.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(bw){var bv=a2||be(),e=true,bx=this.elem,bt=this.options,bu,bz;if(bw||bv>=bt.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bt.animatedProperties[this.prop]=true;for(bu in bt.animatedProperties){if(bt.animatedProperties[bu]!==true){e=false}}if(e){if(bt.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bA,bB){bx.style["overflow"+bB]=bt.overflow[bA]})}if(bt.hide){b(bx).hide()}if(bt.hide||bt.show){for(var by in bt.animatedProperties){b.style(bx,by,bt.orig[by])}}bt.complete.call(bx)}return false}else{if(bt.duration==Infinity){this.now=bv}else{bz=bv-this.startTime;this.state=bz/bt.duration;this.pos=b.easing[bt.animatedProperties[this.prop]](this.state,bz,0,1,bt.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){for(var bt=b.timers,e=0;e<bt.length;++e){if(!bt[e]()){bt.splice(e--,1)}}if(!bt.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(a1);a1=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=(e.prop==="width"||e.prop==="height"?Math.max(0,e.now):e.now)+e.unit}else{e.elem[e.prop]=e.now}}}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(bt){return e===bt.elem}).length}}function z(bv){if(!S[bv]){var e=ar.body,bt=b("<"+bv+">").appendTo(e),bu=bt.css("display");bt.remove();if(bu==="none"||bu===""){if(!a6){a6=ar.createElement("iframe");a6.frameBorder=a6.width=a6.height=0}e.appendChild(a6);if(!n||!a6.createElement){n=(a6.contentWindow||a6.contentDocument).document;n.write((ar.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");n.close()}bt=n.createElement(bv);n.body.appendChild(bt);bu=b.css(bt,"display");e.removeChild(a6)}S[bv]=bu}return S[bv]}var V=/^t(?:able|d|h)$/i,ab=/^(?:body|html)$/i;if("getBoundingClientRect" in ar.documentElement){b.fn.offset=function(bG){var bw=this[0],bz;if(bG){return this.each(function(e){b.offset.setOffset(this,bG,e)})}if(!bw||!bw.ownerDocument){return null}if(bw===bw.ownerDocument.body){return b.offset.bodyOffset(bw)}try{bz=bw.getBoundingClientRect()}catch(bD){}var bF=bw.ownerDocument,bu=bF.documentElement;if(!bz||!b.contains(bu,bw)){return bz?{top:bz.top,left:bz.left}:{top:0,left:0}}var bA=bF.body,bB=aH(bF),by=bu.clientTop||bA.clientTop||0,bC=bu.clientLeft||bA.clientLeft||0,bt=bB.pageYOffset||b.support.boxModel&&bu.scrollTop||bA.scrollTop,bx=bB.pageXOffset||b.support.boxModel&&bu.scrollLeft||bA.scrollLeft,bE=bz.top+bt-by,bv=bz.left+bx-bC;return{top:bE,left:bv}}}else{b.fn.offset=function(bD){var bx=this[0];if(bD){return this.each(function(bE){b.offset.setOffset(this,bD,bE)})}if(!bx||!bx.ownerDocument){return null}if(bx===bx.ownerDocument.body){return b.offset.bodyOffset(bx)}b.offset.initialize();var bA,bu=bx.offsetParent,bt=bx,bC=bx.ownerDocument,bv=bC.documentElement,by=bC.body,bz=bC.defaultView,e=bz?bz.getComputedStyle(bx,null):bx.currentStyle,bB=bx.offsetTop,bw=bx.offsetLeft;while((bx=bx.parentNode)&&bx!==by&&bx!==bv){if(b.offset.supportsFixedPosition&&e.position==="fixed"){break}bA=bz?bz.getComputedStyle(bx,null):bx.currentStyle;bB-=bx.scrollTop;bw-=bx.scrollLeft;if(bx===bu){bB+=bx.offsetTop;bw+=bx.offsetLeft;if(b.offset.doesNotAddBorder&&!(b.offset.doesAddBorderForTableAndCells&&V.test(bx.nodeName))){bB+=parseFloat(bA.borderTopWidth)||0;bw+=parseFloat(bA.borderLeftWidth)||0}bt=bu;bu=bx.offsetParent}if(b.offset.subtractsBorderForOverflowNotVisible&&bA.overflow!=="visible"){bB+=parseFloat(bA.borderTopWidth)||0;bw+=parseFloat(bA.borderLeftWidth)||0}e=bA}if(e.position==="relative"||e.position==="static"){bB+=by.offsetTop;bw+=by.offsetLeft}if(b.offset.supportsFixedPosition&&e.position==="fixed"){bB+=Math.max(bv.scrollTop,by.scrollTop);bw+=Math.max(bv.scrollLeft,by.scrollLeft)}return{top:bB,left:bw}}}b.offset={initialize:function(){var e=ar.body,bt=ar.createElement("div"),bw,by,bx,bz,bu=parseFloat(b.css(e,"marginTop"))||0,bv="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";b.extend(bt.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});bt.innerHTML=bv;e.insertBefore(bt,e.firstChild);bw=bt.firstChild;by=bw.firstChild;bz=bw.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(by.offsetTop!==5);this.doesAddBorderForTableAndCells=(bz.offsetTop===5);by.style.position="fixed";by.style.top="20px";this.supportsFixedPosition=(by.offsetTop===20||by.offsetTop===15);by.style.position=by.style.top="";bw.style.overflow="hidden";bw.style.position="relative";this.subtractsBorderForOverflowNotVisible=(by.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==bu);e.removeChild(bt);b.offset.initialize=b.noop},bodyOffset:function(e){var bu=e.offsetTop,bt=e.offsetLeft;b.offset.initialize();if(b.offset.doesNotIncludeMarginInBodyOffset){bu+=parseFloat(b.css(e,"marginTop"))||0;bt+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bu,left:bt}},setOffset:function(bv,bE,by){var bz=b.css(bv,"position");if(bz==="static"){bv.style.position="relative"}var bx=b(bv),bt=bx.offset(),e=b.css(bv,"top"),bC=b.css(bv,"left"),bD=(bz==="absolute"||bz==="fixed")&&b.inArray("auto",[e,bC])>-1,bB={},bA={},bu,bw;if(bD){bA=bx.position();bu=bA.top;bw=bA.left}else{bu=parseFloat(e)||0;bw=parseFloat(bC)||0}if(b.isFunction(bE)){bE=bE.call(bv,by,bt)}if(bE.top!=null){bB.top=(bE.top-bt.top)+bu}if(bE.left!=null){bB.left=(bE.left-bt.left)+bw}if("using" in bE){bE.using.call(bv,bB)}else{bx.css(bB)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bu=this[0],bt=this.offsetParent(),bv=this.offset(),e=ab.test(bt[0].nodeName)?{top:0,left:0}:bt.offset();bv.top-=parseFloat(b.css(bu,"marginTop"))||0;bv.left-=parseFloat(b.css(bu,"marginLeft"))||0;e.top+=parseFloat(b.css(bt[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bt[0],"borderLeftWidth"))||0;return{top:bv.top-e.top,left:bv.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||ar.body;while(e&&(!ab.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bt,e){var bu="scroll"+e;b.fn[bu]=function(bx){var bv,bw;if(bx===M){bv=this[0];if(!bv){return null}bw=aH(bv);return bw?("pageXOffset" in bw)?bw[bt?"pageYOffset":"pageXOffset"]:b.support.boxModel&&bw.document.documentElement[bu]||bw.document.body[bu]:bv[bu]}return this.each(function(){bw=aH(this);if(bw){bw.scrollTo(!bt?bx:b(bw).scrollLeft(),bt?bx:b(bw).scrollTop())}else{this[bu]=bx}})}});function aH(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bt,e){var bu=e.toLowerCase();b.fn["inner"+e]=function(){var bv=this[0];return bv&&bv.style?parseFloat(b.css(bv,bu,"padding")):null};b.fn["outer"+e]=function(bw){var bv=this[0];return bv&&bv.style?parseFloat(b.css(bv,bu,bw?"margin":"border")):null};b.fn[bu]=function(bx){var by=this[0];if(!by){return bx==null?null:this}if(b.isFunction(bx)){return this.each(function(bC){var bB=b(this);bB[bu](bx.call(this,bC,bB[bu]()))})}if(b.isWindow(by)){var bz=by.document.documentElement["client"+e],bv=by.document.body;return by.document.compatMode==="CSS1Compat"&&bz||bv&&bv["client"+e]||bz}else{if(by.nodeType===9){return Math.max(by.documentElement["client"+e],by.body["scroll"+e],by.documentElement["scroll"+e],by.body["offset"+e],by.documentElement["offset"+e])}else{if(bx===M){var bA=b.css(by,bu),bw=parseFloat(bA);return b.isNaN(bw)?bA:bw}else{return this.css(bu,typeof bx==="string"?bx:bx+"px")}}}}});a9.jQuery=a9.$=b})(window);var jq=jQuery.noConflict(true);jq.cookie=function(b,j,n){if(typeof j!="undefined"){n=n||{};if(j===null){j="";n=jq.extend({},n);n.expires=-1}var e="";if(n.expires&&(typeof n.expires=="number"||n.expires.toUTCString)){var f;if(typeof n.expires=="number"){f=new Date();f.setTime(f.getTime()+(n.expires*24*60*60*1000))}else{f=n.expires}e="; expires="+f.toUTCString()}var m=n.path?"; path="+(n.path):"";var g=n.domain?"; domain="+(n.domain):"";var a=n.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,m,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var l=document.cookie.split(";");for(var h=0;h<l.length;h++){var c=jq.trim(l[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
/*!
 * 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(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.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}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),l={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(n,m,i,o){a.each(f,function(){m-=parseFloat(a.curCSS(n,"padding"+this,true))||0;if(i){m-=parseFloat(a.curCSS(n,"border"+this+"Width",true))||0}if(o){m-=parseFloat(a.curCSS(n,"margin"+this,true))||0}});return m}a.fn["inner"+e]=function(i){if(i===d){return l["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,m){if(typeof i!=="number"){return l["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,m)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},contains:function(f,e){return document.compareDocumentPosition?f.compareDocumentPosition(e)&16:f!==e&&f.contains(e)},hasScroll:function(h,f){if(a(h).css("overflow")==="hidden"){return false}var e=(f&&f==="left")?"scrollLeft":"scrollTop",g=false;if(h[e]>0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jq);
/*!
 * jQuery UI Widget 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(l){return !!b.data(l,f)};b[g]=b[g]||{};b[g][f]=function(l,m){if(arguments.length){this._createWidget(l,m)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var l=b.data(this,f),m=l&&b.isFunction(l[i])?l[i].apply(l,h):l;if(m!==l&&m!==d){j=m;return false}})}else{this.each(function(){var l=b.data(this,f);if(l){l.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.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(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(f,g,h){var l=this.options[f];g=b.Event(g);g.type=(f===this.widgetEventPrefix?f:this.widgetEventPrefix+f).toLowerCase();h=h||{};if(g.originalEvent){for(var e=b.event.props.length,j;e;){j=b.event.props[--e];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(b.isFunction(l)&&l.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jq);
/*!
 * jQuery UI Mouse 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 * jquery.ui.widget.js
 */
(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jq);(function(f,g){f.ui=f.ui||{};var d=/left|center|right/,e=/top|center|bottom/,a="center",b=f.fn.position,c=f.fn.offset;f.fn.position=function(i){if(!i||!i.of){return b.apply(this,arguments)}i=f.extend({},i);var n=f(i.of),m=n[0],p=(i.collision||"flip").split(" "),o=i.offset?i.offset.split(" "):[0,0],l,h,j;if(m.nodeType===9){l=n.width();h=n.height();j={top:0,left:0}}else{if(m.setTimeout){l=n.width();h=n.height();j={top:n.scrollTop(),left:n.scrollLeft()}}else{if(m.preventDefault){i.at="left top";l=h=0;j={top:i.of.pageY,left:i.of.pageX}}else{l=n.outerWidth();h=n.outerHeight();j=n.offset()}}}f.each(["my","at"],function(){var q=(i[this]||"").split(" ");if(q.length===1){q=d.test(q[0])?q.concat([a]):e.test(q[0])?[a].concat(q):[a,a]}q[0]=d.test(q[0])?q[0]:a;q[1]=e.test(q[1])?q[1]:a;i[this]=q});if(p.length===1){p[1]=p[0]}o[0]=parseInt(o[0],10)||0;if(o.length===1){o[1]=o[0]}o[1]=parseInt(o[1],10)||0;if(i.at[0]==="right"){j.left+=l}else{if(i.at[0]===a){j.left+=l/2}}if(i.at[1]==="bottom"){j.top+=h}else{if(i.at[1]===a){j.top+=h/2}}j.left+=o[0];j.top+=o[1];return this.each(function(){var u=f(this),w=u.outerWidth(),s=u.outerHeight(),v=parseInt(f.curCSS(this,"marginLeft",true))||0,r=parseInt(f.curCSS(this,"marginTop",true))||0,y=w+v+(parseInt(f.curCSS(this,"marginRight",true))||0),z=s+r+(parseInt(f.curCSS(this,"marginBottom",true))||0),x=f.extend({},j),q;if(i.my[0]==="right"){x.left-=w}else{if(i.my[0]===a){x.left-=w/2}}if(i.my[1]==="bottom"){x.top-=s}else{if(i.my[1]===a){x.top-=s/2}}x.left=Math.round(x.left);x.top=Math.round(x.top);q={left:x.left-v,top:x.top-r};f.each(["left","top"],function(B,A){if(f.ui.position[p[B]]){f.ui.position[p[B]][A](x,{targetWidth:l,targetHeight:h,elemWidth:w,elemHeight:s,collisionPosition:q,collisionWidth:y,collisionHeight:z,offset:o,my:i.my,at:i.at})}});if(f.fn.bgiframe){u.bgiframe()}u.offset(f.extend(x,{using:i.using}))})};f.ui.position={fit:{left:function(h,i){var l=f(window),j=i.collisionPosition.left+i.collisionWidth-l.width()-l.scrollLeft();h.left=j>0?h.left-j:Math.max(h.left-i.collisionPosition.left,h.left)},top:function(h,i){var l=f(window),j=i.collisionPosition.top+i.collisionHeight-l.height()-l.scrollTop();h.top=j>0?h.top-j:Math.max(h.top-i.collisionPosition.top,h.top)}},flip:{left:function(i,l){if(l.at[0]===a){return}var n=f(window),m=l.collisionPosition.left+l.collisionWidth-n.width()-n.scrollLeft(),h=l.my[0]==="left"?-l.elemWidth:l.my[0]==="right"?l.elemWidth:0,j=l.at[0]==="left"?l.targetWidth:-l.targetWidth,o=-2*l.offset[0];i.left+=l.collisionPosition.left<0?h+j+o:m>0?h+j+o:0},top:function(i,l){if(l.at[1]===a){return}var n=f(window),m=l.collisionPosition.top+l.collisionHeight-n.height()-n.scrollTop(),h=l.my[1]==="top"?-l.elemHeight:l.my[1]==="bottom"?l.elemHeight:0,j=l.at[1]==="top"?l.targetHeight:-l.targetHeight,o=-2*l.offset[1];i.top+=l.collisionPosition.top<0?h+j+o:m>0?h+j+o:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(m,i){if(/static/.test(f.curCSS(m,"position"))){m.style.position="relative"}var l=f(m),o=l.offset(),h=parseInt(f.curCSS(m,"top",true),10)||0,n=parseInt(f.curCSS(m,"left",true),10)||0,j={top:(i.top-o.top)+h,left:(i.left-o.left)+n};if("using" in i){i.using.call(m,j)}else{l.css(j)}};f.fn.offset=function(h){var i=this[0];if(!i||!i.ownerDocument){return null}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return c.call(this)}}}(jq));(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(c){var d=this.options;if(this.helper||d.disabled||a(c.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(c);if(!this.handle){return false}if(d.iframeFix){a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})}return true},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;(d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt));if(d.containment){this._setContainment()}if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();if(a.ui.ddmanager&&!d.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,c)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);if(a.ui.ddmanager){a.ui.ddmanager.dragStart(this,c)}return true},_mouseDrag:function(c,e){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!e){var d=this._uiHash();if(this._trigger("drag",c,d)===false){this._mouseUp({});return false}this.position=d.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,c)}return false},_mouseStop:function(d){var e=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){e=a.ui.ddmanager.drop(this,d)}if(this.dropped){e=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if((this.options.revert=="invalid"&&!e)||(this.options.revert=="valid"&&e)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,e))){var c=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(c._trigger("stop",d)!==false){c._clear()}})}else{if(this._trigger("stop",d)!==false){this._clear()}}return false},_mouseUp:function(c){if(this.options.iframeFix===true){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}if(a.ui.ddmanager){a.ui.ddmanager.dragStop(this,c)}return a.ui.mouse.prototype._mouseUp.call(this,c)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(c){var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target){d=true}});return d},_createHelper:function(d){var e=this.options;var c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[d])):(e.helper=="clone"?this.element.clone().removeAttr("id"):this.element);if(!c.parents("body").length){c.appendTo((e.appendTo=="parent"?this.element[0].parentNode:e.appendTo))}if(c[0]!=this.element[0]&&!(/(fixed|absolute)/).test(c.css("position"))){c.css("position","absolute")}return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0),right:(parseInt(this.element.css("marginRight"),10)||0),bottom:(parseInt(this.element.css("marginBottom"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var g=this.options;if(g.containment=="parent"){g.containment=this.helper[0].parentNode}if(g.containment=="document"||g.containment=="window"){this.containment=[g.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,g.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(g.containment=="document"?0:a(window).scrollLeft())+a(g.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(g.containment=="document"?0:a(window).scrollTop())+(a(g.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(g.containment)&&g.containment.constructor!=Array){var h=a(g.containment);var e=h[0];if(!e){return}var f=h.offset();var d=(a(e).css("overflow")!="hidden");this.containment=[(parseInt(a(e).css("borderLeftWidth"),10)||0)+(parseInt(a(e).css("paddingLeft"),10)||0),(parseInt(a(e).css("borderTopWidth"),10)||0)+(parseInt(a(e).css("paddingTop"),10)||0),(d?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(a(e).css("borderLeftWidth"),10)||0)-(parseInt(a(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(d?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(a(e).css("borderTopWidth"),10)||0)-(parseInt(a(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=h}else{if(g.containment.constructor==Array){this.containment=g.containment}}},_convertPositionTo:function(g,i){if(!i){i=this.position}var e=g=="absolute"?1:-1;var f=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);return{top:(i.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*e)),left:(i.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*e))}},_generatePosition:function(d){var e=this.options,m=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(m[0].tagName);var h=d.pageX;var g=d.pageY;if(this.originalPosition){var c;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();c=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else{c=this.containment}if(d.pageX-this.offset.click.left<c[0]){h=c[0]+this.offset.click.left}if(d.pageY-this.offset.click.top<c[1]){g=c[1]+this.offset.click.top}if(d.pageX-this.offset.click.left>c[2]){h=c[2]+this.offset.click.left}if(d.pageY-this.offset.click.top>c[3]){g=c[3]+this.offset.click.top}}if(e.grid){var j=e.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1]:this.originalPageY;g=c?(!(j-this.offset.click.top<c[1]||j-this.offset.click.top>c[3])?j:(!(j-this.offset.click.top<c[1])?j-e.grid[1]:j+e.grid[1])):j;var f=e.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/e.grid[0])*e.grid[0]:this.originalPageX;h=c?(!(f-this.offset.click.left<c[0]||f-this.offset.click.left>c[2])?f:(!(f-this.offset.click.left<c[0])?f-e.grid[0]:f+e.grid[0])):f}}return{top:(g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:m.scrollTop())))),left:(h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:m.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,d,e){e=e||this._uiHash();a.ui.plugin.call(this,c,[d,e]);if(c=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,c,d,e)},plugins:{},_uiHash:function(c){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.16"});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,f){var e=a(this).data("draggable"),g=e.options,c=a.extend({},f,{item:e.element});e.sortables=[];a(g.connectToSortable).each(function(){var h=a.data(this,"sortable");if(h&&!h.options.disabled){e.sortables.push({instance:h,shouldRevert:h.options.revert});h.refreshPositions();h._trigger("activate",d,c)}})},stop:function(d,f){var e=a(this).data("draggable"),c=a.extend({},f,{item:e.element});a.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(d);this.instance.options.helper=this.instance.options._helper;if(e.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",d,c)}})},drag:function(d,g){var f=a(this).data("draggable"),c=this;var e=function(j){var q=this.offset.click.top,p=this.offset.click.left;var h=this.positionAbs.top,m=this.positionAbs.left;var l=j.height,n=j.width;var r=j.top,i=j.left;return a.ui.isOver(h+q,m+p,r,i,l,n)};a.each(f.sortables,function(h){this.instance.positionAbs=f.positionAbs;this.instance.helperProportions=f.helperProportions;this.instance.offset.click=f.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(c).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);this.instance._mouseStart(d,true,true);this.instance.offset.click.top=f.offset.click.top;this.instance.offset.click.left=f.offset.click.left;this.instance.offset.parent.left-=f.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=f.offset.parent.top-this.instance.offset.parent.top;f._trigger("toSortable",d);f.dropped=this.instance.element;f.currentItem=f.element;this.instance.fromOutside=f}if(this.instance.currentItem){this.instance._mouseDrag(d)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}f._trigger("fromSortable",d);f.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(d,e){var c=a("body"),f=a(this).data("draggable").options;if(c.css("cursor")){f._cursor=c.css("cursor")}c.css("cursor",f.cursor)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._cursor){a("body").css("cursor",e._cursor)}}});a.ui.plugin.add("draggable","opacity",{start:function(d,e){var c=a(e.helper),f=a(this).data("draggable").options;if(c.css("opacity")){f._opacity=c.css("opacity")}c.css("opacity",f.opacity)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._opacity){a(d.helper).css("opacity",e._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(d,e){var c=a(this).data("draggable");if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){c.overflowOffset=c.scrollParent.offset()}},drag:function(e,f){var d=a(this).data("draggable"),g=d.options,c=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x"){if((d.overflowOffset.top+d.scrollParent[0].offsetHeight)-e.pageY<g.scrollSensitivity){d.scrollParent[0].scrollTop=c=d.scrollParent[0].scrollTop+g.scrollSpeed}else{if(e.pageY-d.overflowOffset.top<g.scrollSensitivity){d.scrollParent[0].scrollTop=c=d.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!="y"){if((d.overflowOffset.left+d.scrollParent[0].offsetWidth)-e.pageX<g.scrollSensitivity){d.scrollParent[0].scrollLeft=c=d.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(e.pageX-d.overflowOffset.left<g.scrollSensitivity){d.scrollParent[0].scrollLeft=c=d.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!="x"){if(e.pageY-a(document).scrollTop()<g.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<g.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!="y"){if(e.pageX-a(document).scrollLeft()<g.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<g.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}}if(c!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(d,e)}}});a.ui.plugin.add("draggable","snap",{start:function(d,e){var c=a(this).data("draggable"),f=c.options;c.snapElements=[];a(f.snap.constructor!=String?(f.snap.items||":data(draggable)"):f.snap).each(function(){var h=a(this);var g=h.offset();if(this!=c.element[0]){c.snapElements.push({item:this,width:h.outerWidth(),height:h.outerHeight(),top:g.top,left:g.left})}})},drag:function(v,q){var g=a(this).data("draggable"),s=g.options;var z=s.snapTolerance;var y=q.offset.left,x=y+g.helperProportions.width,f=q.offset.top,e=f+g.helperProportions.height;for(var w=g.snapElements.length-1;w>=0;w--){var u=g.snapElements[w].left,p=u+g.snapElements[w].width,n=g.snapElements[w].top,B=n+g.snapElements[w].height;if(!((u-z<y&&y<p+z&&n-z<f&&f<B+z)||(u-z<y&&y<p+z&&n-z<e&&e<B+z)||(u-z<x&&x<p+z&&n-z<f&&f<B+z)||(u-z<x&&x<p+z&&n-z<e&&e<B+z))){if(g.snapElements[w].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,v,a.extend(g._uiHash(),{snapItem:g.snapElements[w].item})))}g.snapElements[w].snapping=false;continue}if(s.snapMode!="inner"){var c=Math.abs(n-e)<=z;var A=Math.abs(B-f)<=z;var j=Math.abs(u-x)<=z;var m=Math.abs(p-y)<=z;if(c){q.position.top=g._convertPositionTo("relative",{top:n-g.helperProportions.height,left:0}).top-g.margins.top}if(A){q.position.top=g._convertPositionTo("relative",{top:B,left:0}).top-g.margins.top}if(j){q.position.left=g._convertPositionTo("relative",{top:0,left:u-g.helperProportions.width}).left-g.margins.left}if(m){q.position.left=g._convertPositionTo("relative",{top:0,left:p}).left-g.margins.left}}var h=(c||A||j||m);if(s.snapMode!="outer"){var c=Math.abs(n-f)<=z;var A=Math.abs(B-e)<=z;var j=Math.abs(u-y)<=z;var m=Math.abs(p-x)<=z;if(c){q.position.top=g._convertPositionTo("relative",{top:n,left:0}).top-g.margins.top}if(A){q.position.top=g._convertPositionTo("relative",{top:B-g.helperProportions.height,left:0}).top-g.margins.top}if(j){q.position.left=g._convertPositionTo("relative",{top:0,left:u}).left-g.margins.left}if(m){q.position.left=g._convertPositionTo("relative",{top:0,left:p-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[w].snapping&&(c||A||j||m||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,v,a.extend(g._uiHash(),{snapItem:g.snapElements[w].item})))}g.snapElements[w].snapping=(c||A||j||m||h)}}});a.ui.plugin.add("draggable","stack",{start:function(d,e){var g=a(this).data("draggable").options;var f=a.makeArray(a(g.stack)).sort(function(i,h){return(parseInt(a(i).css("zIndex"),10)||0)-(parseInt(a(h).css("zIndex"),10)||0)});if(!f.length){return}var c=parseInt(f[0].style.zIndex)||0;a(f).each(function(h){this.style.zIndex=c+h});this[0].style.zIndex=c+f.length}});a.ui.plugin.add("draggable","zIndex",{start:function(d,e){var c=a(e.helper),f=a(this).data("draggable").options;if(c.css("zIndex")){f._zIndex=c.css("zIndex")}c.css("zIndex",f.zIndex)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._zIndex){a(d.helper).css("zIndex",e._zIndex)}}})})(jq);(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(e){return e.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);(d.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var c=a.ui.ddmanager.droppables[this.options.scope];for(var d=0;d<c.length;d++){if(c[d]==this){c.splice(d,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(c,d){if(c=="accept"){this.accept=a.isFunction(d)?d:function(e){return e.is(d)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(c&&this._trigger("activate",d,this.ui(c)))},_deactivate:function(d){var c=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(c&&this._trigger("deactivate",d,this.ui(c)))},_over:function(d){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",d,this.ui(c))}},_out:function(d){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",d,this.ui(c))}},_drop:function(d,e){var c=e||a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return false}var f=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=a.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],(c.currentItem||c.element))&&a.ui.intersect(c,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){f=true;return false}});if(f){return false}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",d,this.ui(c));return this.element}return false},ui:function(d){return{draggable:(d.currentItem||d.element),helper:d.helper,position:d.position,offset:d.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.16"});a.ui.intersect=function(s,j,p){if(!j.offset){return false}var e=(s.positionAbs||s.position.absolute).left,d=e+s.helperProportions.width,o=(s.positionAbs||s.position.absolute).top,n=o+s.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,q=j.offset.top,m=q+j.proportions.height;switch(p){case"fit":return(g<=e&&d<=c&&q<=o&&n<=m);break;case"intersect":return(g<e+(s.helperProportions.width/2)&&d-(s.helperProportions.width/2)<c&&q<o+(s.helperProportions.height/2)&&n-(s.helperProportions.height/2)<m);break;case"pointer":var h=((s.positionAbs||s.position.absolute).left+(s.clickOffset||s.offset.click).left),i=((s.positionAbs||s.position.absolute).top+(s.clickOffset||s.offset.click).top),f=a.ui.isOver(i,h,q,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((o>=q&&o<=m)||(n>=q&&n<=m)||(o<q&&n>m))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(f,h){var c=a.ui.ddmanager.droppables[f.options.scope]||[];var g=h?h.type:null;var l=(f.currentItem||f.element).find(":data(droppable)").andSelf();droppablesLoop:for(var e=0;e<c.length;e++){if(c[e].options.disabled||(f&&!c[e].accept.call(c[e].element[0],(f.currentItem||f.element)))){continue}for(var d=0;d<l.length;d++){if(l[d]==c[e].element[0]){c[e].proportions.height=0;continue droppablesLoop}}c[e].visible=c[e].element.css("display")!="none";if(!c[e].visible){continue}if(g=="mousedown"){c[e]._activate.call(c[e],h)}c[e].offset=c[e].element.offset();c[e].proportions={width:c[e].element[0].offsetWidth,height:c[e].element[0].offsetHeight}}},drop:function(c,d){var e=false;a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance)){e=e||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(c.currentItem||c.element))){this.isout=1;this.isover=0;this._deactivate.call(this,d)}});return e},dragStart:function(c,d){c.element.parents(":not(body,html)").bind("scroll.droppable",function(){if(!c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}})},drag:function(c,d){if(c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var f=a.ui.intersect(c,this,this.options.tolerance);var h=!f&&this.isover==1?"isout":(f&&this.isover==0?"isover":null);if(!h){return}var g;if(this.options.greedy){var e=this.element.parents(":data(droppable):eq(0)");if(e.length){g=a.data(e[0],"droppable");g.greedyChild=(h=="isover"?1:0)}}if(g&&h=="isover"){g.isover=0;g.isout=1;g._out.call(g,d)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;this[h=="isover"?"_over":"_out"].call(this,d);if(g&&h=="isout"){g.isout=0;g.isover=1;g._over.call(g,d)}})},dragStop:function(c,d){c.element.parents(":not(body,html)").unbind("scroll.droppable");if(!c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}}}})(jq);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,l=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(l.aspectRatio),aspectRatio:l.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:l.helper||l.ghost||l.animate?l.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=l.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var m=this.handles.split(",");this.handles={};for(var g=0;g<m.length;g++){var j=c.trim(m[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++l.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(r){r=r||this.element;for(var o in this.handles){if(this.handles[o].constructor==String){this.handles[o]=c(this.handles[o],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var p=c(this.handles[o],this.element),q=0;q=/sw|ne|nw|se|n|s/.test(o)?p.outerHeight():p.outerWidth();var n=["padding",/ne|nw|n/.test(o)?"Top":/se|sw|s/.test(o)?"Bottom":/^e$/.test(o)?"Right":"Left"].join("");r.css(n,q);this._proportionallyResize()}if(!c(this.handles[o]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(l.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(l.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(l.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}if(c.browser.opera&&(/relative/).test(e.css("position"))){e.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var l=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){l+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:l,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:l,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,n={},r=this,j=this.originalMousePosition,p=this.axis;var s=(e.pageX-j.left)||0,q=(e.pageY-j.top)||0;var i=this._change[p];if(!i){return false}var m=i.apply(this,[e,s,q]),l=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){m=this._updateRatio(m,e)}m=this._respectSize(m,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(m);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,n=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,l=e?0:n.sizeDiff.width;var p={width:(n.helper.width()-l),height:(n.helper.height()-f)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,m=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(p,{top:m,left:j}))}n.helper.height(n.size.height);n.helper.width(n.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,l,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;l=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(h<e.maxWidth){e.maxWidth=h}if(l<e.maxHeight){e.maxHeight=l}}this._vBoundaries=e},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var i=this.options,j=this.position,f=this.size,e=this.axis;if(a(h.height)){h.width=(h.height*this.aspectRatio)}else{if(a(h.width)){h.height=(h.width/this.aspectRatio)}}if(e=="sw"){h.left=j.left+(f.width-h.width);h.top=null}if(e=="nw"){h.top=j.top+(f.height-h.height);h.left=j.left+(f.width-h.width)}return h},_respectSize:function(m,g){var j=this.helper,i=this._vBoundaries,s=this._aspectRatio||g.shiftKey,r=this.axis,v=a(m.width)&&i.maxWidth&&(i.maxWidth<m.width),n=a(m.height)&&i.maxHeight&&(i.maxHeight<m.height),h=a(m.width)&&i.minWidth&&(i.minWidth>m.width),u=a(m.height)&&i.minHeight&&(i.minHeight>m.height);if(h){m.width=i.minWidth}if(u){m.height=i.minHeight}if(v){m.width=i.maxWidth}if(n){m.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height;var l=/sw|nw|w/.test(r),e=/nw|ne|n/.test(r);if(h&&l){m.left=f-i.minWidth}if(v&&l){m.left=f-i.maxWidth}if(u&&e){m.top=q-i.minHeight}if(n&&e){m.top=q-i.maxHeight}var p=!m.width&&!m.height;if(p&&!m.left&&m.top){m.top=null}else{if(p&&!m.top&&m.left){m.left=null}}return m},_proportionallyResize:function(){var l=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(e,function(m,o){var n=parseInt(m,10)||0,p=parseInt(j[o],10)||0;return n+p})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,i=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.16"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var l=c(this);l.data("resizable-alsoresize",{width:parseInt(l.width(),10),height:parseInt(l.height(),10),left:parseInt(l.css("left"),10),top:parseInt(l.css("top"),10),position:l.css("position")})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,m=f.originalPosition;var l={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-m.top)||0,left:(f.position.left-m.left)||0},e=function(n,o){c(n).each(function(){var r=c(this),s=c(this).data("resizable-alsoresize"),q={},p=o&&o.length?o:r.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(p,function(u,w){var v=(s[w]||0)+(l[w]||0);if(v&&v>=0){q[w]=v||null}});if(c.browser.opera&&/relative/.test(r.css("position"))){f._revertToRelativePosition=true;r.css({position:"absolute",top:"auto",left:"auto"})}r.css(q)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(n,o){e(n,o)})}else{e(j.alsoResize)}},stop:function(g,h){var f=c(this).data("resizable"),i=f.options;var e=function(j){c(j).each(function(){var l=c(this);l.css({position:l.data("resizable-alsoresize").position})})};if(f._revertToRelativePosition){f._revertToRelativePosition=false;if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(j){e(j)})}else{e(i.alsoResize)}}c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,p){var q=c(this).data("resizable"),j=q.options;var h=q._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:q.sizeDiff.height,m=e?0:q.sizeDiff.width;var g={width:(q.size.width-m),height:(q.size.height-f)},l=(parseInt(q.element.css("left"),10)+(q.position.left-q.originalPosition.left))||null,n=(parseInt(q.element.css("top"),10)+(q.position.top-q.originalPosition.top))||null;q.element.animate(c.extend(g,n&&l?{top:n,left:l}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(q.element.css("width"),10),height:parseInt(q.element.css("height"),10),top:parseInt(q.element.css("top"),10),left:parseInt(q.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}q._updateCache(o);q._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,s){var v=c(this).data("resizable"),j=v.options,m=v.element;var g=j.containment,l=(g instanceof c)?g.get(0):(/parent/.test(g))?m.parent().get(0):g;if(!l){return}v.containerElement=c(l);if(/document/.test(g)||g==document){v.containerOffset={left:0,top:0};v.containerPosition={left:0,top:0};v.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var q=c(l),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(q.css("padding"+o))});v.containerOffset=q.offset();v.containerPosition=q.position();v.containerSize={height:(q.innerHeight()-i[3]),width:(q.innerWidth()-i[1])};var r=v.containerOffset,e=v.containerSize.height,n=v.containerSize.width,h=(c.ui.hasScroll(l,"left")?l.scrollWidth:n),u=(c.ui.hasScroll(l)?l.scrollHeight:e);v.parentData={element:l,left:r.left,top:r.top,width:h,height:u}}},resize:function(g,r){var v=c(this).data("resizable"),i=v.options,f=v.containerSize,q=v.containerOffset,n=v.size,p=v.position,s=v._aspectRatio||g.shiftKey,e={top:0,left:0},h=v.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=q}if(p.left<(v._helper?q.left:0)){v.size.width=v.size.width+(v._helper?(v.position.left-q.left):(v.position.left-e.left));if(s){v.size.height=v.size.width/i.aspectRatio}v.position.left=i.helper?q.left:0}if(p.top<(v._helper?q.top:0)){v.size.height=v.size.height+(v._helper?(v.position.top-q.top):v.position.top);if(s){v.size.width=v.size.height*i.aspectRatio}v.position.top=v._helper?q.top:0}v.offset.left=v.parentData.left+v.position.left;v.offset.top=v.parentData.top+v.position.top;var m=Math.abs((v._helper?v.offset.left-e.left:(v.offset.left-e.left))+v.sizeDiff.width),u=Math.abs((v._helper?v.offset.top-e.top:(v.offset.top-q.top))+v.sizeDiff.height);var l=v.containerElement.get(0)==v.element.parent().get(0),j=/relative|absolute/.test(v.containerElement.css("position"));if(l&&j){m-=v.parentData.left}if(m+v.size.width>=v.parentData.width){v.size.width=v.parentData.width-m;if(s){v.size.height=v.size.width/v.aspectRatio}}if(u+v.size.height>=v.parentData.height){v.size.height=v.parentData.height-u;if(s){v.size.width=v.size.height*v.aspectRatio}}},stop:function(f,p){var r=c(this).data("resizable"),g=r.options,m=r.position,n=r.containerOffset,e=r.containerPosition,i=r.containerElement;var j=c(r.helper),s=j.offset(),q=j.outerWidth()-r.sizeDiff.width,l=j.outerHeight()-r.sizeDiff.height;if(r._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:s.left-e.left-n.left,width:q,height:l})}if(r._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:s.left-e.left-n.left,width:q,height:l})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,n){var q=c(this).data("resizable"),h=q.options,l=q.size,i=q.originalSize,j=q.originalPosition,p=q.axis,m=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((l.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((l.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(p)){q.size.width=i.width+g;q.size.height=i.height+f}else{if(/^(ne)$/.test(p)){q.size.width=i.width+g;q.size.height=i.height+f;q.position.top=j.top-f}else{if(/^(sw)$/.test(p)){q.size.width=i.width+g;q.size.height=i.height+f;q.position.left=j.left-g}else{q.size.width=i.width+g;q.size.height=i.height+f;q.position.top=j.top-f;q.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jq);(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=a(c.options.filter,c.element[0]);d.each(function(){var e=a(this);var f=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:f.left,top:f.top,right:f.left+e.outerWidth(),bottom:f.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=d.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(e){var c=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled){return}var d=this.options;this.selectees=a(d.filter,this.element[0]);this._trigger("start",e);a(d.appendTo).append(this.helper);this.helper.css({left:e.clientX,top:e.clientY,width:0,height:0});if(d.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var f=a.data(this,"selectable-item");f.startselected=true;if(!e.metaKey){f.$element.removeClass("ui-selected");f.selected=false;f.$element.addClass("ui-unselecting");f.unselecting=true;c._trigger("unselecting",e,{unselecting:f.element})}});a(e.target).parents().andSelf().each(function(){var g=a.data(this,"selectable-item");if(g){var f=!e.metaKey||!g.$element.hasClass("ui-selected");g.$element.removeClass(f?"ui-unselecting":"ui-selected").addClass(f?"ui-selecting":"ui-unselecting");g.unselecting=!f;g.selecting=f;g.selected=f;if(f){c._trigger("selecting",e,{selecting:g.element})}else{c._trigger("unselecting",e,{unselecting:g.element})}return false}})},_mouseDrag:function(j){var d=this;this.dragged=true;if(this.options.disabled){return}var f=this.options;var e=this.opos[0],i=this.opos[1],c=j.pageX,h=j.pageY;if(e>c){var g=c;c=e;e=g}if(i>h){var g=h;h=i;i=g}this.helper.css({left:e,top:i,width:c-e,height:h-i});this.selectees.each(function(){var l=a.data(this,"selectable-item");if(!l||l.element==d.element[0]){return}var m=false;if(f.tolerance=="touch"){m=(!(l.left>c||l.right<e||l.top>h||l.bottom<i))}else{if(f.tolerance=="fit"){m=(l.left>e&&l.right<c&&l.top>i&&l.bottom<h)}}if(m){if(l.selected){l.$element.removeClass("ui-selected");l.selected=false}if(l.unselecting){l.$element.removeClass("ui-unselecting");l.unselecting=false}if(!l.selecting){l.$element.addClass("ui-selecting");l.selecting=true;d._trigger("selecting",j,{selecting:l.element})}}else{if(l.selecting){if(j.metaKey&&l.startselected){l.$element.removeClass("ui-selecting");l.selecting=false;l.$element.addClass("ui-selected");l.selected=true}else{l.$element.removeClass("ui-selecting");l.selecting=false;if(l.startselected){l.$element.addClass("ui-unselecting");l.unselecting=true}d._trigger("unselecting",j,{unselecting:l.element})}}if(l.selected){if(!j.metaKey&&!l.startselected){l.$element.removeClass("ui-selected");l.selected=false;l.$element.addClass("ui-unselecting");l.unselecting=true;d._trigger("unselecting",j,{unselecting:l.element})}}}});return false},_mouseStop:function(e){var c=this;this.dragged=false;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=false;c._trigger("unselected",e,{unselected:f.element})});a(".ui-selecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");f.selecting=false;f.selected=true;f.startselected=true;c._trigger("selected",e,{selected:f.element})});this._trigger("stop",e);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.16"})})(jq);(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var c=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?c.axis==="x"||(/left|right/).test(this.items[0].item.css("float"))||(/inline|table-cell/).test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--){this.items[c].item.removeData("sortable-item")}return this},_setOption:function(c,d){if(c==="disabled"){this.options[c]=d;this.widget()[d?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(f,g){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(f);var e=null,d=this,c=a(f.target).parents().each(function(){if(a.data(this,"sortable-item")==d){e=a(this);return false}});if(a.data(f.target,"sortable-item")==d){e=a(f.target)}if(!e){return false}if(this.options.handle&&!g){var h=false;a(this.options.handle,e).find("*").andSelf().each(function(){if(this==f.target){h=true}});if(!h){return false}}this.currentItem=e;this._removeCurrentsFromItems();return true},_mouseStart:function(f,g,c){var h=this.options,d=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;(h.cursorAt&&this._adjustOffsetFromHelper(h.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",h.cursor)}if(h.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",h.opacity)}if(h.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",h.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!c){for(var e=this.containers.length-1;e>=0;e--){this.containers[e]._trigger("activate",f,d._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var h=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-g.pageY<h.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+h.scrollSpeed}else{if(g.pageY-this.overflowOffset.top<h.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-h.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-g.pageX<h.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+h.scrollSpeed}else{if(g.pageX-this.overflowOffset.left<h.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-h.scrollSpeed}}}else{if(g.pageY-a(document).scrollTop()<h.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<h.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)}}if(g.pageX-a(document).scrollLeft()<h.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<h.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)}}}if(c!==false&&a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,g)}}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(var e=this.items.length-1;e>=0;e--){var f=this.items[e],d=f.item[0],j=this._intersectsWithPointer(f);if(!j){continue}if(d!=this.currentItem[0]&&this.placeholder[j==1?"next":"prev"]()[0]!=d&&!a.ui.contains(this.placeholder[0],d)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],d):true)){this.direction=j==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f)){this._rearrange(g,f)}else{break}this._trigger("change",g,this._uiHash());break}}this._contactContainers(g);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,g)}this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,e){if(!d){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,d)}if(this.options.revert){var c=this;var f=c.placeholder.offset();c.reverting=true;a(this.helper).animate({left:f.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(d)})}else{this._clear(d,e)}return false},cancel:function(){var c=this;if(this.dragging){this._mouseUp({target:null});if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("deactivate",null,c._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger("out",null,c._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(e){var c=this._getItemsAsjQuery(e&&e.connected);var d=[];e=e||{};a(c).each(function(){var f=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||(/(.+)[-=_](.+)/));if(f){d.push((e.key||f[1]+"[]")+"="+(e.key&&e.expression?f[1]:f[2]))}});if(!d.length&&e.key){d.push(e.key+"=")}return d.join("&")},toArray:function(e){var c=this._getItemsAsjQuery(e&&e.connected);var d=[];e=e||{};c.each(function(){d.push(a(e.item||this).attr(e.attribute||"id")||"")});return d},_intersectsWith:function(n){var e=this.positionAbs.left,d=e+this.helperProportions.width,m=this.positionAbs.top,j=m+this.helperProportions.height;var f=n.left,c=f+n.width,o=n.top,i=o+n.height;var p=this.offset.click.top,h=this.offset.click.left;var g=(m+p)>o&&(m+p)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>n[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&o<m+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(e){var f=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),h=f&&d,c=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((g&&g=="right")||c=="down")?2:1):(c&&(c=="down"?2:1))},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+(f.height/2),f.height),e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+(f.width/2),f.width),c=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&&g){return((g=="right"&&e)||(g=="left"&&!e))}else{return c&&((c=="down"&&d)||(c=="up"&&!d))}},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var n=this;var h=[];var f=[];var l=this._connectWith();if(l&&c){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element):a(g.options.items,g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),g])}}}}f.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var e=f.length-1;e>=0;e--){f[e][0].each(function(){h.push(this)})}return a(h)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data(sortable-item)");for(var d=0;d<this.items.length;d++){for(var c=0;c<e.length;c++){if(e[c]==this.items[d].item[0]){this.items.splice(d,1)}}}},_refreshItems:function(c){this.items=[];this.containers=[this];var l=this.items;var r=this;var g=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):a(this.options.items,this.element),this]];var n=this._connectWith();if(n){for(var f=n.length-1;f>=0;f--){var o=a(n[f]);for(var e=o.length-1;e>=0;e--){var h=a.data(o[e],"sortable");if(h&&h!=this&&!h.options.disabled){g.push([a.isFunction(h.options.items)?h.options.items.call(h.element[0],c,{item:this.currentItem}):a(h.options.items,h.element),h]);this.containers.push(h)}}}}for(var f=g.length-1;f>=0;f--){var m=g[f][1];var d=g[f][0];for(var e=0,p=d.length;e<p;e++){var q=a(d[e]);q.data("sortable-item",m);l.push({item:q,instance:m,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var e=this.items.length-1;e>=0;e--){var f=this.items[e];if(f.instance!=this.currentContainer&&this.currentContainer&&f.item[0]!=this.currentItem[0]){continue}var d=this.options.toleranceElement?a(this.options.toleranceElement,f.item):f.item;if(!c){f.width=d.outerWidth();f.height=d.outerHeight()}var g=d.offset();f.left=g.left;f.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var e=this.containers.length-1;e>=0;e--){var g=this.containers[e].element.offset();this.containers[e].containerCache.left=g.left;this.containers[e].containerCache.top=g.top;this.containers[e].containerCache.width=this.containers[e].element.outerWidth();this.containers[e].containerCache.height=this.containers[e].element.outerHeight()}}return this},_createPlaceholder:function(e){var c=e||this,f=c.options;if(!f.placeholder||f.placeholder.constructor==String){var d=f.placeholder;f.placeholder={element:function(){var g=a(document.createElement(c.currentItem[0].nodeName)).addClass(d||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!d){g.style.visibility="hidden"}return g},update:function(g,h){if(d&&!f.forcePlaceholderSize){return}if(!h.height()){h.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10))}if(!h.width()){h.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}}c.placeholder=a(f.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);f.placeholder.update(c,c.placeholder)},_contactContainers:function(c){var e=null,m=null;for(var g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.currentItem[0],this.containers[g].element[0])){continue}if(this._intersectsWith(this.containers[g].containerCache)){if(e&&a.ui.contains(this.containers[g].element[0],e.element[0])){continue}e=this.containers[g];m=g}else{if(this.containers[g].containerCache.over){this.containers[g]._trigger("out",c,this._uiHash(this));this.containers[g].containerCache.over=0}}}if(!e){return}if(this.containers.length===1){this.containers[m]._trigger("over",c,this._uiHash(this));this.containers[m].containerCache.over=1}else{if(this.currentContainer!=this.containers[m]){var l=10000;var h=null;var d=this.positionAbs[this.containers[m].floating?"left":"top"];for(var f=this.items.length-1;f>=0;f--){if(!a.ui.contains(this.containers[m].element[0],this.items[f].item[0])){continue}var n=this.items[f][this.containers[m].floating?"left":"top"];if(Math.abs(n-d)<l){l=Math.abs(n-d);h=this.items[f]}}if(!h&&!this.options.dropOnEmpty){return}this.currentContainer=this.containers[m];h?this._rearrange(c,h,null,true):this._rearrange(c,null,this.containers[m].element,true);this._trigger("change",c,this._uiHash());this.containers[m]._trigger("change",c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[m]._trigger("over",c,this._uiHash(this));this.containers[m].containerCache.over=1}}},_createHelper:function(d){var e=this.options;var c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[d,this.currentItem])):(e.helper=="clone"?this.currentItem.clone():this.currentItem);if(!c.parents("body").length){a(e.appendTo!="parent"?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0])}if(c[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(c[0].style.width==""||e.forceHelperSize){c.width(this.currentItem.width())}if(c[0].style.height==""||e.forceHelperSize){c.height(this.currentItem.height())}return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var d=a(f.containment)[0];var e=a(f.containment).offset();var c=(a(d).css("overflow")!="hidden");this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(g,i){if(!i){i=this.position}var e=g=="absolute"?1:-1;var f=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);return{top:(i.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*e)),left:(i.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*e))}},_generatePosition:function(f){var i=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var e=f.pageX;var d=f.pageY;if(this.originalPosition){if(this.containment){if(f.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left}if(f.pageY-this.offset.click.top<this.containment[1]){d=this.containment[1]+this.offset.click.top}if(f.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left}if(f.pageY-this.offset.click.top>this.containment[3]){d=this.containment[3]+this.offset.click.top}}if(i.grid){var h=this.originalPageY+Math.round((d-this.originalPageY)/i.grid[1])*i.grid[1];d=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-i.grid[1]:h+i.grid[1])):h;var g=this.originalPageX+Math.round((e-this.originalPageX)/i.grid[0])*i.grid[0];e=this.containment?(!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:(!(g-this.offset.click.left<this.containment[0])?g-i.grid[0]:g+i.grid[0])):g}}return{top:(d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:c.scrollTop())))),left:(e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:c.scrollLeft())))}},_rearrange:function(h,g,d,f){d?d[0].appendChild(this.placeholder[0]):g.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?g.item[0]:g.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var e=this,c=this.counter;window.setTimeout(function(){if(c==e.counter){e.refreshPositions(!f)}},0)},_clear:function(e,f){this.reverting=false;var g=[],c=this;if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var d in this._storedCSS){if(this._storedCSS[d]=="auto"||this._storedCSS[d]=="static"){this._storedCSS[d]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!f){g.push(function(h){this._trigger("receive",h,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!f){g.push(function(h){this._trigger("update",h,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!f){g.push(function(h){this._trigger("remove",h,this._uiHash())})}for(var d=this.containers.length-1;d>=0;d--){if(a.ui.contains(this.containers[d].element[0],this.currentItem[0])&&!f){g.push((function(h){return function(i){h._trigger("receive",i,this._uiHash(this))}}).call(this,this.containers[d]));g.push((function(h){return function(i){h._trigger("update",i,this._uiHash(this))}}).call(this,this.containers[d]))}}}for(var d=this.containers.length-1;d>=0;d--){if(!f){g.push((function(h){return function(i){h._trigger("deactivate",i,this._uiHash(this))}}).call(this,this.containers[d]))}if(this.containers[d].containerCache.over){g.push((function(h){return function(i){h._trigger("out",i,this._uiHash(this))}}).call(this,this.containers[d]));this.containers[d].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",e,this._uiHash());for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}return false}if(!f){this._trigger("beforeStop",e,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!f){for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.16"})})(jq);(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var d=this,f=this.element[0].ownerDocument,e;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(g){if(d.options.disabled||d.element.propAttr("readOnly")){return}e=false;var h=a.ui.keyCode;switch(g.keyCode){case h.PAGE_UP:d._move("previousPage",g);break;case h.PAGE_DOWN:d._move("nextPage",g);break;case h.UP:d._move("previous",g);g.preventDefault();break;case h.DOWN:d._move("next",g);g.preventDefault();break;case h.ENTER:case h.NUMPAD_ENTER:if(d.menu.active){e=true;g.preventDefault()}case h.TAB:if(!d.menu.active){return}d.menu.select(g);break;case h.ESCAPE:d.element.val(d.term);d.close(g);break;default:clearTimeout(d.searching);d.searching=setTimeout(function(){if(d.term!=d.element.val()){d.selectedItem=null;d.search(null,g)}},d.options.delay);break}}).bind("keypress.autocomplete",function(g){if(e){e=false;g.preventDefault()}}).bind("focus.autocomplete",function(){if(d.options.disabled){return}d.selectedItem=null;d.previous=d.element.val()}).bind("blur.autocomplete",function(g){if(d.options.disabled){return}clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(g);d._change(g)},150)});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",f)[0]).mousedown(function(g){var h=d.menu.element[0];if(!a(g.target).closest(".ui-menu-item").length){setTimeout(function(){a(document).one("mousedown",function(i){if(i.target!==d.element[0]&&i.target!==h&&!a.ui.contains(h,i.target)){d.close()}})},1)}setTimeout(function(){clearTimeout(d.closing)},13)}).menu({focus:function(h,i){var g=i.item.data("item.autocomplete");if(false!==d._trigger("focus",h,{item:g})){if(/^key/.test(h.originalEvent.type)){d.element.val(g.value)}}},selected:function(i,j){var h=j.item.data("item.autocomplete"),g=d.previous;if(d.element[0]!==f.activeElement){d.element.focus();d.previous=g;setTimeout(function(){d.previous=g;d.selectedItem=h},1)}if(false!==d._trigger("select",i,{item:h})){d.element.val(h.value)}d.term=d.element.val();d.close(i);d.selectedItem=h},blur:function(g,h){if(d.menu.element.is(":visible")&&(d.element.val()!==d.term)){d.element.val(d.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(a.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();a.Widget.prototype.destroy.call(this)},_setOption:function(d,e){a.Widget.prototype._setOption.apply(this,arguments);if(d==="source"){this._initSource()}if(d==="appendTo"){this.menu.element.appendTo(a(e||"body",this.element[0].ownerDocument)[0])}if(d==="disabled"&&e&&this.xhr){this.xhr.abort()}},_initSource:function(){var d=this,f,e;if(a.isArray(this.options.source)){f=this.options.source;this.source=function(h,g){g(a.ui.autocomplete.filter(f,h.term))}}else{if(typeof this.options.source==="string"){e=this.options.source;this.source=function(h,g){if(d.xhr){d.xhr.abort()}d.xhr=a.ajax({url:e,data:h,dataType:"json",autocompleteRequest:++c,success:function(j,i){if(this.autocompleteRequest===c){g(j)}},error:function(){if(this.autocompleteRequest===c){g([])}}})}}else{this.source=this.options.source}}},search:function(e,d){e=e!=null?e:this.element.val();this.term=this.element.val();if(e.length<this.options.minLength){return this.close(d)}clearTimeout(this.closing);if(this._trigger("search",d)===false){return}return this._search(e)},_search:function(d){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:d},this.response)},_response:function(d){if(!this.options.disabled&&d&&d.length){d=this._normalize(d);this._suggest(d);this._trigger("open")}else{this.close()}this.pending--;if(!this.pending){this.element.removeClass("ui-autocomplete-loading")}},close:function(d){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",d)}},_change:function(d){if(this.previous!==this.element.val()){this._trigger("change",d,{item:this.selectedItem})}},_normalize:function(d){if(d.length&&d[0].label&&d[0].value){return d}return a.map(d,function(e){if(typeof e==="string"){return{label:e,value:e}}return a.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(d){var e=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(e,d);this.menu.deactivate();this.menu.refresh();e.show();this._resizeMenu();e.position(a.extend({of:this.element},this.options.position));if(this.options.autoFocus){this.menu.next(new a.Event("mouseover"))}},_resizeMenu:function(){var d=this.menu.element;d.outerWidth(Math.max(d.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(f,e){var d=this;a.each(e,function(g,h){d._renderItem(f,h)})},_renderItem:function(d,e){return a("<li></li>").data("item.autocomplete",e).append(a("<a></a>").text(e.label)).appendTo(d)},_move:function(e,d){if(!this.menu.element.is(":visible")){this.search(null,d);return}if(this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)){this.element.val(this.term);this.menu.deactivate();return}this.menu[e](d)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(d){return d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(f,d){var e=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(f,function(g){return e.test(g.label||g.value||g)})}})}(jq));(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length){return}c.preventDefault();b.select(c)});this.refresh()},refresh:function(){var c=this;var b=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");b.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(d){c.activate(d,a(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(e,d){this.deactivate();if(this.hasScroll()){var f=d.offset().top-this.element.offset().top,b=this.element.scrollTop(),c=this.element.height();if(f<0){this.element.scrollTop(b+f)}else{if(f>=c){this.element.scrollTop(b+f-c+d.height())}}}this.active=d.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:d})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},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,d,c){if(!this.active){this.activate(c,this.element.children(d));return}var b=this.active[e+"All"](".ui-menu-item").eq(0);if(b.length){this.activate(c,b)}else{this.activate(c,this.element.children(d))}},nextPage:function(d){if(this.hasScroll()){if(!this.active||this.last()){this.activate(d,this.element.children(".ui-menu-item:first"));return}var e=this.active.offset().top,c=this.element.height(),b=this.element.children(".ui-menu-item").filter(function(){var f=a(this).offset().top-e-c+a(this).height();return f<10&&f>-10});if(!b.length){b=this.element.children(".ui-menu-item:last")}this.activate(d,b)}else{this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(c){if(this.hasScroll()){if(!this.active||this.first()){this.activate(c,this.element.children(".ui-menu-item:last"));return}var d=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-d+b-a(this).height();return e<10&&e>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(c,result)}else{this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(b){this._trigger("selected",b,{item:this.active})}})}(jq));(function(f,b){var l,e,a,h,i="ui-button ui-widget ui-state-default ui-corner-all",c="ui-state-hover ui-state-active ",g="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var m=f(this).find(":ui-button");setTimeout(function(){m.button("refresh")},1)},d=function(n){var m=n.name,o=n.form,p=f([]);if(m){if(o){p=f(o).find("[name='"+m+"']")}else{p=f("[name='"+m+"']",n.ownerDocument).filter(function(){return !this.form})}}return p};f.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j);if(typeof this.options.disabled!=="boolean"){this.options.disabled=this.element.propAttr("disabled")}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var m=this,o=this.options,p=this.type==="checkbox"||this.type==="radio",q="ui-state-hover"+(!p?" ui-state-active":""),n="ui-state-focus";if(o.label===null){o.label=this.buttonElement.html()}if(this.element.is(":disabled")){o.disabled=true}this.buttonElement.addClass(i).attr("role","button").bind("mouseenter.button",function(){if(o.disabled){return}f(this).addClass("ui-state-hover");if(this===l){f(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(o.disabled){return}f(this).removeClass(q)}).bind("click.button",function(r){if(o.disabled){r.preventDefault();r.stopImmediatePropagation()}});this.element.bind("focus.button",function(){m.buttonElement.addClass(n)}).bind("blur.button",function(){m.buttonElement.removeClass(n)});if(p){this.element.bind("change.button",function(){if(h){return}m.refresh()});this.buttonElement.bind("mousedown.button",function(r){if(o.disabled){return}h=false;e=r.pageX;a=r.pageY}).bind("mouseup.button",function(r){if(o.disabled){return}if(e!==r.pageX||a!==r.pageY){h=true}})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(o.disabled||h){return false}f(this).toggleClass("ui-state-active");m.buttonElement.attr("aria-pressed",m.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(o.disabled||h){return false}f(this).addClass("ui-state-active");m.buttonElement.attr("aria-pressed","true");var r=m.element[0];d(r).not(r).map(function(){return f(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")})}else{this.buttonElement.bind("mousedown.button",function(){if(o.disabled){return false}f(this).addClass("ui-state-active");l=this;f(document).one("mouseup",function(){l=null})}).bind("mouseup.button",function(){if(o.disabled){return false}f(this).removeClass("ui-state-active")}).bind("keydown.button",function(r){if(o.disabled){return false}if(r.keyCode==f.ui.keyCode.SPACE||r.keyCode==f.ui.keyCode.ENTER){f(this).addClass("ui-state-active")}}).bind("keyup.button",function(){f(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(r){if(r.keyCode===f.ui.keyCode.SPACE){f(this).click()}})}}}this._setOption("disabled",o.disabled);this._resetButton()},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"}else{if(this.element.is(":radio")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"}}}if(this.type==="checkbox"||this.type==="radio"){var m=this.element.parents().filter(":last"),o="label[for='"+this.element.attr("id")+"']";this.buttonElement=m.find(o);if(!this.buttonElement.length){m=m.length?m.siblings():this.element.siblings();this.buttonElement=m.filter(o);if(!this.buttonElement.length){this.buttonElement=m.find(o)}}this.element.addClass("ui-helper-hidden-accessible");var n=this.element.is(":checked");if(n){this.buttonElement.addClass("ui-state-active")}this.buttonElement.attr("aria-pressed",n)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(i+" "+c+" "+g).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}f.Widget.prototype.destroy.call(this)},_setOption:function(m,n){f.Widget.prototype._setOption.apply(this,arguments);if(m==="disabled"){if(n){this.element.propAttr("disabled",true)}else{this.element.propAttr("disabled",false)}return}this._resetButton()},refresh:function(){var m=this.element.is(":disabled");if(m!==this.options.disabled){this._setOption("disabled",m)}if(this.type==="radio"){d(this.element[0]).each(function(){if(f(this).is(":checked")){f(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true")}else{f(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true")}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var q=this.buttonElement.removeClass(g),o=f("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(q.empty()).text(),n=this.options.icons,m=n.primary&&n.secondary,p=[];if(n.primary||n.secondary){if(this.options.text){p.push("ui-button-text-icon"+(m?"s":(n.primary?"-primary":"-secondary")))}if(n.primary){q.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>")}if(n.secondary){q.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>")}if(!this.options.text){p.push(m?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){q.attr("title",o)}}}else{p.push("ui-button-text-only")}q.addClass(p.join(" "))}});f.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset");this.element.removeClass("buttonset-hidefirst")},_init:function(){this.refresh()},_setOption:function(m,n){if(m==="disabled"){this.buttons.button("option",m,n)}f.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var m=this.element.css("direction")==="ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return f(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(m?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(m?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return f(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");f.Widget.prototype.destroy.call(this)}})}(jq));(function(e,f){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",b={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},d={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},a=e.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};e.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(h){var g=e(this).css(h).offset().top;if(g<0){e(this).css("top",h.top-g)}}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;var p=this,q=p.options,n=q.title||"&#160;",h=e.ui.dialog.getTitleId(p.element),o=(p.uiDialog=e("<div></div>")).appendTo(document.body).hide().addClass(c+q.dialogClass).css({zIndex:q.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(r){if(q.closeOnEscape&&!r.isDefaultPrevented()&&r.keyCode&&r.keyCode===e.ui.keyCode.ESCAPE){p.close(r);r.preventDefault()}}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(r){p.moveToTop(false,r)}),j=p.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(o),i=(p.uiDialogTitlebar=e("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(o),m=e('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){m.addClass("ui-state-hover")},function(){m.removeClass("ui-state-hover")}).focus(function(){m.addClass("ui-state-focus")}).blur(function(){m.removeClass("ui-state-focus")}).click(function(r){p.close(r);return false}).appendTo(i),l=(p.uiDialogTitlebarCloseText=e("<span></span>")).addClass("ui-icon ui-icon-closethick").text(q.closeText).appendTo(m),g=e("<span></span>").addClass("ui-dialog-title").attr("id",h).html(n).prependTo(i);if(e.isFunction(q.beforeclose)&&!e.isFunction(q.beforeClose)){q.beforeClose=q.beforeclose}i.find("*").add(i).disableSelection();if(q.draggable&&e.fn.draggable){p._makeDraggable()}if(q.resizable&&e.fn.resizable){p._makeResizable()}p._createButtons(q.buttons);p._isOpen=false;if(e.fn.bgiframe){o.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var g=this;if(g.overlay){g.overlay.destroy()}g.uiDialog.hide();g.element.unbind("."+g.widgetName).removeData(g.widgetName).removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");g.uiDialog.remove();if(g.originalTitle){g.element.attr("title",g.originalTitle)}return g},widget:function(){return this.uiDialog},close:function(j){var g=this,i,h;if(false===g._trigger("beforeClose",j)){return}if(g.overlay){g.overlay.destroy()}g.uiDialog.unbind("keypress.ui-dialog");g._isOpen=false;if(g.options.hide){g.uiDialog.hide(g.options.hide,function(){g._trigger("close",j)})}else{g.uiDialog.hide();g._trigger("close",j)}e.ui.dialog.overlay.resize();if(g.options.modal){i=0;e(".ui-dialog").each(function(){if(this!==g.uiDialog[0]){h=e(this).css("z-index");if(!isNaN(h)){i=Math.max(i,h)}}});e.ui.dialog.maxZ=i}return g},isOpen:function(){return this._isOpen},moveToTop:function(l,j){var g=this,i=g.options,h;if((i.modal&&!l)||(!i.stack&&!i.modal)){return g._trigger("focus",j)}if(i.zIndex>e.ui.dialog.maxZ){e.ui.dialog.maxZ=i.zIndex}if(g.overlay){e.ui.dialog.maxZ+=1;g.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ)}h={scrollTop:g.element.scrollTop(),scrollLeft:g.element.scrollLeft()};e.ui.dialog.maxZ+=1;g.uiDialog.css("z-index",e.ui.dialog.maxZ);g.element.attr(h);g._trigger("focus",j);return g},open:function(){if(this._isOpen){return}var h=this,i=h.options,g=h.uiDialog;h.overlay=i.modal?new e.ui.dialog.overlay(h):null;h._size();h._position(i.position);g.show(i.show);h.moveToTop(true);if(i.modal){g.bind("keypress.ui-dialog",function(m){if(m.keyCode!==e.ui.keyCode.TAB){return}var l=e(":tabbable",this),n=l.filter(":first"),j=l.filter(":last");if(m.target===j[0]&&!m.shiftKey){n.focus(1);return false}else{if(m.target===n[0]&&m.shiftKey){j.focus(1);return false}}})}h._autoFocus();h._isOpen=true;h._trigger("open");return h},_autoFocus:function(){var g=this.element.find(":tabbable");if(!g.length){g=this.uiDialog.find(".ui-dialog-buttonpane");if(!g.length){g=this.uiDialog}}g.eq(0).focus()},_createButtons:function(j){var i=this,g=false,h=e("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),l=e("<div></div>").addClass("ui-dialog-buttonset").appendTo(h);i.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof j==="object"&&j!==null){e.each(j,function(){return !(g=true)})}if(g){e.each(j,function(m,o){o=e.isFunction(o)?{click:o,text:m}:o;var n=e('<button type="button"></button>').click(function(){o.click.apply(i.element[0],arguments)}).appendTo(l);e.each(o,function(p,q){if(p==="click"){return}if(p in a){n[p](q)}else{n.attr(p,q)}});if(e.fn.button){n.button()}});h.appendTo(i.uiDialog)}},_makeDraggable:function(){var g=this,j=g.options,l=e(document),i;function h(m){return{position:m.position,offset:m.offset}}g.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(m,n){i=j.height==="auto"?"auto":e(this).height();e(this).height(e(this).height()).addClass("ui-dialog-dragging");g._trigger("dragStart",m,h(n))},drag:function(m,n){g._trigger("drag",m,h(n))},stop:function(m,n){j.position=[n.position.left-l.scrollLeft(),n.position.top-l.scrollTop()];e(this).removeClass("ui-dialog-dragging").height(i);g._trigger("dragStop",m,h(n));e.ui.dialog.overlay.resize()}})},_makeResizable:function(m){m=(m===f?this.options.resizable:m);var h=this,l=h.options,g=h.uiDialog.css("position"),j=(typeof m==="string"?m:"n,e,s,w,se,sw,ne,nw");function i(n){return{originalPosition:n.originalPosition,originalSize:n.originalSize,position:n.position,size:n.size}}h.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:h.element,maxWidth:l.maxWidth,maxHeight:l.maxHeight,minWidth:l.minWidth,minHeight:h._minHeight(),handles:j,start:function(n,o){e(this).addClass("ui-dialog-resizing");h._trigger("resizeStart",n,i(o))},resize:function(n,o){h._trigger("resize",n,i(o))},stop:function(n,o){e(this).removeClass("ui-dialog-resizing");l.height=e(this).height();l.width=e(this).width();h._trigger("resizeStop",n,i(o));e.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var g=this.options;if(g.height==="auto"){return g.minHeight}else{return Math.min(g.minHeight,g.height)}},_position:function(h){var i=[],j=[0,0],g;if(h){if(typeof h==="string"||(typeof h==="object"&&"0" in h)){i=h.split?h.split(" "):[h[0],h[1]];if(i.length===1){i[1]=i[0]}e.each(["left","top"],function(m,l){if(+i[m]===i[m]){j[m]=i[m];i[m]=l}});h={my:i.join(" "),at:i.join(" "),offset:j.join(" ")}}h=e.extend({},e.ui.dialog.prototype.options.position,h)}else{h=e.ui.dialog.prototype.options.position}g=this.uiDialog.is(":visible");if(!g){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position(e.extend({of:window},h));if(!g){this.uiDialog.hide()}},_setOptions:function(j){var h=this,g={},i=false;e.each(j,function(l,m){h._setOption(l,m);if(l in b){i=true}if(l in d){g[l]=m}});if(i){this._size()}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option",g)}},_setOption:function(j,l){var h=this,g=h.uiDialog;switch(j){case"beforeclose":j="beforeClose";break;case"buttons":h._createButtons(l);break;case"closeText":h.uiDialogTitlebarCloseText.text(""+l);break;case"dialogClass":g.removeClass(h.options.dialogClass).addClass(c+l);break;case"disabled":if(l){g.addClass("ui-dialog-disabled")}else{g.removeClass("ui-dialog-disabled")}break;case"draggable":var i=g.is(":data(draggable)");if(i&&!l){g.draggable("destroy")}if(!i&&l){h._makeDraggable()}break;case"position":h._position(l);break;case"resizable":var m=g.is(":data(resizable)");if(m&&!l){g.resizable("destroy")}if(m&&typeof l==="string"){g.resizable("option","handles",l)}if(!m&&l!==false){h._makeResizable(l)}break;case"title":e(".ui-dialog-title",h.uiDialogTitlebar).html(""+(l||"&#160;"));break}e.Widget.prototype._setOption.apply(h,arguments)},_size:function(){var l=this.options,h,j,g=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(l.minWidth>l.width){l.width=l.minWidth}h=this.uiDialog.css({height:"auto",width:l.width}).height();j=Math.max(0,l.minHeight-h);if(l.height==="auto"){if(e.support.minHeight){this.element.css({minHeight:j,height:"auto"})}else{this.uiDialog.show();var i=this.element.css("height","auto").height();if(!g){this.uiDialog.hide()}this.element.height(Math.max(i,j))}}else{this.element.height(Math.max(l.height-h,0))}if(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(g){var h=g.attr("id");if(!h){this.uuid+=1;h=this.uuid}return"ui-dialog-title-"+h},overlay:function(g){this.$el=e.ui.dialog.overlay.create(g)}});e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(g){return g+".dialog-overlay"}).join(" "),create:function(h){if(this.instances.length===0){setTimeout(function(){if(e.ui.dialog.overlay.instances.length){e(document).bind(e.ui.dialog.overlay.events,function(i){if(e(i.target).zIndex()<e.ui.dialog.overlay.maxZ){return false}})}},1);e(document).bind("keydown.dialog-overlay",function(i){if(h.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===e.ui.keyCode.ESCAPE){h.close(i);i.preventDefault()}});e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize)}var g=(this.oldInstances.pop()||e("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(e.fn.bgiframe){g.bgiframe()}this.instances.push(g);return g},destroy:function(g){var h=e.inArray(g,this.instances);if(h!=-1){this.oldInstances.push(this.instances.splice(h,1)[0])}if(this.instances.length===0){e([document,window]).unbind(".dialog-overlay")}g.remove();var i=0;e.each(this.instances,function(){i=Math.max(i,this.css("z-index"))});this.maxZ=i},height:function(){var h,g;if(e.browser.msie&&e.browser.version<7){h=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);g=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(h<g){return e(window).height()+"px"}else{return h+"px"}}else{return e(document).height()+"px"}},width:function(){var g,h;if(e.browser.msie){g=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);h=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(g<h){return e(window).width()+"px"}else{return g+"px"}}else{return e(document).width()+"px"}},resize:function(){var g=e([]);e.each(e.ui.dialog.overlay.instances,function(){g=g.add(this)});g.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)}})}(jq));(function(b,c){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var e=this,l=this.options,j=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),h="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",d=(l.values&&l.values.length)||1,g=[];this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(l.disabled?" ui-slider-disabled ui-disabled":""));this.range=b([]);if(l.range){if(l.range===true){if(!l.values){l.values=[this._valueMin(),this._valueMin()]}if(l.values.length&&l.values.length!==2){l.values=[l.values[0],l.values[0]]}}this.range=b("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+((l.range==="min"||l.range==="max")?" ui-slider-range-"+l.range:""))}for(var f=j.length;f<d;f+=1){g.push(h)}this.handles=j.add(b(g.join("")).appendTo(e.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(i){i.preventDefault()}).hover(function(){if(!l.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!l.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(m){b(this).data("index.ui-slider-handle",m);b(this).addClass("ui-slider-handle-"+m);b(this).attr("id",b(this).parent().attr("id")+"_"+m)});this.handles.keydown(function(q){var n=true,m=b(this).data("index.ui-slider-handle"),r,o,i,p;if(e.options.disabled){return}switch(q.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:n=false;if(!e._keySliding){e._keySliding=true;b(this).addClass("ui-state-active");r=e._start(q,m);if(r===false){return}}break}p=e.options.step;if(e.options.values&&e.options.values.length){o=i=e.values(m)}else{o=i=e.value()}switch(q.keyCode){case b.ui.keyCode.HOME:i=e._valueMin();break;case b.ui.keyCode.END:i=e._valueMax();break;case b.ui.keyCode.PAGE_UP:i=e._trimAlignValue(o+((e._valueMax()-e._valueMin())/a));break;case b.ui.keyCode.PAGE_DOWN:i=e._trimAlignValue(o-((e._valueMax()-e._valueMin())/a));break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(o===e._valueMax()){return}i=e._trimAlignValue(o+p);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(o===e._valueMin()){return}i=e._trimAlignValue(o-p);break}e._slide(q,m,i);return n}).keyup(function(m){var i=b(this).data("index.ui-slider-handle");if(e._keySliding){e._keySliding=false;e._stop(m,i);e._change(m,i);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(f){var g=this.options,j,m,e,h,p,l,n,i,d;if(g.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();j={x:f.pageX,y:f.pageY};m=this._normValueFromMouse(j);e=this._valueMax()-this._valueMin()+1;p=this;this.handles.each(function(o){var q=Math.abs(m-p.values(o));if(e>q){e=q;h=b(this);l=o}});if(g.range===true&&this.values(1)===g.min){l+=1;h=b(this.handles[l])}n=this._start(f,l);if(n===false){return false}this._mouseSliding=true;p._handleIndex=l;h.addClass("ui-state-active").focus();i=h.offset();d=!b(f.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=d?{left:0,top:0}:{left:f.pageX-i.left-(h.width()/2),top:f.pageY-i.top-(h.height()/2)-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(f,l,m)}this._animateOff=true;return true},_mouseStart:function(d){return true},_mouseDrag:function(f){var d={x:f.pageX,y:f.pageY},e=this._normValueFromMouse(d);this._slide(f,this._handleIndex,e);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,h,g,f,i;if(this.orientation==="horizontal"){d=this.elementSize.width;h=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;h=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}g=(h/d);if(g>1){g=1}if(g<0){g=0}if(this.orientation==="vertical"){g=1-g}f=this._valueMax()-this._valueMin();i=this._valueMin()+g*f;return this._trimAlignValue(i)},_start:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}return this._trigger("start",f,d)},_slide:function(h,g,f){var d,e,i;if(this.options.values&&this.options.values.length){d=this.values(g?0:1);if((this.options.values.length===2&&this.options.range===true)&&((g===0&&f>d)||(g===1&&f<d))){f=d}if(f!==this.values(g)){e=this.values();e[g]=f;i=this._trigger("slide",h,{handle:this.handles[g],value:f,values:e});d=this.values(g?0:1);if(i!==false){this.values(g,f,true)}}}else{if(f!==this.value()){i=this._trigger("slide",h,{handle:this.handles[g],value:f});if(i!==false){this.value(f)}}}},_stop:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}this._trigger("stop",f,d)},_change:function(f,e){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}this._trigger("change",f,d)}},value:function(d){if(arguments.length){this.options.value=this._trimAlignValue(d);this._refreshValue();this._change(null,0);return}return this._value()},values:function(e,h){var g,d,f;if(arguments.length>1){this.options.values[e]=this._trimAlignValue(h);this._refreshValue();this._change(null,e);return}if(arguments.length){if(b.isArray(arguments[0])){g=this.options.values;d=arguments[0];for(f=0;f<g.length;f+=1){g[f]=this._trimAlignValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)}else{return this.value()}}}else{return this._values()}},_setOption:function(e,f){var d,g=0;if(b.isArray(this.options.values)){g=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(e){case"disabled":if(f){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(d=0;d<g;d+=1){this._change(null,d)}this._animateOff=false;break}},_value:function(){var d=this.options.value;d=this._trimAlignValue(d);return d},_values:function(d){var g,f,e;if(arguments.length){g=this.options.values[d];g=this._trimAlignValue(g);return g}else{f=this.options.values.slice();for(e=0;e<f.length;e+=1){f[e]=this._trimAlignValue(f[e])}return f}},_trimAlignValue:function(g){if(g<=this._valueMin()){return this._valueMin()}if(g>=this._valueMax()){return this._valueMax()}var d=(this.options.step>0)?this.options.step:1,f=(g-this._valueMin())%d,e=g-f;if(Math.abs(f)*2>=d){e+=(f>0)?d:(-d)}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var g=this.options.range,f=this.options,n=this,e=(!this._animateOff)?f.animate:false,h,d={},i,l,j,m;if(this.options.values&&this.options.values.length){this.handles.each(function(p,o){h=(n.values(p)-n._valueMin())/(n._valueMax()-n._valueMin())*100;d[n.orientation==="horizontal"?"left":"bottom"]=h+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(n.options.range===true){if(n.orientation==="horizontal"){if(p===0){n.range.stop(1,1)[e?"animate":"css"]({left:h+"%"},f.animate)}if(p===1){n.range[e?"animate":"css"]({width:(h-i)+"%"},{queue:false,duration:f.animate})}}else{if(p===0){n.range.stop(1,1)[e?"animate":"css"]({bottom:(h)+"%"},f.animate)}if(p===1){n.range[e?"animate":"css"]({height:(h-i)+"%"},{queue:false,duration:f.animate})}}}i=h})}else{l=this.value();j=this._valueMin();m=this._valueMax();h=(m!==j)?(l-j)/(m-j)*100:0;d[n.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(g==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[e?"animate":"css"]({width:h+"%"},f.animate)}if(g==="max"&&this.orientation==="horizontal"){this.range[e?"animate":"css"]({width:(100-h)+"%"},{queue:false,duration:f.animate})}if(g==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[e?"animate":"css"]({height:h+"%"},f.animate)}if(g==="max"&&this.orientation==="vertical"){this.range[e?"animate":"css"]({height:(100-h)+"%"},{queue:false,duration:f.animate})}}}});b.extend(b.ui.slider,{version:"1.8.16"})}(jq));(function(d,f){var c=0,b=0;function e(){return ++c}function a(){return ++b}d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(g,h){if(g=="selected"){if(this.options.collapsible&&h==this.options.selected){return}this.select(h)}else{this.options[g]=h;this._tabify()}},_tabId:function(g){return g.title&&g.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(g){return g.replace(/:/g,"\\:")},_cookie:function(){var g=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a());return d.cookie.apply(null,[g].concat(d.makeArray(arguments)))},_ui:function(h,g){return{tab:h,panel:g,index:this.anchors.index(h)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var g=d(this);g.html(g.data("label.tabs")).removeData("label.tabs")})},_tabify:function(v){var w=this,j=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(y,o){var x=d(o).attr("href");var z=x.split("#")[0],A;if(z&&(z===location.toString().split("#")[0]||(A=d("base")[0])&&z===A.href)){x=o.hash;o.href=x}if(h.test(x)){w.panels=w.panels.add(w.element.find(w._sanitizeSelector(x)))}else{if(x&&x!=="#"){d.data(o,"href.tabs",x);d.data(o,"load.tabs",x.replace(/#.*$/,""));var C=w._tabId(o);o.href="#"+C;var B=w.element.find("#"+C);if(!B.length){B=d(j.panelTemplate).attr("id",C).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(w.panels[y-1]||w.list);B.data("destroy.tabs",true)}w.panels=w.panels.add(B)}else{j.disabled.push(y)}}});if(v){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===f){if(location.hash){this.anchors.each(function(x,o){if(o.hash==location.hash){j.selected=x;return false}})}if(typeof j.selected!=="number"&&j.cookie){j.selected=parseInt(w._cookie(),10)}if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}j.selected=j.selected||(this.lis.length?0:-1)}else{if(j.selected===null){j.selected=-1}}j.selected=((j.selected>=0&&this.anchors[j.selected])||j.selected<0)?j.selected:0;j.disabled=d.unique(j.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(x,o){return w.lis.index(x)}))).sort();if(d.inArray(j.selected,j.disabled)!=-1){j.disabled.splice(d.inArray(j.selected,j.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(j.selected>=0&&this.anchors.length){w.element.find(w._sanitizeSelector(w.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");w.element.queue("tabs",function(){w._trigger("show",null,w._ui(w.anchors[j.selected],w.element.find(w._sanitizeSelector(w.anchors[j.selected].hash))[0]))});this.load(j.selected)}d(window).bind("unload",function(){w.lis.add(w.anchors).unbind(".tabs");w.lis=w.anchors=w.panels=null})}else{j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(j.cookie){this._cookie(j.selected,j.cookie)}for(var n=0,u;(u=this.lis[n]);n++){d(u)[d.inArray(n,j.disabled)!=-1&&!d(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(j.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var m=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var q=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){m("hover",d(this))});this.lis.bind("mouseout.tabs",function(){q("hover",d(this))});this.anchors.bind("focus.tabs",function(){m("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){q("focus",d(this).closest("li"))})}var g,p;if(j.fx){if(d.isArray(j.fx)){g=j.fx[0];p=j.fx[1]}else{g=p=j.fx}}function l(i,o){i.css("display","");if(!d.support.opacity&&o.opacity){i[0].style.removeAttribute("filter")}}var r=p?function(i,o){d(i).closest("li").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(p,p.duration||"normal",function(){l(o,p);w._trigger("show",null,w._ui(i,o[0]))})}:function(i,o){d(i).closest("li").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");w._trigger("show",null,w._ui(i,o[0]))};var s=g?function(o,i){i.animate(g,g.duration||"normal",function(){w.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");l(i,g);w.element.dequeue("tabs")})}:function(o,i,x){w.lis.removeClass("ui-tabs-selected ui-state-active");i.addClass("ui-tabs-hide");w.element.dequeue("tabs")};this.anchors.bind(j.event+".tabs",function(){var o=this,y=d(o).closest("li"),i=w.panels.filter(":not(.ui-tabs-hide)"),x=w.element.find(w._sanitizeSelector(o.hash));if((y.hasClass("ui-tabs-selected")&&!j.collapsible)||y.hasClass("ui-state-disabled")||y.hasClass("ui-state-processing")||w.panels.filter(":animated").length||w._trigger("select",null,w._ui(this,x[0]))===false){this.blur();return false}j.selected=w.anchors.index(this);w.abort();if(j.collapsible){if(y.hasClass("ui-tabs-selected")){j.selected=-1;if(j.cookie){w._cookie(j.selected,j.cookie)}w.element.queue("tabs",function(){s(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(j.cookie){w._cookie(j.selected,j.cookie)}w.element.queue("tabs",function(){r(o,x)});w.load(w.anchors.index(this));this.blur();return false}}}if(j.cookie){w._cookie(j.selected,j.cookie)}if(x.length){if(i.length){w.element.queue("tabs",function(){s(o,i)})}w.element.queue("tabs",function(){r(o,x)});w.load(w.anchors.index(this))}else{throw new Error("jQuery UI Tabs: Mismatching fragment identifier.")}if(d.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(g){if(typeof g=="string"){g=this.anchors.index(this.anchors.filter("[href$="+g+"]"))}return g},destroy:function(){var g=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h=d.data(this,"href.tabs");if(h){this.href=h}var i=d(this).unbind(".tabs");d.each(["href","load","cache"],function(j,l){i.removeData(l+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(d.data(this,"destroy.tabs")){d(this).remove()}else{d(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(g.cookie){this._cookie(null,g.cookie)}return this},add:function(j,i,h){if(h===f){h=this.anchors.length}var g=this,m=this.options,p=d(m.tabTemplate.replace(/#\{href\}/g,j).replace(/#\{label\}/g,i)),n=!j.indexOf("#")?j.replace("#",""):this._tabId(d("a",p)[0]);p.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var l=g.element.find("#"+n);if(!l.length){l=d(m.panelTemplate).attr("id",n).data("destroy.tabs",true)}l.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(h>=this.lis.length){p.appendTo(this.list);l.appendTo(this.list[0].parentNode)}else{p.insertBefore(this.lis[h]);l.insertBefore(this.panels[h])}m.disabled=d.map(m.disabled,function(q,o){return q>=h?++q:q});this._tabify();if(this.anchors.length==1){m.selected=0;p.addClass("ui-tabs-selected ui-state-active");l.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[0],g.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[h],this.panels[h]));return this},remove:function(g){g=this._getIndex(g);var i=this.options,j=this.lis.eq(g).remove(),h=this.panels.eq(g).remove();if(j.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(g+(g+1<this.anchors.length?1:-1))}i.disabled=d.map(d.grep(i.disabled,function(m,l){return m!=g}),function(m,l){return m>=g?--m:m});this._tabify();this._trigger("remove",null,this._ui(j.find("a")[0],h[0]));return this},enable:function(g){g=this._getIndex(g);var h=this.options;if(d.inArray(g,h.disabled)==-1){return}this.lis.eq(g).removeClass("ui-state-disabled");h.disabled=d.grep(h.disabled,function(l,j){return l!=g});this._trigger("enable",null,this._ui(this.anchors[g],this.panels[g]));return this},disable:function(h){h=this._getIndex(h);var g=this,i=this.options;if(h!=i.selected){this.lis.eq(h).addClass("ui-state-disabled");i.disabled.push(h);i.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[h],this.panels[h]))}return this},select:function(g){g=this._getIndex(g);if(g==-1){if(this.options.collapsible&&this.options.selected!=-1){g=this.options.selected}else{return this}}this.anchors.eq(g).trigger(this.options.event+".tabs");return this},load:function(j){j=this._getIndex(j);var h=this,m=this.options,g=this.anchors.eq(j)[0],i=d.data(g,"load.tabs");this.abort();if(!i||this.element.queue("tabs").length!==0&&d.data(g,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(j).addClass("ui-state-processing");if(m.spinner){var l=d("span",g);l.data("label.tabs",l.html()).html(m.spinner)}this.xhr=d.ajax(d.extend({},m.ajaxOptions,{url:i,success:function(o,n){h.element.find(h._sanitizeSelector(g.hash)).html(o);h._cleanup();if(m.cache){d.data(g,"cache.tabs",true)}h._trigger("load",null,h._ui(h.anchors[j],h.panels[j]));try{m.ajaxOptions.success(o,n)}catch(p){}},error:function(p,n,o){h._cleanup();h._trigger("load",null,h._ui(h.anchors[j],h.panels[j]));try{m.ajaxOptions.error(p,n,j,g)}catch(o){}}}));h.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(h,g){this.anchors.eq(h).removeData("cache.tabs").data("load.tabs",g);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(i,l){var g=this,m=this.options;var h=g._rotate||(g._rotate=function(n){clearTimeout(g.rotation);g.rotation=setTimeout(function(){var o=m.selected;g.select(++o<g.anchors.length?o:0)},i);if(n){n.stopPropagation()}});var j=g._unrotate||(g._unrotate=!l?function(n){if(n.clientX){g.rotate(null)}}:function(n){t=m.selected;h()});if(i){this.element.bind("tabsshow",h);this.anchors.bind(m.event+".tabs",j);h()}else{clearTimeout(g.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(m.event+".tabs",j);delete this._rotate;delete this._unrotate}return this}})})(jq);(function($,undefined){$.extend($.ui,{datepicker:{version:"1.8.16"}});var PROP_NAME="datepicker";var dpuuid=new Date().getTime();var instActive;function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst);if(inst.settings.disabled){this._disableDatepicker(target)}},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);if(inst.settings.disabled){this._disableDatepicker(target)}inst.dpDiv.css("display","block")},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){this.uuid+=1;var id="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");inline.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker()}var date=this._getDateDatepicker(target,true);var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");extendRemove(inst.settings,settings);if(minDate!==null&&settings.dateFormat!==undefined&&settings.minDate===undefined){inst.settings.minDate=this._formatDate(inst,minDate)}if(maxDate!==null&&settings.dateFormat!==undefined&&settings.maxDate===undefined){inst.settings.maxDate=this._formatDate(inst,maxDate)}this._attachments($(target),inst);this._autoSize(inst);this._setDate(inst,date);this._updateAlternate(inst);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}var onSelect=$.datepicker._get(inst,"onSelect");if(onSelect){var dateStr=$.datepicker._formatDate(inst);onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{$.datepicker._hideDatepicker()}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target),val=inst.input.val();if(val!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst);var blurEventType="blur.fromDatepickerKeyUp",onSelect=$.datepicker._get(inst,"onSelect");if(onSelect){inst.input.unbind(blurEventType).one(blurEventType,function(){onSelect.apply((inst.input?inst.input[0]:null),[val,inst])})}}}catch(event){$.datepicker.log(event)}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!=inst){if($.datepicker._datepickerShowing){$.datepicker._triggerOnClose($.datepicker._curInst)}$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");var beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{};if(beforeShowSettings===false){return}extendRemove(inst.settings,beforeShowSettings);inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){var borders=$.datepicker._getBorders(inst.dpDiv);cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}};inst.dpDiv.zIndex($(input).zIndex()+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim||!duration){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;self.maxRows=4;var borders=$.datepicker._getBorders(inst.dpDiv);instActive=inst;inst.dpDiv.empty().append(this._generateHTML(inst));var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}inst.dpDiv.find("."+this._dayOverClass+" a").mouseover();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&inst.input[0]!=document.activeElement){inst.input.focus()}if(inst.yearshtml){var origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml&&inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml)}origyearshtml=inst.yearshtml=null},0)}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1||$.expr.filters.hidden(obj))){obj=obj[isRTL?"previousSibling":"nextSibling"]}var position=$(obj).offset();return[position.left,position.top]},_triggerOnClose:function(inst){var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}$.datepicker._triggerOnClose(inst);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var self=this,altField=self._get(inst,"altField");if(altField){var dateStr=self.formatDate(self._get(inst,"altFormat")||self._get(inst,"dateFormat"),self._getDate(inst),self._getFormatConfig(inst));$(altField).each(function(){$(this)[$(this).is("input")?"val":"text"](dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){var isDoubled=lookAhead(match);var size=(match=="@"?14:(match=="!"?20:(match=="y"&&isDoubled?4:(match=="o"?3:2))));var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a,b){return -(a[1].length-b[1].length)});var index=-1;$.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()==name.toLowerCase()){index=pair[0];iValue+=name.length;return false}});if(index!=-1){return index+1}else{throw"Unknown name at position "+iValue}};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(iValue<value.length){throw new Error("Extra/unparsed characters found in date: "+value.substring(iValue))}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat");var dates=inst.lastVal=inst.input?inst.input.val():null;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};var newDate=(date==null||date===""?defaultDate:(typeof date=="string"?offsetString(date):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));newDate=(newDate&&newDate.toString()=="Invalid Date"?defaultDate:newDate);if(newDate){newDate.setHours(0);newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0)}return this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date;var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;var newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";this.maxRows=4;for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var curRows=Math.ceil((leadDays+daysInMonth)/7);var numRows=(isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows);this.maxRows=numRows;var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+">"+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span>"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" >";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")}if(!inst.yearshtml){inst.yearshtml="";if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" >";for(;year<=endYear;year++){inst.yearshtml+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}inst.yearshtml+="</select>";html+=inst.yearshtml;inst.yearshtml=null}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var newDate=(minDate&&date<minDate?minDate:date);newDate=(maxDate&&newDate>maxDate?maxDate:newDate);return newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.bind("mouseout",function(event){var elem=$(event.target).closest(selector);if(!elem.length){return}elem.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(event){var elem=$(event.target).closest(selector);if($.datepicker._isDisabledDatepicker(instActive.inline?dpDiv.parent()[0]:instActive.input[0])||!elem.length){return}elem.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");elem.addClass("ui-state-hover");if(elem.hasClass("ui-datepicker-prev")){elem.addClass("ui-datepicker-prev-hover")}if(elem.hasClass("ui-datepicker-next")){elem.addClass("ui-datepicker-next-hover")}})}function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!this.length){return this}if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8.16";window["DP_jQuery_"+dpuuid]=$})(jq);(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===b){return this._value()}this._setOption("value",c);return this},_setOption:function(c,d){if(c==="value"){this.options.value=d;this._refreshValue();if(this._value()===this.options.max){this._trigger("complete")}}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;if(typeof c!=="number"){c=0}return Math.min(this.options.max,Math.max(this.min,c))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var d=this.value();var c=this._percentage();if(this.oldValue!==d){this.oldValue=d;this._trigger("change")}this.valueDiv.toggle(d>this.min).toggleClass("ui-corner-right",d===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",d)}});a.extend(a.ui.progressbar,{version:"1.8.16"})})(jq);
/*!
 * jQuery UI Touch Punch 0.1.0
 *
 * Copyright 2010, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
(function(c){c.support.touch=typeof Touch==="object";if(!c.support.touch){return}var f=c.ui.mouse.prototype,g=f._mouseInit,a=f._mouseDown,e=f._mouseUp,b={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"};function d(h){var i=h.originalEvent.changedTouches[0];return c.extend(h,{type:b[h.type],which:1,pageX:i.pageX,pageY:i.pageY,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY})}f._mouseInit=function(){var h=this;h.element.bind("touchstart."+h.widgetName,function(i){return h._mouseDown(d(i))});g.call(h)};f._mouseDown=function(j){var h=this,i=a.call(h,j);h._touchMoveDelegate=function(l){return h._mouseMove(d(l))};h._touchEndDelegate=function(l){return h._mouseUp(d(l))};c(document).bind("touchmove."+h.widgetName,h._touchMoveDelegate).bind("touchend."+h.widgetName,h._touchEndDelegate);return i};f._mouseUp=function(i){var h=this;c(document).unbind("touchmove."+h.widgetName,h._touchMoveDelegate).unbind("touchend."+h.widgetName,h._touchEndDelegate);return e.call(h,i)}})(jq);(function(a){a.widget("ui.rangeSlider",a.extend({},a.ui.slider.prototype,{_create:function(){this.options.range=true;a.ui.slider.prototype._create.apply(this,arguments);this.element.addClass("ui-range-slider-holder")},destroy:function(){this.element.removeClass("ui-range-slider-holder");a.ui.slider.prototype.destroy.apply(this,arguments)}}))})(jq);(function(i){var h="ui-dialog-content",c="ui-dialog-no-title",j="ui-map-popover",l="ui-popover-arrow",f="ui-popover",p="ui-popover-left",o="ui-popover-right",d="ui-popover-top",b="ui-tooltip",g="ui-tooltip-popover",n=null,a="r9tt-";function m(){if(n!==null){clearInterval(n)}}function e(){n=setTimeout(jq.ui.r9popover.close,200)}i.widget("ui.r9dialog",i.ui.dialog,{options:{autoFocus:true,position:["center",100],modal:true,minHeight:50,resizable:false,width:"auto",showCloseX:true,title:null,hideTitle:false,isFixed:false},_autoFocus:function(){if(this.options.autoFocus){i.ui.dialog.prototype._autoFocus.call(this)}else{this.uiDialog.focus()}},_create:function(){i.ui.dialog.prototype._create.apply(this);this.uiDialog.wrapInner('<div class="ui-dialog-liner" />');if(this.options.isFixed){this.uiDialog.css("position","fixed");this._position(this.options.position)}if(this.options.hideTitle){this.uiDialog.addClass(c)}},open:function(){if(this._isOpen){return}i.ui.dialog.prototype.open.apply(this);if(!this.options.showCloseX){this.uiDialog.find(".ui-dialog-titlebar-close").hide()}else{jq(".ui-widget-overlay").click(function(){jq("."+h).r9dialog("close")})}return this}});i.widget("ui.r9popover",i.ui.r9dialog,{options:{at:"auto",draggable:false,position:"body",clazz:""},_create:function(){var q={right:o,top:d};this._destroyAll();var r=i.ui.dialog.overlay.oldInstances.length;if(r){i.ui.dialog.overlay.oldInstances[r-1].height(i(document).height())}i.ui.r9dialog.prototype._create.apply(this);this.uiDialog.addClass(f).addClass(q[this.options.at]||p);if(this.options.clazz!=""){this.uiDialog.addClass(this.options.clazz)}this.uiPopoverArrow=jq("<div/>",{"class":l}).insertAfter(this.element)},_destroyAll:function(){i.ui.r9popover.destroy()},_onOverlayClick:function(){jq("."+h).r9popover("close")},_position:function(q){isVisible=this.uiDialog.is(":visible");if(!isVisible){this.uiDialog.show()}var r=jq.isArray(q);this.uiDialog.css({left:0,top:0}).position({my:((this.options.at=="right")?"right":"left")+" top",at:this._positionAt(),offset:this._positionOffset(),of:r?jq.Event("click",{pageX:q[0],pageY:q[1]}):jq(q||i.ui.r9popover.prototype.options.position),collision:this.options.at=="auto"?"flip":"none"});if(this.options.at=="auto"&&!r&&(jq(q||i.ui.r9popover.prototype.options.position).offset().left>this.uiDialog.offset().left)){this.uiDialog.removeClass(p).addClass(o)}if(!isVisible){this.uiDialog.hide()}},_positionAt:function(){var q=this.options.at;if(q=="top"){return"left bottom"}else{return((q=="right")?"left":"right")+" center"}},_positionOffset:function(){if(this.options.at=="top"){return"-"+(this.uiPopoverArrow.width()/2)+" "+this.uiPopoverArrow.height()}else{return this.uiPopoverArrow.width()+" -"+(this.uiPopoverArrow.height()/2+this.uiPopoverArrow.position().top)}},open:function(){if(this._isOpen){return}i.ui.dialog.prototype.open.apply(this);this.element.show();if(this.options.modal){jq(".ui-widget-overlay").addClass("ui-popover-overlay").click(this._onOverlayClick)}return this}});i.widget("ui.r9tooltip",{timer:null,_create:function(){var q=this;this.element.hover(function(){m();var r={modal:false,position:q.element,clazz:g,width:q.options.width,hideTitle:q.options.hideTitle};var s=jq("#"+a+q.options.ttid);var u=q.options.content;if(u.length==0&&q.options.textAttribute.length>0){u=q.element.attr(q.options.textAttribute).split("|")[1]}if(q.options.ttid.length>0&&s.size()>0){if(s.hasClass(f)){s.r9popover("open")}else{s.r9popover(r);s.show();s.parent().parent().hover(m,e)}}else{var v=q.options.title;if(v.length==0&&q.options.textAttribute.length>0){v=q.element.attr(q.options.textAttribute).split("|")[0]}var w={title:v,width:q.options.width};if(q.options.ttid.length>0){w.id=a+q.options.ttid}jq("<div/>",w).append(u).addClass(q.options.ttclass).appendTo("body").r9popover(r).parent().parent().hover(m,e)}},e)},options:{title:"",textAttribute:"",content:"",ttclass:"",ttid:"",width:"auto",hideTitle:false}});i.ui.r9popover.destroy=function(){i.ui.r9popover.get().r9popover("destroy")};i.ui.r9popover.get=function(){return i("."+f).find("."+h)};i.ui.r9tooltip.destroy=function(){i("."+g).find("."+h).r9popover("destroy")};i.ui.r9popover.close=function(){i.ui.r9popover.get().r9popover("close")};i.widget("ui.r9mapPopover",i.ui.r9popover,{options:{modal:false},_bindMapEvents:function(){var q=this.options.map;if(!q.PopoverClickListener_){q.PopoverClickListener_=GEvent.addListener(q,"click",function(r){if(!r){i.ui.r9mapPopover.destroy()}})}if(!q.PopoverInfoWindowListener_){q.PopoverInfoWindowListener_=GEvent.addListener(q,"infowindowopen",i.ui.r9mapPopover.destroy)}if(!q.PopoverZoomEndListener_){q.PopoverZoomEndListener_=GEvent.addListener(q,"zoomend",i.ui.r9mapPopover.destroy)}},_bindOnClick:function(){var q=this,r=q.uiDialog[0],s=i.ui.r9mapPopover.onClick_;GEvent.bindDom(r,"mousedown",q,s);GEvent.bindDom(r,"dblclick",q,s);GEvent.bindDom(r,"DOMMouseScroll",q,s)},_create:function(){i.ui.r9mapPopover.destroy();i.ui.r9dialog.prototype._create.apply(this);this.uiDialog.addClass(f+" "+j).addClass(this.options.at=="right"?o:p).appendTo(this.options.map.getPane(G_MAP_FLOAT_PANE));this.uiPopoverArrow=jq("<div/>",{"class":l}).insertAfter(this.element);this._bindOnClick();this._bindMapEvents()}});i.ui.r9mapPopover.destroy=function(){i("."+j).find("."+h).r9mapPopover("close").r9mapPopover("destroy")};i.ui.r9mapPopover.onClick_=function(q){if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all){window.event.cancelBubble=true;window.event.returnValue=false}else{q.stopPropagation()}};i.widget("ui.r9LinkedInput",{options:{linkclass:"",linktooltip:"",selectOnOpen:false,click:i.noop,change:i.noop,autoSize:true},_create:function(){if(this.element.prop("tagName")=="SELECT"||this.element.prop("tagName")=="INPUT"){var q=this;var r=this.link=jq("<a id='"+this.element.attr("id")+"-link' title='"+this.options.linktooltip+"' class='actionlink linkFromInput "+((this.element.prop("tagName")=="SELECT")?"selectLinkFromInput ":"")+this.options.linkclass+"' href='javascript:void(0)'>"+jq("<div/>").text(this.getText()).html()+"</a>").insertAfter(this.element.hide());r.bind("click",function(s){if(q.options.autoSize){q.element.width(jq(this).outerWidth())}r.hide();q.element.show();if(q.options.selectOnOpen){q.element.select()}q.options.click()});this.element.bind("change blur",function(u){var s=true;if(q.options.change.call(this,u)){s=false}if(s){r.text(q.getText()).show();if(q.options.autoSize){q.element.width(r.width())}q.element.hide()}else{if(q.options.selectOnOpen){q.element.select()}}})}},getText:function(){if(this.element.prop("tagName")=="SELECT"){return this.element.children(":selected").text()}else{return this.element.val()}},_destroy:function(){this.link.remove();this.element.show()}})})(jq);jq.widget("ui.combobox",{options:{appendTo:"body",position:{my:"left top",at:"left bottom",collision:"none"}},_change:function(a){if(this.previous!==this.element.val()){this._trigger("change",a,{item:this.selectedItem})}},_create:function(){var c=this,f=c.element[0].ownerDocument,a=c.element.hide(),d=a.children(":selected"),e=d.text()?d.text():"",b=c.input=jq("<a class='ui-combobox' href='#'>"+e+"</a>").insertAfter(a).click(function(i){var h=c.menu.element.empty().zIndex(c.element.zIndex()+1);c._renderMenu(h);c.menu.deactivate();c.menu.refresh();c.menu.element.show().position(jq.extend({of:b},c.options.position));c._resizeMenu();setTimeout(function(){jq("body",f).one("click.combobox",function(){c.close(i);c._change(i)})},1);i.preventDefault()}).bind("blur.combobox",function(h){if(!c.options.disabled){c.closing=setTimeout(function(){c.close(h);c._change(h)},150)}}),g=c.menu=jq("<ul></ul>").addClass("ui-combobox").appendTo(jq(c.options.appendTo||"body",f)[0]).mousedown(function(h){var i=c.menu.element[0];if(!jq(h.target).closest(".ui-menu-item").length){setTimeout(function(){jq(document).one("mousedown",function(j){if(j.target!==c.element[0]&&j.target!==i&&!jq.ui.contains(i,j.target)){c.close()}})},1)}setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(i,j){var h=j.item.data("item.combobox");if(false!==c._trigger("focus",i,{item:h})){if(/^key/.test(i.originalEvent.type)){c.element.val(h.value)}}},selected:function(j,l){var i=l.item.data("item.combobox"),h=c.previous;if(c.element[0]!==f.activeElement){c.element.focus();c.previous=h;setTimeout(function(){c.previous=h},1)}if(false!==c._trigger("select",j,{item:i})){b.text(i.label);c.element.val(i.value)}c.term=c.element.val();c.selectedItem=i;c.close(j);c._change(j)},blur:function(h,i){if(c.menu.element.is(":visible")&&(c.element.val()!==c.term)){c.element.val(c.term)}}}).zIndex(c.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(jq.fn.frame){g.element.bgiframe()}c.selectedItem={label:d.text(),value:d.val()}},_getItem:function(a){return{label:a.text(),value:a.val()}},_renderMenu:function(b){var a=this;a.element.children("option").each(function(){var c=a._getItem(jq(this));jq("<li"+((a.selectedItem&&c.value===a.selectedItem.value)?" class='ui-menu-item-selected'":"")+"><a>"+c.label+"</a></li>").data("item.combobox",c).appendTo(b)})},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},close:function(b){var a=this;jq("body",a.element[0].ownerDocument).unbind("click.combobox");clearTimeout(a.closing);if(a.menu.element.is(":visible")){a._trigger("close",b);a.menu.element.hide();a.menu.deactivate()}},value:function(c){var a=this,b=a.element.find("[value="+c+"]");if(b.length){a.selectedItem=a._getItem(b);a.element.val(c);a.input.text(a.selectedItem.label)}},destroy:function(){this.input.remove();this.menu.element.remove();this.element.show();jq.Widget.prototype.destroy.call(this)}});(function(a){a.fn.autogrow=function(b){b=a.extend({maxWidth:1000,minWidth:0,comfortZone:20},b);this.filter("input:text").each(function(){var d=a(this),f=parseInt(d.css("minWidth"))||b.minWidth||d.width(),g=parseInt(d.css("maxWidth"))||b.maxWidth,h="",e=a("<tester/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:d.css("fontSize"),fontFamily:d.css("fontFamily"),fontWeight:d.css("fontWeight"),letterSpacing:d.css("letterSpacing"),whiteSpace:"nowrap"}),c=function(){if(h===(h=d.val())){return}var n=h.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e.html(n);var l=e.width()+b.comfortZone,m=(l>=f)?((l<=g)?l:g):f,j=d.width(),i=(m<j&&m>=f)||(m>j&&m<=g);if(i){d.width(m)}};e.insertAfter(d);d.css({"-webkit-transition-duration":"0.1s","-webkit-transition-timing-function":"ease-in-out","-webkit-transition-property":"width","-moz-transition-duration":"0.1s","-moz-transition-timing-function":"ease-in-out","-moz-transition-property":"width"});d.bind("keyup keydown blur update",c);c()});return this}})(jq);(function(){jq.fn.hintInputBox=function(a){var b={message:"",blurClass:"blur"};var a=jq.extend(b,a);return this.each(function(){var d=jq(this);var e=jq(this.form);var f=jq(window);function c(){if(d.val()===a.message&&d.hasClass(a.blurClass)){d.val("").removeClass(a.blurClass)}}d.blur(function(){if(this.value===""){d.addClass(a.blurClass).val(a.message)}}).focus(c).blur();e.submit(c);f.unload(c)})}})();(function(a){a.fn.tipTip=function(c){var g={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var e=a.extend(g,c);if(a("#tiptip_holder").length<=0){var b=a('<div id="tiptip_holder" style="max-width:'+e.maxWidth+';"></div>');var d=a('<div id="tiptip_content"></div>');var f=a('<div id="tiptip_arrow"></div>');a("body").append(b.html(d).prepend(f.html('<div id="tiptip_arrow_inner"></div>')))}else{var b=a("#tiptip_holder");var d=a("#tiptip_content");var f=a("#tiptip_arrow")}return this.each(function(){var i=a(this);if(e.content){var m=e.content}else{var m=i.attr(e.attribute)}if(m!=""){if(!e.content){i.removeAttr(e.attribute)}var h=false;if(e.activation=="hover"){i.hover(function(){l()},function(){if(!e.keepAlive){j()}});if(e.keepAlive){b.hover(function(){},function(){j()})}}else{if(e.activation=="focus"){i.focus(function(){l()}).blur(function(){j()})}else{if(e.activation=="click"){i.click(function(){l();return false}).hover(function(){},function(){if(!e.keepAlive){j()}});if(e.keepAlive){b.hover(function(){},function(){j()})}}}}function l(){e.enter.call(this);d.html(m);b.hide().removeAttr("class").css("margin","0");f.removeAttr("style");var A=parseInt(i.offset()["top"]);var q=parseInt(i.offset()["left"]);var x=parseInt(i.outerWidth());var C=parseInt(i.outerHeight());var z=b.outerWidth();var u=b.outerHeight();var y=Math.round((x-z)/2);var p=Math.round((C-u)/2);var o=Math.round(q+y);var n=Math.round(A+C+e.edgeOffset);var v="";var E="";var w=Math.round(z-12)/2;if(e.defaultPosition=="bottom"){v="_bottom"}else{if(e.defaultPosition=="top"){v="_top"}else{if(e.defaultPosition=="left"){v="_left"}else{if(e.defaultPosition=="right"){v="_right"}}}}var s=(y+q)<parseInt(a(window).scrollLeft());var r=(z+q)>parseInt(a(window).width());if((s&&y<0)||(v=="_right"&&!r)||(v=="_left"&&q<(z+e.edgeOffset+5))){v="_right";E=Math.round(u-13)/2;w=-12;o=Math.round(q+x+e.edgeOffset);n=Math.round(A+p)}else{if((r&&y<0)||(v=="_left"&&!s)){v="_left";E=Math.round(u-13)/2;w=Math.round(z);o=Math.round(q-(z+e.edgeOffset+5));n=Math.round(A+p)}}var B=(A+C+e.edgeOffset+u+8)>parseInt(a(window).height()+a(window).scrollTop());var D=((A+C)-(e.edgeOffset+u+8))<0;if(B||(v=="_bottom"&&B)||(v=="_top"&&!D)){if(v=="_top"||v=="_bottom"){v="_top"}else{v=v+"_top"}E=u;n=Math.round(A-(u+5+e.edgeOffset))}else{if(D|(v=="_top"&&D)||(v=="_bottom"&&!B)){if(v=="_top"||v=="_bottom"){v="_bottom"}else{v=v+"_bottom"}E=-12;n=Math.round(A+C+e.edgeOffset)}}if(v=="_right_top"||v=="_left_top"){n=n+5}else{if(v=="_right_bottom"||v=="_left_bottom"){n=n-5}}if(v=="_left_top"||v=="_left_bottom"){o=o+5}f.css({"margin-left":w+"px","margin-top":E+"px"});b.css({"margin-left":o+"px","margin-top":n+"px"}).attr("class","tip"+v);if(h){clearTimeout(h)}h=setTimeout(function(){b.stop(true,true).fadeIn(e.fadeIn)},e.delay)}function j(){e.exit.call(this);if(h){clearTimeout(h)}b.fadeOut(e.fadeOut)}}})}})(jq);
/*!
 * jQuery Text Overflow v0.7
 *
 * Licensed under the new BSD License.
 * Copyright 2009-2010, Bram Stein
 * All rights reserved.
 */
(function(c){function a(f,i){var h=0,e=[],g=function(j){var m=0,l;if(h>i){return}for(m=0;m<j.length;m+=1){if(j[m].nodeType===1){l=j[m].cloneNode(false);e[e.length-1].appendChild(l);e.push(l);g(j[m].childNodes);e.pop()}else{if(j[m].nodeType===3){if(h+j[m].length<i){e[e.length-1].appendChild(j[m].cloneNode(false))}else{l=j[m].cloneNode(false);l.textContent=c.trim(l.textContent.substring(0,i-h));e[e.length-1].appendChild(l)}h+=j[m].length}else{e.appendChild(j[m].cloneNode(false))}}}};e.push(f.cloneNode(false));g(f.childNodes);return c(e.pop().childNodes)}var b=document.documentElement.style;var d=("textOverflow" in b||"OTextOverflow" in b);if(c.support.textOverflow=d){c.fn.textOverflow=function(){return this}}else{c.fn.textOverflow=function(g,e){var f=g||"&#x2026;";return this.each(function(){var m=c(this),n=m.clone(),q=m.clone(),l=m.text(),h=m.width(),o=0,p=0,j=l.length,i=function(){if(h!==m.width()){m.replaceWith(q);m=q;q=m.clone();m.textOverflow(g,false);h=m.width()}};m.after(n.hide().css({position:"absolute",width:"auto",overflow:"visible","max-width":"inherit"}));if(n.width()>h){while(o<j){p=Math.floor(o+((j-o)/2));n.empty().append(a(q.get(0),p)).append(f);if(n.width()<h){o=p+1}else{j=p}}if(o<l.length){m.empty().append(a(q.get(0),o-1)).append(f)}}n.remove();if(e){setInterval(i,200)}})}}})(jq);(function(a){a.ellipsisTooltip=function(b){this.init(b||{});return this};a.extend(a.ellipsisTooltip,{checkIfPossible:function(){if(a.fn.textOverflow==undefined||a.fn.tipTip==undefined){return false}return true},prototype:{settings:{activation:"hover",keepAlive:false,maxWidth:"auto",edgeOffset:3,defaultPosition:"top",delay:0,fadeIn:200,fadeOut:200,attribute:"title",content:false,ellipseString:"&#x2026;",maxWidth:"auto"},init:function(b){this.settings=a.extend({},this.settings,b)},processNode:function(b){var b=a(b);var d=a.support.textOverflow?b.width():null;var c=b.text();if(a.support.textOverflow){if(this.getTextWidth(b)<d+1){return}}else{b.textOverflow(this.settings.ellipseString);if(!b.text().match(/âŠ$/)){return}}b.tipTip(a.extend(this.settings,{content:c}))},getTextWidth:function(c){var d=c.clone();d.css({width:"auto",display:"none"});d.appendTo(c.parent());var b=d.width();d.remove();return b}}});a.fn.ellipsisTooltip=function(b){if(a.ellipsisTooltip.checkIfPossible()){return this.each(function(){var c=new a.ellipsisTooltip(b);c.processNode(this)})}return this}})(jq);var R9={extend:function(c,g){var b=R9,e=c.split("."),a=e.length;for(var d=0;d<a;d++){var f=e[d];b[f]=b[f]||{};b=b[f]}for(k in g){b[k]=g[k]}}};jq.fn.disableButton=function(){return this.addClass("ui-state-disabled").prop("disabled",true)};jq.fn.enableButton=function(){return this.removeClass("ui-state-disabled").removeProp("disabled")};(function(){var a=new Date();a.setFullYear(a.getFullYear()+1);jq.datepicker.setDefaults({altFormat:"D, M d yy",closeText:"Close",currentText:"Current",dateFormat:"mm/dd/yy",dayNames:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),dayNamesMin:"S,M,T,W,T,F,S".split(","),dayNamesShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),firstDay:parseInt("1")-1,maxDate:a,minDate:new Date(),monthNames:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthNamesShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),prevText:"Prev",nextText:"Next",showAnim:"",showMonthAfterYear:false})})();jq.r9datepicker={parseDate:function(a){return jq.datepicker.parseDate("mm/dd/yy",a)}};jq.fn.r9datepicker=function(f){var i=f.defaultDate,a="mm/dd/yy";if(i){this.val(jq.datepicker.formatDate(a,i));jq(f.altField).text(jq.datepicker.formatDate(f.altFormat||"D, M d yy",i))}else{jq(f.altField).text(a)}var e=f.beforeShow;var c=f.onClose;var h=f.onSelect;var b=this;var g=function(d,m,j,l){jq(b).trigger(d,[l]);if(m){m(l,j)}};f.beforeShow=function(d,j){g("sbopen",e,d,j)};f.onClose=function(j,d){g("sbclose",c,j,d)};f.onSelect=function(j,d){g("sbset",h,j,d)};return this.attr({autocomplete:"off",autocapitalize:"off",autocorrect:"off"}).datepicker(f)};var R9=R9||{};R9.dp=(function(){function a(e,d){return(c(d)-c(e))/86400000}function b(e,f){var d=e[f];delete e[f];return d}function c(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}return{doublePicker:function(s,q){var f=s.defaultDate,d=q.defaultDate,i=jq(s.altField),g=jq(q.altField),o=b(s,"onSelect")||jq.noop,m=b(q,"onSelect")||jq.noop,n=jq(b(s,"selector")),l=jq(b(q,"selector")),r=s.resetAfterDays||30,e=s.minRangeDays||0,j=s.numberOfMonths||2,h=q.numberOfMonths||2,p=s.pop2==undefined?true:s.pop2;n.r9datepicker(jq.extend({beforeShowDay:function(u){return[true,(u&&d&&u.getTime()==d.getTime())?"ui-datepicker-marked-day":""]},numberOfMonths:j,onSelect:function(x,w){f=n.datepicker("getDate");var v=d&&a(f,d);if(!d||v>r||v<e){l.datepicker("setDate",null).datepicker("option","defaultDate",f);g.text("mm/dd/yy")}o.call(this,x,w);if(p){if(l.is(":visible")&&l.css("visibility")!="hidden"){function u(){l.focus()}window.setTimeout(u,50)}}}},s));l.r9datepicker(jq.extend({beforeShowDay:function(u){return[true,(f&&u&&f.getTime()==u.getTime())?"ui-datepicker-marked-day":""]},numberOfMonths:h,onSelect:function(w,v){d=l.datepicker("getDate");var u=f&&a(f,d);if(!f||u<e){n.datepicker("setDate",null).datepicker("option","defaultDate",d);i.text("mm/dd/yy")}m.call(this,w,v)}},q))}}})();var R9=R9||{};R9.utils=function(){return{formToObject:function(c){var b={},a=jq(c).serializeArray();jq.each(a,function(){b[this.name]=this.value});return b},slugify:function(a){return a.replace(/[^A-Za-z0-9-_]/g,"")}}}();var R9=R9||{};R9.social=function(){var c=0,b=0,a=null;function e(g,f){c++;if(c>30){c=0;f()}else{jq.post("/s/toolbox",{action:"listat"},function(h){if(h.status=="OK"){c=0;g()}else{if(h.error=="user.rejected"){c=0;f()}else{setTimeout(function(){e(g,f)},1000)}}},"json")}}function d(g,h,f){a=window.open(g,"LinkedInAuth","width=470,height=420");setTimeout(function(){e(h,f)},1000)}return{_fbLogin:function(f){jq.get("/vs/fb/login/show?action=vs");f=jq.extend({error:jq.noop,perms:"email,user_hometown,user_location",success:jq.noop},f);FB.login(function(g){if(g.authResponse){jq.cookie("fbUserId",g.authResponse.userID,{path:"/"});jq.cookie("fbAuthToken",g.authResponse.accessToken,{path:"/"});jq.get("/vs/fb/login/accept?action=vs");f.success()}else{jq.cookie("fbUserId",null,{path:"/"});jq.cookie("fbAuthToken",null,{path:"/"});jq.get("/vs/fb/login/reject?action=vs");f.error()}},{scope:f.perms});return false},checkPermissions:function(f,g){FB.getLoginStatus(function(i){if(i.authResponse){var j=FB.Data.query("select uid, {0} from permissions where uid={1}",f,i.session.uid);try{j.wait(function(l){if(l.length>0){g(l[0])}else{g(null)}})}catch(h){g(null)}}else{g(null)}})},fbLink:function(g,f){FB.getLoginStatus(function(h){if(h.authResponse){FB.logout(function(){AjaxReg.ui.linkWarning(g,f)});return false}else{return R9.social._fbLogin({success:function(){AjaxReg.facebook.link(g)},perms:f||""})}})},fbLogin:function(f){var h;if(f){h=typeof f==="function"?f:f.success}function g(){AjaxReg.facebook.login(0,h,f.confcode)}f=jq.extend({error:jq.noop},f,{success:g});return R9.social._fbLogin(f)},shareToFacebook:function(){},shareToLinkedin:function(i,h){var i=i||"";var g={msg:i,action:"sendtoli"};h=jq.extend(g,h);b++;if(b>3){b=0;return false}var f=this;jq.post("/s/toolbox",h,function(j){if(j.status!="OK"&&j.error=="linkedin.noauth"){d(j.redirect,function(){f.shareToLinkedin(i,h)},function(){jq(document).trigger("r9.social.linkedinshare.failure",["linkedin.noauth"]);jq(document).trigger("r9.social.linkedinshare.complete")})}else{if(j.status=="OK"){jq(document).trigger("r9.social.linkedinshare.success")}else{jq(document).trigger("r9.social.linkedinshare.failure",[j.error])}jq(document).trigger("r9.social.linkedinshare.complete");b=0}},"json");return false}}}();function fbAsyncInit(){FB.init({oauth:true,appId:"163003079204",cookie:true,xfbml:true,status:true,channelUrl:location.protocol+"//"+location.hostname+"/k/run/fbauth/channel"});jq(document).trigger("r9.facebook.api.loaded");FB.Event.subscribe("edge.create",function(a,b){if(window.recordlike){recordlike(a)}});FB.getLoginStatus(function(a){if(a.status=="connected"){jq.cookie("fbUserId",a.authResponse.userID,{path:"/"});jq.cookie("fbAuthToken",a.authResponse.accessToken,{path:"/"})}else{jq.cookie("fbUserId",null,{path:"/"});jq.cookie("fbAuthToken",null,{path:"/"})}})}function load_facebook_api(){if(!document.getElementById("fb-root")){jq("<div/>",{id:"fb-root"}).appendTo("body")}jq.getScript(location.protocol+"//connect.facebook.net/en_US/all.js");jq("#fblink").click(function(){return R9.social.fbLink()});jq("#fbsignin").click(function(){return R9.social.fbLogin()})}function SetCookie(e,d,c,b){var a={path:"/",secure:false};if(c){a.expires=c}if(b){a.domain=b}jq.cookie(e,d,a)}function kmail(a){document.write('<a class="mlink" href="mailto:'+a+'&#64;kayak&#46;com">'+a+"&#64;kayak&#46;com</a>")}function kmail2(b,a){document.write('<a class="mlink" href="mailto:'+b+"&#64;"+a+'">'+b+"&#64;"+a+"</a>")}function validateEmail(a){if(a.length>0){var b=a.match("^(.+)@(.+)$");if(b!=null){if(b[1]!=null){if(b[1].match(/^\"?[\'\w-_\.\+]*\"?$/)==null){return false}}if(b[2]!=null){return b[2].match(/^[\w-\.]*\.[A-Za-z]{2,6}$/)!=null||b[2].match(/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/)!=null}}}return false}function roundTo(b,c,a){if(a==null){a=true}var d=Math.floor(b/c);if((b%c)>0){if(a){return((d+1)*c)}else{return(d*c)}}else{return b}}function getRadioValue(a){return jq(a).filter(":checked").val()||null}function showmessage(b,a){function c(e,d){jq("#messagebox").html(e);if(d&&d.length>0){jq("#messagebox").attr("title",d)}}if(jq("#messagebox").length==0){jq("body").append("<div title='Updating results...' id='messagebox'></div>");c(b,a);jq("#messagebox").r9dialog({dialogClass:"messagebox",modal:false,showCloseX:false,closeOnEscape:false,position:["center",185]})}else{c(b,a);jq("#messagebox").r9dialog("open")}}function hidemessage(){if(jq("#messagebox").length>0){jq("#messagebox").r9dialog("close")}}function msie(a){return jq.browser.msie&&(!a||a>=jq.browser.version-0)&&jq.browser.version-0||0}function getFader(){var a=jq("#faderPane");if(!a.length){a=jq("<div id='faderPane' class='faderPane'></div>").appendTo("body")}return a}function toggleFaderPane(a,b){fader=getFader();if(a){fader.css("height",jq(window).height()).show();jq(window).resize(function(){fader.css("height",jq(window).height())})}else{fader.hide()}hideMeOnPopup(a);fader[0].onclick=(typeof b=="function")&&a?b:null}function htmlSafe(a){return a.replace(/\&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;")}function stripSpaces(a){return a.replace(/\s/g,"")}function displaysmartad(iframe,rank){try{var smtaddiv=jq(iframe).contents().find("body #smtdiv");var smtad=eval("smtad="+jq(smtaddiv).text());if(smtad.provider_code&&smtad.searchid){getsmartadcreative(rank,smtad.provider_code,smtad.searchid,smtad.click_tracking,smtad.sz,true,Streaming.done);if(!Streaming.done){pollsmartadcreative(rank,smtad.provider_code,smtad.searchid,smtad.click_tracking,smtad.sz)}}}catch(ignored){}}function getsmartadcreative(d,a,j,c,g,b,i){var h=document.getElementById("displayAd"+d);if(h){var l="/h/ads/smartad?provider_code="+a+"&searchid="+j+"&clicktracking="+c+"&sz="+g+"&rank="+d+"&logimpr="+b+"&strm="+i;if(navigator.appVersion.indexOf("MSIE")!=-1){var f=document.getElementById("displayAdSpanFrame"+d);f.innerHTML=f.innerHTML.replace(/src="[^"]*"/,'src="'+l+'"')}else{setIframeUrl(h,l)}}}function pollsmartadcreative(e,a,b,d,c){if(!Streaming.done){setTimeout("pollsmartadcreative("+e+",'"+a+"','"+b+"','"+d+"','"+c+"')",1000)}else{getsmartadcreative(e,a,b,d,c,false,true)}}function loadDisplayAds(){jq("iframe[id^=displayAd]").each(function(){var f=this.id.replace("displayAd","");var a=jq(this).attr("longdesc");if(this.contentWindow.location.href==a){return}var e=!jq(this).hasClass("nonds");var d=this;if(e){this.onload=function(){displayAdOnloadJS(d,f)}}if(e&&navigator.appVersion.indexOf("MSIE")!=-1){var c=this.parentNode;if(c){var b=c.innerHTML;var g=b.replace(/src="[^"]*"/,'src="'+a+'" onload="displayAdOnloadJS(jq(\'#displayAd'+f+"'),"+f+');"');c.innerHTML=g}}else{setIframeUrl(this,a)}if(typeof(document.bannerUrls)=="undefined"){document.bannerUrls={}}document.bannerUrls["displayAd"+f]=a})}function displayAdOnloadJS(c,d){var b=jq(c).contents().find("body #smtdiv");var a=jq(c).contents().find("body #cmp2div");if(b&&b.length==1){displaysmartad(c,d)}else{resizeIframeToContents(c)}}jq(loadDisplayAds);function resizeIframeToContents(b){var a=jq(b).contents().find("body"),d=jq(b).attr("id").replace("displayAd","displayAdHide");if(a){b.height=a.height();b.width=a.width()}var c=jq(b).contents().find("body img");if(c&&c.length==1&&c.attr("src")!=null&&c.attr("src").indexOf("/kayakadpixel.gif")>0){jq(b).attr({height:0,width:0}).css("margin",0);jq("#bannerad"+d.replace("displayAdHide","")).hide();jq("#"+d).hide()}else{jq("#"+d).css("visibility","visible")}}var bannerAdReloadTimer=null;function reloadBannerAds(){function c(d,j){var h=document.getElementById(d);if(h!=null){if(!h.src){if(window.Streaming){Streaming.dbg(d+" NAF")}return}var f=navigator.appVersion.indexOf("MSIE")!=-1?h.contentWindow.location.href:h.src;if(typeof(document.bannerUrls)!="undefined"){if(document.bannerUrls[d]!=null){f=document.bannerUrls[d]}}var g=(f.indexOf("&ad_ts=")<0?f+ +"&ad_ts="+(new Date()).getTime():f.substring(0,f.indexOf("&ad_ts")))+"&ad_ts="+(new Date()).getTime();if(navigator.appVersion.indexOf("MSIE")!=-1){var i=document.getElementById("displayAdSpanFrame"+j);i.innerHTML=i.innerHTML.replace(/src="[^"]*"/,'src="'+g+'"')}else{setIframeUrl(h,g)}}}function a(d){d=document.getElementById(d);return d&&d.style.display!="none"}function b(){bannerAdReloadTimer=null;if(a("bannerad1")){c("displayAd1","1")}if(a("bannerad2")){c("displayAd2","2")}if(a("bannerad3")){c("displayAd3","3")}if(a("bannerad4")){c("displayAd4","4")}}if(bannerAdReloadTimer){window.clearTimeout(bannerAdReloadTimer)}bannerAdReloadTimer=window.setTimeout(b,2500)}function loadTT(f,b){var a=f.match(/^\#ttip(.*)/);var c=a&&a[1];if(!c||jq(f).length){b();return}var e=function(){if(!jq(f).length){jq("<div id='ttip"+c+"'></div>").appendTo("body")}b()};var d={action:"ttip",t:c};if(R9.ttip&&R9.ttip[c]){if(R9.ttip[c].empty){return e()}jq.extend(d,R9.ttip[c].params)}return ssAJAX("/s/toolbox",d,e)}function showTT(d,f,c,a,b,e){loadTT("#ttip"+c,function(){if(f!=""){jq("#ttipText"+c).html(f)}if(c=="BL"){var g=jq("#ttip"+c);g.css({left:"-9999",visibility:"visible"}).show(function(){_showTT(d,f,c,a,b,e)})}else{_showTT(d,f,c,a,b,e)}})}function _showTT(h,m,f,n,d,b){if(d==null||!d){hideAllTT(false)}else{if(b!=null){parts=b.split(",");for(var e=0;e<parts.length;e++){hideTTType(parts[e])}}}var g=jq("#ttip"+f);obj=document.getElementById("ttip"+f);obj.style.display="block";var c=jq(h).offset();var o=c.top;var a=c.left;if(n!=null){o+=n.y;a+=n.x}if(f=="BL"){g.show(function(){jq(this).position({my:"left bottom",at:"left top",offset:"-30 5",of:jq(h)})});return}else{if(f=="TL"){o=o+h.offsetHeight-5;a=a+h.offsetWidth-50}else{if(f=="CL"){o=o+h.offsetHeight-30;a=a+h.offsetWidth+25}else{if(f=="CR"||f=="FSP"){o=o-(g.outerHeight()/2)+(h.offsetHeight/2);if(f=="CL"||f=="FL"||f=="FSP"){a=a+h.offsetWidth}else{a=a-g.outerWidth()}}else{if(f=="FL"){a=a+jq(h).outerWidth()+20;o=o+(jq(h).outerHeight()/2)-65}else{if(f=="DL"){a=a+jq(h).outerWidth();o=o+(jq(h).outerHeight()/2)-50;obj.style.zIndex="45"}else{if(f=="DR"){var l=a;var j=o;o=o+(jq(h).outerHeight()/2)-50;a=a-(jq(obj).outerWidth()+3);obj.style.zIndex="45"}else{if(f=="CT"||f=="CB"){o=o-0+h.offsetHeight;if((jq.browser.mozilla||jq.browser.safari)&&(f=="CL"||f=="FL")){o+=8}else{if(jq.browser.msie&&parseInt(jq.browser.version)==6){}}a=a-(obj.offsetWidth/2)}}}}}}}}jq(obj).css({top:o,left:a,visibility:"visible"})}function hideAllTT(a){if(navigator.appVersion.indexOf("MSIE 6.")!=-1){jq("select.hideOnTT").css("visibility","visible")}if(a==null){a=true}jq.each(["BL","TL","CL","CR","CB","CT","DL","DR","FL","FSP","DX","DXC","DT","DTC","DG","DGC","SHR","HP","SLT","SLB"],function(){hideTTType(this)});try{jq("#createShareDiv").r9popover("close")}catch(b){}if(typeof localTTHidden=="function"&&a){localTTHidden()}jq("div.hideableTT").hide()}function hideTTType(a){jq("#ttip"+a).hide()}function simpleurl(b){if(b==null){return b}var d=b.indexOf("http://")==0,a=b.indexOf("/",d?7:0),c=a>0?b.substring(d?7:0,a):b.substring(d?7:0);return c.indexOf("www.")==0?c.substring(4):c}function cleanUrl(a){if(a!=""&&a.indexOf("http")!=0){a="http://"+a.slice(0,1017)}return a}function isBadUrl(a){a=cleanUrl(a);return !(a.match(/^https?\:\/\/([A-Za-z0-9\-]*\.){1,}[A-Za-z0-9]{1,3}(\:[0-9]*)?[\/\?][^\s]*$/)||a.match(/^https?\:\/\/([A-Za-z0-9\-]*\.){1,}[A-Za-z0-9]{1,3}(\:[0-9]*)?$/)||a.match(/^https?\:\/\/([A-Za-z0-9\-]*\.){1,}(name|travel|museum|aero|mobi|info|jobs)(\:[0-9]*)?[\/\?][^\s]*$/)||a.match(/^https?\:\/\/([A-Za-z0-9\-]*\.){1,}(name|travel|museum|aero|mobi|info|jobs)(\:[0-9]*)?$/))}function replaceArgs(){str=arguments[0];for(var a=1;a<=arguments.length;a++){str=str.replace("{"+(a-1)+"}",arguments[a])}return str}var r9EventList=null;function pushRecordedEvents(){if(r9EventList&&r9EventList.length>0){var a={};jq.each(r9EventList,function(c){var d=(typeof this.value!="undefined")?this.value:"",b=(typeof this.units!="undefined")?this.units:"";a["event_"+c]=this.category+":"+this.subCategory+":"+this.name+":"+d+":"+b});jq.post("/s/sparkle?action=clientevents",a);r9EventList=[]}}function recordEvent(a,e,c,b,d){if(r9EventList==null){r9EventList=[];jq(window).unload(pushRecordedEvents)}jq.get("/vs/"+a+"/"+e+"/"+c+"/"+b+"/"+d+"?action=vs"+(typeof SearchID!="undefined"?"&searchid="+SearchID:""))}if(typeof String.prototype.localeCompare=="undefined"){String.prototype.localeCompare=function(a){if(this<a){return -1}if(this>a){return 1}return 0}}var R9_DisplayEds_JustHidden=false;function hideDisplayAds(a){R9_DisplayEds_JustHidden=true;AjaxAlert.disableDisplayAds();if(a==null||a){AjaxReg.regtype="displayad";AjaxReg.ui.register(function(){})}}function StringBuilder(a){this.strings=[""];this.append(a)}jq.extend(StringBuilder.prototype,{append:function(a){if(a){this.strings.push(a)}return this},clear:function(){this.strings.length=1}});StringBuilder.prototype.toString=function(){return this.strings.join("")};function kykButtonClicked(b,a){b=jq(b);b.find(".sideimg").each(function(){this.style.backgroundPosition=this.style.backgroundPosition.replace(/^0px/,"-90px").replace(/-60px/,"-90px").replace(/-30px/,"-90px")});b.find(".text").css({backgroundPosition:"0px -185px"});b.find(".up").hide();if(a!=null){b.find(".down").html(a)}b.find(".down").show();b.prop("disabled",true);b.find("div").prop("disabled",false);jq.each(["hover","mouseenter","mouseleave","click","mousedown","mouseup"],function(){b.unbind(this)});b.blur()}function bindKykButton(b){var a=b||"button.kykbtn";jq(a).hover(function(){jq(this).find(".sideimg").each(function(){this.style.backgroundPosition=this.style.backgroundPosition.replace(/^0px/,"-30px").replace(/^-60px/,"-30px")});jq(this).find(".text").css({backgroundPosition:"0px -111px"})},function(){jq(this).find(".sideimg").each(function(){this.style.backgroundPosition=this.style.backgroundPosition.replace(/-30px/,"0px").replace(/-60px/,"0px")});jq(this).find(".text").css({backgroundPosition:"0px -74px"})}).mousedown(function(){jq(this).find(".sideimg").each(function(){this.style.backgroundPosition=this.style.backgroundPosition.replace(/-30px/,"-60px")});jq(this).find(".text").css({backgroundPosition:"0px -148px"})});if(b==null){jq("button.kykbtnsingleclick").click(function(){jq(this).addClass("disabledKayakBtn");kykButtonClicked(this)})}}function showCountryList(a){if(document.getElementById("currentCountry")==null){jq("#countryList").load("/s/toolbox",{action:"countrylist",showCurr:a},function(){loadCCCpicker()})}}function rewriteRedirect(b,a){b=jq(b);b.attr("href","/out?url="+encodeURIComponent(b.attr("href"))+(a?"&h="+a:""));return true}jq(function(){bindKykButton()});function r9Float(a){return a-0}function hideMeOnPopup(a){jq("div.hideMeOnPopup").css({visibility:a==null||a?"hidden":"visible"})}function hideOnOutsideClick(a){jq("body").click(function(){jq("#"+a).hide().unbind("click");jq("body").unbind("click")});jq("#"+a).click(function(b){b.stopPropagation()})}function setToAnchor(l,e,b,i,m){var j=jq("#"+e).offset(),c=jq("#"+l).outerHeight(),a=jq("#"+l).outerWidth(),g=jq("#"+e).outerHeight(),d=jq("#"+e).outerWidth(),f=j.left,h=j.top;if(b=="left"){f=f-a}else{if(b=="right"){f+=d}}if(i!=0){h+=i}if(m!=0){f+=m}jq("#"+l).css({position:"absolute",left:f,top:h,zIndex:50})}function recordlike(a){jq.post("/s/toolbox","action=like&href="+escape(a));if(addAdt){addAdt("facebook.like")}}function gradientDialogCleanup(){function a(){jq(".dialog_top").hide().show()}a();window.setTimeout(a,2000)}function loadHashResults(a){var b=document.location.pathname;if(document.location.hash){if(b.indexOf("/",b.length-1)==-1){b+="/"}b+=document.location.hash.substring(1);loadResults(b,a)}else{document.location.reload()}}function evalScript(a){if(a.src){jq.ajax({url:a.src,async:false,dataType:"script"})}else{jq.globalEval(a.text||a.textContent||a.innerHTML||"")}if(a.parentNode){a.parentNode.removeChild(a)}}function loadResults(a,b,c){if(!window.samepageresults){document.location.href=a;return}jq.cookie("hashparams",null);if(document.location.hash&&document.location.hash.length>0){R9.ajaxHistory.ignoredChange(function(){document.location.hash=""})}jq.ajax({url:a,type:"GET",dataType:"html",complete:function(f,d){if(d==="success"){if(c){c()}jq("body")[0].innerHTML=f.responseText;Profiler.init();if(window.Filters){window.Filters=makeFilters(window.Filters.Generator)}jq.datepicker.initialized=false;window.samepagesuccess=false;jq("body script").each(function(){evalScript(this)});var e=a.match(/\/([^\/]*)\/([^\?]*)(\?.*)?/);if(e){var g;if(document.location.pathname.indexOf(e[1])==1){g=e[2]}else{g=e[1]+"/"+e[2]}if(!b){R9.ajaxHistory.ignoredChange(function(){if(window.samepagesuccess){document.location.hash=g}})}else{document.location.hash=g}}jq(document.body).css("cursor","default");R9.ui.initHeader();if(window.R9Admin&&window.samepagesuccess){setTimeout(function(){validateScripts(f.responseText)},5000)}R9.ajaxHistory.initialize(function(){loadHashResults(true)})}}})}function validateScripts(c){var b=jq("<div/>");if(c){b[0].innerHTML=c}try{validateJS(c&&b||null)}catch(a){alert("Hey, Admin!\nThis is not good: "+a)}}function deepExtend(b,a){if(!b){return a}jq.each(a,function(d,c){b[d]=deepExtend(b[d],c)});return b}function enableAddAdt(a,b){jq.get("/vs/"+a+"/"+b+"?action=vs"+(typeof SearchID!="undefined"?"&searchid="+SearchID:""))}function setIframeUrl(b,a){b.contentWindow.location.replace(a)}var emailDealSaveSuccess_clientSuccess=null,emailDealSaveSuccess_clientError=null,AjaxReg=(function(){var q=null;function e(y,z,x){alert(z)}function d(){return jq("#ajaxinner button")}function a(){b();l();jq("#showAlertRegLink").attr("href","javascript:showAlertSection()");jq("#emailAlertsPopupAfterClick").hide();jq("#hiddenCarsPopupAfterClick").show();AjaxReg.alreadyRegistered=true}function f(){b();l();AjaxReg.alreadyRegistered=false}function u(){location.reload(true)}function g(){jq("#ajaxinner").r9dialog("destroy").remove()}function n(){d().button("disable")}function i(){d().button("enable")}function b(){g();return false}function c(x){jq.ajax({url:x,dataType:"script",async:false,cache:false})}function o(){jq("tr.error").hide();jq("#ajaxmessage").addClass("hidden")}function w(x){return function(){if(r()){o();s("/k/run/fbauth/loginAndLinkExisting",jq("#ajaxinner form").serialize(),function(y){if(y.status==0){if(x){a();x()}else{u()}}else{j(y.message)}})}return false}}function l(){jq("#header").load("/k/headerajax?"+new Date().getTime(),R9.ui.initHeader)}function v(x){x=x||{};if(typeof x==="function"){x={success:x}}return x}function s(y,A,C){try{if(!q){if(typeof easyXDM=="undefined"){c("/v428/js/alien/easyXDM.min.js")}if(!jq.isPlainObject(window.JSON)){c("/v428/js/mweb/json2.js")}var z="/k/run/auth/xdm/",x=z+"name";q=new easyXDM.Rpc({local:x,remote:AjaxReg.remoteHost+z+"remoteMethods",remoteHelper:AjaxReg.remoteHost+x,swf:AjaxReg.remoteHost+"/images/v428165/swf/easyxdm.swf"},{remote:{postJSON:{}}})}q.postJSON(y,A,C,e)}catch(B){j('An unknown error has occurred. If it continues, please <a href="/feedback/form">send feedback</a>.');try{if(jq.isPlainObject(window.JSON)){jq.post("/k/run/auth/error",{e:JSON.stringify(B)})}}catch(D){}}}function h(x,y,z){g();jq.ajax({url:"/k/run/auth/display/"+x,data:y,dataType:"html",success:z||m,error:e,cache:false})}function j(x){var A=jq("#ajaxerror");if(A.length){jq("#ajaxerror").find("div").html(x).end().show()}else{var y=jq("#ajaxmessage").parents(".ui-dialog").width();var z=(y)?(y-50):500;jq("#ajaxmessage").html(x).css("width",z+"px").removeClass("hidden")}jq("#ajaxreason").hide();i()}function m(z,x){var A=jq(z),y={close:x,title:A.attr("title")};A.attr("title","").r9dialog(y).find("form").submit(n);d().button()}function p(){var x=jq("#fbLoginPopover").r9popover({modal:false,position:this,width:363}).find("a").blur().end();jq("body").one("click",function(){x.r9popover("close")});return false}function r(){o();var x=document.ajaxlogreg;jq(x).find(".highlight").removeClass("highlight");if(!validateEmail(x.username.value)){j("Please enter a valid email address.");jq(x.username).addClass("highlight").focus();i();return false}if(x.passwd.value.length==0){j("Please enter a password");jq(x.passwd).addClass("highlight").focus();i();return false}return true}return{regtype:"default",defaultAirportCode:"",alreadyRegistered:false,confcode:"",usernamedefault:"",searchid:"",facebook:{link:function(x){o();jq.ajax({type:"POST",url:"/k/run/fbauth/link",dataType:"json",success:function(y){if(y.status==0){R9.globals.formtoken=y.formToken;if(x){b();l();AjaxReg.alreadyRegistered=true;x()}else{u()}}else{if(y.status==1){FB.logout();h("linkConflict")}else{if(y.status==-1){j(y.message)}}}},error:e})},login:function(x,z,y){o();jq.ajax({type:"POST",url:"/k/run/fbauth/login",data:{confcode:y||"",confirm:x||0},dataType:"json",success:function(A){if(A.status==0){R9.globals.formtoken=A.formToken;if(z){a();z()}else{u()}}else{if(A.status==1){if(A.message=="l"){h("link",null,function(B){B=jq(B);B.find("#ajaxlinkwelcome a").click(function(){b();FB.logout()});m(B);jq("#ajaxlinkfields").submit(w(z))})}else{h("fbWelcome",null,function(B){m(B);jq("#ajaxfbwelcome a").first().click(function(){jq("#ajaxfbwelcomefields").slideDown();jq("#ajaxfbwelcome a:first").slideUp();return false}).end().last().click(function(){AjaxReg.facebook.login(1,z,y);return false});jq("#ajaxfbwelcomefields").submit(w(z))})}}else{if(A.status==-1){j(A.message)}}}},error:e})},unlink:function(x){o();jq.ajax({type:"POST",url:"/k/run/fbauth/unlink",dataType:"json",success:function(y){if(y.status==0){R9.globals.formtoken=y.formToken;if(x){a();AjaxReg.alreadyRegistered=true;x()}else{u()}}else{j(y.message)}},error:e})}},ui:{linkWarning:function(y,x){h("linkWarning",null,function(z){m(z);d().click(function(){n();return R9.social.fbLink(y,x)})})},login:function(x){x=v(x);h("login",jq.extend({cc:AjaxReg.confcode,regtype:AjaxReg.regtype,srch:AjaxReg.searchid,un:AjaxReg.usernamedefault},x.data),function(y){m(y,x.error);jq("#ajaxfblogin > a").click(p);jq("#ajaxfblogin span:first").click(function(){return R9.social.fbLogin({confcode:AjaxReg.confcode,success:x.success})});jq("#ajaxtoggle a").click(function(){AjaxReg.ui.register(x);return false});var z=jq("#ajaxloginfields");z.submit(function(){if(r()){o();s("/k/run/auth/login",jq(this).serialize(),function(A){if(A.status==0){R9.globals.formtoken=A.formToken;if(x.success){AjaxReg.alreadyRegistered=true;x.success();a()}else{u()}}else{j(A.message)}})}return false});jq("input",z).focus(i);if(jq("input[name=username]",z).val()){jq("input[name=passwd]",z).focus()}})},register:function(x){x=v(x);h("reg",jq.extend({regtype:AjaxReg.regtype,dac:AjaxReg.defaultAirportCode,cc:AjaxReg.confcode,un:AjaxReg.usernamedefault,srch:AjaxReg.searchid},x.data),function(y){m(y,x.error);jq("#ajaxfblogin > a").click(p);jq("#ajaxfblogin span:first").click(function(){return R9.social.fbLogin({confcode:AjaxReg.confcode,success:x.success})});jq("#ajaxregisterfields").submit(function(){if(!validateEmail(this.username.value)){alert("Please enter a valid email address.");this.username.focus();i();return false}if(this.airport.value.length==0){alert("Please enter a home airport.");this.airport.focus();i();return false}if(this.passwd.value.length==0){alert("Please enter a password");this.passwd.focus();i();return false}o();s("/k/run/auth/register",jq(this).serialize(),function(z){if(z.status==0){R9.globals.formtoken=z.formToken;if(x.success){AjaxReg.alreadyRegistered=true;x.success();a()}else{u()}}else{j(z.message)}});return false});jq("#ajaxregisterfields input").focus(i);jq("#ajaxregisterfields input[name=airport]").smartbox({callback:function(z){jq("#ajaxregisterfields input[name=airportcode]").val(z.id)},minWidth:175});jq("#ajaxtoggle a").click(function(){AjaxReg.ui.login(x);return false})})},logout:function(x){o();jq.ajax({type:"POST",url:"/k/run/fbauth/logout",dataType:"json",success:function(y){if(y.status==0){R9.globals.formtoken=y.formToken;f();if(x){x()}else{u()}}else{j(y.message)}},error:e})}}}})(),AjaxAlert={_ajaxError:function(b,c,a){alert(c)},_doPost:function(a,b){jq("tr.error").hide();jq.ajax({type:"POST",url:a,data:b,dataType:"script",error:this._ajaxError})},_getDriveByData:function(){return jq("#ajaxalert").serialize()},showEmailAlertError:function(a){jq("#alerterrorrow").show();jq("#alertsuccessrow").hide();jq("#ajaxalerterror").html(a)},showDuplicateEmailAlertError:function(a,b){if(typeof showPriceAlertSaved=="function"){showPriceAlertSaved(a,b)}},emailAlertSaveSuccess:function(a){if(typeof showPriceAlertSaved=="function"){showPriceAlertSaved(a)}},saveEmailAlert:function(){this._doPost("/k/alertajax","action=save&"+jq("#ajaxalert").serialize())},saveHotelAlert:function(){this._doPost("/alerts/hrp/save",jq("#hotelalert").serialize())},hotelAlertSaveSuccess:function(a){if(typeof showAlertSaved=="function"){showAlertSaved(a)}},showHotelAlertError:function(a){if(typeof showAlertError=="function"){showAlertError(a)}},showDriveByAlertDialog:function(a,b){if(!b){b="driveby"}jq.ajax({type:"POST",url:"/s/toolbox",data:{action:"driveby",searchid:a,alertsrc:b},dataType:"html",success:function(c){jq(c).r9dialog({close:function(){toggleFaderPane(false)},width:371})},error:this._ajaxError,cache:false})},saveAlertAjaxReg:function(d,a,b){var f=this._getDriveByData();if(AjaxReg.alreadyRegistered){AjaxAlert.saveDriveByEmailAlert(f)}else{var c=jq("#ajaxalert"),e=c.find("input:hidden[name=alertsrc]").val();AjaxReg.regtype=e;AjaxReg.searchid=d;if(a){AjaxReg.usernamedefault=a}AjaxReg.ui[b?"login":"register"]({success:function(){AjaxAlert.saveDriveByEmailAlert(f)},data:{alertsrc:e,hid:c.find("input:hidden[name=hid]").val()}})}},saveDriveByEmailAlert:function(a){this._doPost("/k/alertajax","action=save&"+(a||jq("#ajaxalert").serialize()))},saveChangeHomeAirportError:function(a){jq("tr.successrow").hide();jq("#ajaxairporterror").html(a);jq("#dealerrorrow").show();jq("tr.buttonrow").show();jq("tr.inputrow").show()},saveChangeHomeAirportSuccess:function(){saveChangeHomeAirport_clientSuccess()},saveChangeHomeAirport:function(){this._doPost("/k/savehomeairportajax","action=save&"+jq("#ajaxchangehome").serialize())},disableDisplayAds:function(){jq.ajax({type:"GET",url:"/s/sparkle",data:"action=hidedisplayads&"+jq("#ajaxalert").serialize(),dataType:"text",success:function(){jq("#displayAd1, #displayAd2, #displayAd3, #displayAd4, .hidedisplayad").hide("slow",function(){if(window.R9&&R9.RP&&R9.RP.FloatingAd){R9.RP.FloatingAd.refresh()}})},error:this._ajaxError,cache:false})}};function formatDate(f){if(f.length<6){return false}if(f.length>10){return false}if(f.indexOf("/")>=0){var e=f.split("/");if(e.length!=3){return false}if(e[0].length==0||e[1].length==0||e[2].length==0){return false}var a=parseInt(e[1],10);var d=parseInt(e[0],10);var c=parseInt(e[2],10)}else{if(f.indexOf("-")>=0){var e=f.split("-");if(e.length!=3){return false}if(e[0].length==0||e[1].length==0||e[2].length==0){return false}var a=parseInt(e[2],10);var d=parseInt(e[1],10);var c=parseInt(e[0],10)}else{if(f.indexOf(".")>=0){var e=f.split(".");if(e.length!=3){return false}if(e[0].length==0||e[1].length==0||e[2].length==0){return false}var a=parseInt(e[0],10);var d=parseInt(e[1],10);var c=parseInt(e[2],10)}else{return false}}}if(c<100){if(c<30){c+=2000}else{c+=1900}}if(!isValidDate(c,d,a)){return false}var b="";if(d<10){b+="0"}b+=d+"/";if(a<10){b+="0"}b+=a+"/";b+=c;return b}function isValidDate(c,d,a){if(c>=1970){var b=new Date(c,d-1,a);if(a!=b.getDate()){return false}if(d!=(b.getMonth()+1)){return false}if(c!=b.getFullYear()){return false}}else{if((a<1)||(a>31)){return false}if((d<1)||(d>12)){return false}if((c<1000)||(c>3000)){return false}}if(a>28){if(getNumberOfDays(c,d)<a){return false}}return true}function getNumberOfDays(a,b){switch(b){case 2:if(isLeapYear(a)){return 29}return 28;break;case 1:case 3:case 5:case 7:case 8:case 10:case 12:return 31;break;default:return 30}}function isLeapYear(a){return(((a%4==0)&&(a%100!=0))||(a%400==0))}function validDate(b){if(b.value.length==0){return true}if(!formatDate(b.value)){alert("Please enter a valid date. (MM/DD/YYYY format)");b.focus();b.select();return false}var a=formatDate(b.value);if(isNaN(Date.parse(a))){alert("Please enter a valid date. (MM/DD/YYYY format)");b.focus();b.select();return false}b.value=a;return true}function parseDate(d){var f=d.split("/");var e=parseInt(zeroUnpad(f[0]));var a=parseInt(zeroUnpad(f[1]));var c=parseInt(zeroUnpad(f[2]));var b=new Date(c,e-1,a);return b}function zeroPad(a){if(a.length==1){return"0"+a}return a}function zeroUnpad(a){a=""+a;if(a.match(/^0/)){return a.substring(1)}return a}function addDays(c,e){c.setDate(c.getDate()+e);var d=c.getMonth()+1;var a=c.getDate();var b=c.getYear();if(b<1900){b+=1900}return zeroPad(d)+"/"+zeroPad(a)+"/"+b}function countDays(c,a){c.setUTCMilliseconds(0);c.setUTCSeconds(0);c.setUTCMinutes(0);c.setUTCHours(12);a.setUTCMilliseconds(0);a.setUTCSeconds(0);a.setUTCMinutes(0);a.setUTCHours(13);var b=a.getTime()-c.getTime();return Math.floor(b/(1000*60*60*24))}function existsInArray(c,a){for(var b=0;b<c.length;b++){if(c[b]==a){return true}}return false}Date.prototype.formatDate=function(input,time){var switches=["a","A","B","d","D","F","g","G","h","H","i","j","l","L","m","M","n","O","r","s","t","T","U","w","y","Y","z"];var daysLong=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var daysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"];function a(){return self.getHours()>11?"pm":"am"}function A(){return self.getHours()>11?"PM":"AM"}function B(){var off=(self.getTimezoneOffset()+60)*60;var theSeconds=(self.getHours()*3600)+(self.getMinutes()*60)+self.getSeconds()+off;var beat=Math.floor(theSeconds/86.4);if(beat>1000){beat-=1000}if(beat<0){beat+=1000}if((""+beat).length==1){beat="00"+beat}if((""+beat).length==2){beat="0"+beat}return beat}function d(){return new String(self.getDate()).length==1?"0"+self.getDate():self.getDate()}function D(){return daysShort[self.getDay()]}function F(){return monthsLong[self.getMonth()]}function g(){return self.getHours()>12?self.getHours()-12:self.getHours()}function G(){return self.getHours()}function h(){if(self.getHours()>12){var s=new String(self.getHours()-12);return s.length==1?"0"+(self.getHours()-12):self.getHours()-12}else{var s=new String(self.getHours());return s.length==1?"0"+self.getHours():self.getHours()}}function H(){return new String(self.getHours()).length==1?"0"+self.getHours():self.getHours()}function i(){return new String(self.getMinutes()).length==1?"0"+self.getMinutes():self.getMinutes()}function j(){return self.getDate()}function l(){return daysLong[self.getDay()]}function L(){var y_=Y();if((y_%4==0&&y_%100!=0)||(y_%4==0&&y_%100==0&&y_%400==0)){return 1}else{return 0}}function m(){return self.getMonth()<9?"0"+(self.getMonth()+1):self.getMonth()+1}function M(){return monthsShort[self.getMonth()]}function n(){return self.getMonth()+1}function O(){var os=Math.abs(self.getTimezoneOffset());var h=""+Math.floor(os/60);var m=""+(os%60);h.length==1?h="0"+h:1;m.length==1?m="0"+m:1;return self.getTimezoneOffset()<0?"+"+h+m:"-"+h+m}function r(){var r;r=D()+", "+j()+" "+M()+" "+Y()+" "+H()+":"+i()+":"+s()+" "+O();return r}function s(){return new String(self.getSeconds()).length==1?"0"+self.getSeconds():self.getSeconds()}function t(){var daysinmonths=[null,31,28,31,30,31,30,31,31,30,31,30,31];if(L()==1&&n()==2){return 29}return daysinmonths[n()]}function T(){return G()+":"+i()}function U(){return Math.round(self.getTime()/1000)}function W(){var beforeNY=364+L()-z();var afterNY=z();var weekday=w()!=0?w()-1:6;if(beforeNY<=2&&weekday<=2-beforeNY){return 1}var ny=new Date("January 1 "+Y()+" 00:00:00");var nyDay=ny.getDay()!=0?ny.getDay()-1:6;if((afterNY<=2)&&(nyDay>=4)&&(afterNY>=(6-nyDay))){var prevNY=new Date("December 31 "+(Y()-1)+" 00:00:00");return prevNY.formatDate("W")}if(nyDay<=3){return 1+Math.floor((z()+nyDay)/7)}else{return 1+Math.floor((z()-(7-nyDay))/7)}}function w(){return self.getDay()}function Y(){if(self.getFullYear){var newDate=new Date("January 1 2001 00:00:00 +0000");var x=newDate.getFullYear();if(x==2001){return self.getFullYear()}}var x=self.getYear();var y=x%100;y+=(y<38)?2000:1900;return y}function y(){var y=Y()+"";return y.substring(y.length-2,y.length)}function z(){var t=new Date("January 1 "+Y()+" 00:00:00");var diff=self.getTime()-t.getTime();return Math.floor(diff/1000/60/60/24)}var self=this;if(time){var prevTime=self.getTime();self.setTime(time)}var ia=input.split("");var ij=0;while(ia[ij]){if(ia[ij]=="\\"){ia.splice(ij,1)}else{if(existsInArray(switches,ia[ij])){ia[ij]=eval(ia[ij]+"()")}}ij++}if(prevTime){self.setTime(prevTime)}return ia.join("")};Date.prototype.formatUTCDate=function(input,time){var switches=["a","A","B","d","D","F","g","G","h","H","i","j","l","L","m","M","n","O","r","s","t","T","U","w","y","Y","z"];var daysLong=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var daysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"];function a(){return self.getUTCHours()>11?"pm":"am"}function A(){return self.getUTCHours()>11?"PM":"AM"}function B(){var off=(self.getTimezoneOffset()+60)*60;var theSeconds=(self.getHours()*3600)+(self.getMinutes()*60)+self.getSeconds()+off;var beat=Math.floor(theSeconds/86.4);if(beat>1000){beat-=1000}if(beat<0){beat+=1000}if((""+beat).length==1){beat="00"+beat}if((""+beat).length==2){beat="0"+beat}return beat}function d(){return new String(self.getDate()).length==1?"0"+self.getDate():self.getUTCDate()}function D(){return daysShort[self.getUTCDay()]}function F(){return monthsLong[self.getUTCMonth()]}function g(){return self.getUTCHours()>12?self.getUTCHours()-12:self.getUTCHours()}function G(){return self.getUTCHours()}function h(){if(self.getUTCHours()>12){var s=new String(self.getUTCHours()-12);return s.length==1?"0"+(self.getUTCHours()-12):self.getUTCHours()-12}else{var s=new String(self.getUTCHours());return s.length==1?"0"+self.getUTCHours():self.getUTCHours()}}function H(){return new String(self.getUTCHours()).length==1?"0"+self.getUTCHours():self.getUTCHours()}function i(){return new String(self.getUTCMinutes()).length==1?"0"+self.getUTCMinutes():self.getUTCMinutes()}function j(){return self.getUTCDate()}function l(){return daysLong[self.getUTCDay()]}function L(){var y_=Y();if((y_%4==0&&y_%100!=0)||(y_%4==0&&y_%100==0&&y_%400==0)){return 1}else{return 0}}function m(){return self.getUTCMonth()<9?"0"+(self.getUTCMonth()+1):self.getUTCMonth()+1}function M(){return monthsShort[self.getUTCMonth()]}function n(){return self.getUTCMonth()+1}function O(){var os=Math.abs(self.getTimezoneOffset());var h=""+Math.floor(os/60);var m=""+(os%60);h.length==1?h="0"+h:1;m.length==1?m="0"+m:1;return self.getTimezoneOffset()<0?"+"+h+m:"-"+h+m}function r(){var r;r=D()+", "+j()+" "+M()+" "+Y()+" "+H()+":"+i()+":"+s()+" "+O();return r}function s(){return new String(self.getUTCSeconds()).length==1?"0"+self.getUTCSeconds():self.getUTCSeconds()}function t(){var daysinmonths=[null,31,28,31,30,31,30,31,31,30,31,30,31];if(L()==1&&n()==2){return 29}return daysinmonths[n()]}function T(){return G()+":"+i()}function U(){return Math.round(self.getTime()/1000)}function w(){return self.getUTCDay()}function Y(){if(self.getUTCFullYear){var newDate=new Date("January 1 2001 00:00:00 +0000");var x=newDate.getUTCFullYear();if(x==2001){return self.getUTCFullYear()}}var x=self.getUTCYear();var y=x%100;y+=(y<38)?2000:1900;return y}function y(){var y=Y()+"";return y.substring(y.length-2,y.length)}function z(){var t=new Date("January 1 "+Y()+" 00:00:00");var diff=self.getTime()-t.getTime();return Math.floor(diff/1000/60/60/24)}var self=this;if(time){var prevTime=self.getTime();self.setTime(time)}var ia=input.split("");var ij=0;while(ia[ij]){if(ia[ij]=="\\"){ia.splice(ij,1)}else{if(existsInArray(switches,ia[ij])){ia[ij]=eval(ia[ij]+"()")}}ij++}if(prevTime){self.setTime(prevTime)}return ia.join("")};function getShortTime(e,d){if(d==null||isFlexDate){d=false}var a=e.getUTCHours();if(a>=13){a=a-12}else{if(a==0){a=12}}var c=e.getUTCMinutes();if(c<10){c="0"+c}var b=(e.getUTCHours()>=12)?"p":"a";if(d){return dow[e.getUTCDay()]+" "+a+":"+c+b}else{return a+":"+c+b}}function getShortDate(a){return a.formatUTCDate("M j")}(function(){var d=27,j=9,a=18,m=38,i=40,c=37,g=39,e=13,l=16,f="smartboxOptions",b,h={air:1,car:2,hotel:3,any:4,crc:5,crcg:6,deal:7,crcga:8,hotelname:11,brandname:15};function n(){if(b){try{b.abort()}catch(o){}}}jq.fn.smartbox=function(s,q,p){if(!s||jq.isPlainObject(s)){s=jq.extend({},jq.fn.smartbox.defaults,s);var w,u;function o(){return jq(w).find("ul li")}function x(v){var y=o();retIndex=y.index(v);return retIndex==-1?0:retIndex}function r(){w.style.display=u.style.display="none"}this.each(function(){var I=jq(this),F=0,K,C,O,P,z=0,H=false,y=false;function B(){if(w){w.style.display="none";w.innerHTML=""}if(u){u.style.display="none"}H=true;I.trigger("sbclose")}function G(){return I.data(f)}function D(){C=x(this);A(C);B()}function E(){C=-1;M(-1)}function N(){C=x(this);M(C)}function M(R){var S=G().itemHighlightClass;var T=o();T.removeClass(S);if(R>=0){jq(T[R]).addClass(S);C=R}}function A(T){var W=G();if(T<0){K="";I.data(W.dataKey,"");if(W.callbackWithNull){W.callback.call(I[0],null)}}else{if(P>0){var V=o();var U=V[T],S=U.id.split("-"),X="";if(S.length>1){X=S[1]}I.data(W.dataKey,X).val(jq(U).text());var R=jq.extend({id:X,str:U.innerHTML,type:S[0]},jq(U).data());if(R.type=="isl"&&S.length>1){codes=S[1].split("/");R.str=codes[0]}if(S.length>2){R.hc=S[2]}if(S.length>3){if(R.type==="hotel"){R.hid=S[3]}else{if(R.type==="rest"){R.rtid=S[3]}else{R.lmid=S[3]}}}W.callback.call(I[0],R)}}I.trigger("sbset",[T])}function L(){var W=G(),T=w.style,V=u.style;T.display="inline";if(!window.opera){V.display="inline"}var U=Math.min(W.maxWidth,Math.max(W.minWidth,w.offsetWidth));T.width=V.width=U+"px";var S=I.offset(),R=S.left;if(W.position==="right"){R+=I.width()-U-2}T.left=R+"px";T.top=(S.top+I.outerHeight())+"px";V.height=w.offsetHeight+"px";V.top=T.top;V.left=T.left}function Q(){var U=G(),T=I.val().toUpperCase(),R="";if(U.recentList!=null&&U.recentList.length>0){for(var S=0;S<U.recentList.length;S++){if(T.length==0||U.recentList[S].display.toUpperCase().indexOf(T)>=0){if(R.length==0){R="<li class='separator'><b>Recently searched:</b></li>"}R+="<li id='"+U.recentList[S].code+"' class='"+U.recentList[S].className+"'>"+U.recentList[S].display+"</li>"}}}if(jq.trim(R).length==0){return null}return R}function v(){I.trigger("sbopen");var T=G(),S=I.val();if(K.length>0&&K==S){return}if(S.length>=T.minChars){K=S;var R=jq.extend({f:"h",lc:T.localeLanguage,lc_cc:T.localeCountry,s:h[T.searchType]||T.searchType,where:K},T.getSmartData!=null?T.getSmartData():T.smartData);if(T.countryCode){R.cc=T.countryCode}b=jq.post(T.smartUrl,R,J,"text")}else{J(null)}}function J(U){var V=G();var S=Q();if(S==null&&U==null){return}var R=(U==null)?1:0;U=(U||"<ul>");if(S!=null&&U.length>0&&U.indexOf("</ul>")>0){U=U.substr(0,U.indexOf("</ul>"))}U+=(S||"")+"</ul>";w.innerHTML=U;if(V.maxResults){jq(w).find("ul li").slice(V.maxResults).remove()}var T=o();P=T.length;if(P>0){T.mousedown(D).mouseout(E).mouseover(N);w.style.width="auto";L()}else{r()}C=(V.forceSelection||(V.forceSingle&&P==1)?R:-1);O=C;M(C)}jq(this).attr({autocomplete:"off",autocapitalize:"off",autocorrect:"off"}).blur(function(){var R=G();if(!I.data(R.dataKey)){if(((C>=0&&R.forceSelection&&!R.noForceOnBlur)||(R.forceSingle&&P==1))){A(0)}else{if(R.promptText){I.css("color",R.promptColor).val(R.promptText);y=true}}}n();B();H=false}).data(f,s).click(function(){var R=G();if(R.recentList!=null&&R.recentList.length>0){n();v()}}).focus(function(){var U=G();if(y){I.css("color","").val("");y=false}var S=U.targetId;w=document.getElementById(S)||jq("<div/>",{id:S,css:{display:"none",position:"absolute",width:"auto",zIndex:5001}}).appendTo("body")[0];w.className=U.targetClass||(U.searchType+"smartboxResults");var T=U.targetBGId;u=document.getElementById(T)||jq("<iframe/>",{id:T,css:{display:"none",position:"absolute",zIndex:5000},frameborder:0,scrolling:"no"}).appendTo("body")[0];K="";C=O=-1;H=false;if(I.size()&&I.val().length>0&&U.searchOnFocus){v()}else{if(U.getInitData){var R=U.getInitData.call();if(R){J(R)}}}}).keydown(function(S){var R=document.all?S.keyCode:S.which;F=R;z=new Date().getTime();switch(R){case c:case m:C=Math.max(C-1,0);M(C);break;case g:case i:C=Math.min(C+1,P-1);M(C);break;case e:if(P>0){A(C);B()}break;case d:B();break;case j:if(C>=0&&C<P){A(C)}break;case a:case l:break;default:C=-1;A(-1);setTimeout(function(){if(F!=e){if(I.size()&&I.val().length>0){n();v()}else{A(-1);B()}}},1);break}}).keypress(function(){var R=!H;H=false;return R?true:F!=e})})}else{if(s==="option"){this.data(f)[q]=p}}return this};jq.fn.smartbox.defaults={callback:jq.noop,callbackWithNull:false,countryCode:null,dataKey:"smartbox",forceSelection:true,forceSingle:false,itemHighlightClass:"smartboxItemHi",localeCountry:"US",localeLanguage:"en",maxResults:null,maxWidth:1000,minChars:1,minWidth:50,position:"left",promptColor:"#666",promptText:null,recentList:null,searchType:"air",smartData:{},smartUrl:"/m/smarty",targetClass:null,targetId:"smartbox",targetBGId:"smartboxBG"}})();var R9=R9||{};R9.ui=(function(){var a=false;var b=null;return{initHeader:function(){jq("#headermenudropdown a:last").click(function(){var c=jq(this).attr("href");if(!FB){jq(document).bind("r9.facebook.api.loaded",d)}else{d()}function d(){if(FB&&FB.getAuthResponse()){FB.logout(function(){window.location.href=c})}else{window.location.href=c}}return false});jq("#proflinksmenu").click(function(){var c=jq(this).offset();isHidden=!jq("#headermenudropdown").is(":visible");jq("#headermenudropdown").css({left:c.left,top:c.top+jq(this).height()+3}).show();hideMeOnPopup(isHidden);if(isHidden){window.setTimeout(function(){jq("body").one("click",function(){jq("#headermenudropdown").hide();hideMeOnPopup(false)})},1)}});jq("#sidestep_header #headermenu").mouseenter(function(){var c=jq(this).offset();jq("#headermenudropdown").css({left:c.left,top:c.top+jq(this).height()+1}).show()});jq("#sidestep_header #headermenudropdown").mouseleave(function(){jq(this).hide()})},initMapsAPI:function(d){b=d;var c=document.createElement("script");c.src="http://maps.google.com/maps/api/js?sensor=false&callback=R9.ui.initMapsAPIComplete";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)},initMapsAPIComplete:function(c){a=true;b(c)},isMapsAPIInitialized:function(){return a},doAfterMapsAPIInitialized:function(c){if(!a){this.initMapsAPI(c)}else{c()}}}})();jq(R9.ui.initHeader);var bound=false;function hoverDisclaimer(b,c,a,e){if(jq("#ttipDXC").is(":visible")){return}if(jq("#ttipDTC").is(":visible")){return}if(jq("#ttipDGC").is(":visible")){return}if(!bound){jq("a.disclaim, span.disclaim, span.closeareadis").click(function(f){f.stopPropagation()});bound=true}var d=new Object();if(a==null){a=20}if(e==null){e=-20}d.x=a;d.y=e;if(c){hideTTType("DX");hideTTType("DT");hideTTType("DG");showTT(b,"","DXC",d,true)}else{showTT(b,"","DX",d,true)}}function hideDisclaimerClicked(a){if(a==null){a=true}if(a){hideAllTT(false)}else{hideTTType("DXC");hideTTType("DTC");hideTTType("DGC")}}function hideDisclaimer(a){if(jq("#ttipDXC").is(":visible")){return}if(jq("#ttipDTC").is(":visible")){return}if(jq("#ttipDGC").is(":visible")){return}if(a==null){a=true}if(a){hideAllTT(false)}else{hideTTType("DX");hideTTType("DT");hideTTType("DG")}}function hoverTotalDisclaimer(b,c,a,e){if(jq("#ttipDXC").is(":visible")){return}if(jq("#ttipDTC").is(":visible")){return}if(jq("#ttipDGC").is(":visible")){return}if(!bound){jq("a.disclaim").bind("click",function(f){cancelEvents(f)});jq("span.disclaim").bind("click",function(f){cancelEvents(f)});jq("span.closeareadis").bind("click",function(f){cancelEvents(f)});bound=true}var d=new Object();if(a==null){a=20}if(e==null){e=-20}d.x=a;d.y=e;if(c){hideTTType("DX");hideTTType("DT");hideTTType("DG");showTT(b,"","DTC",d,true)}else{showTT(b,"","DT",d,true)}}function hoverGrandTotalDisclaimer(b,c,a,e){if(jq("#ttipDXC").is(":visible")){return}if(jq("#ttipDTC").is(":visible")){return}if(jq("#ttipDGC").is(":visible")){return}if(!bound){jq("a.disclaim").bind("click",function(f){cancelEvents(f)});jq("span.disclaim").bind("click",function(f){cancelEvents(f)});jq("span.closeareadis").bind("click",function(f){cancelEvents(f)});bound=true}var d=new Object();if(a==null){a=20}if(e==null){e=-20}d.x=a;d.y=e;if(c){hideTTType("DX");hideTTType("DT");hideTTType("DG");showTT(b,"","DGC",d,true)}else{showTT(b,"","DG",d,true)}}function XXX_emailDealSaveSuccess_clientSuccess(){alert("You are now subscribed to our deals email newsletter.");document.getElementById("dealemail").value="";document.getElementById("homeairport").value="";document.getElementById("homeairporthint").value=""}function XXX_emailDealSaveSuccess_clientError(a){alert(""+a)}function sampleNewsletter(){document.location.href="/h/newsletter/livedemo/deals?username="+encodeURIComponent(document.getElementById("dealemail").value)+"&homeairport="+encodeURIComponent(document.getElementById("homeairporthint").value)}function setDealsEmail(a){if(!validateEmail(document.getElementById("dealemail").value)){alert("Please enter a valid email address.")}else{saveEmailDeal(a)}}function showEmailDealError(a){XXX_emailDealSaveSuccess_clientError(a)}function emailDealSaveSuccess(){XXX_emailDealSaveSuccess_clientSuccess()}function saveEmailDeal(a){var b="action=save&src="+(a||"")+"&email="+encodeURIComponent(document.getElementById("dealemail").value)+"&homeairport="+encodeURIComponent(document.getElementById("homeairporthint").value);jq.ajax({type:"POST",url:"/k/dealajax",data:b,dataType:"script",success:function(c){},error:function(d,e,c){if(typeof this.callbackfail=="function"){this.callbackfail(d,e,c)}else{alert(e)}},cache:false})}jq(function(){jq("#homeairport").smartbox({callback:function(a){jq("#homeairporthint").val(a.id)},minWidth:175,timeout:0})});function generateFlightsUrl(c,m,d,a,l,j){var b="";if(m!=null&&j!="weekend"){b=generateLegParams(c,-1,m,j);if("openflex"==j){d=new Date(m.getTime());d.setDate(d.getDate()+30)}if(d!=null){var n=dateToString(d);b=b+"/"+n;b+=getTimeOption(c.return_time.value);if(j!="openflex"){b+=getFlexOption(c.return_date_flex.value)}else{var g=c.lengthofstay.value.replace("-","to");b+="-flexible-calendar-"+g}}if(c.prefer_nonstop!=undefined&&(c.prefer_nonstop.checked||c.prefer_nonstop.value=="Y")){b+="/nonstop"}}else{if(a){for(var f=0;f<l;f++){if(c["origin"+f]==null||c["origin"+f].value==""){break}if(f>0){b+="/"}b+=generateLegParams(c,f,a[f],"exact")}}else{b=generateOaD(c,"");b+="/weekend";var o=generateWeekendDays(c);var e=c.weekend_depart_date.value;if(e!="WEEKEND"){b+="/"+e.substr(0,4)+"-"+e.substr(4);if(o!=""){b+="-"+o}}else{if(o!=""){b+="/"+o}}}}var h=c.travelers.value;if(h>1){b+="/"+h+"adults"}b+=getCabinClass(c.cabin.value);return"/flights/"+b}function generateLegParams(b,j,g,f){var h="";if(j>-1){h=j+""}var c="depart_time"+h;var i="flex"+h;var a=generateOaD(b,h);var e=dateToString(g);a=a+"/"+e;a+=getTimeOption(b[c].value);var d;if(j==-1&&f!="openflex"){a+=getFlexOption(b.depart_date_flex.value)}else{if(f=="openflex"){a+="-flexible-calendar-0"}}return a}function generateOaD(c,m){var n="origin"+m;var i="destination"+m;var o="origincode"+m;var f="destcode"+m;var l="nearbyO"+m;var b="nearbyD"+m;var e=new RegExp("(([A-Z]{3}))","g");var d=c[o].value.substr(0,3);if(d==""||d.indexOf("C-")==0){d=c[n].value+"";d=d.replace(/ /g,"");if(d.indexOf("(")!=-1){var h=e.exec(d);if(h!=null){d=h[0]}}}var j=c[f].value.substr(0,3);if(j==""||j.indexOf("C-")==0){j=c[i].value+"";j=j.replace(/ /g,"");if(j.indexOf("(")!=-1){e.compile(e);var g=e.exec(j);if(g!=null){j=g[0]}}}var a=d;if(c[l]&&c[l].checked){a+=",nearby"}a+="-"+j;if(c[b]&&c[b].checked){a+=",nearby"}return a}function dateToString(c){var d=c.getMonth()+1;if(d<10){d="0"+d}var a=c.getDate();if(a<10){a="0"+a}var b=c.getFullYear()+"-"+d+"-"+a;return b}function getTimeOption(a){if(a=="a"){return""}else{if(a=="r"){return"-early-morning"}else{if(a=="m"){return"-morning"}else{if(a=="n"){return"-afternoon"}else{if(a=="e"){return"-evening"}else{if(a=="l"){return"-night"}else{return"-"+a+"h"}}}}}}}function getCabinClass(a){if(a=="p"){return"/premium"}else{if(a=="b"){return"/business"}else{if(a=="f"){return"/first"}}}return""}function generateWeekendDays(c){var b=c.weekend_depart.value;var a=c.weekend_return.value;var d="";if(b!="FRIDAY_ANYTIME"||a!="SUNDAY_ANYTIME"){d=generateWeekendDay(b)+"-"+generateWeekendDay(a)}return d}function generateWeekendDay(a){if(a=="THURSDAY_ANYTIME"){return"Thu"}else{if(a=="THURSDAY_AM"){return"Thu-AM"}else{if(a=="THURSDAY_PM"){return"Thu-PM"}else{if(a=="FRIDAY_ANYTIME"){return"Fri"}else{if(a=="FRIDAY_AM"){return"Fri-AM"}else{if(a=="FRIDAY_PM"){return"Fri-PM"}else{if(a=="SATURDAY_ANYTIME"){return"Sat"}else{if(a=="SATURDAY_AM"){return"Sat-AM"}else{if(a=="SUNDAY_ANYTIME"){return"Sun"}else{if(a=="SUNDAY_AM"){return"Sun-AM"}else{if(a=="SUNDAY_PM"){return"Sun-PM"}else{if(a=="MONDAY_ANYTIME"){return"Mon"}else{if(a=="MONDAY_AM"){return"Mon-AM"}else{if(a=="MONDAY_PM"){return"Mon-PM"}}}}}}}}}}}}}}return""}function getFlexOption(a){if(a=="plusminusthree"){return"-flexible"}else{if(a=="plusminustwo"){return"-flexible-2days"}else{if(a=="plusminusone"){return"-flexible-1day"}else{if(a=="plusone"){return"-flexible-1day-after"}else{if(a=="minusone"){return"-flexible-1day-before"}}}}}return""}function generateVacationsUrl(c,u,n){var a="";var o="origin";var w="destination";var p="origincode";var x="destcode";var f=new RegExp("(([A-Z]{3}))","g");var l=c[p].value.substr(0,3);if(l==""){l=c[o].value+"";l=l.replace(/ /g,"");if(l.indexOf("(")!=-1){var g=f.exec(l);if(g!=null){l=g[0]}}}var v=c[x].value.substr(0,3);if(v==""){v=c[w].value+"";v=v.replace(/ /g,"");if(v.indexOf("(")!=-1){f.compile(f);var y=f.exec(v);if(y!=null){v=y[0]}}}a=l+"-"+v;var r=dateToString(u);a=a+"/"+r;var e=dateToString(n);a=a+"/"+e;var q=c.kids.value;var b=c.adults.value;if(b!=2||q>0){a+="/"+b+"adult";if(b>1){a+="s"}}if(q>0){var d=0;var j=0;var h="";for(var s=1;s<=q;s++){var m=c["childAge"+s].value;if(m<2){j++}else{d++;if(d>1){h+=","}h+=m}}if(d>0){a+="/"+d+"child";if(d>1){a+="ren"}a+="-age"+h}if(j>0){a+="/"+j+"infant";if(j>1){a+="s"}}}return"/vacations/"+a}function dateToString(c){var d=c.getMonth()+1;if(d<10){d="0"+d}var a=c.getDate();if(a<10){a="0"+a}var b=c.getFullYear()+"-"+d+"-"+a;return b}function generateCruisesUrl(f){var h="";if(f.dep_date.value!=""){var d=f.dep_date.value.substr(0,4);var g=f.dep_date.value.substr(4,2);h=d+"-"+g}var a=f.destination;if(a.value!="ALL"){h+="/"+generateDestOrLineString(a.options[a.selectedIndex].text)}var c=f.cruiseline;if(typeof c.value!="undefined"&&c.value!=""){h+="/"+generateDestOrLineString(c.options[c.selectedIndex].text)}var e=f.length;if(e.value!="ALL"){h+="/"+generateLength(e)}if(f.senior!=undefined&&f.senior.checked){h+="/senior"}var b=f.region_code.value;if(b!=""){h+="/state-"+b}return"/cruises/"+h}function generateDestOrLineString(b){var a=b+"";return a.replace(/\//g,"-").replace(/\s-\s/g,"-").replace(/\s/g,"-")}function generateLength(a){return a.options[a.selectedIndex].text.replace(" ","").replace("+","-").toLowerCase()}var removeAccentedChars=(function(){var a=/[öäüÖÄÜáàâéèêúùûóòôÁÀÂÉÈÊÚÙÛÓÒÔßæçØøðÇÐÌÍÎÏìíîïÑñŠšŸÿýŽžŒ]/g;var b={"ä":"a","ö":"o","ü":"u","Ä":"A","Ö":"O","Ü":"U","á":"a","à":"a","â":"a","é":"e","è":"e","ê":"e","ú":"u","ù":"u","û":"u","ó":"o","ò":"o","ô":"o","Á":"A","À":"A","Â":"A","É":"E","È":"E","Ê":"E","Ú":"U","Ù":"U","Û":"U","Ó":"O","Ò":"O","Ô":"O","ß":"s","æ":"o","ç":"c","Ø":"O","ø":"o","ð":"e","Ç":"C","Ð":"D","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Š":"S","š":"s","Ÿ":"Y","ÿ":"y","ý":"y","Ž":"Z","ž":"z","Œ":"O"};return function(c){return(c.replace(a,function(d){return b[d]}))}})();function encodeLocation(b){var a=b+"";return removeAccentedChars(a.replace(/, /g,",").replace(/ - /g,",").replace(/ /g,"-")).replace(/[^A-Za-z0-9_\-,.]/g,"")}function generateHotelsUrl(b,l,c){var g=b.othercity.value;var j="-c";var h=b.address!=undefined?b.address.value:"";if(h!=""){g=h;if(h.indexOf(b.location.value)==-1){g+=","+b.location.value}j="-a"}var a=encodeLocation(g);var e=b.citycode.value;if(e!=""){a+=j+e}if(b.hid!=undefined&&b.hid.value!=""&&b.hid.value!=null){a+="-h"+b.hid.value}else{if(b.lmid!=undefined&&b.lmid.value!=""&&b.lmid.value!=null){a+="-l"+b.lmid.value}}if(l!=null){a+="/"+dateToString(l)+"/"+dateToString(c)}var d=b.rooms.value;var f=b.guests1!=undefined?b.guests1.value:b.guests.value;if(d>1&&b.guests2!=undefined){f=b.guests2.value}if(f>1){a+="/"+f+"guests"}var d=b.rooms.value;if(d>1){a+="/"+d+"rooms"}var i=b.address_nickname!=undefined?b.address_nickname.value:"";if(i!=""&&i!=h){a+="/at-"+encodeLocation(i)}return"/hotels/"+a}function generateCarsUrl(e,d,b){var a=e.citycode1.value;var f=null;var g=e.oneway.value==undefined?e.oneway[1].checked:e.oneway.value=="y";if(a.indexOf("/")==3){f=a.substring(0,3)+"-a"+a.substring(4)}if(f==null){f=encodeLocation(e.location.value)+"-c"+a}if(g){f+="/";var h=e.citycode2.value;var c=null;if(h.indexOf("/")==3){c=h.substring(0,3)+"-a"+h.substring(4)}if(c!=null){f+=c}else{f+=encodeLocation(e.location2.value)+"-c"+h}}f+="/"+generateDateTime(e,"pickup",d);f+="/"+generateDateTime(e,"dropoff",b);return"/cars/"+f}function generateDateTime(c,e,b){var d=dateToString(b);var a=c[e+"_hour"].value;if(a!=12){d+="-"+a+"h"}return d}function dateToString(c){var d=c.getMonth()+1;if(d<10){d="0"+d}var a=c.getDate();if(a<10){a="0"+a}var b=c.getFullYear()+"-"+d+"-"+a;return b}function generateSearchUrl(d,m,h){var v=d.usecleanurl==undefined?false:d.usecleanurl.value=="true";if(!v){return null}var c=null;var s="";if(d.tab.value=="flights"){var j=null;var u=null;var p=null;var e=6;var b=(d.dtFlexCat!=null)?((m)?jq(d.dtFlexCat).val():jq(d.dtFlexCat).filter(":checked").val()):null;if((m&&b!="weekend")||(!m&&(d.oneway[0].checked||d.oneway[1].checked))){u=jq(d.depart_date).datepicker("getDate");var l=true;if(d.oneway[0]==undefined){l=d.oneway.value=="n"}else{l=d.oneway[0].checked}if(l){p=jq(d.return_date).datepicker("getDate")}}else{if(d.oneway.length>2&&d.oneway[2].checked){j=new Array();for(var r=0;r<e;r++){j[r]=jq(d["depart_date"+r]).datepicker("getDate")}}}c=generateFlightsUrl(d,u,p,j,e,b);s="F"}else{if(d.tab.value=="hotels"){c=generateHotelsUrl(d,jq(d.checkin_date).datepicker("getDate"),jq(d.checkout_date).datepicker("getDate"));s="H"}else{if(d.tab.value=="cars"){c=generateCarsUrl(d,jq(d.pickup_date).datepicker("getDate"),jq(d.dropoff_date).datepicker("getDate"));s="C"}else{if(d.tab.value=="vacations"){c=generateVacationsUrl(d,jq(d.depart_date).datepicker("getDate"),jq(d.return_date).datepicker("getDate"));s="V"}else{if(d.tab.value=="cruises"){c=generateCruisesUrl(d);s="R"}}}}}if(c!=null){var n=c.indexOf("s/")+2;var q=c.substring(0,n-1);var f=encodeURIComponent(c.substring(n));var g="hiddenParams"+f;var a="";if(d.comparetosite!=undefined){var o=new Array();jq(d.comparetosite).each(function(){if(this.checked){o.push(this.value)}});a+="&comparetosite="+o.join(",")}if(d.comparetokayak!=undefined){var o=new Array();jq(d.comparetokayak).each(function(){if(this.checked){o.push(this.value)}});a+="&comparetokayak="+o.join(",")}a+=addHiddenParam(d,"src");a+=addHiddenParam(d,"c2s");a+=addHiddenParam(d,"po");a+=addHiddenParam(d,"personality");a+=addHiddenParam(d,"originsid");a+=addHiddenParam(d,"provider");a+=addHiddenParam(d,"r9secret");a+=addHiddenParam(d,"r9debug");a+=addHiddenParam(d,"searchType");a+=addHiddenParam(d,"recent");a+=addHiddenParam(d,"instasearch_id");a+=addHiddenParam(d,"fid");if(d.primetehkila&&d.primetehkila.checked){a+=addHiddenParam(d,"primetehkila")}document.cookie=g+"="+encodeURIComponent(a)+"; path=/";if(h){document.cookie=s+f+"=; expires=Fri, 01 Jan 1970 00:00:00 UTC; path=/"}}return c}function addHiddenParam(a,b){if(a[b]==undefined){return""}return"&"+b+"="+a[b].value}function setupSearchParams(a){document.cookie="formParams="+encodeURIComponent(a)+"; path=/";return true}function hideCCCpicker(){var a=jq("#countryList, #headermenudropdown, #morecurrencies");if(a.length){a.css("display","none");hideMeOnPopup(false)}}function loadCCCpicker(){var a=jq("#countrypickerlink"),c=a.offset(),b=jq("#countryList");jq("#countryList").css({left:c.left+a.width()-b.width(),top:c.top+a.height()+1});hideMeOnPopup(true);b.show();jq(document.body).one("click",function(f){var d=f.pageX,i=f.pageY,g=jq("#countryList"),h=g.offset();if(d<h.left||d>(h.left+g.width())||i<h.top||i>(h.top+g.height())){hideCCCpicker()}});jq("#countryList, #countrypickerlink, #headermenudropdown, #morecurrencies").click(function(d){d.stopPropagation()})}function saveCurrency(b,a){jq.ajax({type:"POST",url:"/k/ident/session/currency",data:{currency:b,posted:true,save:a},dataType:"text",success:function(){location.reload()},cache:false})};

;var jsck_r9="v428";
/* et=19, mt=1603, c=p2, i=sparkle007, v=R114, cc=2, r=none */

