JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add needed jquery and jquery-ui files
authorJason Woofenden <jason@jasonwoof.com>
Wed, 25 Jan 2012 20:47:28 +0000 (15:47 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 25 Jan 2012 20:47:28 +0000 (15:47 -0500)
README.md
external/README [new file with mode: 0644]
external/jquery.min.js [new file with mode: 0644]
external/jquery.ui.core.js [new file with mode: 0644]
external/jquery.ui.draggable.js [new file with mode: 0644]
external/jquery.ui.mouse.js [new file with mode: 0644]
external/jquery.ui.widget.js [new file with mode: 0644]
index.html
server.coffee

index 7c13a36..660bee6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -57,3 +57,11 @@ jquery-ui that it is looking for. Future versions of Peach CGT should be better
 at finding these javascript files, and may even come with some of them. For
 now, try fiddling with the `<script>` tags in `index.html` or hacking
 `javascript_handler` in server.coffee.
+
+
+License
+-------
+
+This project is AGPLv3+. The files from the `external/` directory aren't really
+part of this project, they come from other projects. Please see
+`external/README` for details.
diff --git a/external/README b/external/README
new file mode 100644 (file)
index 0000000..ccb12bf
--- /dev/null
@@ -0,0 +1,8 @@
+This directory is for javascript for the client that are copied from other
+projects.
+
+See:
+
+http://jquery.com/
+
+http://jqueryui.com/
diff --git a/external/jquery.min.js b/external/jquery.min.js
new file mode 100644 (file)
index 0000000..12117be
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * jQuery JavaScript Library v1.7.1
+ * 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 Nov 21 21:11:03 2011 -0500
+ */
+(function(J,bb){var ah=J.document,bu=J.navigator,bk=J.location;var p=(function(){var e=function(b0,b1){return new e.fn.init(b0,b1,by)},bU=J.jQuery,bH=J.$,by,bZ=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bx=/\s+$/,bD=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bQ=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,bB=/(webkit)[ \/]([\w.]+)/,bP=/(opera)(?:.*version)?[ \/]([\w.]+)/,bR=/(msie) ([\w.]+)/,bL=/(mozilla)(?:.*? rv:([\w.]+))?/,bz=/-([a-z]|[0-9])/ig,bG=/^-ms-/,bT=function(b1,b0){return(b0+"").toUpperCase()},bX=bu.userAgent,bV,bw,bF,bS=Object.prototype.toString,bY=Object.prototype.hasOwnProperty,bC=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bE={};e.fn=e.prototype={constructor:e,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&ah.body){this.context=ah;this[0]=ah.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bZ.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof e?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:ah);b1=bD.exec(b0);if(b1){if(e.isPlainObject(b4)){b0=[ah.createElement(b1[1])];e.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=e.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?e.clone(b1.fragment):b1.fragment).childNodes}return e.merge(this,b0)}else{b5=ah.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=ah;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(e.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==bb){this.selector=b0.selector;this.context=b0.context}return e.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(e.isArray(b1)){bC.apply(b2,b1)}else{e.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return e.each(this,b1,b0)},ready:function(b0){e.bindReady();bw.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(e.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bC,sort:[].sort,splice:[].splice};e.fn.init.prototype=e.fn;e.extend=e.fn.extend=function(){var b8,b1,b0,b2,b6,b7,b3=arguments[0]||{},b4=1,b5=arguments.length,b9=false;if(typeof b3==="boolean"){b9=b3;b3=arguments[1]||{};b4=2}if(typeof b3!=="object"&&!e.isFunction(b3)){b3={}}if(b5===b4){b3=this;--b4}for(;b4<b5;b4++){if((b8=arguments[b4])!=null){for(b1 in b8){b0=b3[b1];b2=b8[b1];if(b3===b2){continue}if(b9&&b2&&(e.isPlainObject(b2)||(b6=e.isArray(b2)))){if(b6){b6=false;b7=b0&&e.isArray(b0)?b0:[]}else{b7=b0&&e.isPlainObject(b0)?b0:{}}b3[b1]=e.extend(b9,b7,b2)}else{if(b2!==bb){b3[b1]=b2}}}}}return b3};e.extend({noConflict:function(b0){if(J.$===e){J.$=bH}if(b0&&J.jQuery===e){J.jQuery=bU}return e},isReady:false,readyWait:1,holdReady:function(b0){if(b0){e.readyWait++}else{e.ready(true)}},ready:function(b0){if((b0===true&&!--e.readyWait)||(b0!==true&&!e.isReady)){if(!ah.body){return setTimeout(e.ready,1)}e.isReady=true;if(b0!==true&&--e.readyWait>0){return}bw.fireWith(ah,[e]);if(e.fn.trigger){e(ah).trigger("ready").off("ready")}}},bindReady:function(){if(bw){return}bw=e.Callbacks("once memory");if(ah.readyState==="complete"){return setTimeout(e.ready,1)}if(ah.addEventListener){ah.addEventListener("DOMContentLoaded",bF,false);J.addEventListener("load",e.ready,false)}else{if(ah.attachEvent){ah.attachEvent("onreadystatechange",bF);J.attachEvent("onload",e.ready);var b0=false;try{b0=J.frameElement==null}catch(b1){}if(ah.documentElement.doScroll&&b0){bA()}}}},isFunction:function(b0){return e.type(b0)==="function"},isArray:Array.isArray||function(b0){return e.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bE[bS.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||e.type(b2)!=="object"||b2.nodeType||e.isWindow(b2)){return false}try{if(b2.constructor&&!bY.call(b2,"constructor")&&!bY.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===bb||bY.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=e.trim(b0);if(J.JSON&&J.JSON.parse){return J.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bQ,"]").replace(bJ,""))){return(new Function("return "+b0))()}e.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(J.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=bb}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){e.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(J.execScript||function(b1){J["eval"].call(J,b1)})(b0)}},camelCase:function(b0){return b0.replace(bG,"ms-").replace(bz,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b5,b6,b3){var b2,b4=0,b0=b5.length,b1=b0===bb||e.isFunction(b5);if(b3){if(b1){for(b2 in b5){if(b6.apply(b5[b2],b3)===false){break}}}else{for(;b4<b0;){if(b6.apply(b5[b4++],b3)===false){break}}}}else{if(b1){for(b2 in b5){if(b6.call(b5[b2],b2,b5[b2])===false){break}}}else{for(;b4<b0;){if(b6.call(b5[b4],b4,b5[b4++])===false){break}}}}return b5},trim:bO?function(b0){return b0==null?"":bO.call(b0)}:function(b0){return b0==null?"":b0.toString().replace(bI,"").replace(bx,"")},makeArray:function(b3,b1){var b0=b1||[];if(b3!=null){var b2=e.type(b3);if(b3.length==null||b2==="string"||b2==="function"||b2==="regexp"||e.isWindow(b3)){bC.call(b0,b3)}else{e.merge(b0,b3)}}return b0},inArray:function(b2,b3,b1){var b0;if(b3){if(bv){return bv.call(b3,b2,b1)}b0=b3.length;b1=b1?b1<0?Math.max(0,b0+b1):b1:0;for(;b1<b0;b1++){if(b1 in b3&&b3[b1]===b2){return b1}}}return -1},merge:function(b4,b3){var b2=b4.length,b1=0;if(typeof b3.length==="number"){for(var b0=b3.length;b1<b0;b1++){b4[b2++]=b3[b1]}}else{while(b3[b1]!==bb){b4[b2++]=b3[b1++]}}b4.length=b2;return b4},grep:function(b2,b5,b0){var b3=[],b6;b0=!!b0;for(var b4=0,b1=b2.length;b4<b1;b4++){b6=!!b5(b2[b4],b4);if(b0!==b6){b3.push(b2[b4])}}return b3},map:function(b0,b6,b8){var b5,b7,b4=[],b1=0,b3=b0.length,b2=b0 instanceof e||b3!==bb&&typeof b3==="number"&&((b3>0&&b0[0]&&b0[b3-1])||b3===0||e.isArray(b0));if(b2){for(;b1<b3;b1++){b5=b6(b0[b1],b1,b8);if(b5!=null){b4[b4.length]=b5}}}else{for(b7 in b0){b5=b6(b0[b7],b7,b8);if(b5!=null){b4[b4.length]=b5}}}return b4.concat.apply([],b4)},guid:1,proxy:function(b4,b3){if(typeof b3==="string"){var b2=b4[b3];b3=b4;b4=b2}if(!e.isFunction(b4)){return bb}var b0=bK.call(arguments,2),b1=function(){return b4.apply(b3,b0.concat(bK.call(arguments)))};b1.guid=b4.guid=b4.guid||b1.guid||e.guid++;return b1},access:function(b0,b7,b6,b1,b5,b8){var b4=b0.length;if(typeof b7==="object"){for(var b2 in b7){e.access(b0,b2,b7[b2],b1,b5,b6)}return b0}if(b6!==bb){b1=!b8&&b1&&e.isFunction(b6);for(var b3=0;b3<b4;b3++){b5(b0[b3],b7,b1?b6.call(b0[b3],b3,b5(b0[b3],b7)):b6,b8)}return b0}return b4?b5(b0[0],b7):bb},now:function(){return(new Date()).getTime()},uaMatch:function(b1){b1=b1.toLowerCase();var b0=bB.exec(b1)||bP.exec(b1)||bR.exec(b1)||b1.indexOf("compatible")<0&&bL.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}},sub:function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}e.extend(true,b0,this);b0.superclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof e&&!(b4 instanceof b0)){b4=b0(b4)}return e.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(ah);return b0},browser:{}});e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b1,b0){bE["[object "+b0+"]"]=b0.toLowerCase()});bV=e.uaMatch(bX);if(bV.browser){e.browser[bV.browser]=true;e.browser.version=bV.version}if(e.browser.webkit){e.browser.safari=true}if(bM.test("\xA0")){bI=/^[\s\xA0]+/;bx=/[\s\xA0]+$/}by=e(ah);if(ah.addEventListener){bF=function(){ah.removeEventListener("DOMContentLoaded",bF,false);e.ready()}}else{if(ah.attachEvent){bF=function(){if(ah.readyState==="complete"){ah.detachEvent("onreadystatechange",bF);e.ready()}}}}function bA(){if(e.isReady){return}try{ah.documentElement.doScroll("left")}catch(b0){setTimeout(bA,1);return}e.ready()}return e})();var a1={};function aX(bv){var bx=a1[bv]={},bw,e;bv=bv.split(/\s+/);for(bw=0,e=bv.length;bw<e;bw++){bx[bv[bw]]=true}return bx}p.Callbacks=function(bw){bw=bw?(a1[bw]||aX(bw)):{};var bB=[],bC=[],by,bx,bA,bz,e,bE=function(bG){var bH,bF,bJ,bI,bK;for(bH=0,bF=bG.length;bH<bF;bH++){bJ=bG[bH];bI=p.type(bJ);if(bI==="array"){bE(bJ)}else{if(bI==="function"){if(!bw.unique||!bD.has(bJ)){bB.push(bJ)}}}}},bv=function(bG,bF){bF=bF||[];by=!bw.memory||[bG,bF];bx=true;e=bA||0;bA=0;bz=bB.length;for(;bB&&e<bz;e++){if(bB[e].apply(bG,bF)===false&&bw.stopOnFalse){by=true;break}}bx=false;if(bB){if(!bw.once){if(bC&&bC.length){by=bC.shift();bD.fireWith(by[0],by[1])}}else{if(by===true){bD.disable()}else{bB=[]}}}},bD={add:function(){if(bB){var bF=bB.length;bE(arguments);if(bx){bz=bB.length}else{if(by&&by!==true){bA=bF;bv(by[0],by[1])}}}return this},remove:function(){if(bB){var bG=arguments,bF=0,bI=bG.length;for(;bF<bI;bF++){for(var bH=0;bH<bB.length;bH++){if(bG[bF]===bB[bH]){if(bx){if(bH<=bz){bz--;if(bH<=e){e--}}}bB.splice(bH--,1);if(bw.unique){break}}}}}return this},has:function(bH){if(bB){var bG=0,bF=bB.length;for(;bG<bF;bG++){if(bH===bB[bG]){return true}}}return false},empty:function(){bB=[];return this},disable:function(){bB=bC=by=bb;return this},disabled:function(){return !bB},lock:function(){bC=bb;if(!by||by===true){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){if(bC){if(bx){if(!bw.once){bC.push([bG,bF])}}else{if(!(bw.once&&by)){bv(bG,bF)}}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!by}};return bD};var ar=[].slice;p.extend({Deferred:function(by){var bx=p.Callbacks("once memory"),bw=p.Callbacks("once memory"),e=p.Callbacks("memory"),bv="pending",bB={resolve:bx,reject:bw,notify:e},bz={done:bx.add,fail:bw.add,progress:e.add,state:function(){return bv},isResolved:bx.fired,isRejected:bw.fired,then:function(bE,bD,bF){bC.done(bE).fail(bD).progress(bF);return this},always:function(){bC.done.apply(bC,arguments).fail.apply(bC,arguments);return this},pipe:function(bF,bE,bD){return p.Deferred(function(bG){p.each({done:[bF,"resolve"],fail:[bE,"reject"],progress:[bD,"notify"]},function(bK,bL){var bJ=bL[0],bH=bL[1],bI;if(p.isFunction(bJ)){bC[bK](function(){bI=bJ.apply(this,arguments);if(bI&&p.isFunction(bI.promise)){bI.promise().then(bG.resolve,bG.reject,bG.notify)}else{bG[bH+"With"](this===bC?bG:this,[bI])}})}else{bC[bK](bG[bH])}})}).promise()},promise:function(bE){if(bE==null){bE=bz}else{for(var bD in bz){bE[bD]=bz[bD]}}return bE}},bC=bz.promise({}),bA;for(bA in bB){bC[bA]=bB[bA].fire;bC[bA+"With"]=bB[bA].fireWith}bC.done(function(){bv="resolved"},bw.disable,e.lock).fail(function(){bv="rejected"},bx.disable,e.lock);if(by){by.call(bC,bC)}return bC},when:function(bC){var by=ar.call(arguments,0),bv=0,bw=by.length,bB=new Array(bw),bx=bw,e=bw,bD=bw<=1&&bC&&p.isFunction(bC.promise)?bC:p.Deferred(),bA=bD.promise();function bE(bF){return function(bG){by[bF]=arguments.length>1?ar.call(arguments,0):bG;if(!(--bx)){bD.resolveWith(bD,by)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?ar.call(arguments,0):bG;bD.notifyWith(bA,bB)}}if(bw>1){for(;bv<bw;bv++){if(by[bv]&&by[bv].promise&&p.isFunction(by[bv].promise)){by[bv].promise().then(bE(bv),bD.reject,bz(bv))}else{--bx}}if(!bx){bD.resolveWith(bD,by)}}else{if(bD!==bC){bD.resolveWith(bD,bw?[bC]:[])}}return bA}});p.support=(function(){var bJ,bI,bF,bK,by,bG,bz,bx,bB,bE,bC,bA,bw,bv=ah.createElement("div"),bH=ah.documentElement;bv.setAttribute("className","t");bv.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bK=ah.createElement("select");by=bK.appendChild(ah.createElement("option"));bG=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bG.value==="on"),optSelected:by.selected,getSetAttribute:bv.className!=="t",enctype:!!ah.createElement("form").enctype,html5Clone:ah.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bG.checked=true;bJ.noCloneChecked=bG.cloneNode(true).checked;bK.disabled=true;bJ.optDisabled=!by.disabled;try{delete bv.test}catch(bD){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bG=ah.createElement("input");bG.value="t";bG.setAttribute("type","radio");bJ.radioValue=bG.value==="t";bG.setAttribute("checked","checked");bv.appendChild(bG);bx=ah.createDocumentFragment();bx.appendChild(bv.lastChild);bJ.checkClone=bx.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bG.checked;bx.removeChild(bG);bx.appendChild(bv);bv.innerHTML="";if(J.getComputedStyle){bz=ah.createElement("div");bz.style.width="0";bz.style.marginRight="0";bv.style.width="2px";bv.appendChild(bz);bJ.reliableMarginRight=(parseInt((J.getComputedStyle(bz,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(bA in {submit:1,change:1,focusin:1}){bC="on"+bA;bw=(bC in bv);if(!bw){bv.setAttribute(bC,"return;");bw=(typeof bv[bC]==="function")}bJ[bA+"Bubbles"]=bw}}bx.removeChild(bv);bx=bK=by=bz=bv=bG=null;p(function(){var bQ,bT,bV,bU,bL,bM,bP,bS,bR,e,bN,bO=ah.getElementsByTagName("body")[0];if(!bO){return}bP=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bN="<div "+e+"><div></div></div><table "+e+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";bQ=ah.createElement("div");bQ.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bP+"px";bO.insertBefore(bQ,bO.firstChild);bv=ah.createElement("div");bQ.appendChild(bv);bv.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bB=bv.getElementsByTagName("td");bw=(bB[0].offsetHeight===0);bB[0].style.display="";bB[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bB[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";p.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="<div style='width:4px;'></div>";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bN;bT=bv.firstChild;bV=bT.firstChild;bL=bT.nextSibling.firstChild.firstChild;bM={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bL.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bM.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bT.style.overflow="hidden";bT.style.position="relative";bM.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bM.doesNotIncludeMarginInBodyOffset=(bO.offsetTop!==bP);bO.removeChild(bQ);bv=bQ=null;p.extend(bJ,bM)});return bJ})();var ag=/^(?:\{.*\}|\[.*\])$/,az=/([A-Z])/g;p.extend({cache:{},uuid:0,expando:"jQuery"+(p.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?p.cache[e[p.expando]]:e[p.expando];return !!e&&!a3(e)},data:function(bA,bv,bB,bz){if(!p.acceptData(bA)){return}var bE,by,bD,bG=p.expando,bC=typeof bv==="string",bF=bA.nodeType,e=bF?p.cache:bA,bw=bF?bA[bG]:bA[bG]&&bG,bx=bv==="events";if((!bw||!e[bw]||(!bx&&!bz&&!e[bw].data))&&bC&&bB===bb){return}if(!bw){if(bF){bA[bG]=bw=++p.uuid}else{bw=bG}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=p.noop}}if(typeof bv==="object"||typeof bv==="function"){if(bz){e[bw]=p.extend(e[bw],bv)}else{e[bw].data=p.extend(e[bw].data,bv)}}bE=by=e[bw];if(!bz){if(!by.data){by.data={}}by=by.data}if(bB!==bb){by[p.camelCase(bv)]=bB}if(bx&&!by[bv]){return bE.events}if(bC){bD=by[bv];if(bD==null){bD=by[p.camelCase(bv)]}}else{bD=by}return bD},removeData:function(bz,bv,by){if(!p.acceptData(bz)){return}var bx,bB,bA,bD=p.expando,bC=bz.nodeType,e=bC?p.cache:bz,bw=bC?bz[bD]:bD;if(!e[bw]){return}if(bv){bx=by?e[bw]:e[bw].data;if(bx){if(!p.isArray(bv)){if(bv in bx){bv=[bv]}else{bv=p.camelCase(bv);if(bv in bx){bv=[bv]}else{bv=bv.split(" ")}}}for(bB=0,bA=bv.length;bB<bA;bB++){delete bx[bv[bB]]}if(!(by?a3:p.isEmptyObject)(bx)){return}}}if(!by){delete e[bw].data;if(!a3(e[bw])){return}}if(p.support.deleteExpando||!e.setInterval){delete e[bw]}else{e[bw]=null}if(bC){if(p.support.deleteExpando){delete bz[bD]}else{if(bz.removeAttribute){bz.removeAttribute(bD)}else{bz[bD]=null}}}},_data:function(bv,e,bw){return p.data(bv,e,bw,true)},acceptData:function(bv){if(bv.nodeName){var e=p.noData[bv.nodeName.toLowerCase()];if(e){return !(e===true||bv.getAttribute("classid")!==e)}}return true}});p.fn.extend({data:function(by,bA){var bB,e,bw,bz=null;if(typeof by==="undefined"){if(this.length){bz=p.data(this[0]);if(this[0].nodeType===1&&!p._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var bx=0,bv=e.length;bx<bv;bx++){bw=e[bx].name;if(bw.indexOf("data-")===0){bw=p.camelCase(bw.substring(5));a4(this[0],bw,bz[bw])}}p._data(this[0],"parsedAttrs",true)}}return bz}else{if(typeof by==="object"){return this.each(function(){p.data(this,by)})}}bB=by.split(".");bB[1]=bB[1]?"."+bB[1]:"";if(bA===bb){bz=this.triggerHandler("getData"+bB[1]+"!",[bB[0]]);if(bz===bb&&this.length){bz=p.data(this[0],by);bz=a4(this[0],by,bz)}return bz===bb&&bB[1]?this.data(bB[0]):bz}else{return this.each(function(){var bC=p(this),bD=[bB[0],bA];bC.triggerHandler("setData"+bB[1]+"!",bD);p.data(this,by,bA);bC.triggerHandler("changeData"+bB[1]+"!",bD)})}},removeData:function(e){return this.each(function(){p.removeData(this,e)})}});function a4(bx,bw,by){if(by===bb&&bx.nodeType===1){var bv="data-"+bw.replace(az,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:p.isNumeric(by)?parseFloat(by):ag.test(by)?p.parseJSON(by):by}catch(bz){}p.data(bx,bw,by)}else{by=bb}}return by}function a3(bv){for(var e in bv){if(e==="data"&&p.isEmptyObject(bv[e])){continue}if(e!=="toJSON"){return false}}return true}function C(by,bw,bA){var bx=bw+"defer",bv=bw+"queue",e=bw+"mark",bz=p._data(by,bx);if(bz&&(bA==="queue"||!p._data(by,bv))&&(bA==="mark"||!p._data(by,e))){setTimeout(function(){if(!p._data(by,bv)&&!p._data(by,e)){p.removeData(by,bx,true);bz.fire()}},0)}}p.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";p._data(bv,e,(p._data(bv,e)||0)+1)}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((p._data(bx,e)||1)-1);if(bw){p._data(bx,e,bw)}else{p.removeData(bx,e,true);C(bx,bv,"mark")}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=p._data(bv,e);if(bx){if(!bw||p.isArray(bx)){bw=p._data(bv,e,p.makeArray(bx))}else{bw.push(bx)}}return bw||[]}},dequeue:function(by,bx){bx=bx||"fx";var bv=p.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift()}if(bw){if(bx==="fx"){bv.unshift("inprogress")}p._data(by,bx+".run",e);bw.call(by,function(){p.dequeue(by,bx)},e)}if(!bv.length){p.removeData(by,bx+"queue "+bx+".run",true);C(by,bx,"queue")}}});p.fn.extend({queue:function(e,bv){if(typeof e!=="string"){bv=e;e="fx"}if(bv===bb){return p.queue(this[0],e)}return this.each(function(){var bw=p.queue(this,e,bv);if(e==="fx"&&bw[0]!=="inprogress"){p.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){p.dequeue(this,e)})},delay:function(bv,e){bv=p.fx?p.fx.speeds[bv]||bv:bv;e=e||"fx";return this.queue(e,function(by,bx){var bw=setTimeout(by,bv);bx.stop=function(){clearTimeout(bw)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bD,bw){if(typeof bD!=="string"){bw=bD;bD=bb}bD=bD||"fx";var e=p.Deferred(),bC=this,by=bC.length,bA=1,bv=bD+"defer",bz=bD+"queue",bB=bD+"mark",bx;function bE(){if(!(--bA)){e.resolveWith(bC,[bC])}}while(by--){if((bx=p.data(bC[by],bv,bb,true)||(p.data(bC[by],bz,bb,true)||p.data(bC[by],bB,bb,true))&&p.data(bC[by],bv,p.Callbacks("once memory"),true))){bA++;bx.add(bE)}}bE();return e.promise()}});var al=/[\n\t\r]/g,aQ=/\s+/,aO=/\r/g,b=/^(?:button|input)$/i,D=/^(?:button|input|object|select|textarea)$/i,h=/^a(?:rea)?$/i,ad=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,be=p.support.getSetAttribute,bf,aW,aw;p.fn.extend({attr:function(e,bv){return p.access(this,e,bv,true,p.attr)},removeAttr:function(e){return this.each(function(){p.removeAttr(this,e)})},prop:function(e,bv){return p.access(this,e,bv,true,p.prop)},removeProp:function(e){e=p.propFix[e]||e;return this.each(function(){try{this[e]=bb;delete this[e]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(p.isFunction(by)){return this.each(function(bC){p(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(aQ);for(bw=0,bv=this.length;bw<bv;bw++){bx=this[bw];if(bx.nodeType===1){if(!bx.className&&bA.length===1){bx.className=by}else{bz=" "+bx.className+" ";for(bB=0,e=bA.length;bB<e;bB++){if(!~bz.indexOf(" "+bA[bB]+" ")){bz+=bA[bB]+" "}}bx.className=p.trim(bz)}}}}return this},removeClass:function(bz){var bA,bx,bv,by,bw,bB,e;if(p.isFunction(bz)){return this.each(function(bC){p(this).removeClass(bz.call(this,bC,this.className))})}if((bz&&typeof bz==="string")||bz===bb){bA=(bz||"").split(aQ);for(bx=0,bv=this.length;bx<bv;bx++){by=this[bx];if(by.nodeType===1&&by.className){if(bz){bw=(" "+by.className+" ").replace(al," ");for(bB=0,e=bA.length;bB<e;bB++){bw=bw.replace(" "+bA[bB]+" "," ")}by.className=p.trim(bw)}else{by.className=""}}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,e=typeof bv==="boolean";if(p.isFunction(bx)){return this.each(function(by){p(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bz,bA=0,by=p(this),bB=bv,bC=bx.split(aQ);while((bz=bC[bA++])){bB=e?bB:!by.hasClass(bz);by[bB?"addClass":"removeClass"](bz)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){p._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":p._data(this,"__className__")||""}}})},hasClass:function(e){var bw=" "+e+" ",bx=0,bv=this.length;for(;bx<bv;bx++){if(this[bx].nodeType===1&&(" "+this[bx].className+" ").replace(al," ").indexOf(bw)>-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=p.valHooks[bw.nodeName.toLowerCase()]||p.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==bb){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aO,""):bv==null?"":bv}return}by=p.isFunction(bx);return this.each(function(bA){var bz=p(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(p.isArray(bB)){bB=p.map(bB,function(bC){return bC==null?"":bC+""})}}}e=p.valHooks[this.nodeName.toLowerCase()]||p.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===bb){this.value=bB}})}});p.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(bv){var bB,bw,bz,e,by=bv.selectedIndex,bC=[],bA=bv.options,bx=bv.type==="select-one";if(by<0){return null}bw=bx?by:0;bz=bx?by+1:bA.length;for(;bw<bz;bw++){e=bA[bw];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){bB=p(e).val();if(bx){return bB}bC.push(bB)}}if(bx&&!bC.length&&bA.length){return p(bA[by]).val()}return bC},set:function(bv,bw){var e=p.makeArray(bw);p(bv).find("option").each(function(){this.selected=p.inArray(p(this).val(),e)>=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,by,bB,bz){var bx,e,bw,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&by in p.attrFn){return p(bA)[by](bB)}if(typeof bA.getAttribute==="undefined"){return p.prop(bA,by,bB)}bw=bv!==1||!p.isXMLDoc(bA);if(bw){by=by.toLowerCase();e=p.attrHooks[by]||(ad.test(by)?aW:bf)}if(bB!==bb){if(bB===null){p.removeAttr(bA,by);return}else{if(e&&"set" in e&&bw&&(bx=e.set(bA,bB,by))!==bb){return bx}else{bA.setAttribute(by,""+bB);return bB}}}else{if(e&&"get" in e&&bw&&(bx=e.get(bA,by))!==null){return bx}else{bx=bA.getAttribute(by);return bx===null?bb:bx}}},removeAttr:function(by,bz){var e,bA,bw,bv,bx=0;if(bz&&by.nodeType===1){bA=bz.toLowerCase().split(aQ);bv=bA.length;for(;bx<bv;bx++){bw=bA[bx];if(bw){e=p.propFix[bw]||bw;p.attr(by,bw,"");by.removeAttribute(be?bw:e);if(ad.test(bw)&&e in by){by[e]=false}}}}},attrHooks:{type:{set:function(e,bv){if(b.test(e.nodeName)&&e.parentNode){p.error("type property can't be changed")}else{if(!p.support.radioValue&&bv==="radio"&&p.nodeName(e,"input")){var bw=e.value;e.setAttribute("type",bv);if(bw){e.value=bw}return bv}}}},value:{get:function(bv,e){if(bf&&p.nodeName(bv,"button")){return bf.get(bv,e)}return e in bv?bv.value:null},set:function(bv,bw,e){if(bf&&p.nodeName(bv,"button")){return bf.set(bv,bw,e)}bv.value=bw}}},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(bz,by,bA){var bx,e,bw,bv=bz.nodeType;if(!bz||bv===3||bv===8||bv===2){return}bw=bv!==1||!p.isXMLDoc(bz);if(bw){by=p.propFix[by]||by;e=p.propHooks[by]}if(bA!==bb){if(e&&"set" in e&&(bx=e.set(bz,bA,by))!==bb){return bx}else{return(bz[by]=bA)}}else{if(e&&"get" in e&&(bx=e.get(bz,by))!==null){return bx}else{return bz[by]}}},propHooks:{tabIndex:{get:function(bv){var e=bv.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):D.test(bv.nodeName)||h.test(bv.nodeName)&&bv.href?0:bb}}}});p.attrHooks.tabindex=p.propHooks.tabIndex;aW={get:function(bw,bv){var bx,e=p.prop(bw,bv);return e===true||typeof e!=="boolean"&&(bx=bw.getAttributeNode(bv))&&bx.nodeValue!==false?bv.toLowerCase():bb},set:function(bw,bx,bv){var e;if(bx===false){p.removeAttr(bw,bv)}else{e=p.propFix[bv]||bv;if(e in bw){bw[e]=true}bw.setAttribute(bv,bv.toLowerCase())}return bv}};if(!be){aw={name:true,id:true};bf=p.valHooks.button={get:function(bw,bv){var e;e=bw.getAttributeNode(bv);return e&&(aw[bv]?e.nodeValue!=="":e.specified)?e.nodeValue:bb},set:function(bw,bx,bv){var e=bw.getAttributeNode(bv);if(!e){e=ah.createAttribute(bv);bw.setAttributeNode(e)}return(e.nodeValue=bx+"")}};p.attrHooks.tabindex.set=bf.set;p.each(["width","height"],function(bv,e){p.attrHooks[e]=p.extend(p.attrHooks[e],{set:function(bw,bx){if(bx===""){bw.setAttribute(e,"auto");return bx}}})});p.attrHooks.contenteditable={get:bf.get,set:function(bv,bw,e){if(bw===""){bw="false"}bf.set(bv,bw,e)}}}if(!p.support.hrefNormalized){p.each(["href","src","width","height"],function(bv,e){p.attrHooks[e]=p.extend(p.attrHooks[e],{get:function(bx){var bw=bx.getAttribute(e,2);return bw===null?bb:bw}})})}if(!p.support.style){p.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||bb},set:function(e,bv){return(e.style.cssText=""+bv)}}}if(!p.support.optSelected){p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(bv){var e=bv.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!p.support.enctype){p.propFix.enctype="encoding"}if(!p.support.checkOn){p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(e,bv){if(p.isArray(bv)){return(e.checked=p.inArray(p(e).val(),bv)>=0)}}})});var bd=/^(?:textarea|input|select)$/i,k=/^([^\.]*)?(?:\.(.+))?$/,L=/\bhover(\.\S+)?\b/,aA=/^key/,F=/^(?:mouse|contextmenu)|click/,R=/^(?:focusinfocus|focusoutblur)$/,T=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,V=function(e){var bv=T.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},d=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return p.event.special.hover?e:e.replace(L,"mouseenter$1 mouseleave$1")};p.event={add:function(bA,bE,bK,bD,bB){var bw,by,bH,bJ,bI,bF,bv,bG,bx,bC,bz,e;if(bA.nodeType===3||bA.nodeType===8||!bE||!bK||!(bw=p._data(bA))){return}if(bK.handler){bx=bK;bK=bx.handler}if(!bK.guid){bK.guid=p.guid++}bH=bw.events;if(!bH){bw.events=bH={}}by=bw.handle;if(!by){bw.handle=by=function(bL){return typeof p!=="undefined"&&(!bL||p.event.triggered!==bL.type)?p.event.dispatch.apply(by.elem,arguments):bb};by.elem=bA}bE=p.trim(bt(bE)).split(" ");for(bJ=0;bJ<bE.length;bJ++){bI=k.exec(bE[bJ])||[];bF=bI[1];bv=(bI[2]||"").split(".").sort();e=p.event.special[bF]||{};bF=(bB?e.delegateType:e.bindType)||bF;e=p.event.special[bF]||{};bG=p.extend({type:bF,origType:bI[1],data:bD,handler:bK,guid:bK.guid,selector:bB,quick:V(bB),namespace:bv.join(".")},bx);bz=bH[bF];if(!bz){bz=bH[bF]=[];bz.delegateCount=0;if(!e.setup||e.setup.call(bA,bD,bv,by)===false){if(bA.addEventListener){bA.addEventListener(bF,by,false)}else{if(bA.attachEvent){bA.attachEvent("on"+bF,by)}}}}if(e.add){e.add.call(bA,bG);if(!bG.handler.guid){bG.handler.guid=bK.guid}}if(bB){bz.splice(bz.delegateCount++,0,bG)}else{bz.push(bG)}p.event.global[bF]=true}bA=null},global:{},remove:function(bK,bE,bv,bI,bx){var bH=p.hasData(bK)&&p._data(bK),bF,bw,by,bL,bB,bz,bJ,bD,bA,bG,bC,e;if(!bH||!(bD=bH.events)){return}bE=p.trim(bt(bE||"")).split(" ");for(bF=0;bF<bE.length;bF++){bw=k.exec(bE[bF])||[];by=bL=bw[1];bB=bw[2];if(!by){for(by in bD){p.event.remove(bK,by+bE[bF],bv,bI,true)}continue}bA=p.event.special[by]||{};by=(bI?bA.delegateType:bA.bindType)||by;bC=bD[by]||[];bz=bC.length;bB=bB?new RegExp("(^|\\.)"+bB.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(bJ=0;bJ<bC.length;bJ++){e=bC[bJ];if((bx||bL===e.origType)&&(!bv||bv.guid===e.guid)&&(!bB||bB.test(e.namespace))&&(!bI||bI===e.selector||bI==="**"&&e.selector)){bC.splice(bJ--,1);if(e.selector){bC.delegateCount--}if(bA.remove){bA.remove.call(bK,e)}}}if(bC.length===0&&bz!==bC.length){if(!bA.teardown||bA.teardown.call(bK,bB)===false){p.removeEvent(bK,by,bH.handle)}delete bD[by]}}if(p.isEmptyObject(bD)){bG=bH.handle;if(bG){bG.elem=null}p.removeData(bK,["events","handle"],true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bw,bE,bB,bJ){if(bB&&(bB.nodeType===3||bB.nodeType===8)){return}var bG=bw.type||bw,bx=[],e,by,bD,bH,bA,bF,bv,bz,bC,bI;if(R.test(bG+p.event.triggered)){return}if(bG.indexOf("!")>=0){bG=bG.slice(0,-1);by=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bB||p.event.customEvent[bG])&&!p.event.global[bG]){return}bw=typeof bw==="object"?bw[p.expando]?bw:new p.Event(bG,bw):new p.Event(bG);bw.type=bG;bw.isTrigger=true;bw.exclusive=by;bw.namespace=bx.join(".");bw.namespace_re=bw.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;bF=bG.indexOf(":")<0?"on"+bG:"";if(!bB){e=p.cache;for(bD in e){if(e[bD].events&&e[bD].events[bG]){p.event.trigger(bw,bE,e[bD].handle.elem,true)}}return}bw.result=bb;if(!bw.target){bw.target=bB}bE=bE!=null?p.makeArray(bE):[];bE.unshift(bw);bv=p.event.special[bG]||{};if(bv.trigger&&bv.trigger.apply(bB,bE)===false){return}bC=[[bB,bv.bindType||bG]];if(!bJ&&!bv.noBubble&&!p.isWindow(bB)){bI=bv.delegateType||bG;bH=R.test(bI+bG)?bB:bB.parentNode;bA=null;for(;bH;bH=bH.parentNode){bC.push([bH,bI]);bA=bH}if(bA&&bA===bB.ownerDocument){bC.push([bA.defaultView||bA.parentWindow||J,bI])}}for(bD=0;bD<bC.length&&!bw.isPropagationStopped();bD++){bH=bC[bD][0];bw.type=bC[bD][1];bz=(p._data(bH,"events")||{})[bw.type]&&p._data(bH,"handle");if(bz){bz.apply(bH,bE)}bz=bF&&bH[bF];if(bz&&p.acceptData(bH)&&bz.apply(bH,bE)===false){bw.preventDefault()}}bw.type=bG;if(!bJ&&!bw.isDefaultPrevented()){if((!bv._default||bv._default.apply(bB.ownerDocument,bE)===false)&&!(bG==="click"&&p.nodeName(bB,"a"))&&p.acceptData(bB)){if(bF&&bB[bG]&&((bG!=="focus"&&bG!=="blur")||bw.target.offsetWidth!==0)&&!p.isWindow(bB)){bA=bB[bF];if(bA){bB[bF]=null}p.event.triggered=bG;bB[bG]();p.event.triggered=bb;if(bA){bB[bF]=bA}}}}return bw.result},dispatch:function(e){e=p.event.fix(e||J.event);var bz=((p._data(this,"events")||{})[e.type]||[]),bB=bz.delegateCount,bG=[].slice.call(arguments,0),by=!e.exclusive&&!e.namespace,bK=[],bC,bA,bJ,bx,bF,bE,bv,bD,bH,bw,bI;bG[0]=e;e.delegateTarget=this;if(bB&&!e.target.disabled&&!(e.button&&e.type==="click")){bx=p(this);bx.context=this.ownerDocument||this;for(bJ=e.target;bJ!=this;bJ=bJ.parentNode||this){bE={};bD=[];bx[0]=bJ;for(bC=0;bC<bB;bC++){bH=bz[bC];bw=bH.selector;if(bE[bw]===bb){bE[bw]=(bH.quick?d(bJ,bH.quick):bx.is(bw))}if(bE[bw]){bD.push(bH)}}if(bD.length){bK.push({elem:bJ,matches:bD})}}}if(bz.length>bB){bK.push({elem:this,matches:bz.slice(bB)})}for(bC=0;bC<bK.length&&!e.isPropagationStopped();bC++){bv=bK[bC];e.currentTarget=bv.elem;for(bA=0;bA<bv.matches.length&&!e.isImmediatePropagationStopped();bA++){bH=bv.matches[bA];if(by||(!e.namespace&&!bH.namespace)||e.namespace_re&&e.namespace_re.test(bH.namespace)){e.data=bH.data;e.handleObj=bH;bF=((p.event.special[bH.origType]||{}).handle||bH.handler).apply(bv.elem,bG);if(bF!==bb){e.result=bF;if(bF===false){e.preventDefault();e.stopPropagation()}}}}}return e.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bv,e){if(bv.which==null){bv.which=e.charCode!=null?e.charCode:e.keyCode}return bv}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(bx,bw){var by,bz,e,bv=bw.button,bA=bw.fromElement;if(bx.pageX==null&&bw.clientX!=null){by=bx.target.ownerDocument||ah;bz=by.documentElement;e=by.body;bx.pageX=bw.clientX+(bz&&bz.scrollLeft||e&&e.scrollLeft||0)-(bz&&bz.clientLeft||e&&e.clientLeft||0);bx.pageY=bw.clientY+(bz&&bz.scrollTop||e&&e.scrollTop||0)-(bz&&bz.clientTop||e&&e.clientTop||0)}if(!bx.relatedTarget&&bA){bx.relatedTarget=bA===bx.target?bw.toElement:bA}if(!bx.which&&bv!==bb){bx.which=(bv&1?1:(bv&2?3:(bv&4?2:0)))}return bx}},fix:function(bx){if(bx[p.expando]){return bx}var bw,bz,bv=bx,e=p.event.fixHooks[bx.type]||{},by=e.props?this.props.concat(e.props):this.props;bx=p.Event(bv);for(bw=by.length;bw;){bz=by[--bw];bx[bz]=bv[bz]}if(!bx.target){bx.target=bv.srcElement||ah}if(bx.target.nodeType===3){bx.target=bx.target.parentNode}if(bx.metaKey===bb){bx.metaKey=bx.ctrlKey}return e.filter?e.filter(bx,bv):bx},special:{ready:{setup:p.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(bw,bv,e){if(p.isWindow(this)){this.onbeforeunload=e}},teardown:function(bv,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}},simulate:function(bv,by,bx,bw){var bz=p.extend(new p.Event(),bx,{type:bv,isSimulated:true,originalEvent:{}});if(bw){p.event.trigger(bz,null,by)}else{p.event.dispatch.call(by,bz)}if(bz.isDefaultPrevented()){bx.preventDefault()}}};p.event.handle=p.event.dispatch;p.removeEvent=ah.removeEventListener?function(bw,bv,e){if(bw.removeEventListener){bw.removeEventListener(bv,e,false)}}:function(bw,bv,e){if(bw.detachEvent){bw.detachEvent("on"+bv,e)}};p.Event=function(bv,e){if(!(this instanceof p.Event)){return new p.Event(bv,e)}if(bv&&bv.type){this.originalEvent=bv;this.type=bv.type;this.isDefaultPrevented=(bv.defaultPrevented||bv.returnValue===false||bv.getPreventDefault&&bv.getPreventDefault())?f:z}else{this.type=bv}if(e){p.extend(this,e)}this.timeStamp=bv&&bv.timeStamp||p.now();this[p.expando]=true};function z(){return false}function f(){return true}p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=f;var bv=this.originalEvent;if(!bv){return}if(bv.preventDefault){bv.preventDefault()}else{bv.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=f;var bv=this.originalEvent;if(!bv){return}if(bv.stopPropagation){bv.stopPropagation()}bv.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=f;this.stopPropagation()},isDefaultPrevented:z,isPropagationStopped:z,isImmediatePropagationStopped:z};p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bv,e){p.event.special[bv]={delegateType:e,bindType:e,handle:function(bz){var bB=this,bA=bz.relatedTarget,by=bz.handleObj,bw=by.selector,bx;if(!bA||(bA!==bB&&!p.contains(bB,bA))){bz.type=by.origType;bx=by.handler.apply(this,arguments);bz.type=e}return bx}}});if(!p.support.submitBubbles){p.event.special.submit={setup:function(){if(p.nodeName(this,"form")){return false}p.event.add(this,"click._submit keypress._submit",function(bx){var bw=bx.target,bv=p.nodeName(bw,"input")||p.nodeName(bw,"button")?bw.form:bb;if(bv&&!bv._submit_attached){p.event.add(bv,"submit._submit",function(e){if(this.parentNode&&!e.isTrigger){p.event.simulate("submit",this.parentNode,e,true)}});bv._submit_attached=true}})},teardown:function(){if(p.nodeName(this,"form")){return false}p.event.remove(this,"._submit")}}}if(!p.support.changeBubbles){p.event.special.change={setup:function(){if(bd.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){p.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});p.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false;p.event.simulate("change",this,e,true)}})}return false}p.event.add(this,"beforeactivate._change",function(bw){var bv=bw.target;if(bd.test(bv.nodeName)&&!bv._change_attached){p.event.add(bv,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){p.event.simulate("change",this.parentNode,e,true)}});bv._change_attached=true}})},handle:function(bv){var e=bv.target;if(this!==e||bv.isSimulated||bv.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bv.handleObj.handler.apply(this,arguments)}},teardown:function(){p.event.remove(this,"._change");return bd.test(this.nodeName)}}}if(!p.support.focusinBubbles){p.each({focus:"focusin",blur:"focusout"},function(bx,e){var bv=0,bw=function(by){p.event.simulate(e,by.target,p.event.fix(by),true)};p.event.special[e]={setup:function(){if(bv++===0){ah.addEventListener(bx,bw,true)}},teardown:function(){if(--bv===0){ah.removeEventListener(bx,bw,true)}}}})}p.fn.extend({on:function(bw,e,bz,by,bv){var bA,bx;if(typeof bw==="object"){if(typeof e!=="string"){bz=e;e=bb}for(bx in bw){this.on(bx,e,bz,bw[bx],bv)}return this}if(bz==null&&by==null){by=e;bz=e=bb}else{if(by==null){if(typeof e==="string"){by=bz;bz=bb}else{by=bz;bz=e;e=bb}}}if(by===false){by=z}else{if(!by){return this}}if(bv===1){bA=by;by=function(bB){p().off(bB);return bA.apply(this,arguments)};by.guid=bA.guid||(bA.guid=p.guid++)}return this.each(function(){p.event.add(this,bw,by,bz,e)})},one:function(bv,e,bx,bw){return this.on.call(this,bv,e,bx,bw,1)},off:function(bw,e,by){if(bw&&bw.preventDefault&&bw.handleObj){var bv=bw.handleObj;p(bw.delegateTarget).off(bv.namespace?bv.type+"."+bv.namespace:bv.type,bv.selector,bv.handler);return this}if(typeof bw==="object"){for(var bx in bw){this.off(bx,e,bw[bx])}return this}if(e===false||typeof e==="function"){by=e;e=bb}if(by===false){by=z}return this.each(function(){p.event.remove(this,bw,by,e)})},bind:function(e,bw,bv){return this.on(e,null,bw,bv)},unbind:function(e,bv){return this.off(e,null,bv)},live:function(e,bw,bv){p(this.context).on(e,this.selector,bw,bv);return this},die:function(e,bv){p(this.context).off(e,this.selector||"**",bv);return this},delegate:function(e,bv,bx,bw){return this.on(bv,e,bx,bw)},undelegate:function(e,bv,bw){return arguments.length==1?this.off(e,"**"):this.off(bv,e,bw)},trigger:function(e,bv){return this.each(function(){p.event.trigger(e,bv,this)})},triggerHandler:function(e,bv){if(this[0]){return p.event.trigger(e,bv,this[0],true)}},toggle:function(by){var bw=arguments,bv=by.guid||p.guid++,bx=0,e=function(bz){var bA=(p._data(this,"lastToggle"+by.guid)||0)%bx;p._data(this,"lastToggle"+by.guid,bA+1);bz.preventDefault();return bw[bA].apply(this,arguments)||false};e.guid=bv;while(bx<bw.length){bw[bx++].guid=bv}return this.click(e)},hover:function(e,bv){return this.mouseenter(e).mouseleave(bv||e)}});p.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 contextmenu").split(" "),function(bv,e){p.fn[e]=function(bx,bw){if(bw==null){bw=bx;bx=null}return arguments.length>0?this.on(e,null,bx,bw):this.trigger(e)};if(p.attrFn){p.attrFn[e]=true}if(aA.test(e)){p.event.fixHooks[e]=p.event.keyHooks}if(F.test(e)){p.event.fixHooks[e]=p.event.mouseHooks}});
+/*
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bA="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bx=true,bP=/\\/g,bN=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bx=false;return 0});var bF=function(bW,e,bZ,b0){bZ=bZ||[];e=e||ah;var bR=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bW||typeof bW!=="string"){return bZ}var bT,b3,b6,bS,b2,b5,b4,bY,bV=true,bU=bF.isXML(e),bX=[],b1=bW;do{bH.exec("");bT=bH.exec(b1);if(bT){b1=bT[3];bX.push(bT[1]);if(bT[2]){bS=bT[3];break}}}while(bT);if(bX.length>1&&bz.exec(bW)){if(bX.length===2&&bC.relative[bX[0]]){b3=bJ(bX[0]+bX[1],e,b0)}else{b3=bC.relative[bX[0]]?[e]:bF(bX.shift(),e);while(bX.length){bW=bX.shift();if(bC.relative[bW]){bW+=bX.shift()}b3=bJ(bW,b3,b0)}}}else{if(!b0&&bX.length>1&&e.nodeType===9&&!bU&&bC.match.ID.test(bX[0])&&!bC.match.ID.test(bX[bX.length-1])){b2=bF.find(bX.shift(),e,bU);e=b2.expr?bF.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=b0?{expr:bX.pop(),set:bD(b0)}:bF.find(bX.pop(),bX.length===1&&(bX[0]==="~"||bX[0]==="+")&&e.parentNode?e.parentNode:e,bU);b3=b2.expr?bF.filter(b2.expr,b2.set):b2.set;if(bX.length>0){b6=bD(b3)}else{bV=false}while(bX.length){b5=bX.pop();b4=b5;if(!bC.relative[b5]){b5=""}else{b4=bX.pop()}if(b4==null){b4=e}bC.relative[b5](b6,b4,bU)}}else{b6=bX=[]}}if(!b6){b6=b3}if(!b6){bF.error(b5||bW)}if(bL.call(b6)==="[object Array]"){if(!bV){bZ.push.apply(bZ,b6)}else{if(e&&e.nodeType===1){for(bY=0;b6[bY]!=null;bY++){if(b6[bY]&&(b6[bY]===true||b6[bY].nodeType===1&&bF.contains(e,b6[bY]))){bZ.push(b3[bY])}}}else{for(bY=0;b6[bY]!=null;bY++){if(b6[bY]&&b6[bY].nodeType===1){bZ.push(b3[bY])}}}}}else{bD(b6,bZ)}if(bS){bF(bS,bR,bZ,b0);bF.uniqueSort(bZ)}return bZ};bF.uniqueSort=function(bR){if(bO){bB=bx;bR.sort(bO);if(bB){for(var e=1;e<bR.length;e++){if(bR[e]===bR[e-1]){bR.splice(e--,1)}}}}return bR};bF.matches=function(e,bR){return bF(e,null,null,bR)};bF.matchesSelector=function(e,bR){return bF(bR,null,null,[e]).length>0};bF.find=function(bW,e,bY){var bX,bS,bU,bT,bV,bR;if(!bW){return[]}for(bS=0,bU=bC.order.length;bS<bU;bS++){bV=bC.order[bS];if((bT=bC.leftMatch[bV].exec(bW))){bR=bT[1];bT.splice(1,1);if(bR.substr(bR.length-1)!=="\\"){bT[1]=(bT[1]||"").replace(bP,"");bX=bC.find[bV](bT,e,bY);if(bX!=null){bW=bW.replace(bC.match[bV],"");break}}}}if(!bX){bX=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bX,expr:bW}};bF.filter=function(b1,b2,b5,bS){var bU,bY,bZ,b6,b4,bX,bR,bT,b3,e=b1,b0=[],bW=b2,bV=b2&&b2[0]&&bF.isXML(b2[0]);while(b1&&b2.length){for(bZ in bC.filter){if((bU=bC.leftMatch[bZ].exec(b1))!=null&&bU[2]){bX=bC.filter[bZ];bR=bU[1];bY=false;bU.splice(1,1);if(bR.substr(bR.length-1)==="\\"){continue}if(bW===b0){b0=[]}if(bC.preFilter[bZ]){bU=bC.preFilter[bZ](bU,bW,b5,b0,bS,bV);if(!bU){bY=b6=true}else{if(bU===true){continue}}}if(bU){for(bT=0;(b4=bW[bT])!=null;bT++){if(b4){b6=bX(b4,bU,bT,bW);b3=bS^b6;if(b5&&b6!=null){if(b3){bY=true}else{bW[bT]=false}}else{if(b3){b0.push(b4);bY=true}}}}}if(b6!==bb){if(!b5){bW=b0}b1=b1.replace(bC.match[bZ],"");if(!bY){return[]}break}}}if(b1===e){if(bY==null){bF.error(b1)}else{break}}e=b1}return bW};bF.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var bG=bF.getText=function(bU){var bS,bT,e=bU.nodeType,bR="";if(e){if(e===1||e===9){if(typeof bU.textContent==="string"){return bU.textContent}else{if(typeof bU.innerText==="string"){return bU.innerText.replace(bN,"")}else{for(bU=bU.firstChild;bU;bU=bU.nextSibling){bR+=bG(bU)}}}}else{if(e===3||e===4){return bU.nodeValue}}}else{for(bS=0;(bT=bU[bS]);bS++){if(bT.nodeType!==8){bR+=bG(bT)}}}return bR};var bC=bF.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(bW,bS){var bR=typeof bS==="string",bV=bR&&!bQ.test(bS),bX=bR&&!bV;if(bV){bS=bS.toLowerCase()}for(var bT=0,e=bW.length,bU;bT<e;bT++){if((bU=bW[bT])){while((bU=bU.previousSibling)&&bU.nodeType!==1){}bW[bT]=bX||bU&&bU.nodeName.toLowerCase()===bS?bU||false:bU===bS}}if(bX){bF.filter(bS,bW,true)}},">":function(bW,bT){var bV,bS=typeof bT==="string",bU=0,e=bW.length;if(bS&&!bQ.test(bT)){bT=bT.toLowerCase();for(;bU<e;bU++){bV=bW[bU];if(bV){var bR=bV.parentNode;bW[bU]=bR.nodeName.toLowerCase()===bT?bR:false}}}else{for(;bU<e;bU++){bV=bW[bU];if(bV){bW[bU]=bS?bV.parentNode:bV.parentNode===bT}}if(bS){bF.filter(bT,bW,true)}}},"":function(bT,bR,bV){var bU,bS=bI++,e=bK;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("parentNode",bR,bS,bT,bU,bV)},"~":function(bT,bR,bV){var bU,bS=bI++,e=bK;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("previousSibling",bR,bS,bT,bU,bV)}},find:{ID:function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var e=bS.getElementById(bR[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bS,bV){if(typeof bV.getElementsByName!=="undefined"){var bR=[],bU=bV.getElementsByName(bS[1]);for(var bT=0,e=bU.length;bT<e;bT++){if(bU[bT].getAttribute("name")===bS[1]){bR.push(bU[bT])}}return bR.length===0?null:bR}},TAG:function(e,bR){if(typeof bR.getElementsByTagName!=="undefined"){return bR.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bS,e,bR,bW,bV,bX){bS=" "+bS[1].replace(bP,"")+" ";if(bX){return bS}for(var bT=0,bU;(bU=e[bT])!=null;bT++){if(bU){if(bV^(bU.className&&(" "+bU.className+" ").replace(/[\t\n\r]/g," ").indexOf(bS)>=0)){if(!bR){bW.push(bU)}}else{if(bR){e[bT]=false}}}}return false},ID:function(e){return e[1].replace(bP,"")},TAG:function(bR,e){return bR[1].replace(bP,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bF.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){bF.error(e[0])}}e[0]=bI++;return e},ATTR:function(bT,e,bR,bV,bU,bW){var bS=bT[1]=bT[1].replace(bP,"");if(!bW&&bC.attrMap[bS]){bT[1]=bC.attrMap[bS]}bT[4]=(bT[4]||bT[5]||"").replace(bP,"");if(bT[2]==="~="){bT[4]=" "+bT[4]+" "}return bT},PSEUDO:function(bT,e,bR,bV,bU){if(bT[1]==="not"){if((bH.exec(bT[3])||"").length>1||/^\w/.test(bT[3])){bT[3]=bF(bT[3],null,null,e)}else{var bS=bF.filter(bT[3],e,bR,true^bU);if(!bR){bV.push.apply(bV,bS)}return false}}else{if(bC.match.POS.test(bT[0])||bC.match.CHILD.test(bT[0])){return true}}return bT},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(bS,bR,e){return !!bF(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||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(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.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(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bR<e[3]-0},gt:function(bS,bR,e){return bR>e[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bW,bV,bY){var e=bW[1],bX=bC.filters[e];if(bX){return bX(bS,bV,bW,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bG([bS])||"").indexOf(bW[3])>=0}else{if(e==="not"){var bR=bW[3];for(var bU=0,bT=bR.length;bU<bT;bU++){if(bR[bU]===bS){return false}}return true}else{bF.error(e)}}}},CHILD:function(bS,bT){var bU,bZ,bW,b0,e,bV,bY,bX=bT[1],bR=bS;switch(bX){case"only":case"first":while((bR=bR.previousSibling)){if(bR.nodeType===1){return false}}if(bX==="first"){return true}bR=bS;case"last":while((bR=bR.nextSibling)){if(bR.nodeType===1){return false}}return true;case"nth":bU=bT[2];bZ=bT[3];if(bU===1&&bZ===0){return true}bW=bT[0];b0=bS.parentNode;if(b0&&(b0[bA]!==bW||!bS.nodeIndex)){bV=0;for(bR=b0.firstChild;bR;bR=bR.nextSibling){if(bR.nodeType===1){bR.nodeIndex=++bV}}b0[bA]=bW}bY=bS.nodeIndex-bZ;if(bU===0){return bY===0}else{return(bY%bU===0&&bY/bU>=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bU,bS){var bR=bS[1],bW=bF.attr?bF.attr(bU,bR):bC.attrHandle[bR]?bC.attrHandle[bR](bU):bU[bR]!=null?bU[bR]:bU.getAttribute(bR),bV=bW+"",bT=bS[2],e=bS[4];return bW==null?bT==="!=":!bT&&bF.attr?bW!=null:bT==="="?bV===e:bT==="*="?bV.indexOf(e)>=0:bT==="~="?(" "+bV+" ").indexOf(e)>=0:!e?bV&&bW!==false:bT==="!="?bV!==e:bT==="^="?bV.indexOf(e)===0:bT==="$="?bV.substr(bV.length-e.length)===e:bT==="|="?bV===e||bV.substr(0,e.length+1)===e+"-":false},POS:function(bU,bS,bT,bV){var bR=bS[2],e=bC.setFilters[bR];if(e){return e(bU,bT,bS,bV)}}}};var bz=bC.match.POS,bE=function(bR,e){return"\\"+(e-0+1)};for(var by in bC.match){bC.match[by]=new RegExp(bC.match[by].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bC.leftMatch[by]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bC.match[by].source.replace(/\\(\d+)/g,bE))}var bD=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(ah.documentElement.childNodes,0)[0].nodeType}catch(bM){bD=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS<e;bS++){bR.push(bU[bS])}}else{for(;bU[bS];bS++){bR.push(bU[bS])}}}return bR}}var bO,bw;if(ah.documentElement.compareDocumentPosition){bO=function(bR,e){if(bR===e){bB=true;return 0}if(!bR.compareDocumentPosition||!e.compareDocumentPosition){return bR.compareDocumentPosition?-1:1}return bR.compareDocumentPosition(e)&4?-1:1}}else{bO=function(bY,bW){if(bY===bW){bB=true;return 0}else{if(bY.sourceIndex&&bW.sourceIndex){return bY.sourceIndex-bW.sourceIndex}}var bV,bR,bS=[],e=[],bU=bY.parentNode,bX=bW.parentNode,bZ=bU;if(bU===bX){return bw(bY,bW)}else{if(!bU){return -1}else{if(!bX){return 1}}}while(bZ){bS.unshift(bZ);bZ=bZ.parentNode}bZ=bX;while(bZ){e.unshift(bZ);bZ=bZ.parentNode}bV=bS.length;bR=e.length;for(var bT=0;bT<bV&&bT<bR;bT++){if(bS[bT]!==e[bT]){return bw(bS[bT],e[bT])}}return bT===bV?bw(bY,e[bT],-1):bw(bS[bT],bW,1)};bw=function(bR,e,bS){if(bR===e){return bS}var bT=bR.nextSibling;while(bT){if(bT===e){return -1}bT=bT.nextSibling}return 1}}(function(){var bR=ah.createElement("div"),bS="script"+(new Date()).getTime(),e=ah.documentElement;bR.innerHTML="<a name='"+bS+"'/>";e.insertBefore(bR,e.firstChild);if(ah.getElementById(bS)){bC.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:bb:[]}};bC.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=ah.createElement("div");e.appendChild(ah.createComment(""));if(e.getElementsByTagName("*").length>0){bC.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bC.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(ah.querySelectorAll){(function(){var e=bF,bT=ah.createElement("div"),bS="__sizzle__";bT.innerHTML="<p class='TEST'></p>";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}bF=function(b4,bV,bX,b1){bV=bV||ah;if(!b1&&!bF.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bD(bV.getElementsByTagName(b4),bX)}else{if(b2[2]&&bC.find.CLASS&&bV.getElementsByClassName){return bD(bV.getElementsByClassName(b2[2]),bX)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bD([bV.body],bX)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bD([bY],bX)}}else{return bD([],bX)}}}try{return bD(bV.querySelectorAll(b4),bX)}catch(bZ){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var b3=bV,bW=bV.getAttribute("id"),bU=bW||bS,b5=bV.parentNode,b6=/^\s*[+~]/.test(b4);if(!bW){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b6&&b5){bV=bV.parentNode}try{if(!b6||b5){return bD(bV.querySelectorAll("[id='"+bU+"'] "+b4),bX)}}catch(b0){}finally{if(!bW){b3.removeAttribute("id")}}}}}return e(b4,bV,bX,b1)};for(var bR in e){bF[bR]=e[bR]}bT=null})()}(function(){var e=ah.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(ah.createElement("div"),"div"),bR=false;try{bS.call(ah.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}bF.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bF.isXML(bW)){try{if(bR||!bC.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return bF(bY,null,null,[bW]).length>0}}})();(function(){var e=ah.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}bC.order.splice(1,0,"CLASS");bC.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bX,bV,bY,bW,bZ){for(var bT=0,bS=bY.length;bT<bS;bT++){var e=bY[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bA]===bV){bU=bY[e.sizset];break}if(e.nodeType===1&&!bZ){e[bA]=bV;e.sizset=bT}if(e.nodeName.toLowerCase()===bX){bU=e;break}e=e[bR]}bY[bT]=bU}}}function bK(bR,bX,bV,bY,bW,bZ){for(var bT=0,bS=bY.length;bT<bS;bT++){var e=bY[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bA]===bV){bU=bY[e.sizset];break}if(e.nodeType===1){if(!bZ){e[bA]=bV;e.sizset=bT}if(typeof bX!=="string"){if(e===bX){bU=true;break}}else{if(bF.filter(bX,[e]).length>0){bU=e;break}}}e=e[bR]}bY[bT]=bU}}}if(ah.documentElement.contains){bF.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(ah.documentElement.compareDocumentPosition){bF.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{bF.contains=function(){return false}}}bF.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bJ=function(bS,e,bV){var bW,bY=[],bT="",bX=e.nodeType?[e]:e;while((bW=bC.match.PSEUDO.exec(bS))){bT+=bW[0];bS=bS.replace(bC.match.PSEUDO,"")}bS=bC.relative[bS]?bS+"*":bS;for(var bU=0,bR=bX.length;bU<bR;bU++){bF(bS,bX[bU],bY,bV)}return bF.filter(bT,bY)};bF.attr=p.attr;bF.selectors.attrMap={};p.find=bF;p.expr=bF.selectors;p.expr[":"]=p.expr.filters;p.unique=bF.uniqueSort;p.text=bF.getText;p.isXMLDoc=bF.isXML;p.contains=bF.contains})();var aU=/Until$/,aH=/^(?:parents|prevUntil|prevAll)/,bc=/,/,v=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,I=p.expr.match.POS,aC={children:true,contents:true,next:true,prev:true};p.fn.extend({find:function(e){var bx=this,bz,bw;if(typeof e!=="string"){return p(e).filter(function(){for(bz=0,bw=bx.length;bz<bw;bz++){if(p.contains(bx[bz],this)){return true}}})}var by=this.pushStack("","find",e),bv,bB,bA;for(bz=0,bw=this.length;bz<bw;bz++){bv=by.length;p.find(e,this[bz],by);if(bz>0){for(bB=bv;bB<by.length;bB++){for(bA=0;bA<bv;bA++){if(by[bA]===by[bB]){by.splice(bB--,1);break}}}}}return by},has:function(bv){var e=p(bv);return this.filter(function(){for(var bx=0,bw=e.length;bx<bw;bx++){if(p.contains(this,e[bx])){return true}}})},not:function(e){return this.pushStack(av(this,e,false),"not",e)},filter:function(e){return this.pushStack(av(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?I.test(e)?p(e,this.context).index(this[0])>=0:p.filter(e,this).length>0:this.filter(e).length>0)},closest:function(bw,by){var bv=[],bx,e,bz=this[0];if(p.isArray(bw)){var bB=1;while(bz&&bz.ownerDocument&&bz!==by){for(bx=0;bx<bw.length;bx++){if(p(bz).is(bw[bx])){bv.push({selector:bw[bx],elem:bz,level:bB})}}bz=bz.parentNode;bB++}return bv}var bA=I.test(bw)||typeof bw!=="string"?p(bw,by||this.context):0;for(bx=0,e=this.length;bx<e;bx++){bz=this[bx];while(bz){if(bA?bA.index(bz)>-1:p.find.matchesSelector(bz,bw)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===by||bz.nodeType===11){break}}}}bv=bv.length>1?p.unique(bv):bv;return this.pushStack(bv,"closest",bw)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return p.inArray(this[0],p(e))}return p.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?p(e,bv):p.makeArray(e&&e.nodeType?[e]:e),bw=p.merge(this.get(),bx);return this.pushStack(bh(bx[0])||bh(bw[0])?bw:p.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function bh(e){return !e||!e.parentNode||e.parentNode.nodeType===11}p.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return p.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return p.dir(bv,"parentNode",bw)},next:function(e){return p.nth(e,2,"nextSibling")},prev:function(e){return p.nth(e,2,"previousSibling")},nextAll:function(e){return p.dir(e,"nextSibling")},prevAll:function(e){return p.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return p.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return p.dir(bv,"previousSibling",bw)},siblings:function(e){return p.sibling(e.parentNode.firstChild,e)},children:function(e){return p.sibling(e.firstChild)},contents:function(e){return p.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:p.makeArray(e.childNodes)}},function(e,bv){p.fn[e]=function(by,bw){var bx=p.map(this,bv,by);if(!aU.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=p.filter(bw,bx)}bx=this.length>1&&!aC[e]?p.unique(bx):bx;if((this.length>1||bc.test(bw))&&aH.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});p.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?p.find.matchesSelector(e[0],bw)?[e[0]]:[]:p.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===bb||bx.nodeType!==1||!p(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,bx,bv,bw){bx=bx||1;var e=0;for(;by;by=by[bv]){if(by.nodeType===1&&++e===bx){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function av(e,bw,bv){bw=bw||0;if(p.isFunction(bw)){return p.grep(e,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===bv})}else{if(bw.nodeType){return p.grep(e,function(bz,by){return(bz===bw)===bv})}else{if(typeof bw==="string"){var bx=p.grep(e,function(by){return by.nodeType===1});if(v.test(bw)){return p.filter(bw,bx,!bv)}else{bw=p.filter(bw,bx)}}}}return p.grep(e,function(bz,by){return(p.inArray(bz,bw)>=0)===bv})}function s(e){var bw=aG.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aG="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aa=/ jQuery\d+="(?:\d+|null)"/g,af=/^\s+/,Q=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,l=/<([\w:]+)/,bo=/<tbody/i,U=/<|&#?\w+;/,aR=/<(?:script|style)/i,a8=/<(?:script|object|embed|option|style)/i,aN=new RegExp("<(?:"+aG+")","i"),n=/checked\s*(?:[^=]|=\s*.checked.)/i,bl=/\/(java|ecma)script/i,aB=/^\s*<!(?:\[CDATA\[|\-\-)/,ak={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,"",""]},X=s(ah);ak.optgroup=ak.option;ak.tbody=ak.tfoot=ak.colgroup=ak.caption=ak.thead;ak.th=ak.td;if(!p.support.htmlSerialize){ak._default=[1,"div<div>","</div>"]}p.fn.extend({text:function(e){if(p.isFunction(e)){return this.each(function(bw){var bv=p(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==bb){return this.empty().append((this[0]&&this[0].ownerDocument||ah).createTextNode(e))}return p.text(this)},wrapAll:function(e){if(p.isFunction(e)){return this.each(function(bw){p(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=p(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(p.isFunction(e)){return this.each(function(bv){p(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bw=p(this),bv=bw.contents();if(bv.length){bv.wrapAll(e)}else{bw.append(e)}})},wrap:function(e){var bv=p.isFunction(e);return this.each(function(bw){p(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!p.nodeName(this,"body")){p(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(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=p.clean(arguments);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(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,p.clean(arguments));return e}}},remove:function(bv,e){for(var bw=0,bx;(bx=this[bw])!=null;bw++){if(!bv||p.filter(bv,[bx]).length){if(!e&&bx.nodeType===1){p.cleanData(bx.getElementsByTagName("*"));p.cleanData([bx])}if(bx.parentNode){bx.parentNode.removeChild(bx)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){p.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return p.clone(this,bv,e)})},html:function(bx){if(bx===bb){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(aa,""):null}else{if(typeof bx==="string"&&!aR.test(bx)&&(p.support.leadingWhitespace||!af.test(bx))&&!ak[(l.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(Q,"<$1></$2>");try{for(var bw=0,bv=this.length;bw<bv;bw++){if(this[bw].nodeType===1){p.cleanData(this[bw].getElementsByTagName("*"));this[bw].innerHTML=bx}}}catch(by){this.empty().append(bx)}}else{if(p.isFunction(bx)){this.each(function(bz){var e=p(this);e.html(bx.call(this,bz,e.html()))})}else{this.empty().append(bx)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(p.isFunction(e)){return this.each(function(bx){var bw=p(this),bv=bw.html();bw.replaceWith(e.call(this,bx,bv))})}if(typeof e!=="string"){e=p(e).detach()}return this.each(function(){var bw=this.nextSibling,bv=this.parentNode;p(this).remove();if(bw){p(bw).before(e)}else{p(bv).append(e)}})}else{return this.length?this.pushStack(p(p.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bB,bF,bD){var by,bz,e,bE,bC=bB[0],bw=[];if(!p.support.checkClone&&arguments.length===3&&typeof bC==="string"&&n.test(bC)){return this.each(function(){p(this).domManip(bB,bF,bD,true)})}if(p.isFunction(bC)){return this.each(function(bH){var bG=p(this);bB[0]=bC.call(this,bH,bF?bG.html():bb);bG.domManip(bB,bF,bD)})}if(this[0]){bE=bC&&bC.parentNode;if(p.support.parentNode&&bE&&bE.nodeType===11&&bE.childNodes.length===this.length){by={fragment:bE}}else{by=p.buildFragment(bB,this,bw)}e=by.fragment;if(e.childNodes.length===1){bz=e=e.firstChild}else{bz=e.firstChild}if(bz){bF=bF&&p.nodeName(bz,"tr");for(var bx=0,bv=this.length,bA=bv-1;bx<bv;bx++){bD.call(bF?ba(this[bx],bz):this[bx],by.cacheable||(bv>1&&bx<bA)?p.clone(e,true,true):e)}}if(bw.length){p.each(bw,w)}}return this}});function ba(e,bv){return p.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function t(bB,bw){if(bw.nodeType!==1||!p.hasData(bB)){return}var by,bx,e,bA=p._data(bB),bz=p._data(bw,bA),bv=bA.events;if(bv){delete bz.handle;bz.events={};for(by in bv){for(bx=0,e=bv[by].length;bx<e;bx++){p.event.add(bw,by+(bv[by][bx].namespace?".":"")+bv[by][bx].namespace,bv[by][bx],bv[by][bx].data)}}}if(bz.data){bz.data=p.extend({},bz.data)}}function ab(bv,e){var bw;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bv)}bw=e.nodeName.toLowerCase();if(bw==="object"){e.outerHTML=bv.outerHTML}else{if(bw==="input"&&(bv.type==="checkbox"||bv.type==="radio")){if(bv.checked){e.defaultChecked=e.checked=bv.checked}if(e.value!==bv.value){e.value=bv.value}}else{if(bw==="option"){e.selected=bv.defaultSelected}else{if(bw==="input"||bw==="textarea"){e.defaultValue=bv.defaultValue}}}}e.removeAttribute(p.expando)}p.buildFragment=function(bx,bw,e){var by,bz,bv,bA,bB=bx[0];if(bw&&bw[0]){bA=bw[0].ownerDocument||bw[0]}if(!bA.createDocumentFragment){bA=ah}if(bx.length===1&&typeof bB==="string"&&bB.length<512&&bA===ah&&bB.charAt(0)==="<"&&!a8.test(bB)&&(p.support.checkClone||!n.test(bB))&&(p.support.html5Clone||!aN.test(bB))){bz=true;bv=p.fragments[bB];if(bv&&bv!==1){by=bv}}if(!by){by=bA.createDocumentFragment();p.clean(bx,bA,by,e)}if(bz){p.fragments[bB]=bv?by:1}return{fragment:by,cacheable:bz}};p.fragments={};p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bv){p.fn[e]=function(bx){var bB=[],bw=p(bx),bA=this.length===1&&this[0].parentNode;if(bA&&bA.nodeType===11&&bA.childNodes.length===1&&bw.length===1){bw[bv](this[0]);return this}else{for(var bC=0,by=bw.length;bC<by;bC++){var bz=(bC>0?this.clone(true):this).get();p(bw[bC])[bv](bz);bB=bB.concat(bz)}return this.pushStack(bB,e,bw.selector)}}});function E(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function aj(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function bg(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){aj(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){p.grep(e.getElementsByTagName("input"),aj)}}}function aK(e){var bv=ah.createElement("div");X.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}p.extend({clone:function(by,bz,bx){var e,bw,bv,bA=p.support.html5Clone||!aN.test("<"+by.nodeName)?by.cloneNode(true):aK(by);if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!p.isXMLDoc(by)){ab(by,bA);e=E(by);bw=E(bA);for(bv=0;e[bv];++bv){if(bw[bv]){ab(e[bv],bw[bv])}}}if(bz){t(by,bA);if(bx){e=E(by);bw=E(bA);for(bv=0;e[bv];++bv){t(e[bv],bw[bv])}}}e=bw=null;return bA},clean:function(bw,bz,by,bB){var bG;bz=bz||ah;if(typeof bz.createElement==="undefined"){bz=bz.ownerDocument||bz[0]&&bz[0].ownerDocument||ah}var bI=[],bC;for(var bF=0,bA;(bA=bw[bF])!=null;bF++){if(typeof bA==="number"){bA+=""}if(!bA){continue}if(typeof bA==="string"){if(!U.test(bA)){bA=bz.createTextNode(bA)}else{bA=bA.replace(Q,"<$1></$2>");var bK=(l.exec(bA)||["",""])[1].toLowerCase(),bx=ak[bK]||ak._default,bE=bx[0],bv=bz.createElement("div");if(bz===ah){X.appendChild(bv)}else{s(bz).appendChild(bv)}bv.innerHTML=bx[1]+bA+bx[2];while(bE--){bv=bv.lastChild}if(!p.support.tbody){var e=bo.test(bA),bD=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]==="<table>"&&!e?bv.childNodes:[];for(bC=bD.length-1;bC>=0;--bC){if(p.nodeName(bD[bC],"tbody")&&!bD[bC].childNodes.length){bD[bC].parentNode.removeChild(bD[bC])}}}if(!p.support.leadingWhitespace&&af.test(bA)){bv.insertBefore(bz.createTextNode(af.exec(bA)[0]),bv.firstChild)}bA=bv.childNodes}}var bH;if(!p.support.appendChecked){if(bA[0]&&typeof(bH=bA.length)==="number"){for(bC=0;bC<bH;bC++){bg(bA[bC])}}else{bg(bA)}}if(bA.nodeType){bI.push(bA)}else{bI=p.merge(bI,bA)}}if(by){bG=function(bL){return !bL.type||bl.test(bL.type)};for(bF=0;bI[bF];bF++){if(bB&&p.nodeName(bI[bF],"script")&&(!bI[bF].type||bI[bF].type.toLowerCase()==="text/javascript")){bB.push(bI[bF].parentNode?bI[bF].parentNode.removeChild(bI[bF]):bI[bF])}else{if(bI[bF].nodeType===1){var bJ=p.grep(bI[bF].getElementsByTagName("script"),bG);bI.splice.apply(bI,[bF+1,0].concat(bJ))}by.appendChild(bI[bF])}}}return bI},cleanData:function(bv){var bB,bx,e=p.cache,bw=p.event.special,by=p.support.deleteExpando;for(var bA=0,bz;(bz=bv[bA])!=null;bA++){if(bz.nodeName&&p.noData[bz.nodeName.toLowerCase()]){continue}bx=bz[p.expando];if(bx){bB=e[bx];if(bB&&bB.events){for(var bC in bB.events){if(bw[bC]){p.event.remove(bz,bC)}else{p.removeEvent(bz,bC,bB.handle)}}if(bB.handle){bB.handle.elem=null}}if(by){delete bz[p.expando]}else{if(bz.removeAttribute){bz.removeAttribute(p.expando)}}delete e[bx]}}}});function w(e,bv){if(bv.src){p.ajax({url:bv.src,async:false,dataType:"script"})}else{p.globalEval((bv.text||bv.textContent||bv.innerHTML||"").replace(aB,"/*$0*/"))}if(bv.parentNode){bv.parentNode.removeChild(bv)}}var aM=/alpha\([^)]*\)/i,aD=/opacity=([^)]*)/,bj=/([A-Z]|^ms)/g,H=/^-?\d+(?:px)?$/i,bn=/^-?\d/,K=/^([\-+])=([\-+.\de]+)/,a7={position:"absolute",visibility:"hidden",display:"block"},aJ=["Left","Right"],a0=["Top","Bottom"],aV,au,aS;p.fn.css=function(e,bv){if(arguments.length===2&&bv===bb){return this}return p.access(this,e,bv,true,function(bx,bw,by){return by!==bb?p.style(bx,bw,by):p.css(bx,bw)})};p.extend({cssHooks:{opacity:{get:function(bw,e){if(e){var bv=aV(bw,"opacity","opacity");return bv===""?"1":bv}else{return bw.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(by,bv,bD,bx){if(!by||by.nodeType===3||by.nodeType===8||!by.style){return}var bB,bC,bz=p.camelCase(bv),bw=by.style,bE=p.cssHooks[bz];bv=p.cssProps[bz]||bz;if(bD!==bb){bC=typeof bD;if(bC==="string"&&(bB=K.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(p.css(by,bv));bC="number"}if(bD==null||bC==="number"&&isNaN(bD)){return}if(bC==="number"&&!p.cssNumber[bz]){bD+="px"}if(!bE||!("set" in bE)||(bD=bE.set(by,bD))!==bb){try{bw[bv]=bD}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(by,false,bx))!==bb){return bB}return bw[bv]}},css:function(by,bx,bv){var bw,e;bx=p.camelCase(bx);e=p.cssHooks[bx];bx=p.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float"}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==bb){return bw}else{if(aV){return aV(by,bx)}}},swap:function(bx,bw,by){var e={};for(var bv in bw){e[bv]=bx.style[bv];bx.style[bv]=bw[bv]}by.call(bx);for(bv in bw){bx.style[bv]=e[bv]}}});p.curCSS=p.css;p.each(["height","width"],function(bv,e){p.cssHooks[e]={get:function(by,bx,bw){var bz;if(bx){if(by.offsetWidth!==0){return o(by,e,bw)}else{p.swap(by,a7,function(){bz=o(by,e,bw)})}return bz}},set:function(bw,bx){if(H.test(bx)){bx=parseFloat(bx);if(bx>=0){return bx+"px"}}else{return bx}}}});if(!p.support.opacity){p.cssHooks.opacity={get:function(bv,e){return aD.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,bw=p.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",e=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&p.trim(e.replace(aM,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=aM.test(e)?e.replace(aM,bw):e+" "+bw}}}p(function(){if(!p.support.reliableMarginRight){p.cssHooks.marginRight={get:function(bw,e){var bv;p.swap(bw,{display:"inline-block"},function(){if(e){bv=aV(bw,"margin-right","marginRight")}else{bv=bw.style.marginRight}});return bv}}}});if(ah.defaultView&&ah.defaultView.getComputedStyle){au=function(by,bx){var bw,e,bv;bx=bx.replace(bj,"-$1").toLowerCase();if((e=by.ownerDocument.defaultView)&&(bv=e.getComputedStyle(by,null))){bw=bv.getPropertyValue(bx);if(bw===""&&!p.contains(by.ownerDocument.documentElement,by)){bw=p.style(by,bx)}}return bw}}if(ah.documentElement.currentStyle){aS=function(by,bv){var bA,bz,bx,e=by.currentStyle&&by.currentStyle[bv],bw=by.style;if(e===null&&bw&&(bx=bw[bv])){e=bx}if(!H.test(e)&&bn.test(e)){bA=bw.left;bz=by.runtimeStyle&&by.runtimeStyle.left;if(bz){by.runtimeStyle.left=by.currentStyle.left}bw.left=bv==="fontSize"?"1em":(e||0);e=bw.pixelLeft+"px";bw.left=bA;if(bz){by.runtimeStyle.left=bz}}return e===""?"auto":e}}aV=au||aS;function o(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?aJ:a0,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx<e;bx++){if(!bv){bA-=parseFloat(p.css(by,"padding"+bz[bx]))||0}if(bv==="margin"){bA+=parseFloat(p.css(by,bv+bz[bx]))||0}else{bA-=parseFloat(p.css(by,"border"+bz[bx]+"Width"))||0}}}return bA+"px"}bA=aV(by,bw,bw);if(bA<0||bA==null){bA=by.style[bw]||0}bA=parseFloat(bA)||0;if(bv){for(;bx<e;bx++){bA+=parseFloat(p.css(by,"padding"+bz[bx]))||0;if(bv!=="padding"){bA+=parseFloat(p.css(by,"border"+bz[bx]+"Width"))||0}if(bv==="margin"){bA+=parseFloat(p.css(by,bv+bz[bx]))||0}}}return bA+"px"}if(p.expr&&p.expr.filters){p.expr.filters.hidden=function(bv){var e=bv.offsetWidth,bw=bv.offsetHeight;return(e===0&&bw===0)||(!p.support.reliableHiddenOffsets&&((bv.style&&bv.style.display)||p.css(bv,"display"))==="none")};p.expr.filters.visible=function(e){return !p.expr.filters.hidden(e)}}var g=/%20/g,ae=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,ao=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,W=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ay=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aF=/^(?:GET|HEAD)$/,m=/^\/\//,a9=/\?/,a6=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,c=/\s+/,br=/([?&])_=[^&]*/,M=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,y=p.fn.load,aT={},a={},aq,r,aP=["*/"]+["*"];try{aq=bk.href}catch(ai){aq=ah.createElement("a");aq.href="";aq=aq.href}r=M.exec(aq.toLowerCase())||[];function i(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(p.isFunction(bA)){var bx=by.toLowerCase().split(c),bz=0,bv=bx.length,bw,bB,bC;for(;bz<bv;bz++){bw=bx[bz];bC=/^\+/.test(bw);if(bC){bw=bw.substr(1)||"*"}bB=e[bw]=e[bw]||[];bB[bC?"unshift":"push"](bA)}}}}function Z(bw,bB,bv,bD,bC,bx){bC=bC||bB.dataTypes[0];bx=bx||{};bx[bC]=true;var bA=bw[bC],by=0,bz=bA?bA.length:0,e=(bw===aT),bE;for(;by<bz&&(e||!bE);by++){bE=bA[by](bB,bv,bD);if(typeof bE==="string"){if(!e||bx[bE]){bE=bb}else{bB.dataTypes.unshift(bE);bE=Z(bw,bB,bv,bD,bE,bx)}}}if((e||!bE)&&!bx["*"]){bE=Z(bw,bB,bv,bD,"*",bx)}return bE}function aI(by,bx){var bv,e,bw=p.ajaxSettings.flatOptions||{};for(bv in bx){if(bx[bv]!==bb){(bw[bv]?by:(e||(e={})))[bv]=bx[bv]}}if(e){p.extend(true,by,e)}}p.fn.extend({load:function(bw,bA,by){if(typeof bw!=="string"&&y){return y.apply(this,arguments)}else{if(!this.length){return this}}var bz=bw.indexOf(" ");if(bz>=0){var e=bw.slice(bz,bw.length);bw=bw.slice(0,bz)}var bx="GET";if(bA){if(p.isFunction(bA)){by=bA;bA=bb}else{if(typeof bA==="object"){bA=p.param(bA,p.ajaxSettings.traditional);bx="POST"}}}var bv=this;p.ajax({url:bw,type:bx,dataType:"html",data:bA,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?p("<div>").append(bD.replace(a6,"")).find(e):bD)}if(by){bv.each(by,[bD,bB,bC])}}});return this},serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||W.test(this.type))}).map(function(e,bv){var bw=p(this).val();return bw==null?null:p.isArray(bw)?p.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){p.fn[bv]=function(bw){return this.on(bv,bw)}});p.each(["get","post"],function(e,bv){p[bv]=function(bw,by,bz,bx){if(p.isFunction(by)){bx=bx||bz;bz=by;by=bb}return p.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});p.extend({getScript:function(e,bv){return p.get(e,bb,bv,"script")},getJSON:function(e,bv,bw){return p.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){aI(bv,p.ajaxSettings)}else{e=bv;bv=p.ajaxSettings}aI(bv,e);return bv},ajaxSettings:{url:aq,isLocal:ay.test(r[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","*":aP},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":J.String,"text html":true,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:i(aT),ajaxTransport:i(a),ajax:function(bz,bA){if(typeof bz==="object"){bA=bz;bz=bb}bA=bA||{};var bD=p.ajaxSetup({},bA),bR=bD.context||bD,bP=bR!==bD&&(bR.nodeType||bR instanceof p)?p(bR):p.event,bS=p.Deferred(),bN=p.Callbacks("once memory"),bB=bD.statusCode||{},bw,bO={},bH={},bF,bx,bL,bE,bI,by=0,bC,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!by){var e=bT.toLowerCase();bT=bH[e]=bH[e]||bT;bO[bT]=bU}return this},getAllResponseHeaders:function(){return by===2?bF:null},getResponseHeader:function(bT){var e;if(by===2){if(!bx){bx={};while((e=ao.exec(bF))){bx[e[1].toLowerCase()]=e[2]}}e=bx[bT.toLowerCase()]}return e===bb?null:e},overrideMimeType:function(e){if(!by){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bG(0,e);return this}};function bG(bY,b0,bU,bX){if(by===2){return}by=2;if(bE){clearTimeout(bE)}bL=bb;bF=bX||"";bJ.readyState=bY>0?4:0;var bT,b4,b3,bW=b0,bZ=bU?bi(bD,bJ,bU):bb,bV,b2;if(bY>=200&&bY<300||bY===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){p.lastModified[bw]=bV}if((b2=bJ.getResponseHeader("Etag"))){p.etag[bw]=b2}}if(bY===304){bW="notmodified";bT=true}else{try{b4=G(bD,bZ);bW="success";bT=true}catch(b1){bW="parsererror";b3=b1}}}else{b3=bW;if(!bW||bY){bW="error";if(bY<0){bY=0}}}bJ.status=bY;bJ.statusText=""+(b0||bW);if(bT){bS.resolveWith(bR,[b4,bW,bJ])}else{bS.rejectWith(bR,[bJ,bW,b3])}bJ.statusCode(bB);bB=bb;if(bC){bP.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bR,[bJ,bW]);if(bC){bP.trigger("ajaxComplete",[bJ,bD]);if(!(--p.active)){p.event.trigger("ajaxStop")}}}bS.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(by<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(m,r[1]+"//");bD.dataTypes=p.trim(bD.dataType||"*").toLowerCase().split(c);if(bD.crossDomain==null){bI=M.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=r[1]||bI[2]!=r[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(r[3]||(r[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=p.param(bD.data,bD.traditional)}Z(aT,bD,bA,bJ);if(by===2){return false}bC=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aF.test(bD.type);if(bC&&p.active++===0){p.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(a9.test(bD.url)?"&":"?")+bD.data;delete bD.data}bw=bD.url;if(bD.cache===false){var bv=p.now(),bQ=bD.url.replace(br,"$1_="+bv);bD.url=bQ+((bQ===bD.url)?(a9.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bA.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bw=bw||bD.url;if(p.lastModified[bw]){bJ.setRequestHeader("If-Modified-Since",p.lastModified[bw])}if(p.etag[bw]){bJ.setRequestHeader("If-None-Match",p.etag[bw])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aP+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bR,bJ,bD)===false||by===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=Z(a,bD,bA,bJ);if(!bL){bG(-1,"No Transport")}else{bJ.readyState=1;if(bC){bP.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{by=1;bL.send(bO,bG)}catch(bM){if(by<2){bG(-1,bM)}else{throw bM}}}return bJ},param:function(bw,bv){var bx=[],by=function(bz,bA){bA=p.isFunction(bA)?bA():bA;bx[bx.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bv===bb){bv=p.ajaxSettings.traditional}if(p.isArray(bw)||(bw.jquery&&!p.isPlainObject(bw))){p.each(bw,function(){by(this.name,this.value)})}else{for(var e in bw){bp(e,bw[e],bv,by)}}return bx.join("&").replace(g,"+")}});function bp(e,by,bv,bx){if(p.isArray(by)){p.each(by,function(bA,bz){if(bv||ae.test(e)){bx(e,bz)}else{bp(e+"["+(typeof bz==="object"||p.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var bw in by){bp(e+"["+bw+"]",by[bw],bv,bx)}}else{bx(e,by)}}}p.extend({active:0,lastModified:{},etag:{}});function bi(bD,bB,e){var by=bD.contents,bC=bD.dataTypes,bw=bD.responseFields,bz,bA,bv,bx;for(bA in bw){if(bA in e){bB[bw[bA]]=e[bA]}}while(bC[0]==="*"){bC.shift();if(bz===bb){bz=bD.mimeType||bB.getResponseHeader("content-type")}}if(bz){for(bA in by){if(by[bA]&&by[bA].test(bz)){bC.unshift(bA);break}}}if(bC[0] in e){bv=bC[0]}else{for(bA in e){if(!bC[0]||bD.converters[bA+" "+bC[0]]){bv=bA;break}if(!bx){bx=bA}}bv=bv||bx}if(bv){if(bv!==bC[0]){bC.unshift(bv)}return e[bv]}}function G(bH,by){if(bH.dataFilter){by=bH.dataFilter(by,bH.dataType)}var bF=bH.dataTypes,bG={},bA,bD,bB=bF.length,bz,bC=bF[0],bw,bx,bE,bv,e;for(bA=1;bA<bB;bA++){if(bA===1){for(bD in bH.converters){if(typeof bD==="string"){bG[bD.toLowerCase()]=bH.converters[bD]}}}bw=bC;bC=bF[bA];if(bC==="*"){bC=bw}else{if(bw!=="*"&&bw!==bC){bx=bw+" "+bC;bE=bG[bx]||bG["* "+bC];if(!bE){e=bb;for(bv in bG){bz=bv.split(" ");if(bz[0]===bw||bz[0]==="*"){e=bG[bz[1]+" "+bC];if(e){bv=bG[bv];if(bv===true){bE=e}else{if(e===true){bE=bv}}break}}}}if(!(bE||e)){p.error("No conversion from "+bx.replace(" "," to "))}if(bE!==true){by=bE?bE(by):e(bv(by))}}}}return by}var an=p.now(),u=/(\=)\?(&|$)|\?\?/i;p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return p.expando+"_"+(an++)}});p.ajaxPrefilter("json jsonp",function(bD,bz,bC){var by=bD.contentType==="application/x-www-form-urlencoded"&&(typeof bD.data==="string");if(bD.dataTypes[0]==="jsonp"||bD.jsonp!==false&&(u.test(bD.url)||by&&u.test(bD.data))){var bB,bA=bD.jsonpCallback=p.isFunction(bD.jsonpCallback)?bD.jsonpCallback():bD.jsonpCallback,bw=J[bA],e=bD.url,bx=bD.data,bv="$1"+bA+"$2";if(bD.jsonp!==false){e=e.replace(u,bv);if(bD.url===e){if(by){bx=bx.replace(u,bv)}if(bD.data===bx){e+=(/\?/.test(e)?"&":"?")+bD.jsonp+"="+bA}}}bD.url=e;bD.data=bx;J[bA]=function(bE){bB=[bE]};bC.always(function(){J[bA]=bw;if(bB&&p.isFunction(bw)){J[bA](bB[0])}});bD.converters["script json"]=function(){if(!bB){p.error(bA+" was not called")}return bB[0]};bD.dataTypes[0]="json";return"script"}});p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){p.globalEval(e);return e}}});p.ajaxPrefilter("script",function(e){if(e.cache===bb){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});p.ajaxTransport("script",function(bw){if(bw.crossDomain){var bv,e=ah.head||ah.getElementsByTagName("head")[0]||ah.documentElement;return{send:function(bx,by){bv=ah.createElement("script");bv.async="async";if(bw.scriptCharset){bv.charset=bw.scriptCharset}bv.src=bw.url;bv.onload=bv.onreadystatechange=function(bA,bz){if(bz||!bv.readyState||/loaded|complete/.test(bv.readyState)){bv.onload=bv.onreadystatechange=null;if(e&&bv.parentNode){e.removeChild(bv)}bv=bb;if(!bz){by(200,"success")}}};e.insertBefore(bv,e.firstChild)},abort:function(){if(bv){bv.onload(0,1)}}}}});var A=J.ActiveXObject?function(){for(var e in O){O[e](0,1)}}:false,x=0,O;function ap(){try{return new J.XMLHttpRequest()}catch(bv){}}function aL(){try{return new J.ActiveXObject("Microsoft.XMLHTTP")}catch(bv){}}p.ajaxSettings.xhr=J.ActiveXObject?function(){return !this.isLocal&&ap()||aL()}:ap;(function(e){p.extend(p.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(p.ajaxSettings.xhr());if(p.support.ajax){p.ajaxTransport(function(e){if(!e.crossDomain||p.support.cors){var bv;return{send:function(bB,bz){var bA=e.xhr(),bw,by;if(e.username){bA.open(e.type,e.url,e.async,e.username,e.password)}else{bA.open(e.type,e.url,e.async)}if(e.xhrFields){for(by in e.xhrFields){bA[by]=e.xhrFields[by]}}if(e.mimeType&&bA.overrideMimeType){bA.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((e.hasContent&&e.data)||null);bv=function(bK,bG){var bH,bE,bC,bD,bI;try{if(bv&&(bG||bA.readyState===4)){bv=bb;if(bw){bA.onreadystatechange=p.noop;if(A){delete O[bw]}}if(bG){if(bA.readyState!==4){bA.abort()}}else{bH=bA.status;bC=bA.getAllResponseHeaders();bD={};bI=bA.responseXML;if(bI&&bI.documentElement){bD.xml=bI}bD.text=bA.responseText;try{bE=bA.statusText}catch(bJ){bE=""}if(!bH&&e.isLocal&&!e.crossDomain){bH=bD.text?200:404}else{if(bH===1223){bH=204}}}}}catch(bF){if(!bG){bz(-1,bF)}}if(bD){bz(bH,bE,bD,bC)}};if(!e.async||bA.readyState===4){bv()}else{bw=++x;if(A){if(!O){O={};p(J).unload(A)}O[bw]=bv}bA.onreadystatechange=bv}},abort:function(){if(bv){bv(0,1)}}}}})}var a5={},N,j,am=/^(?:toggle|show|hide)$/,ac=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,S,at=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a2;p.fn.extend({show:function(bx,bA,bz){var bw,by;if(bx||bx===0){return this.animate(aZ("show",3),bx,bA,bz)}else{for(var bv=0,e=this.length;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(!p._data(bw,"olddisplay")&&by==="none"){by=bw.style.display=""}if(by===""&&p.css(bw,"display")==="none"){p._data(bw,"olddisplay",bm(bw.nodeName))}}}for(bv=0;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(by===""||by==="none"){bw.style.display=p._data(bw,"olddisplay")||""}}}return this}},hide:function(bx,bA,bz){if(bx||bx===0){return this.animate(aZ("hide",3),bx,bA,bz)}else{var bw,by,bv=0,e=this.length;for(;bv<e;bv++){bw=this[bv];if(bw.style){by=p.css(bw,"display");if(by!=="none"&&!p._data(bw,"olddisplay")){p._data(bw,"olddisplay",by)}}}for(bv=0;bv<e;bv++){if(this[bv].style){this[bv].style.display="none"}}return this}},_toggle:p.fn.toggle,toggle:function(bw,bv,bx){var e=typeof bw==="boolean";if(p.isFunction(bw)&&p.isFunction(bv)){this._toggle.apply(this,arguments)}else{if(bw==null||e){this.each(function(){var by=e?bw:p(this).is(":hidden");p(this)[by?"show":"hide"]()})}else{this.animate(aZ("toggle",3),bw,bv,bx)}}return this},fadeTo:function(e,bx,bw,bv){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bx},e,bw,bv)},animate:function(bz,bw,by,bx){var bv=p.speed(bw,by,bx);if(p.isEmptyObject(bz)){return this.each(bv.complete,[false])}bz=p.extend({},bz);function e(){if(bv.queue===false){p._mark(this)}var bC=p.extend({},bv),bJ=this.nodeType===1,bE=bJ&&p(this).is(":hidden"),bA,bF,bD,bI,bH,bB,bG,bL,bK;bC.animatedProperties={};for(bD in bz){bA=p.camelCase(bD);if(bD!==bA){bz[bA]=bz[bD];delete bz[bD]}bF=bz[bA];if(p.isArray(bF)){bC.animatedProperties[bA]=bF[1];bF=bz[bA]=bF[0]}else{bC.animatedProperties[bA]=bC.specialEasing&&bC.specialEasing[bA]||bC.easing||"swing"}if(bF==="hide"&&bE||bF==="show"&&!bE){return bC.complete.call(this)}if(bJ&&(bA==="height"||bA==="width")){bC.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(p.css(this,"display")==="inline"&&p.css(this,"float")==="none"){if(!p.support.inlineBlockNeedsLayout||bm(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.zoom=1}}}}if(bC.overflow!=null){this.style.overflow="hidden"}for(bD in bz){bI=new p.fx(this,bC,bD);bF=bz[bD];if(am.test(bF)){bK=p._data(this,"toggle"+bD)||(bF==="toggle"?bE?"show":"hide":0);if(bK){p._data(this,"toggle"+bD,bK==="show"?"hide":"show");bI[bK]()}else{bI[bF]()}}else{bH=ac.exec(bF);bB=bI.cur();if(bH){bG=parseFloat(bH[2]);bL=bH[3]||(p.cssNumber[bD]?"":"px");if(bL!=="px"){p.style(this,bD,(bG||1)+bL);bB=((bG||1)/bI.cur())*bB;p.style(this,bD,bB+bL)}if(bH[1]){bG=((bH[1]==="-="?-1:1)*bG)+bB}bI.custom(bB,bG,bL)}else{bI.custom(bB,bF,"")}}}return true}return bv.queue===false?this.each(e):this.queue(bv.queue,e)},stop:function(bw,e,bv){if(typeof bw!=="string"){bv=e;e=bw;bw=bb}if(e&&bw!==false){this.queue(bw||"fx",[])}return this.each(function(){var bz,by=false,bx=p.timers,bA=p._data(this);if(!bv){p._unmark(true,this)}function bB(bE,bF,bD){var bC=bF[bD];p.removeData(bE,bD,true);bC.stop(bv)}if(bw==null){for(bz in bA){if(bA[bz]&&bA[bz].stop&&bz.indexOf(".run")===bz.length-4){bB(this,bA,bz)}}}else{if(bA[bz=bw+".run"]&&bA[bz].stop){bB(this,bA,bz)}}for(bz=bx.length;bz--;){if(bx[bz].elem===this&&(bw==null||bx[bz].queue===bw)){if(bv){bx[bz](true)}else{bx[bz].saveState()}by=true;bx.splice(bz,1)}}if(!(bv&&by)){p.dequeue(this,bw)}})}});function B(){setTimeout(aE,0);return(a2=p.now())}function aE(){a2=bb}function aZ(bv,e){var bw={};p.each(at.concat.apply([],at.slice(0,e)),function(){bw[this]=bv});return bw}p.each({slideDown:aZ("show",1),slideUp:aZ("hide",1),slideToggle:aZ("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bv){p.fn[e]=function(bw,by,bx){return this.animate(bv,bw,by,bx)}});p.extend({speed:function(bw,bx,bv){var e=bw&&typeof bw==="object"?p.extend({},bw):{complete:bv||!bv&&bx||p.isFunction(bw)&&bw,duration:bw,easing:bv&&bx||bx&&!p.isFunction(bx)&&bx};e.duration=p.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in p.fx.speeds?p.fx.speeds[e.duration]:p.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(by){if(p.isFunction(e.old)){e.old.call(this)}if(e.queue){p.dequeue(this,e.queue)}else{if(by!==false){p._unmark(this)}}};return e},easing:{linear:function(bw,bx,e,bv){return e+bv*bw},swing:function(bw,bx,e,bv){return((-Math.cos(bw*Math.PI)/2)+0.5)*bv+e}},timers:[],fx:function(bv,e,bw){this.options=e;this.elem=bv;this.prop=bw;e.orig=e.orig||{}}});p.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(p.fx.step[this.prop]||p.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,bv=p.css(this.elem,this.prop);return isNaN(e=parseFloat(bv))?!bv||bv==="auto"?0:bv:e},custom:function(bz,by,bx){var e=this,bw=p.fx;this.startTime=a2||B();this.end=by;this.now=this.start=bz;this.pos=this.state=0;this.unit=bx||this.unit||(p.cssNumber[this.prop]?"":"px");function bv(bA){return e.step(bA)}bv.queue=this.options.queue;bv.elem=this.elem;bv.saveState=function(){if(e.options.hide&&p._data(e.elem,"fxshow"+e.prop)===bb){p._data(e.elem,"fxshow"+e.prop,e.start)}};if(bv()&&p.timers.push(bv)&&!S){S=setInterval(bw.tick,bw.interval)}},show:function(){var e=p._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||p.style(this.elem,this.prop);this.options.show=true;if(e!==bb){this.custom(this.cur(),e)}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur())}p(this.elem).show()},hide:function(){this.options.orig[this.prop]=p._data(this.elem,"fxshow"+this.prop)||p.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(bx){var bA,bB,bz,bw=a2||B(),e=true,by=this.elem,bv=this.options;if(bx||bw>=bv.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bv.animatedProperties[this.prop]=true;for(bA in bv.animatedProperties){if(bv.animatedProperties[bA]!==true){e=false}}if(e){if(bv.overflow!=null&&!p.support.shrinkWrapBlocks){p.each(["","X","Y"],function(bC,bD){by.style["overflow"+bD]=bv.overflow[bC]})}if(bv.hide){p(by).hide()}if(bv.hide||bv.show){for(bA in bv.animatedProperties){p.style(by,bA,bv.orig[bA]);p.removeData(by,"fxshow"+bA,true);p.removeData(by,"toggle"+bA,true)}}bz=bv.complete;if(bz){bv.complete=false;bz.call(by)}}return false}else{if(bv.duration==Infinity){this.now=bw}else{bB=bw-this.startTime;this.state=bB/bv.duration;this.pos=p.easing[bv.animatedProperties[this.prop]](this.state,bB,0,1,bv.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};p.extend(p.fx,{tick:function(){var bw,e=p.timers,bv=0;for(;bv<e.length;bv++){bw=e[bv];if(!bw()&&e[bv]===bw){e.splice(bv--,1)}}if(!e.length){p.fx.stop()}},interval:13,stop:function(){clearInterval(S);S=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){p.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.now+e.unit}else{e.elem[e.prop]=e.now}}}});p.each(["width","height"],function(e,bv){p.fx.step[bv]=function(bw){p.style(bw.elem,bv,Math.max(0,bw.now)+bw.unit)}});if(p.expr&&p.expr.filters){p.expr.filters.animated=function(e){return p.grep(p.timers,function(bv){return e===bv.elem}).length}}function bm(bx){if(!a5[bx]){var e=ah.body,bv=p("<"+bx+">").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!N){N=ah.createElement("iframe");N.frameBorder=N.width=N.height=0}e.appendChild(N);if(!j||!N.createElement){j=(N.contentWindow||N.contentDocument).document;j.write((ah.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");j.close()}bv=j.createElement(bx);j.body.appendChild(bv);bw=p.css(bv,"display");e.removeChild(N)}a5[bx]=bw}return a5[bx]}var aY=/^t(?:able|d|h)$/i,Y=/^(?:body|html)$/i;if("getBoundingClientRect" in ah.documentElement){p.fn.offset=function(bH){var by=this[0],bB;if(bH){return this.each(function(e){p.offset.setOffset(this,bH,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return p.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bI=by.ownerDocument,bw=bI.documentElement;if(!bB||!p.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bI.body,bD=ax(bI),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||p.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||p.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{p.fn.offset=function(bE){var by=this[0];if(bE){return this.each(function(bG){p.offset.setOffset(this,bE,bG)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return p.offset.bodyOffset(by)}var bB,e=by.offsetParent,bC=by,bF=by.ownerDocument,bw=bF.documentElement,bz=bF.body,bv=bF.defaultView,bA=bv?bv.getComputedStyle(by,null):by.currentStyle,bD=by.offsetTop,bx=by.offsetLeft;while((by=by.parentNode)&&by!==bz&&by!==bw){if(p.support.fixedPosition&&bA.position==="fixed"){break}bB=bv?bv.getComputedStyle(by,null):by.currentStyle;bD-=by.scrollTop;bx-=by.scrollLeft;if(by===e){bD+=by.offsetTop;bx+=by.offsetLeft;if(p.support.doesNotAddBorder&&!(p.support.doesAddBorderForTableAndCells&&aY.test(by.nodeName))){bD+=parseFloat(bB.borderTopWidth)||0;bx+=parseFloat(bB.borderLeftWidth)||0}bC=e;e=by.offsetParent}if(p.support.subtractsBorderForOverflowNotVisible&&bB.overflow!=="visible"){bD+=parseFloat(bB.borderTopWidth)||0;bx+=parseFloat(bB.borderLeftWidth)||0}bA=bB}if(bA.position==="relative"||bA.position==="static"){bD+=bz.offsetTop;bx+=bz.offsetLeft}if(p.support.fixedPosition&&bA.position==="fixed"){bD+=Math.max(bw.scrollTop,bz.scrollTop);bx+=Math.max(bw.scrollLeft,bz.scrollLeft)}return{top:bD,left:bx}}}p.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(p.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(p.css(e,"marginTop"))||0;bv+=parseFloat(p.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(e,bF,bx){var bz=p.css(e,"position");if(bz==="static"){e.style.position="relative"}var bw=p(e),bB=bw.offset(),bD=p.css(e,"top"),bG=p.css(e,"left"),bE=(bz==="absolute"||bz==="fixed")&&p.inArray("auto",[bD,bG])>-1,bC={},bA={},by,bv;if(bE){bA=bw.position();by=bA.top;bv=bA.left}else{by=parseFloat(bD)||0;bv=parseFloat(bG)||0}if(p.isFunction(bF)){bF=bF.call(e,bx,bB)}if(bF.top!=null){bC.top=(bF.top-bB.top)+by}if(bF.left!=null){bC.left=(bF.left-bB.left)+bv}if("using" in bF){bF.using.call(e,bC)}else{bw.css(bC)}}};p.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=Y.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(p.css(bw,"marginTop"))||0;bx.left-=parseFloat(p.css(bw,"marginLeft"))||0;e.top+=parseFloat(p.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(p.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||ah.body;while(e&&(!Y.test(e.nodeName)&&p.css(e,"position")==="static")){e=e.offsetParent}return e})}});p.each(["Left","Top"],function(bv,e){var bw="scroll"+e;p.fn[bw]=function(bz){var bx,by;if(bz===bb){bx=this[0];if(!bx){return null}by=ax(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:p.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=ax(this);if(by){by.scrollTo(!bv?bz:p(by).scrollLeft(),bv?bz:p(by).scrollTop())}else{this[bw]=bz}})}});function ax(e){return p.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}p.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();p.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(p.css(bx,bw,"padding")):this[bw]():null};p.fn["outer"+e]=function(bx){var by=this[0];return by?by.style?parseFloat(p.css(by,bw,bx?"margin":"border")):this[bw]():null};p.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(p.isFunction(bz)){return this.each(function(bE){var bD=p(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(p.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===bb){var bC=p.css(bA,bw),by=parseFloat(bC);return p.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});J.jQuery=J.$=p;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return p})}})(window);
\ No newline at end of file
diff --git a/external/jquery.ui.core.js b/external/jquery.ui.core.js
new file mode 100644 (file)
index 0000000..6d82ff1
--- /dev/null
@@ -0,0 +1,314 @@
+/*!
+ * jQuery UI 1.8.17
+ *
+ * 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( $, undefined ) {
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+       return;
+}
+
+$.extend( $.ui, {
+       version: "1.8.17",
+
+       keyCode: {
+               ALT: 18,
+               BACKSPACE: 8,
+               CAPS_LOCK: 20,
+               COMMA: 188,
+               COMMAND: 91,
+               COMMAND_LEFT: 91, // COMMAND
+               COMMAND_RIGHT: 93,
+               CONTROL: 17,
+               DELETE: 46,
+               DOWN: 40,
+               END: 35,
+               ENTER: 13,
+               ESCAPE: 27,
+               HOME: 36,
+               INSERT: 45,
+               LEFT: 37,
+               MENU: 93, // COMMAND_RIGHT
+               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 // COMMAND
+       }
+});
+
+// plugins
+$.fn.extend({
+       propAttr: $.fn.prop || $.fn.attr,
+
+       _focus: $.fn.focus,
+       focus: function( delay, fn ) {
+               return typeof delay === "number" ?
+                       this.each(function() {
+                               var elem = this;
+                               setTimeout(function() {
+                                       $( elem ).focus();
+                                       if ( fn ) {
+                                               fn.call( elem );
+                                       }
+                               }, delay );
+                       }) :
+                       this._focus.apply( this, arguments );
+       },
+
+       scrollParent: function() {
+               var scrollParent;
+               if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+                       scrollParent = this.parents().filter(function() {
+                               return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+                       }).eq(0);
+               } else {
+                       scrollParent = this.parents().filter(function() {
+                               return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+                       }).eq(0);
+               }
+
+               return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+       },
+
+       zIndex: function( zIndex ) {
+               if ( zIndex !== undefined ) {
+                       return this.css( "zIndex", zIndex );
+               }
+
+               if ( this.length ) {
+                       var elem = $( this[ 0 ] ), position, value;
+                       while ( elem.length && elem[ 0 ] !== document ) {
+                               // Ignore z-index if position is set to a value where z-index is ignored by the browser
+                               // This makes behavior of this function consistent across browsers
+                               // WebKit always returns auto if the element is positioned
+                               position = elem.css( "position" );
+                               if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+                                       // IE returns 0 when zIndex is not specified
+                                       // other browsers return a string
+                                       // we ignore the case of nested elements with an explicit value of 0
+                                       // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+                                       value = parseInt( elem.css( "zIndex" ), 10 );
+                                       if ( !isNaN( value ) && value !== 0 ) {
+                                               return value;
+                                       }
+                               }
+                               elem = elem.parent();
+                       }
+               }
+
+               return 0;
+       },
+
+       disableSelection: function() {
+               return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+                       ".ui-disableSelection", function( event ) {
+                               event.preventDefault();
+                       });
+       },
+
+       enableSelection: function() {
+               return this.unbind( ".ui-disableSelection" );
+       }
+});
+
+$.each( [ "Width", "Height" ], function( i, name ) {
+       var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+               type = name.toLowerCase(),
+               orig = {
+                       innerWidth: $.fn.innerWidth,
+                       innerHeight: $.fn.innerHeight,
+                       outerWidth: $.fn.outerWidth,
+                       outerHeight: $.fn.outerHeight
+               };
+
+       function reduce( elem, size, border, margin ) {
+               $.each( side, function() {
+                       size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
+                       if ( border ) {
+                               size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
+                       }
+                       if ( margin ) {
+                               size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
+                       }
+               });
+               return size;
+       }
+
+       $.fn[ "inner" + name ] = function( size ) {
+               if ( size === undefined ) {
+                       return orig[ "inner" + name ].call( this );
+               }
+
+               return this.each(function() {
+                       $( this ).css( type, reduce( this, size ) + "px" );
+               });
+       };
+
+       $.fn[ "outer" + name] = function( size, margin ) {
+               if ( typeof size !== "number" ) {
+                       return orig[ "outer" + name ].call( this, size );
+               }
+
+               return this.each(function() {
+                       $( this).css( type, reduce( this, size, true, margin ) + "px" );
+               });
+       };
+});
+
+// selectors
+function focusable( element, isTabIndexNotNaN ) {
+       var nodeName = element.nodeName.toLowerCase();
+       if ( "area" === nodeName ) {
+               var map = element.parentNode,
+                       mapName = map.name,
+                       img;
+               if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+                       return false;
+               }
+               img = $( "img[usemap=#" + mapName + "]" )[0];
+               return !!img && visible( img );
+       }
+       return ( /input|select|textarea|button|object/.test( nodeName )
+               ? !element.disabled
+               : "a" == nodeName
+                       ? element.href || isTabIndexNotNaN
+                       : isTabIndexNotNaN)
+               // the element and all of its ancestors must be visible
+               && visible( element );
+}
+
+function visible( element ) {
+       return !$( element ).parents().andSelf().filter(function() {
+               return $.curCSS( this, "visibility" ) === "hidden" ||
+                       $.expr.filters.hidden( this );
+       }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+       data: function( elem, i, match ) {
+               return !!$.data( elem, match[ 3 ] );
+       },
+
+       focusable: function( element ) {
+               return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+       },
+
+       tabbable: function( element ) {
+               var tabIndex = $.attr( element, "tabindex" ),
+                       isTabIndexNaN = isNaN( tabIndex );
+               return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+       }
+});
+
+// support
+$(function() {
+       var body = document.body,
+               div = body.appendChild( div = document.createElement( "div" ) );
+
+       $.extend( div.style, {
+               minHeight: "100px",
+               height: "auto",
+               padding: 0,
+               borderWidth: 0
+       });
+
+       $.support.minHeight = div.offsetHeight === 100;
+       $.support.selectstart = "onselectstart" in div;
+
+       // set display to none to avoid a layout bug in IE
+       // http://dev.jquery.com/ticket/4014
+       body.removeChild( div ).style.display = "none";
+});
+
+
+
+
+
+// deprecated
+$.extend( $.ui, {
+       // $.ui.plugin is deprecated.  Use the proxy pattern instead.
+       plugin: {
+               add: function( module, option, set ) {
+                       var proto = $.ui[ module ].prototype;
+                       for ( var i in set ) {
+                               proto.plugins[ i ] = proto.plugins[ i ] || [];
+                               proto.plugins[ i ].push( [ option, set[ i ] ] );
+                       }
+               },
+               call: function( instance, name, args ) {
+                       var set = instance.plugins[ name ];
+                       if ( !set || !instance.element[ 0 ].parentNode ) {
+                               return;
+                       }
+       
+                       for ( var i = 0; i < set.length; i++ ) {
+                               if ( instance.options[ set[ i ][ 0 ] ] ) {
+                                       set[ i ][ 1 ].apply( instance.element, args );
+                               }
+                       }
+               }
+       },
+       
+       // will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
+       contains: function( a, b ) {
+               return document.compareDocumentPosition ?
+                       a.compareDocumentPosition( b ) & 16 :
+                       a !== b && a.contains( b );
+       },
+       
+       // only used by resizable
+       hasScroll: function( el, a ) {
+       
+               //If overflow is hidden, the element might have extra content, but the user wants to hide it
+               if ( $( el ).css( "overflow" ) === "hidden") {
+                       return false;
+               }
+       
+               var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+                       has = false;
+       
+               if ( el[ scroll ] > 0 ) {
+                       return true;
+               }
+       
+               // TODO: determine which cases actually cause this to happen
+               // if the element doesn't have the scroll set, see if it's possible to
+               // set the scroll
+               el[ scroll ] = 1;
+               has = ( el[ scroll ] > 0 );
+               el[ scroll ] = 0;
+               return has;
+       },
+       
+       // these are odd functions, fix the API or move into individual plugins
+       isOverAxis: function( x, reference, size ) {
+               //Determines when x coordinate is over "b" element axis
+               return ( x > reference ) && ( x < ( reference + size ) );
+       },
+       isOver: function( y, x, top, left, height, width ) {
+               //Determines when x, y coordinates is over "b" element
+               return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
+       }
+});
+
+})( jQuery );
diff --git a/external/jquery.ui.draggable.js b/external/jquery.ui.draggable.js
new file mode 100644 (file)
index 0000000..41aba9d
--- /dev/null
@@ -0,0 +1,825 @@
+/*
+ * jQuery UI Draggable 1.8.17
+ *
+ * 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/Draggables
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *     jquery.ui.mouse.js
+ *     jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.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(event) {
+
+               var o = this.options;
+
+               // among others, prevent a drag on a resizable-handle
+               if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+                       return false;
+
+               //Quit if we're not on a valid handle
+               this.handle = this._getHandle(event);
+               if (!this.handle)
+                       return false;
+               
+               if ( o.iframeFix ) {
+                       $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+                               $('<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($(this).offset())
+                               .appendTo("body");
+                       });
+               }
+
+               return true;
+
+       },
+
+       _mouseStart: function(event) {
+
+               var o = this.options;
+
+               //Create and append the visible helper
+               this.helper = this._createHelper(event);
+
+               //Cache the helper size
+               this._cacheHelperProportions();
+
+               //If ddmanager is used for droppables, set the global draggable
+               if($.ui.ddmanager)
+                       $.ui.ddmanager.current = this;
+
+               /*
+                * - Position generation -
+                * This block generates everything position related - it's the core of draggables.
+                */
+
+               //Cache the margins of the original element
+               this._cacheMargins();
+
+               //Store the helper's css position
+               this.cssPosition = this.helper.css("position");
+               this.scrollParent = this.helper.scrollParent();
+
+               //The element's absolute position on the page minus margins
+               this.offset = this.positionAbs = this.element.offset();
+               this.offset = {
+                       top: this.offset.top - this.margins.top,
+                       left: this.offset.left - this.margins.left
+               };
+
+               $.extend(this.offset, {
+                       click: { //Where the click happened, relative to the element
+                               left: event.pageX - this.offset.left,
+                               top: event.pageY - this.offset.top
+                       },
+                       parent: this._getParentOffset(),
+                       relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+               });
+
+               //Generate the original position
+               this.originalPosition = this.position = this._generatePosition(event);
+               this.originalPageX = event.pageX;
+               this.originalPageY = event.pageY;
+
+               //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+               (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+               //Set a containment if given in the options
+               if(o.containment)
+                       this._setContainment();
+
+               //Trigger event + callbacks
+               if(this._trigger("start", event) === false) {
+                       this._clear();
+                       return false;
+               }
+
+               //Recache the helper size
+               this._cacheHelperProportions();
+
+               //Prepare the droppable offsets
+               if ($.ui.ddmanager && !o.dropBehaviour)
+                       $.ui.ddmanager.prepareOffsets(this, event);
+
+               this.helper.addClass("ui-draggable-dragging");
+               this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+               
+               //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+               if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
+               
+               return true;
+       },
+
+       _mouseDrag: function(event, noPropagation) {
+
+               //Compute the helpers position
+               this.position = this._generatePosition(event);
+               this.positionAbs = this._convertPositionTo("absolute");
+
+               //Call plugins and callbacks and use the resulting position if something is returned
+               if (!noPropagation) {
+                       var ui = this._uiHash();
+                       if(this._trigger('drag', event, ui) === false) {
+                               this._mouseUp({});
+                               return false;
+                       }
+                       this.position = ui.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($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+               return false;
+       },
+
+       _mouseStop: function(event) {
+
+               //If we are using droppables, inform the manager about the drop
+               var dropped = false;
+               if ($.ui.ddmanager && !this.options.dropBehaviour)
+                       dropped = $.ui.ddmanager.drop(this, event);
+
+               //if a drop comes from outside (a sortable)
+               if(this.dropped) {
+                       dropped = this.dropped;
+                       this.dropped = false;
+               }
+               
+               //if the original element is removed, don't bother to continue if helper is set to "original"
+               if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")
+                       return false;
+
+               if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+                       var self = this;
+                       $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+                               if(self._trigger("stop", event) !== false) {
+                                       self._clear();
+                               }
+                       });
+               } else {
+                       if(this._trigger("stop", event) !== false) {
+                               this._clear();
+                       }
+               }
+
+               return false;
+       },
+       
+       _mouseUp: function(event) {
+               if (this.options.iframeFix === true) {
+                       $("div.ui-draggable-iframeFix").each(function() { 
+                               this.parentNode.removeChild(this); 
+                       }); //Remove frame helpers
+               }
+               
+               //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+               if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
+               
+               return $.ui.mouse.prototype._mouseUp.call(this, event);
+       },
+       
+       cancel: function() {
+               
+               if(this.helper.is(".ui-draggable-dragging")) {
+                       this._mouseUp({});
+               } else {
+                       this._clear();
+               }
+               
+               return this;
+               
+       },
+
+       _getHandle: function(event) {
+
+               var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+               $(this.options.handle, this.element)
+                       .find("*")
+                       .andSelf()
+                       .each(function() {
+                               if(this == event.target) handle = true;
+                       });
+
+               return handle;
+
+       },
+
+       _createHelper: function(event) {
+
+               var o = this.options;
+               var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
+
+               if(!helper.parents('body').length)
+                       helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+               if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+                       helper.css("position", "absolute");
+
+               return helper;
+
+       },
+
+       _adjustOffsetFromHelper: function(obj) {
+               if (typeof obj == 'string') {
+                       obj = obj.split(' ');
+               }
+               if ($.isArray(obj)) {
+                       obj = {left: +obj[0], top: +obj[1] || 0};
+               }
+               if ('left' in obj) {
+                       this.offset.click.left = obj.left + this.margins.left;
+               }
+               if ('right' in obj) {
+                       this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+               }
+               if ('top' in obj) {
+                       this.offset.click.top = obj.top + this.margins.top;
+               }
+               if ('bottom' in obj) {
+                       this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+               }
+       },
+
+       _getParentOffset: function() {
+
+               //Get the offsetParent and cache its position
+               this.offsetParent = this.helper.offsetParent();
+               var po = this.offsetParent.offset();
+
+               // This is a special case where we need to modify a offset calculated on start, since the following happened:
+               // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+               // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+               //    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+               if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+                       po.left += this.scrollParent.scrollLeft();
+                       po.top += this.scrollParent.scrollTop();
+               }
+
+               if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+               || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+                       po = { top: 0, left: 0 };
+
+               return {
+                       top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+                       left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+               };
+
+       },
+
+       _getRelativeOffset: function() {
+
+               if(this.cssPosition == "relative") {
+                       var p = this.element.position();
+                       return {
+                               top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+                               left: p.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 o = this.options;
+               if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+               if(o.containment == 'document' || o.containment == 'window') this.containment = [
+                       o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+                       o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+                       (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+                       (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+               ];
+
+               if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
+                       var c = $(o.containment);
+                       var ce = c[0]; if(!ce) return;
+                       var co = c.offset();
+                       var over = ($(ce).css("overflow") != 'hidden');
+
+                       this.containment = [
+                               (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
+                               (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
+                               (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
+                               (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top  - this.margins.bottom
+                       ];
+                       this.relative_container = c;
+
+               } else if(o.containment.constructor == Array) {
+                       this.containment = o.containment;
+               }
+
+       },
+
+       _convertPositionTo: function(d, pos) {
+
+               if(!pos) pos = this.position;
+               var mod = d == "absolute" ? 1 : -1;
+               var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+               return {
+                       top: (
+                               pos.top                                                                                                                                 // The absolute mouse position
+                               + this.offset.relative.top * mod                                                                                // Only for relative positioned nodes: Relative offset from element to offset parent
+                               + this.offset.parent.top * mod                                                                                  // The offsetParent's offset without borders (offset + border)
+                               - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+                       ),
+                       left: (
+                               pos.left                                                                                                                                // The absolute mouse position
+                               + this.offset.relative.left * mod                                                                               // Only for relative positioned nodes: Relative offset from element to offset parent
+                               + this.offset.parent.left * mod                                                                                 // The offsetParent's offset without borders (offset + border)
+                               - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+                       )
+               };
+
+       },
+
+       _generatePosition: function(event) {
+
+               var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+               var pageX = event.pageX;
+               var pageY = event.pageY;
+
+               /*
+                * - Position constraining -
+                * Constrain the position to a mix of grid, containment.
+                */
+
+               if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+                        var containment;
+                        if(this.containment) {
+                                if (this.relative_container){
+                                    var co = this.relative_container.offset();
+                                    containment = [ this.containment[0] + co.left,
+                                                    this.containment[1] + co.top,
+                                                    this.containment[2] + co.left,
+                                                    this.containment[3] + co.top ];
+                                }
+                                else {
+                                    containment = this.containment;
+                                }
+
+                               if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
+                               if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
+                               if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
+                               if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
+                       }
+
+                       if(o.grid) {
+                               //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+                               var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
+                               pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+                               var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+                               pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+                       }
+
+               }
+
+               return {
+                       top: (
+                               pageY                                                                                                                           // The absolute mouse position
+                               - this.offset.click.top                                                                                                 // Click offset (relative to the element)
+                               - this.offset.relative.top                                                                                              // Only for relative positioned nodes: Relative offset from element to offset parent
+                               - this.offset.parent.top                                                                                                // The offsetParent's offset without borders (offset + border)
+                               + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+                       ),
+                       left: (
+                               pageX                                                                                                                           // The absolute mouse position
+                               - this.offset.click.left                                                                                                // Click offset (relative to the element)
+                               - this.offset.relative.left                                                                                             // Only for relative positioned nodes: Relative offset from element to offset parent
+                               - this.offset.parent.left                                                                                               // The offsetParent's offset without borders (offset + border)
+                               + ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+                       )
+               };
+
+       },
+
+       _clear: function() {
+               this.helper.removeClass("ui-draggable-dragging");
+               if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
+               //if($.ui.ddmanager) $.ui.ddmanager.current = null;
+               this.helper = null;
+               this.cancelHelperRemoval = false;
+       },
+
+       // From now on bulk stuff - mainly helpers
+
+       _trigger: function(type, event, ui) {
+               ui = ui || this._uiHash();
+               $.ui.plugin.call(this, type, [event, ui]);
+               if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+               return $.Widget.prototype._trigger.call(this, type, event, ui);
+       },
+
+       plugins: {},
+
+       _uiHash: function(event) {
+               return {
+                       helper: this.helper,
+                       position: this.position,
+                       originalPosition: this.originalPosition,
+                       offset: this.positionAbs
+               };
+       }
+
+});
+
+$.extend($.ui.draggable, {
+       version: "1.8.17"
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+       start: function(event, ui) {
+
+               var inst = $(this).data("draggable"), o = inst.options,
+                       uiSortable = $.extend({}, ui, { item: inst.element });
+               inst.sortables = [];
+               $(o.connectToSortable).each(function() {
+                       var sortable = $.data(this, 'sortable');
+                       if (sortable && !sortable.options.disabled) {
+                               inst.sortables.push({
+                                       instance: sortable,
+                                       shouldRevert: sortable.options.revert
+                               });
+                               sortable.refreshPositions();    // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
+                               sortable._trigger("activate", event, uiSortable);
+                       }
+               });
+
+       },
+       stop: function(event, ui) {
+
+               //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+               var inst = $(this).data("draggable"),
+                       uiSortable = $.extend({}, ui, { item: inst.element });
+
+               $.each(inst.sortables, function() {
+                       if(this.instance.isOver) {
+
+                               this.instance.isOver = 0;
+
+                               inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+                               this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+                               //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
+                               if(this.shouldRevert) this.instance.options.revert = true;
+
+                               //Trigger the stop of the sortable
+                               this.instance._mouseStop(event);
+
+                               this.instance.options.helper = this.instance.options._helper;
+
+                               //If the helper has been the original item, restore properties in the sortable
+                               if(inst.options.helper == 'original')
+                                       this.instance.currentItem.css({ top: 'auto', left: 'auto' });
+
+                       } else {
+                               this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+                               this.instance._trigger("deactivate", event, uiSortable);
+                       }
+
+               });
+
+       },
+       drag: function(event, ui) {
+
+               var inst = $(this).data("draggable"), self = this;
+
+               var checkPos = function(o) {
+                       var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
+                       var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
+                       var itemHeight = o.height, itemWidth = o.width;
+                       var itemTop = o.top, itemLeft = o.left;
+
+                       return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
+               };
+
+               $.each(inst.sortables, function(i) {
+                       
+                       //Copy over some variables to allow calling the sortable's native _intersectsWith
+                       this.instance.positionAbs = inst.positionAbs;
+                       this.instance.helperProportions = inst.helperProportions;
+                       this.instance.offset.click = inst.offset.click;
+                       
+                       if(this.instance._intersectsWith(this.instance.containerCache)) {
+
+                               //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+                               if(!this.instance.isOver) {
+
+                                       this.instance.isOver = 1;
+                                       //Now we fake the start of dragging for the sortable instance,
+                                       //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+                                       //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+                                       this.instance.currentItem = $(self).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
+                                       this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+                                       this.instance.options.helper = function() { return ui.helper[0]; };
+
+                                       event.target = this.instance.currentItem[0];
+                                       this.instance._mouseCapture(event, true);
+                                       this.instance._mouseStart(event, true, true);
+
+                                       //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+                                       this.instance.offset.click.top = inst.offset.click.top;
+                                       this.instance.offset.click.left = inst.offset.click.left;
+                                       this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+                                       this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+                                       inst._trigger("toSortable", event);
+                                       inst.dropped = this.instance.element; //draggable revert needs that
+                                       //hack so receive/update callbacks work (mostly)
+                                       inst.currentItem = inst.element;
+                                       this.instance.fromOutside = inst;
+
+                               }
+
+                               //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+                               if(this.instance.currentItem) this.instance._mouseDrag(event);
+
+                       } else {
+
+                               //If it doesn't intersect with the sortable, and it intersected before,
+                               //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+                               if(this.instance.isOver) {
+
+                                       this.instance.isOver = 0;
+                                       this.instance.cancelHelperRemoval = true;
+                                       
+                                       //Prevent reverting on this forced stop
+                                       this.instance.options.revert = false;
+                                       
+                                       // The out event needs to be triggered independently
+                                       this.instance._trigger('out', event, this.instance._uiHash(this.instance));
+                                       
+                                       this.instance._mouseStop(event, true);
+                                       this.instance.options.helper = this.instance.options._helper;
+
+                                       //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+                                       this.instance.currentItem.remove();
+                                       if(this.instance.placeholder) this.instance.placeholder.remove();
+
+                                       inst._trigger("fromSortable", event);
+                                       inst.dropped = false; //draggable revert needs that
+                               }
+
+                       };
+
+               });
+
+       }
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+       start: function(event, ui) {
+               var t = $('body'), o = $(this).data('draggable').options;
+               if (t.css("cursor")) o._cursor = t.css("cursor");
+               t.css("cursor", o.cursor);
+       },
+       stop: function(event, ui) {
+               var o = $(this).data('draggable').options;
+               if (o._cursor) $('body').css("cursor", o._cursor);
+       }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+       start: function(event, ui) {
+               var t = $(ui.helper), o = $(this).data('draggable').options;
+               if(t.css("opacity")) o._opacity = t.css("opacity");
+               t.css('opacity', o.opacity);
+       },
+       stop: function(event, ui) {
+               var o = $(this).data('draggable').options;
+               if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+       }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+       start: function(event, ui) {
+               var i = $(this).data("draggable");
+               if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
+       },
+       drag: function(event, ui) {
+
+               var i = $(this).data("draggable"), o = i.options, scrolled = false;
+
+               if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
+
+                       if(!o.axis || o.axis != 'x') {
+                               if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+                                       i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+                               else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
+                                       i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+                       }
+
+                       if(!o.axis || o.axis != 'y') {
+                               if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+                                       i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+                               else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
+                                       i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+                       }
+
+               } else {
+
+                       if(!o.axis || o.axis != 'x') {
+                               if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+                                       scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+                               else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+                                       scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+                       }
+
+                       if(!o.axis || o.axis != 'y') {
+                               if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+                                       scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+                               else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+                                       scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+                       }
+
+               }
+
+               if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+                       $.ui.ddmanager.prepareOffsets(i, event);
+
+       }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+       start: function(event, ui) {
+
+               var i = $(this).data("draggable"), o = i.options;
+               i.snapElements = [];
+
+               $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
+                       var $t = $(this); var $o = $t.offset();
+                       if(this != i.element[0]) i.snapElements.push({
+                               item: this,
+                               width: $t.outerWidth(), height: $t.outerHeight(),
+                               top: $o.top, left: $o.left
+                       });
+               });
+
+       },
+       drag: function(event, ui) {
+
+               var inst = $(this).data("draggable"), o = inst.options;
+               var d = o.snapTolerance;
+
+               var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+                       y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+               for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+                       var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
+                               t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+
+                       //Yes, I know, this is insane ;)
+                       if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+                               if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+                               inst.snapElements[i].snapping = false;
+                               continue;
+                       }
+
+                       if(o.snapMode != 'inner') {
+                               var ts = Math.abs(t - y2) <= d;
+                               var bs = Math.abs(b - y1) <= d;
+                               var ls = Math.abs(l - x2) <= d;
+                               var rs = Math.abs(r - x1) <= d;
+                               if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+                               if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+                               if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+                               if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+                       }
+
+                       var first = (ts || bs || ls || rs);
+
+                       if(o.snapMode != 'outer') {
+                               var ts = Math.abs(t - y1) <= d;
+                               var bs = Math.abs(b - y2) <= d;
+                               var ls = Math.abs(l - x1) <= d;
+                               var rs = Math.abs(r - x2) <= d;
+                               if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+                               if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+                               if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+                               if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+                       }
+
+                       if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
+                               (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+                       inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+               };
+
+       }
+});
+
+$.ui.plugin.add("draggable", "stack", {
+       start: function(event, ui) {
+
+               var o = $(this).data("draggable").options;
+
+               var group = $.makeArray($(o.stack)).sort(function(a,b) {
+                       return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+               });
+               if (!group.length) { return; }
+               
+               var min = parseInt(group[0].style.zIndex) || 0;
+               $(group).each(function(i) {
+                       this.style.zIndex = min + i;
+               });
+
+               this[0].style.zIndex = min + group.length;
+
+       }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+       start: function(event, ui) {
+               var t = $(ui.helper), o = $(this).data("draggable").options;
+               if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+               t.css('zIndex', o.zIndex);
+       },
+       stop: function(event, ui) {
+               var o = $(this).data("draggable").options;
+               if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
+       }
+});
+
+})(jQuery);
diff --git a/external/jquery.ui.mouse.js b/external/jquery.ui.mouse.js
new file mode 100644 (file)
index 0000000..6bb65de
--- /dev/null
@@ -0,0 +1,162 @@
+/*!
+ * jQuery UI Mouse 1.8.17
+ *
+ * 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( $, undefined ) {
+
+var mouseHandled = false;
+$( document ).mouseup( function( e ) {
+       mouseHandled = false;
+});
+
+$.widget("ui.mouse", {
+       options: {
+               cancel: ':input,option',
+               distance: 1,
+               delay: 0
+       },
+       _mouseInit: function() {
+               var self = this;
+
+               this.element
+                       .bind('mousedown.'+this.widgetName, function(event) {
+                               return self._mouseDown(event);
+                       })
+                       .bind('click.'+this.widgetName, function(event) {
+                               if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
+                                   $.removeData(event.target, self.widgetName + '.preventClickEvent');
+                                       event.stopImmediatePropagation();
+                                       return false;
+                               }
+                       });
+
+               this.started = false;
+       },
+
+       // TODO: make sure destroying one instance of mouse doesn't mess with
+       // other instances of mouse
+       _mouseDestroy: function() {
+               this.element.unbind('.'+this.widgetName);
+       },
+
+       _mouseDown: function(event) {
+               // don't let more than one widget handle mouseStart
+               if( mouseHandled ) { return };
+
+               // we may have missed mouseup (out of window)
+               (this._mouseStarted && this._mouseUp(event));
+
+               this._mouseDownEvent = event;
+
+               var self = this,
+                       btnIsLeft = (event.which == 1),
+                       // event.target.nodeName works around a bug in IE 8 with
+                       // disabled inputs (#7620)
+                       elIsCancel = (typeof this.options.cancel == "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+               if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+                       return true;
+               }
+
+               this.mouseDelayMet = !this.options.delay;
+               if (!this.mouseDelayMet) {
+                       this._mouseDelayTimer = setTimeout(function() {
+                               self.mouseDelayMet = true;
+                       }, this.options.delay);
+               }
+
+               if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+                       this._mouseStarted = (this._mouseStart(event) !== false);
+                       if (!this._mouseStarted) {
+                               event.preventDefault();
+                               return true;
+                       }
+               }
+
+               // Click event may never have fired (Gecko & Opera)
+               if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
+                       $.removeData(event.target, this.widgetName + '.preventClickEvent');
+               }
+
+               // these delegates are required to keep context
+               this._mouseMoveDelegate = function(event) {
+                       return self._mouseMove(event);
+               };
+               this._mouseUpDelegate = function(event) {
+                       return self._mouseUp(event);
+               };
+               $(document)
+                       .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+                       .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+               event.preventDefault();
+               
+               mouseHandled = true;
+               return true;
+       },
+
+       _mouseMove: function(event) {
+               // IE mouseup check - mouseup happened when mouse was out of window
+               if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+                       return this._mouseUp(event);
+               }
+
+               if (this._mouseStarted) {
+                       this._mouseDrag(event);
+                       return event.preventDefault();
+               }
+
+               if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+                       this._mouseStarted =
+                               (this._mouseStart(this._mouseDownEvent, event) !== false);
+                       (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+               }
+
+               return !this._mouseStarted;
+       },
+
+       _mouseUp: function(event) {
+               $(document)
+                       .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+                       .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+               if (this._mouseStarted) {
+                       this._mouseStarted = false;
+
+                       if (event.target == this._mouseDownEvent.target) {
+                           $.data(event.target, this.widgetName + '.preventClickEvent', true);
+                       }
+
+                       this._mouseStop(event);
+               }
+
+               return false;
+       },
+
+       _mouseDistanceMet: function(event) {
+               return (Math.max(
+                               Math.abs(this._mouseDownEvent.pageX - event.pageX),
+                               Math.abs(this._mouseDownEvent.pageY - event.pageY)
+                       ) >= this.options.distance
+               );
+       },
+
+       _mouseDelayMet: function(event) {
+               return this.mouseDelayMet;
+       },
+
+       // These are placeholder methods, to be overriden by extending plugin
+       _mouseStart: function(event) {},
+       _mouseDrag: function(event) {},
+       _mouseStop: function(event) {},
+       _mouseCapture: function(event) { return true; }
+});
+
+})(jQuery);
diff --git a/external/jquery.ui.widget.js b/external/jquery.ui.widget.js
new file mode 100644 (file)
index 0000000..facd77b
--- /dev/null
@@ -0,0 +1,272 @@
+/*!
+ * jQuery UI Widget 1.8.17
+ *
+ * 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( $, undefined ) {
+
+// jQuery 1.4+
+if ( $.cleanData ) {
+       var _cleanData = $.cleanData;
+       $.cleanData = function( elems ) {
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       try {
+                               $( elem ).triggerHandler( "remove" );
+                       // http://bugs.jquery.com/ticket/8235
+                       } catch( e ) {}
+               }
+               _cleanData( elems );
+       };
+} else {
+       var _remove = $.fn.remove;
+       $.fn.remove = function( selector, keepData ) {
+               return this.each(function() {
+                       if ( !keepData ) {
+                               if ( !selector || $.filter( selector, [ this ] ).length ) {
+                                       $( "*", this ).add( [ this ] ).each(function() {
+                                               try {
+                                                       $( this ).triggerHandler( "remove" );
+                                               // http://bugs.jquery.com/ticket/8235
+                                               } catch( e ) {}
+                                       });
+                               }
+                       }
+                       return _remove.call( $(this), selector, keepData );
+               });
+       };
+}
+
+$.widget = function( name, base, prototype ) {
+       var namespace = name.split( "." )[ 0 ],
+               fullName;
+       name = name.split( "." )[ 1 ];
+       fullName = namespace + "-" + name;
+
+       if ( !prototype ) {
+               prototype = base;
+               base = $.Widget;
+       }
+
+       // create selector for plugin
+       $.expr[ ":" ][ fullName ] = function( elem ) {
+               return !!$.data( elem, name );
+       };
+
+       $[ namespace ] = $[ namespace ] || {};
+       $[ namespace ][ name ] = function( options, element ) {
+               // allow instantiation without initializing for simple inheritance
+               if ( arguments.length ) {
+                       this._createWidget( options, element );
+               }
+       };
+
+       var basePrototype = new base();
+       // we need to make the options hash a property directly on the new instance
+       // otherwise we'll modify the options hash on the prototype that we're
+       // inheriting from
+//     $.each( basePrototype, function( key, val ) {
+//             if ( $.isPlainObject(val) ) {
+//                     basePrototype[ key ] = $.extend( {}, val );
+//             }
+//     });
+       basePrototype.options = $.extend( true, {}, basePrototype.options );
+       $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
+               namespace: namespace,
+               widgetName: name,
+               widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
+               widgetBaseClass: fullName
+       }, prototype );
+
+       $.widget.bridge( name, $[ namespace ][ name ] );
+};
+
+$.widget.bridge = function( name, object ) {
+       $.fn[ name ] = function( options ) {
+               var isMethodCall = typeof options === "string",
+                       args = Array.prototype.slice.call( arguments, 1 ),
+                       returnValue = this;
+
+               // allow multiple hashes to be passed on init
+               options = !isMethodCall && args.length ?
+                       $.extend.apply( null, [ true, options ].concat(args) ) :
+                       options;
+
+               // prevent calls to internal methods
+               if ( isMethodCall && options.charAt( 0 ) === "_" ) {
+                       return returnValue;
+               }
+
+               if ( isMethodCall ) {
+                       this.each(function() {
+                               var instance = $.data( this, name ),
+                                       methodValue = instance && $.isFunction( instance[options] ) ?
+                                               instance[ options ].apply( instance, args ) :
+                                               instance;
+                               // TODO: add this back in 1.9 and use $.error() (see #5972)
+//                             if ( !instance ) {
+//                                     throw "cannot call methods on " + name + " prior to initialization; " +
+//                                             "attempted to call method '" + options + "'";
+//                             }
+//                             if ( !$.isFunction( instance[options] ) ) {
+//                                     throw "no such method '" + options + "' for " + name + " widget instance";
+//                             }
+//                             var methodValue = instance[ options ].apply( instance, args );
+                               if ( methodValue !== instance && methodValue !== undefined ) {
+                                       returnValue = methodValue;
+                                       return false;
+                               }
+                       });
+               } else {
+                       this.each(function() {
+                               var instance = $.data( this, name );
+                               if ( instance ) {
+                                       instance.option( options || {} )._init();
+                               } else {
+                                       $.data( this, name, new object( options, this ) );
+                               }
+                       });
+               }
+
+               return returnValue;
+       };
+};
+
+$.Widget = function( options, element ) {
+       // allow instantiation without initializing for simple inheritance
+       if ( arguments.length ) {
+               this._createWidget( options, element );
+       }
+};
+
+$.Widget.prototype = {
+       widgetName: "widget",
+       widgetEventPrefix: "",
+       options: {
+               disabled: false
+       },
+       _createWidget: function( options, element ) {
+               // $.widget.bridge stores the plugin instance, but we do it anyway
+               // so that it's stored even before the _create function runs
+               $.data( element, this.widgetName, this );
+               this.element = $( element );
+               this.options = $.extend( true, {},
+                       this.options,
+                       this._getCreateOptions(),
+                       options );
+
+               var self = this;
+               this.element.bind( "remove." + this.widgetName, function() {
+                       self.destroy();
+               });
+
+               this._create();
+               this._trigger( "create" );
+               this._init();
+       },
+       _getCreateOptions: function() {
+               return $.metadata && $.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( key, value ) {
+               var options = key;
+
+               if ( arguments.length === 0 ) {
+                       // don't return a reference to the internal hash
+                       return $.extend( {}, this.options );
+               }
+
+               if  (typeof key === "string" ) {
+                       if ( value === undefined ) {
+                               return this.options[ key ];
+                       }
+                       options = {};
+                       options[ key ] = value;
+               }
+
+               this._setOptions( options );
+
+               return this;
+       },
+       _setOptions: function( options ) {
+               var self = this;
+               $.each( options, function( key, value ) {
+                       self._setOption( key, value );
+               });
+
+               return this;
+       },
+       _setOption: function( key, value ) {
+               this.options[ key ] = value;
+
+               if ( key === "disabled" ) {
+                       this.widget()
+                               [ value ? "addClass" : "removeClass"](
+                                       this.widgetBaseClass + "-disabled" + " " +
+                                       "ui-state-disabled" )
+                               .attr( "aria-disabled", value );
+               }
+
+               return this;
+       },
+
+       enable: function() {
+               return this._setOption( "disabled", false );
+       },
+       disable: function() {
+               return this._setOption( "disabled", true );
+       },
+
+       _trigger: function( type, event, data ) {
+               var prop, orig,
+                       callback = this.options[ type ];
+
+               data = data || {};
+               event = $.Event( event );
+               event.type = ( type === this.widgetEventPrefix ?
+                       type :
+                       this.widgetEventPrefix + type ).toLowerCase();
+               // the original event may come from any element
+               // so we need to reset the target on the new event
+               event.target = this.element[ 0 ];
+
+               // copy original event properties over to the new event
+               orig = event.originalEvent;
+               if ( orig ) {
+                       for ( prop in orig ) {
+                               if ( !( prop in event ) ) {
+                                       event[ prop ] = orig[ prop ];
+                               }
+                       }
+               }
+
+               this.element.trigger( event, data );
+
+               return !( $.isFunction(callback) &&
+                       callback.call( this.element[0], event, data ) === false ||
+                       event.isDefaultPrevented() );
+       }
+};
+
+})( jQuery );
index 94107b6..77937b5 100644 (file)
@@ -4,11 +4,11 @@
        <title>Peach CGT</title>
        <meta charset="utf-8" />
        <link rel="stylesheet" href="style.css" />
-       <script src="/javascript/jquery/jquery.min.js"></script>
-       <script src="/javascript/jquery-ui/ui/jquery.ui.core.js"></script>
-       <script src="/javascript/jquery-ui/ui/jquery.ui.widget.js"></script>
-       <script src="/javascript/jquery-ui/ui/jquery.ui.mouse.js"></script>
-       <script src="/javascript/jquery-ui/ui/jquery.ui.draggable.js"></script>
+       <script src="/external/jquery.min.js"></script>
+       <script src="/external/jquery.ui.core.js"></script>
+       <script src="/external/jquery.ui.widget.js"></script>
+       <script src="/external/jquery.ui.mouse.js"></script>
+       <script src="/external/jquery.ui.draggable.js"></script>
        <script src="common.js"></script>
        <script src="cs_cards.js"></script>
        <script src="client.js"></script>
index b1cdac9..0411657 100644 (file)
@@ -115,9 +115,9 @@ clean_pathname = (str) ->
        str = str.replace clean_pathname_regex2, '/_'
        return str.replace clean_pathname_regex3, '_'
 
-# serve javascript files from within /usr/share/javascript
-javascript_handler = (args, out, request, url_parts) ->
-       filename = clean_pathname "/usr/share/#{url_parts.pathname}"
+# serve javascript files from within external/
+external_javascript_handler = (args, out, request, url_parts) ->
+       filename = clean_pathname "external/#{url_parts.pathname.substr 10}"
        fs.readFile filename, 'utf8', (err, data) ->
                if err
                        out.writeHead 404
@@ -274,8 +274,8 @@ http_server = http.createServer (req, res) ->
 
        rel_path = url_parts.pathname.substr 1
 
-       if rel_path.substr(0, 11) is 'javascript/'
-               return javascript_handler url_parts.query, res, req, url_parts
+       if rel_path.substr(0, 9) is 'external/'
+               return external_javascript_handler url_parts.query, res, req, url_parts
        else if rel_path.substr(rel_path.length - 4) is '.css'
                res.writeHead 200, 'Content-Type': 'text/css'
                return css_handler url_parts.query, res, req, url_parts