diff --git a/build-min/dependencies.js b/build-min/dependencies.js index 3c15898..d612ad3 100644 --- a/build-min/dependencies.js +++ b/build-min/dependencies.js @@ -1,43 +1,260 @@ -/*! - * jQuery JavaScript Library v1.6.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: Thu May 12 15:04:36 2011 -0400 - */ -(function(bc,L){var ar=bc.document,bu=bc.navigator,bl=bc.location;var b=(function(){var bE=function(bY,bZ){return new bE.fn.init(bY,bZ,bC)},bT=bc.jQuery,bG=bc.$,bC,bX=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bD=/\s+$/,bH=/\d/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bV=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bW=bu.userAgent,bU,bB,e,bL=Object.prototype.toString,bF=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bE.fn=bE.prototype={constructor:bE,init:function(bY,b2,b1){var b0,b3,bZ,b4;if(!bY){return this}if(bY.nodeType){this.context=this[0]=bY;this.length=1;return this}if(bY==="body"&&!b2&&ar.body){this.context=ar;this[0]=ar.body;this.selector=bY;this.length=1;return this}if(typeof bY==="string"){if(bY.charAt(0)==="<"&&bY.charAt(bY.length-1)===">"&&bY.length>=3){b0=[null,bY,null]}else{b0=bX.exec(bY)}if(b0&&(b0[1]||!b2)){if(b0[1]){b2=b2 instanceof bE?b2[0]:b2;b4=(b2?b2.ownerDocument||b2:ar);bZ=bA.exec(bY);if(bZ){if(bE.isPlainObject(b2)){bY=[ar.createElement(bZ[1])];bE.fn.attr.call(bY,b2,true)}else{bY=[b4.createElement(bZ[1])]}}else{bZ=bE.buildFragment([b0[1]],[b4]);bY=(bZ.cacheable?bE.clone(bZ.fragment):bZ.fragment).childNodes}return bE.merge(this,bY)}else{b3=ar.getElementById(b0[2]);if(b3&&b3.parentNode){if(b3.id!==b0[2]){return b1.find(bY)}this.length=1;this[0]=b3}this.context=ar;this.selector=bY;return this}}else{if(!b2||b2.jquery){return(b2||b1).find(bY)}else{return this.constructor(b2).find(bY)}}}else{if(bE.isFunction(bY)){return b1.ready(bY)}}if(bY.selector!==L){this.selector=bY.selector;this.context=bY.context}return bE.makeArray(bY,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(bY){return bY==null?this.toArray():(bY<0?this[this.length+bY]:this[bY])},pushStack:function(bZ,b1,bY){var b0=this.constructor();if(bE.isArray(bZ)){bz.apply(b0,bZ)}else{bE.merge(b0,bZ)}b0.prevObject=this;b0.context=this.context;if(b1==="find"){b0.selector=this.selector+(this.selector?" ":"")+bY}else{if(b1){b0.selector=this.selector+"."+b1+"("+bY+")"}}return b0},each:function(bZ,bY){return bE.each(this,bZ,bY)},ready:function(bY){bE.bindReady();bB.done(bY);return this},eq:function(bY){return bY===-1?this.slice(bY):this.slice(bY,+bY+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(bY){return this.pushStack(bE.map(this,function(b0,bZ){return bY.call(b0,bZ,b0)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bE.fn.init.prototype=bE.fn;bE.extend=bE.fn.extend=function(){var b7,b0,bY,bZ,b4,b5,b3=arguments[0]||{},b2=1,b1=arguments.length,b6=false;if(typeof b3==="boolean"){b6=b3;b3=arguments[1]||{};b2=2}if(typeof b3!=="object"&&!bE.isFunction(b3)){b3={}}if(b1===b2){b3=this;--b2}for(;b20){return}bB.resolveWith(ar,[bE]);if(bE.fn.trigger){bE(ar).trigger("ready").unbind("ready")}}},bindReady:function(){if(bB){return}bB=bE._Deferred();if(ar.readyState==="complete"){return setTimeout(bE.ready,1)}if(ar.addEventListener){ar.addEventListener("DOMContentLoaded",e,false);bc.addEventListener("load",bE.ready,false)}else{if(ar.attachEvent){ar.attachEvent("onreadystatechange",e);bc.attachEvent("onload",bE.ready);var bY=false;try{bY=bc.frameElement==null}catch(bZ){}if(ar.documentElement.doScroll&&bY){bw()}}}},isFunction:function(bY){return bE.type(bY)==="function"},isArray:Array.isArray||function(bY){return bE.type(bY)==="array"},isWindow:function(bY){return bY&&typeof bY==="object"&&"setInterval" in bY},isNaN:function(bY){return bY==null||!bH.test(bY)||isNaN(bY)},type:function(bY){return bY==null?String(bY):bx[bL.call(bY)]||"object"},isPlainObject:function(bZ){if(!bZ||bE.type(bZ)!=="object"||bZ.nodeType||bE.isWindow(bZ)){return false}if(bZ.constructor&&!bF.call(bZ,"constructor")&&!bF.call(bZ.constructor.prototype,"isPrototypeOf")){return false}var bY;for(bY in bZ){}return bY===L||bF.call(bZ,bY)},isEmptyObject:function(bZ){for(var bY in bZ){return false}return true},error:function(bY){throw bY},parseJSON:function(bY){if(typeof bY!=="string"||!bY){return null}bY=bE.trim(bY);if(bc.JSON&&bc.JSON.parse){return bc.JSON.parse(bY)}if(bN.test(bY.replace(bV,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+bY))()}bE.error("Invalid JSON: "+bY)},parseXML:function(b0,bY,bZ){if(bc.DOMParser){bZ=new DOMParser();bY=bZ.parseFromString(b0,"text/xml")}else{bY=new ActiveXObject("Microsoft.XMLDOM");bY.async="false";bY.loadXML(b0)}bZ=bY.documentElement;if(!bZ||!bZ.nodeName||bZ.nodeName==="parsererror"){bE.error("Invalid XML: "+b0)}return bY},noop:function(){},globalEval:function(bY){if(bY&&bM.test(bY)){(bc.execScript||function(bZ){bc["eval"].call(bc,bZ)})(bY)}},nodeName:function(bZ,bY){return bZ.nodeName&&bZ.nodeName.toUpperCase()===bY.toUpperCase()},each:function(b1,b4,b0){var bZ,b2=0,b3=b1.length,bY=b3===L||bE.isFunction(b1);if(b0){if(bY){for(bZ in b1){if(b4.apply(b1[bZ],b0)===false){break}}}else{for(;b20&&bY[0]&&bY[bZ-1])||bZ===0||bE.isArray(bY));if(b1){for(;b01?aH.call(arguments,0):bC;if(!(--by)){e.resolveWith(e,aH.call(bv,0))}}}if(bz>1){for(;bw
a";bz=bF.getElementsByTagName("*");bM=bF.getElementsByTagName("a")[0];if(!bz||!bz.length||!bM){return{}}bG=ar.createElement("select");bx=bG.appendChild(ar.createElement("option"));bE=bF.getElementsByTagName("input")[0];bC={leadingWhitespace:(bF.firstChild.nodeType===3),tbody:!bF.getElementsByTagName("tbody").length,htmlSerialize:!!bF.getElementsByTagName("link").length,style:/top/.test(bM.getAttribute("style")),hrefNormalized:(bM.getAttribute("href")==="/a"),opacity:/^0.55$/.test(bM.style.opacity),cssFloat:!!bM.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bF.className!=="t",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bC.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bC.optDisabled=!bx.disabled;try{delete bF.test}catch(bK){bC.deleteExpando=false}if(!bF.addEventListener&&bF.attachEvent&&bF.fireEvent){bF.attachEvent("onclick",function bH(){bC.noCloneEvent=false;bF.detachEvent("onclick",bH)});bF.cloneNode(true).fireEvent("onclick")}bE=ar.createElement("input");bE.value="t";bE.setAttribute("type","radio");bC.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bF.appendChild(bE);bw=ar.createDocumentFragment();bw.appendChild(bF.firstChild);bC.checkClone=bw.cloneNode(true).cloneNode(true).lastChild.checked;bF.innerHTML="";bF.style.width=bF.style.paddingLeft="1px";bD=ar.createElement("body");bv={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(bJ in bv){bD.style[bJ]=bv[bJ]}bD.appendChild(bF);bL.insertBefore(bD,bL.firstChild);bC.appendChecked=bE.checked;bC.boxModel=bF.offsetWidth===2;if("zoom" in bF.style){bF.style.display="inline";bF.style.zoom=1;bC.inlineBlockNeedsLayout=(bF.offsetWidth===2);bF.style.display="";bF.innerHTML="
";bC.shrinkWrapBlocks=(bF.offsetWidth!==2)}bF.innerHTML="
t
";bI=bF.getElementsByTagName("td");bN=(bI[0].offsetHeight===0);bI[0].style.display="";bI[1].style.display="none";bC.reliableHiddenOffsets=bN&&(bI[0].offsetHeight===0);bF.innerHTML="";if(ar.defaultView&&ar.defaultView.getComputedStyle){bA=ar.createElement("div");bA.style.width="0";bA.style.marginRight="0";bF.appendChild(bA);bC.reliableMarginRight=(parseInt((ar.defaultView.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}bD.innerHTML="";bL.removeChild(bD);if(bF.attachEvent){for(bJ in {submit:1,change:1,focusin:1}){bB="on"+bJ;bN=(bB in bF);if(!bN){bF.setAttribute(bB,"return;");bN=(typeof bF[bB]==="function")}bC[bJ+"Bubbles"]=bN}}return bC})();b.boxModel=b.support.boxModel;var aO=/^(?:\{.*\}|\[.*\])$/,ax=/([a-z])([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!U(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bC=b.expando,bB=typeof bv==="string",bA,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[b.expando]:bx[b.expando]&&b.expando;if((!bw||(by&&bw&&!e[bw][bC]))&&bB&&bz===L){return}if(!bw){if(bD){bx[b.expando]=bw=++b.uuid}else{bw=b.expando}}if(!e[bw]){e[bw]={};if(!bD){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw][bC]=b.extend(e[bw][bC],bv)}else{e[bw]=b.extend(e[bw],bv)}}bA=e[bw];if(by){if(!bA[bC]){bA[bC]={}}bA=bA[bC]}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bv==="events"&&!bA[bv]){return bA[bC]&&bA[bC].events}return bB?bA[b.camelCase(bv)]:bA},removeData:function(by,bw,bz){if(!b.acceptData(by)){return}var bB=b.expando,bC=by.nodeType,bv=bC?b.cache:by,bx=bC?by[b.expando]:b.expando;if(!bv[bx]){return}if(bw){var bA=bz?bv[bx][bB]:bv[bx];if(bA){delete bA[bw];if(!U(bA)){return}}}if(bz){delete bv[bx][bB];if(!U(bv[bx])){return}}var e=bv[bx][bB];if(b.support.deleteExpando||bv!=bc){delete bv[bx]}else{bv[bx]=null}if(e){bv[bx]={};if(!bC){bv[bx].toJSON=b.noop}bv[bx][bB]=e}else{if(bC){if(b.support.deleteExpando){delete by[b.expando]}else{if(by.removeAttribute){by.removeAttribute(b.expando)}else{by[b.expando]=null}}}}},_data:function(bv,e,bw){return b.data(bv,e,bw,true)},acceptData:function(bv){if(bv.nodeName){var e=b.noData[bv.nodeName.toLowerCase()];if(e){return !(e===true||bv.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(by,bA){var bz=null;if(typeof by==="undefined"){if(this.length){bz=b.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,bw;for(var bx=0,bv=e.length;bx-1){return true}}return false},val:function(bx){var e,bv,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}return(bw.value||"").replace(aQ,"")}return L}var by=b.isFunction(bx);return this.each(function(bA){var bz=b(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(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,by=e.selectedIndex,bB=[],bC=e.options,bx=e.type==="select-one";if(by<0){return null}for(var bv=bx?by:0,bz=bx?by+1:bC.length;bv=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},attrFix:{tabindex:"tabIndex"},attr:function(bA,bx,bB,bz){var bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return L}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(!("getAttribute" in bA)){return b.prop(bA,bx,bB)}var bw,e,by=bv!==1||!b.isXMLDoc(bA);bx=by&&b.attrFix[bx]||bx;e=b.attrHooks[bx];if(!e){if(al.test(bx)&&(typeof bB==="boolean"||bB===L||bB.toLowerCase()===bx.toLowerCase())){e=aX}else{if(a3&&(b.nodeName(bA,"form")||a8.test(bx))){e=a3}}}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return L}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by){return e.get(bA,bx)}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bv,e){var bw;if(bv.nodeType===1){e=b.attrFix[e]||e;if(b.support.getSetAttribute){bv.removeAttribute(e)}else{b.attr(bv,e,"");bv.removeAttributeNode(bv.getAttributeNode(e))}if(al.test(e)&&(bw=b.propFix[e]||e) in bv){bv[bw]=false}}},attrHooks:{type:{set:function(e,bv){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&bv==="radio"&&b.nodeName(e,"input")){var bw=e.value;e.setAttribute("type",bv);if(bw){e.value=bw}return bv}}}},tabIndex:{get:function(bv){var e=bv.getAttributeNode("tabIndex");return e&&e.specified?parseInt(e.value,10):E.test(bv.nodeName)||l.test(bv.nodeName)&&bv.href?0:L}}},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,bx,bA){var bv=bz.nodeType;if(!bz||bv===3||bv===8||bv===2){return L}var bw,e,by=bv!==1||!b.isXMLDoc(bz);bx=by&&b.propFix[bx]||bx;e=b.propHooks[bx];if(bA!==L){if(e&&"set" in e&&(bw=e.set(bz,bA,bx))!==L){return bw}else{return(bz[bx]=bA)}}else{if(e&&"get" in e&&(bw=e.get(bz,bx))!==L){return bw}else{return bz[bx]}}},propHooks:{}});aX={get:function(bv,e){return bv[b.propFix[e]||e]?e.toLowerCase():L},set:function(bv,bx,e){var bw;if(bx===false){b.removeAttr(bv,e)}else{bw=b.propFix[e]||e;if(bw in bv){bv[bw]=bx}bv.setAttribute(e,e.toLowerCase())}return e}};b.attrHooks.value={get:function(bv,e){if(a3&&b.nodeName(bv,"button")){return a3.get(bv,e)}return bv.value},set:function(bv,bw,e){if(a3&&b.nodeName(bv,"button")){return a3.set(bv,bw,e)}bv.value=bw}};if(!b.support.getSetAttribute){b.attrFix=b.propFix;a3=b.attrHooks.name=b.valHooks.button={get:function(bw,bv){var e;e=bw.getAttributeNode(bv);return e&&e.nodeValue!==""?e.nodeValue:L},set:function(bw,bx,bv){var e=bw.getAttributeNode(bv);if(e){e.nodeValue=bx;return bx}}};b.each(["width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bw,bx){if(bx===""){bw.setAttribute(e,"auto");return bx}}})})}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bx){var bw=bx.getAttribute(e,2);return bw===null?L:bw}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||L},set:function(e,bv){return(e.style.cssText=""+bv)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(bv){var e=bv.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}}})}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,bv){if(b.isArray(bv)){return(e.checked=b.inArray(b(e).val(),bv)>=0)}}})});var aE=Object.prototype.hasOwnProperty,aZ=/\.(.*)$/,be=/^(?:textarea|input|select)$/i,O=/\./g,bi=/ /g,aD=/[^\w\s.|`]/g,H=function(e){return e.replace(aD,"\\$&")};b.event={add:function(bx,bB,bG,bz){if(bx.nodeType===3||bx.nodeType===8){return}if(bG===false){bG=bk}else{if(!bG){return}}var bv,bF;if(bG.handler){bv=bG;bG=bv.handler}if(!bG.guid){bG.guid=b.guid++}var bC=b._data(bx);if(!bC){return}var bH=bC.events,bA=bC.handle;if(!bH){bC.events=bH={}}if(!bA){bC.handle=bA=function(bI){return typeof b!=="undefined"&&(!bI||b.event.triggered!==bI.type)?b.event.handle.apply(bA.elem,arguments):L}}bA.elem=bx;bB=bB.split(" ");var bE,by=0,e;while((bE=bB[by++])){bF=bv?b.extend({},bv):{handler:bG,data:bz};if(bE.indexOf(".")>-1){e=bE.split(".");bE=e.shift();bF.namespace=e.slice(0).sort().join(".")}else{e=[];bF.namespace=""}bF.type=bE;if(!bF.guid){bF.guid=bG.guid}var bw=bH[bE],bD=b.event.special[bE]||{};if(!bw){bw=bH[bE]=[];if(!bD.setup||bD.setup.call(bx,bz,e,bA)===false){if(bx.addEventListener){bx.addEventListener(bE,bA,false)}else{if(bx.attachEvent){bx.attachEvent("on"+bE,bA)}}}}if(bD.add){bD.add.call(bx,bF);if(!bF.handler.guid){bF.handler.guid=bG.guid}}bw.push(bF);b.event.global[bE]=true}bx=null},global:{},remove:function(bJ,bE,bw,bA){if(bJ.nodeType===3||bJ.nodeType===8){return}if(bw===false){bw=bk}var bM,bz,bB,bG,bH=0,bx,bC,bF,by,bD,e,bL,bI=b.hasData(bJ)&&b._data(bJ),bv=bI&&bI.events;if(!bI||!bv){return}if(bE&&bE.type){bw=bE.handler;bE=bE.type}if(!bE||typeof bE==="string"&&bE.charAt(0)==="."){bE=bE||"";for(bz in bv){b.event.remove(bJ,bz+bE)}return}bE=bE.split(" ");while((bz=bE[bH++])){bL=bz;e=null;bx=bz.indexOf(".")<0;bC=[];if(!bx){bC=bz.split(".");bz=bC.shift();bF=new RegExp("(^|\\.)"+b.map(bC.slice(0).sort(),H).join("\\.(?:.*\\.)?")+"(\\.|$)")}bD=bv[bz];if(!bD){continue}if(!bw){for(bG=0;bG=0){bE=bE.slice(0,-1);bv=true}if(bE.indexOf(".")>=0){bw=bE.split(".");bE=bw.shift();bw.sort()}if((!bz||b.event.customEvent[bE])&&!b.event.global[bE]){return}e=typeof e==="object"?e[b.expando]?e:new b.Event(bE,e):new b.Event(bE);e.type=bE;e.exclusive=bv;e.namespace=bw.join(".");e.namespace_re=new RegExp("(^|\\.)"+bw.join("\\.(?:.*\\.)?")+"(\\.|$)");if(bG||!bz){e.preventDefault();e.stopPropagation()}if(!bz){b.each(b.cache,function(){var bI=b.expando,bH=this[bI];if(bH&&bH.events&&bH.events[bE]){b.event.trigger(e,bB,bH.handle.elem)}});return}if(bz.nodeType===3||bz.nodeType===8){return}e.result=L;e.target=bz;bB=bB?b.makeArray(bB):[];bB.unshift(e);var bF=bz,bx=bE.indexOf(":")<0?"on"+bE:"";do{var bC=b._data(bF,"handle");e.currentTarget=bF;if(bC){bC.apply(bF,bB)}if(bx&&b.acceptData(bF)&&bF[bx]&&bF[bx].apply(bF,bB)===false){e.result=false;e.preventDefault()}bF=bF.parentNode||bF.ownerDocument||bF===e.target.ownerDocument&&bc}while(bF&&!e.isPropagationStopped());if(!e.isDefaultPrevented()){var by,bD=b.event.special[bE]||{};if((!bD._default||bD._default.call(bz.ownerDocument,e)===false)&&!(bE==="click"&&b.nodeName(bz,"a"))&&b.acceptData(bz)){try{if(bx&&bz[bE]){by=bz[bx];if(by){bz[bx]=null}b.event.triggered=bE;bz[bE]()}}catch(bA){}if(by){bz[bx]=by}b.event.triggered=L}}return e.result},handle:function(bB){bB=b.event.fix(bB||bc.event);var bv=((b._data(this,"events")||{})[bB.type]||[]).slice(0),bA=!bB.exclusive&&!bB.namespace,by=Array.prototype.slice.call(arguments,0);by[0]=bB;bB.currentTarget=this;for(var bx=0,e=bv.length;bx-1?b.map(bv.options,function(bx){return bx.selected}).join("-"):""}else{if(b.nodeName(bv,"select")){bw=bv.selectedIndex}}}return bw},aa=function aa(bx){var bv=bx.target,bw,by;if(!be.test(bv.nodeName)||bv.readOnly){return}bw=b._data(bv,"_change_data");by=k(bv);if(bx.type!=="focusout"||bv.type!=="radio"){b._data(bv,"_change_data",by)}if(bw===L||by===bw){return}if(bw!=null||by){bx.type="change";bx.liveFired=L;b.event.trigger(bx,arguments[1],bv)}};b.event.special.change={filters:{focusout:aa,beforedeactivate:aa,click:function(bx){var bw=bx.target,bv=b.nodeName(bw,"input")?bw.type:"";if(bv==="radio"||bv==="checkbox"||b.nodeName(bw,"select")){aa.call(this,bx)}},keydown:function(bx){var bw=bx.target,bv=b.nodeName(bw,"input")?bw.type:"";if((bx.keyCode===13&&!b.nodeName(bw,"textarea"))||(bx.keyCode===32&&(bv==="checkbox"||bv==="radio"))||bv==="select-multiple"){aa.call(this,bx)}},beforeactivate:function(bw){var bv=bw.target;b._data(bv,"_change_data",k(bv))}},setup:function(bw,bv){if(this.type==="file"){return false}for(var e in bn){b.event.add(this,e+".specialChange",bn[e])}return be.test(this.nodeName)},teardown:function(e){b.event.remove(this,".specialChange");return be.test(this.nodeName)}};bn=b.event.special.change.filters;bn.focus=bn.beforeactivate}function aW(bv,bx,e){var bw=b.extend({},e[0]);bw.type=bv;bw.originalEvent={};bw.liveFired=L;b.event.handle.call(bx,bw);if(bw.isDefaultPrevented()){e[0].preventDefault()}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bx,e){var bv=0;b.event.special[e]={setup:function(){if(bv++===0){ar.addEventListener(bx,bw,true)}},teardown:function(){if(--bv===0){ar.removeEventListener(bx,bw,true)}}};function bw(by){var bz=b.event.fix(by);bz.type=e;bz.originalEvent={};b.event.trigger(bz,null,bz.target);if(bz.isDefaultPrevented()){by.preventDefault()}}})}b.each(["bind","one"],function(bv,e){b.fn[e]=function(bB,bC,bA){var bz;if(typeof bB==="object"){for(var by in bB){this[e](by,bC,bB[by],bA)}return this}if(arguments.length===2||bC===false){bA=bC;bC=L}if(e==="one"){bz=function(bD){b(this).unbind(bD,bz);return bA.apply(this,arguments)};bz.guid=bA.guid||b.guid++}else{bz=bA}if(bB==="unload"&&e!=="one"){this.one(bB,bC,bA)}else{for(var bx=0,bw=this.length;bxbx){break}bF.currentTarget=bz.elem;bF.data=bz.handleObj.data;bF.handleObj=bz.handleObj;bJ=bz.handleObj.origHandler.apply(bz.elem,arguments);if(bJ===false||bF.isPropagationStopped()){bx=bz.level;if(bJ===false){bC=false}if(bF.isImmediatePropagationStopped()){break}}}return bC}function q(bv,e){return(bv&&bv!=="*"?bv+".":"")+e.replace(O,"`").replace(bi,"&")}b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),function(bv,e){b.fn[e]=function(bx,bw){if(bw==null){bw=bx;bx=null}return arguments.length>0?this.bind(e,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bF=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bG=0,bJ=Object.prototype.toString,bA=false,bz=true,bH=/\\/g,bN=/\W/;[0,0].sort(function(){bz=false;return 0});var bx=function(bS,e,bV,bW){bV=bV||[];e=e||ar;var bY=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bS||typeof bS!=="string"){return bV}var bP,b0,b3,bO,bZ,b2,b1,bU,bR=true,bQ=bx.isXML(e),bT=[],bX=bS;do{bF.exec("");bP=bF.exec(bX);if(bP){bX=bP[3];bT.push(bP[1]);if(bP[2]){bO=bP[3];break}}}while(bP);if(bT.length>1&&bB.exec(bS)){if(bT.length===2&&bC.relative[bT[0]]){b0=bK(bT[0]+bT[1],e)}else{b0=bC.relative[bT[0]]?[e]:bx(bT.shift(),e);while(bT.length){bS=bT.shift();if(bC.relative[bS]){bS+=bT.shift()}b0=bK(bS,b0)}}}else{if(!bW&&bT.length>1&&e.nodeType===9&&!bQ&&bC.match.ID.test(bT[0])&&!bC.match.ID.test(bT[bT.length-1])){bZ=bx.find(bT.shift(),e,bQ);e=bZ.expr?bx.filter(bZ.expr,bZ.set)[0]:bZ.set[0]}if(e){bZ=bW?{expr:bT.pop(),set:bD(bW)}:bx.find(bT.pop(),bT.length===1&&(bT[0]==="~"||bT[0]==="+")&&e.parentNode?e.parentNode:e,bQ);b0=bZ.expr?bx.filter(bZ.expr,bZ.set):bZ.set;if(bT.length>0){b3=bD(b0)}else{bR=false}while(bT.length){b2=bT.pop();b1=b2;if(!bC.relative[b2]){b2=""}else{b1=bT.pop()}if(b1==null){b1=e}bC.relative[b2](b3,b1,bQ)}}else{b3=bT=[]}}if(!b3){b3=b0}if(!b3){bx.error(b2||bS)}if(bJ.call(b3)==="[object Array]"){if(!bR){bV.push.apply(bV,b3)}else{if(e&&e.nodeType===1){for(bU=0;b3[bU]!=null;bU++){if(b3[bU]&&(b3[bU]===true||b3[bU].nodeType===1&&bx.contains(e,b3[bU]))){bV.push(b0[bU])}}}else{for(bU=0;b3[bU]!=null;bU++){if(b3[bU]&&b3[bU].nodeType===1){bV.push(b0[bU])}}}}}else{bD(b3,bV)}if(bO){bx(bO,bY,bV,bW);bx.uniqueSort(bV)}return bV};bx.uniqueSort=function(bO){if(bI){bA=bz;bO.sort(bI);if(bA){for(var e=1;e0};bx.find=function(bU,e,bV){var bT;if(!bU){return[]}for(var bQ=0,bP=bC.order.length;bQ":function(bT,bO){var bS,bR=typeof bO==="string",bP=0,e=bT.length;if(bR&&!bN.test(bO)){bO=bO.toLowerCase();for(;bP=0)){if(!bP){e.push(bS)}}else{if(bP){bO[bR]=false}}}}return false},ID:function(e){return e[1].replace(bH,"")},TAG:function(bO,e){return bO[1].replace(bH,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bx.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bO=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bO[1]+(bO[2]||1))-0;e[3]=bO[3]-0}else{if(e[2]){bx.error(e[0])}}e[0]=bG++;return e},ATTR:function(bR,bO,bP,e,bS,bT){var bQ=bR[1]=bR[1].replace(bH,"");if(!bT&&bC.attrMap[bQ]){bR[1]=bC.attrMap[bQ]}bR[4]=(bR[4]||bR[5]||"").replace(bH,"");if(bR[2]==="~="){bR[4]=" "+bR[4]+" "}return bR},PSEUDO:function(bR,bO,bP,e,bS){if(bR[1]==="not"){if((bF.exec(bR[3])||"").length>1||/^\w/.test(bR[3])){bR[3]=bx(bR[3],null,null,bO)}else{var bQ=bx.filter(bR[3],bO,bP,true^bS);if(!bP){e.push.apply(e,bQ)}return false}}else{if(bC.match.POS.test(bR[0])||bC.match.CHILD.test(bR[0])){return true}}return bR},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(bP,bO,e){return !!bx(e[3],bP).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bP){var e=bP.getAttribute("type"),bO=bP.type;return bP.nodeName.toLowerCase()==="input"&&"text"===bO&&(e===bO||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(bO){var e=bO.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bO.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bO){var e=bO.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bO.type},button:function(bO){var e=bO.nodeName.toLowerCase();return e==="input"&&"button"===bO.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(bO,e){return e===0},last:function(bP,bO,e,bQ){return bO===bQ.length-1},even:function(bO,e){return e%2===0},odd:function(bO,e){return e%2===1},lt:function(bP,bO,e){return bOe[3]-0},nth:function(bP,bO,e){return e[3]-0===bO},eq:function(bP,bO,e){return e[3]-0===bO}},filter:{PSEUDO:function(bP,bU,bT,bV){var e=bU[1],bO=bC.filters[e];if(bO){return bO(bP,bT,bU,bV)}else{if(e==="contains"){return(bP.textContent||bP.innerText||bx.getText([bP])||"").indexOf(bU[3])>=0}else{if(e==="not"){var bQ=bU[3];for(var bS=0,bR=bQ.length;bS=0)}}},ID:function(bO,e){return bO.nodeType===1&&bO.getAttribute("id")===e},TAG:function(bO,e){return(e==="*"&&bO.nodeType===1)||bO.nodeName.toLowerCase()===e},CLASS:function(bO,e){return(" "+(bO.className||bO.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bS,bQ){var bP=bQ[1],e=bC.attrHandle[bP]?bC.attrHandle[bP](bS):bS[bP]!=null?bS[bP]:bS.getAttribute(bP),bT=e+"",bR=bQ[2],bO=bQ[4];return e==null?bR==="!=":bR==="="?bT===bO:bR==="*="?bT.indexOf(bO)>=0:bR==="~="?(" "+bT+" ").indexOf(bO)>=0:!bO?bT&&e!==false:bR==="!="?bT!==bO:bR==="^="?bT.indexOf(bO)===0:bR==="$="?bT.substr(bT.length-bO.length)===bO:bR==="|="?bT===bO||bT.substr(0,bO.length+1)===bO+"-":false},POS:function(bR,bO,bP,bS){var e=bO[2],bQ=bC.setFilters[e];if(bQ){return bQ(bR,bP,bO,bS)}}}};var bB=bC.match.POS,bw=function(bO,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,bw))}var bD=function(bO,e){bO=Array.prototype.slice.call(bO,0);if(e){e.push.apply(e,bO);return e}return bO};try{Array.prototype.slice.call(ar.documentElement.childNodes,0)[0].nodeType}catch(bM){bD=function(bR,bQ){var bP=0,bO=bQ||[];if(bJ.call(bR)==="[object Array]"){Array.prototype.push.apply(bO,bR)}else{if(typeof bR.length==="number"){for(var e=bR.length;bP";e.insertBefore(bO,e.firstChild);if(ar.getElementById(bP)){bC.find.ID=function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var bQ=bS.getElementById(bR[1]);return bQ?bQ.id===bR[1]||typeof bQ.getAttributeNode!=="undefined"&&bQ.getAttributeNode("id").nodeValue===bR[1]?[bQ]:L:[]}};bC.filter.ID=function(bS,bQ){var bR=typeof bS.getAttributeNode!=="undefined"&&bS.getAttributeNode("id");return bS.nodeType===1&&bR&&bR.nodeValue===bQ}}e.removeChild(bO);e=bO=null})();(function(){var e=ar.createElement("div");e.appendChild(ar.createComment(""));if(e.getElementsByTagName("*").length>0){bC.find.TAG=function(bO,bS){var bR=bS.getElementsByTagName(bO[1]);if(bO[1]==="*"){var bQ=[];for(var bP=0;bR[bP];bP++){if(bR[bP].nodeType===1){bQ.push(bR[bP])}}bR=bQ}return bR}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bC.attrHandle.href=function(bO){return bO.getAttribute("href",2)}}e=null})();if(ar.querySelectorAll){(function(){var e=bx,bQ=ar.createElement("div"),bP="__sizzle__";bQ.innerHTML="

";if(bQ.querySelectorAll&&bQ.querySelectorAll(".TEST").length===0){return}bx=function(b1,bS,bW,b0){bS=bS||ar;if(!b0&&!bx.isXML(bS)){var bZ=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b1);if(bZ&&(bS.nodeType===1||bS.nodeType===9)){if(bZ[1]){return bD(bS.getElementsByTagName(b1),bW)}else{if(bZ[2]&&bC.find.CLASS&&bS.getElementsByClassName){return bD(bS.getElementsByClassName(bZ[2]),bW)}}}if(bS.nodeType===9){if(b1==="body"&&bS.body){return bD([bS.body],bW)}else{if(bZ&&bZ[3]){var bV=bS.getElementById(bZ[3]);if(bV&&bV.parentNode){if(bV.id===bZ[3]){return bD([bV],bW)}}else{return bD([],bW)}}}try{return bD(bS.querySelectorAll(b1),bW)}catch(bX){}}else{if(bS.nodeType===1&&bS.nodeName.toLowerCase()!=="object"){var bT=bS,bU=bS.getAttribute("id"),bR=bU||bP,b3=bS.parentNode,b2=/^\s*[+~]/.test(b1);if(!bU){bS.setAttribute("id",bR)}else{bR=bR.replace(/'/g,"\\$&")}if(b2&&b3){bS=bS.parentNode}try{if(!b2||b3){return bD(bS.querySelectorAll("[id='"+bR+"'] "+b1),bW)}}catch(bY){}finally{if(!bU){bT.removeAttribute("id")}}}}}return e(b1,bS,bW,b0)};for(var bO in e){bx[bO]=e[bO]}bQ=null})()}(function(){var e=ar.documentElement,bP=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bP){var bR=!bP.call(ar.createElement("div"),"div"),bO=false;try{bP.call(ar.documentElement,"[test!='']:sizzle")}catch(bQ){bO=true}bx.matchesSelector=function(bT,bV){bV=bV.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bx.isXML(bT)){try{if(bO||!bC.match.PSEUDO.test(bV)&&!/!=/.test(bV)){var bS=bP.call(bT,bV);if(bS||!bR||bT.document&&bT.document.nodeType!==11){return bS}}}catch(bU){}}return bx(bV,null,null,[bT]).length>0}}})();(function(){var e=ar.createElement("div");e.innerHTML="
";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(bO,bP,bQ){if(typeof bP.getElementsByClassName!=="undefined"&&!bQ){return bP.getElementsByClassName(bO[1])}};e=null})();function bv(bO,bT,bS,bW,bU,bV){for(var bQ=0,bP=bW.length;bQ0){bR=e;break}}}e=e[bO]}bW[bQ]=bR}}}if(ar.documentElement.contains){bx.contains=function(bO,e){return bO!==e&&(bO.contains?bO.contains(e):true)}}else{if(ar.documentElement.compareDocumentPosition){bx.contains=function(bO,e){return !!(bO.compareDocumentPosition(e)&16)}}else{bx.contains=function(){return false}}}bx.isXML=function(e){var bO=(e?e.ownerDocument||e:0).documentElement;return bO?bO.nodeName!=="HTML":false};var bK=function(e,bU){var bS,bQ=[],bR="",bP=bU.nodeType?[bU]:bU;while((bS=bC.match.PSEUDO.exec(e))){bR+=bS[0];e=e.replace(bC.match.PSEUDO,"")}e=bC.relative[e]?e+"*":e;for(var bT=0,bO=bP.length;bT0){for(bB=bA;bB0:this.filter(e).length>0)},closest:function(bE,bv){var bB=[],by,bw,bD=this[0];if(b.isArray(bE)){var bA,bx,bz={},e=1;if(bD&&bE.length){for(by=0,bw=bE.length;by-1:b(bD).is(bA)){bB.push({selector:bx,elem:bD,level:e})}}bD=bD.parentNode;e++}}return bB}var bC=I.test(bE)||typeof bE!=="string"?b(bE,bv||this.context):0;for(by=0,bw=this.length;by-1:b.find.matchesSelector(bD,bE)){bB.push(bD);break}else{bD=bD.parentNode;if(!bD||!bD.ownerDocument||bD===bv||bD.nodeType===11){break}}}}bB=bB.length>1?b.unique(bB):bB;return this.pushStack(bB,"closest",bE)},index:function(e){if(!e||typeof e==="string"){return b.inArray(this[0],e?b(e):this.parent().children())}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(D(bx[0])||D(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function D(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(bz,bw){var by=b.map(this,bv,bz),bx=Q.call(arguments);if(!Z.test(e)){bw=bz}if(bw&&typeof bw==="string"){by=b.filter(bw,by)}by=this.length>1&&!av[e]?b.unique(by):by;if((this.length>1||ba.test(bw))&&an.test(e)){by=by.reverse()}return this.pushStack(by,e,bx.join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){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 aC(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bq.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}var ae=/ jQuery\d+="(?:\d+|null)"/g,ao=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,x=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};au.optgroup=au.option;au.tbody=au.tfoot=au.colgroup=au.caption=au.thead;au.th=au.td;if(!b.support.htmlSerialize){au._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||ar).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(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(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){return this.each(function(){b(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b(arguments[0]).toArray());return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.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 b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ae,""):null}else{if(typeof bx==="string"&&!P.test(bx)&&(b.support.leadingWhitespace||!ao.test(bx))&&!au[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(T,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bf(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")}else{if("querySelectorAll" in e){return e.querySelectorAll("*")}else{return[]}}}function aw(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function F(e){if(b.nodeName(e,"input")){aw(e)}else{if(e.getElementsByTagName){b.grep(e.getElementsByTagName("input"),aw)}}}b.extend({clone:function(by,bA,bw){var bz=by.cloneNode(true),e,bv,bx;if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){af(by,bz);e=bf(by);bv=bf(bz);for(bx=0;e[bx];++bx){af(e[bx],bv[bx])}}if(bA){u(by,bz);if(bw){e=bf(by);bv=bf(bz);for(bx=0;e[bx];++bx){u(e[bx],bv[bx])}}}return bz},clean:function(bw,by,bH,bA){var bF;by=by||ar;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||ar}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(T,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=au[bK]||au._default,bD=bx[0],bv=by.createElement("div");bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=x.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ao.test(bz)){bv.insertBefore(by.createTextNode(ao.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return aq.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;bx.zoom=1;var e=b.isNaN(bz)?"":"alpha(opacity="+bz*100+")",bw=bv&&bv.filter||bx.filter||"";bx.filter=ai.test(bw)?bw.replace(ai,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=X(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(ar.defaultView&&ar.defaultView.getComputedStyle){aG=function(by,bw){var bv,bx,e;bw=bw.replace(A,"-$1").toLowerCase();if(!(bx=by.ownerDocument.defaultView)){return L}if((e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(ar.documentElement.currentStyle){aU=function(by,bw){var bz,bv=by.currentStyle&&by.currentStyle[bw],e=by.runtimeStyle&&by.runtimeStyle[bw],bx=by.style;if(!bd.test(bv)&&bo.test(bv)){bz=bx.left;if(e){by.runtimeStyle.left=by.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bz;if(e){by.runtimeStyle.left=e}}return bv===""?"auto":bv}}X=aG||aU;function p(bw,bv,e){var by=bv==="width"?ak:a1,bx=bv==="width"?bw.offsetWidth:bw.offsetHeight;if(e==="border"){return bx}b.each(by,function(){if(!e){bx-=parseFloat(b.css(bw,"padding"+this))||0}if(e==="margin"){bx+=parseFloat(b.css(bw,"margin"+this))||0}else{bx-=parseFloat(b.css(bw,"border"+this+"Width"))||0}});return bx}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&(bw.style.display||b.css(bw,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var j=/%20/g,am=/\[\]$/,bt=/\r?\n/g,br=/#.*$/,aA=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aY=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,aN=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a6=/)<[^<]*)*<\/script>/gi,r=/^(?:select|textarea)/i,h=/\s+/,bs=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,B=b.fn.load,Y={},s={},aB,t;try{aB=bl.href}catch(at){aB=ar.createElement("a");aB.href="";aB=aB.href}t=K.exec(aB.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||r.test(this.nodeName)||aY.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bt,"\r\n")}}):{name:bv.name,value:bw.replace(bt,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.bind(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bw,e){if(!e){e=bw;bw=b.extend(true,b.ajaxSettings,e)}else{b.extend(true,bw,b.ajaxSettings,e)}for(var bv in {context:1,url:1}){if(bv in e){bw[bv]=e[bv]}else{if(bv in b.ajaxSettings){bw[bv]=b.ajaxSettings[bv]}}}return bw},ajaxSettings:{url:aB,isLocal:aK.test(t[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","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bc.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML}},ajaxPrefilter:f(Y),ajaxTransport:f(s),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b._Deferred(),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aA.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bY,bW,bZ,bV){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bV||"";bJ.readyState=bY?4:0;var bT,b3,b2,bX=bZ?bj(bD,bJ,bZ):L,bU,b1;if(bY>=200&&bY<300||bY===304){if(bD.ifModified){if((bU=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bU}if((b1=bJ.getResponseHeader("Etag"))){b.etag[bC]=b1}}if(bY===304){bW="notmodified";bT=true}else{try{b3=G(bD,bX);bW="success";bT=true}catch(b0){bW="parsererror";b2=b0}}}else{b2=bW;if(!bW||bY){bW="error";if(bY<0){bY=0}}}bJ.status=bY;bJ.statusText=bW;if(bT){bR.resolveWith(bS,[b3,bW,bJ])}else{bR.rejectWith(bS,[bJ,bW,b2])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b3:b2])}bN.resolveWith(bS,[bJ,bW]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.done;bJ.statusCode=function(bT){if(bT){var e;if(bA<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(br,"").replace(c,t[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=t[1]||bI[2]!=t[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(t[3]||(t[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aS(Y,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aN.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(bs,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", */*; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aS(s,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(status<2){bF(-1,bM)}else{b.error(bM)}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){w(bx,e[bx],bw,by)}}return bv.join("&").replace(j,"+")}});function w(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||am.test(bw)){bx(bw,bz)}else{w(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){w(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bv.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bv.animatedProperties[this.prop]=true;for(bw in bv.animatedProperties){if(bv.animatedProperties[bw]!==true){e=false}}if(e){if(bv.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bv.overflow[bC]})}if(bv.hide){b(bz).hide()}if(bv.hide||bv.show){for(var bA in bv.animatedProperties){b.style(bz,bA,bv.orig[bA])}}bv.complete.call(bz)}return false}else{if(bv.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bv.duration;this.pos=b.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}};b.extend(b.fx,{tick:function(){for(var bv=b.timers,e=0;e").appendTo("body"),bv=e.css("display");e.remove();if(bv==="none"||bv===""){if(!a9){a9=ar.createElement("iframe");a9.frameBorder=a9.width=a9.height=0}ar.body.appendChild(a9);if(!m||!a9.createElement){m=(a9.contentWindow||a9.contentDocument).document;m.write("")}e=m.createElement(bw);m.body.appendChild(e);bv=b.css(e,"display");ar.body.removeChild(a9)}R[bw]=bv}return R[bw]}var V=/^t(?:able|d|h)$/i,ab=/^(?:body|html)$/i;if("getBoundingClientRect" in ar.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aI(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}b.offset.initialize();var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.offset.supportsFixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.offset.doesNotAddBorder&&!(b.offset.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.offset.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.offset.supportsFixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={initialize:function(){var e=ar.body,bv=ar.createElement("div"),by,bA,bz,bB,bw=parseFloat(b.css(e,"marginTop"))||0,bx="
";b.extend(bv.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});bv.innerHTML=bx;e.insertBefore(bv,e.firstChild);by=bv.firstChild;bA=by.firstChild;bB=by.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(bA.offsetTop!==5);this.doesAddBorderForTableAndCells=(bB.offsetTop===5);bA.style.position="fixed";bA.style.top="20px";this.supportsFixedPosition=(bA.offsetTop===20||bA.offsetTop===15);bA.style.position=bA.style.top="";by.style.overflow="hidden";by.style.position="relative";this.subtractsBorderForOverflowNotVisible=(bA.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==bw);e.removeChild(bv);b.offset.initialize=b.noop},bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;b.offset.initialize();if(b.offset.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ab.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.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||ar.body;while(e&&(!ab.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aI(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aI(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aI(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){return this[0]?parseFloat(b.css(this[0],bw,"padding")):null};b.fn["outer"+e]=function(bx){return this[0]?parseFloat(b.css(this[0],bw,bx?"margin":"border")):null};b.fn[bw]=function(by){var bz=this[0];if(!bz){return by==null?null:this}if(b.isFunction(by)){return this.each(function(bD){var bC=b(this);bC[bw](by.call(this,bD,bC[bw]()))})}if(b.isWindow(bz)){var bA=bz.document.documentElement["client"+e];return bz.document.compatMode==="CSS1Compat"&&bA||bz.document.body["client"+e]||bA}else{if(bz.nodeType===9){return Math.max(bz.documentElement["client"+e],bz.body["scroll"+e],bz.documentElement["scroll"+e],bz.body["offset"+e],bz.documentElement["offset"+e])}else{if(by===L){var bB=b.css(bz,bw),bx=parseFloat(bB);return b.isNaN(bx)?bB:bx}else{return this.css(bw,typeof by==="string"?by:by+"px")}}}}});bc.jQuery=bc.$=b})(window); -/*! - * jQuery UI 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.13",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery); -/*! - * jQuery UI Widget 1.8.13 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(e){for(var f=0,g;(g=e[f])!=null;f++){b(g).triggerHandler("remove")}c(e)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(f,g,h){var k=this.options[f];g=b.Event(g);g.type=(f===this.widgetEventPrefix?f:this.widgetEventPrefix+f).toLowerCase();h=h||{};if(g.originalEvent){for(var e=b.event.props.length,j;e;){j=b.event.props[--e];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(b.isFunction(k)&&k.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);(function(f,g){f.ui=f.ui||{};var d=/left|center|right/,e=/top|center|bottom/,a="center",b=f.fn.position,c=f.fn.offset;f.fn.position=function(i){if(!i||!i.of){return b.apply(this,arguments)}i=f.extend({},i);var m=f(i.of),l=m[0],o=(i.collision||"flip").split(" "),n=i.offset?i.offset.split(" "):[0,0],k,h,j;if(l.nodeType===9){k=m.width();h=m.height();j={top:0,left:0}}else{if(l.setTimeout){k=m.width();h=m.height();j={top:m.scrollTop(),left:m.scrollLeft()}}else{if(l.preventDefault){i.at="left top";k=h=0;j={top:i.of.pageY,left:i.of.pageX}}else{k=m.outerWidth();h=m.outerHeight();j=m.offset()}}}f.each(["my","at"],function(){var p=(i[this]||"").split(" ");if(p.length===1){p=d.test(p[0])?p.concat([a]):e.test(p[0])?[a].concat(p):[a,a]}p[0]=d.test(p[0])?p[0]:a;p[1]=e.test(p[1])?p[1]:a;i[this]=p});if(o.length===1){o[1]=o[0]}n[0]=parseInt(n[0],10)||0;if(n.length===1){n[1]=n[0]}n[1]=parseInt(n[1],10)||0;if(i.at[0]==="right"){j.left+=k}else{if(i.at[0]===a){j.left+=k/2}}if(i.at[1]==="bottom"){j.top+=h}else{if(i.at[1]===a){j.top+=h/2}}j.left+=n[0];j.top+=n[1];return this.each(function(){var s=f(this),u=s.outerWidth(),r=s.outerHeight(),t=parseInt(f.curCSS(this,"marginLeft",true))||0,q=parseInt(f.curCSS(this,"marginTop",true))||0,w=u+t+(parseInt(f.curCSS(this,"marginRight",true))||0),x=r+q+(parseInt(f.curCSS(this,"marginBottom",true))||0),v=f.extend({},j),p;if(i.my[0]==="right"){v.left-=u}else{if(i.my[0]===a){v.left-=u/2}}if(i.my[1]==="bottom"){v.top-=r}else{if(i.my[1]===a){v.top-=r/2}}v.left=Math.round(v.left);v.top=Math.round(v.top);p={left:v.left-t,top:v.top-q};f.each(["left","top"],function(z,y){if(f.ui.position[o[z]]){f.ui.position[o[z]][y](v,{targetWidth:k,targetHeight:h,elemWidth:u,elemHeight:r,collisionPosition:p,collisionWidth:w,collisionHeight:x,offset:n,my:i.my,at:i.at})}});if(f.fn.bgiframe){s.bgiframe()}s.offset(f.extend(v,{using:i.using}))})};f.ui.position={fit:{left:function(h,i){var k=f(window),j=i.collisionPosition.left+i.collisionWidth-k.width()-k.scrollLeft();h.left=j>0?h.left-j:Math.max(h.left-i.collisionPosition.left,h.left)},top:function(h,i){var k=f(window),j=i.collisionPosition.top+i.collisionHeight-k.height()-k.scrollTop();h.top=j>0?h.top-j:Math.max(h.top-i.collisionPosition.top,h.top)}},flip:{left:function(i,k){if(k.at[0]===a){return}var m=f(window),l=k.collisionPosition.left+k.collisionWidth-m.width()-m.scrollLeft(),h=k.my[0]==="left"?-k.elemWidth:k.my[0]==="right"?k.elemWidth:0,j=k.at[0]==="left"?k.targetWidth:-k.targetWidth,n=-2*k.offset[0];i.left+=k.collisionPosition.left<0?h+j+n:l>0?h+j+n:0},top:function(i,k){if(k.at[1]===a){return}var m=f(window),l=k.collisionPosition.top+k.collisionHeight-m.height()-m.scrollTop(),h=k.my[1]==="top"?-k.elemHeight:k.my[1]==="bottom"?k.elemHeight:0,j=k.at[1]==="top"?k.targetHeight:-k.targetHeight,n=-2*k.offset[1];i.top+=k.collisionPosition.top<0?h+j+n:l>0?h+j+n:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(l,i){if(/static/.test(f.curCSS(l,"position"))){l.style.position="relative"}var k=f(l),n=k.offset(),h=parseInt(f.curCSS(l,"top",true),10)||0,m=parseInt(f.curCSS(l,"left",true),10)||0,j={top:(i.top-n.top)+h,left:(i.left-n.left)+m};if("using" in i){i.using.call(l,j)}else{k.css(j)}};f.fn.offset=function(h){var i=this[0];if(!i||!i.ownerDocument){return null}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return c.call(this)}}}(jQuery));(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var d=this,f=this.element[0].ownerDocument,e;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(g){if(d.options.disabled||d.element.attr("readonly")){return}e=false;var h=a.ui.keyCode;switch(g.keyCode){case h.PAGE_UP:d._move("previousPage",g);break;case h.PAGE_DOWN:d._move("nextPage",g);break;case h.UP:d._move("previous",g);g.preventDefault();break;case h.DOWN:d._move("next",g);g.preventDefault();break;case h.ENTER:case h.NUMPAD_ENTER:if(d.menu.active){e=true;g.preventDefault()}case h.TAB:if(!d.menu.active){return}d.menu.select(g);break;case h.ESCAPE:d.element.val(d.term);d.close(g);break;default:clearTimeout(d.searching);d.searching=setTimeout(function(){if(d.term!=d.element.val()){d.selectedItem=null;d.search(null,g)}},d.options.delay);break}}).bind("keypress.autocomplete",function(g){if(e){e=false;g.preventDefault()}}).bind("focus.autocomplete",function(){if(d.options.disabled){return}d.selectedItem=null;d.previous=d.element.val()}).bind("blur.autocomplete",function(g){if(d.options.disabled){return}clearTimeout(d.searching);d.closing=setTimeout(function(){d.close(g);d._change(g)},150)});this._initSource();this.response=function(){return d._response.apply(d,arguments)};this.menu=a("
    ").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",f)[0]).mousedown(function(g){var h=d.menu.element[0];if(!a(g.target).closest(".ui-menu-item").length){setTimeout(function(){a(document).one("mousedown",function(i){if(i.target!==d.element[0]&&i.target!==h&&!a.ui.contains(h,i.target)){d.close()}})},1)}setTimeout(function(){clearTimeout(d.closing)},13)}).menu({focus:function(h,i){var g=i.item.data("item.autocomplete");if(false!==d._trigger("focus",h,{item:g})){if(/^key/.test(h.originalEvent.type)){d.element.val(g.value)}}},selected:function(i,j){var h=j.item.data("item.autocomplete"),g=d.previous;if(d.element[0]!==f.activeElement){d.element.focus();d.previous=g;setTimeout(function(){d.previous=g;d.selectedItem=h},1)}if(false!==d._trigger("select",i,{item:h})){d.element.val(h.value)}d.term=d.element.val();d.close(i);d.selectedItem=h},blur:function(g,h){if(d.menu.element.is(":visible")&&(d.element.val()!==d.term)){d.element.val(d.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(a.fn.bgiframe){this.menu.element.bgiframe()}},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(d,e){a.Widget.prototype._setOption.apply(this,arguments);if(d==="source"){this._initSource()}if(d==="appendTo"){this.menu.element.appendTo(a(e||"body",this.element[0].ownerDocument)[0])}if(d==="disabled"&&e&&this.xhr){this.xhr.abort()}},_initSource:function(){var d=this,f,e;if(a.isArray(this.options.source)){f=this.options.source;this.source=function(h,g){g(a.ui.autocomplete.filter(f,h.term))}}else{if(typeof this.options.source==="string"){e=this.options.source;this.source=function(h,g){if(d.xhr){d.xhr.abort()}d.xhr=a.ajax({url:e,data:h,dataType:"json",autocompleteRequest:++c,success:function(j,i){if(this.autocompleteRequest===c){g(j)}},error:function(){if(this.autocompleteRequest===c){g([])}}})}}else{this.source=this.options.source}}},search:function(e,d){e=e!=null?e:this.element.val();this.term=this.element.val();if(e.length").data("item.autocomplete",e).append(a("").text(e.label)).appendTo(d)},_move:function(e,d){if(!this.menu.element.is(":visible")){this.search(null,d);return}if(this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)){this.element.val(this.term);this.menu.deactivate();return}this.menu[e](d)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(d){return d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(f,d){var e=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(f,function(g){return e.test(g.label||g.value||g)})}})}(jQuery));(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length){return}c.preventDefault();b.select(c)});this.refresh()},refresh:function(){var c=this;var b=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");b.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(d){c.activate(d,a(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(e,d){this.deactivate();if(this.hasScroll()){var f=d.offset().top-this.element.offset().top,b=this.element.scrollTop(),c=this.element.height();if(f<0){this.element.scrollTop(b+f)}else{if(f>=c){this.element.scrollTop(b+f-c+d.height())}}}this.active=d.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:d})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null},next:function(b){this.move("next",".ui-menu-item:first",b)},previous:function(b){this.move("prev",".ui-menu-item:last",b)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,d,c){if(!this.active){this.activate(c,this.element.children(d));return}var b=this.active[e+"All"](".ui-menu-item").eq(0);if(b.length){this.activate(c,b)}else{this.activate(c,this.element.children(d))}},nextPage:function(d){if(this.hasScroll()){if(!this.active||this.last()){this.activate(d,this.element.children(".ui-menu-item:first"));return}var e=this.active.offset().top,c=this.element.height(),b=this.element.children(".ui-menu-item").filter(function(){var f=a(this).offset().top-e-c+a(this).height();return f<10&&f>-10});if(!b.length){b=this.element.children(".ui-menu-item:last")}this.activate(d,b)}else{this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(c){if(this.hasScroll()){if(!this.active||this.first()){this.activate(c,this.element.children(".ui-menu-item:last"));return}var d=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-d+b-a(this).height();return e<10&&e>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(c,result)}else{this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()=E.computed&&(E={value:L,computed:J})});return E.value};C.min=function(H,G,F){if(!G&&C.isArray(H)){return Math.min.apply(Math,H)}var E={computed:Infinity};d(H,function(L,I,K){var J=G?G.call(F,L,I,K):L;JH?1:0}),"value")};C.sortedIndex=function(J,I,G){G=G||C.identity;var E=0,H=J.length;while(E>1;G(J[F])=0})})};C.zip=function(){var E=s.call(arguments);var H=C.max(C.pluck(E,"length"));var G=new Array(H);for(var F=0;F=0;G--){F=[E[G].apply(this,F)]}return F[0]}};C.keys=A||function(G){if(G!==Object(G)){throw new TypeError("Invalid object")}var F=[];for(var E in G){if(o.call(G,E)){F[F.length]=E}}return F};C.values=function(E){return C.map(E,C.identity)};C.functions=C.methods=function(E){return C.filter(C.keys(E),function(F){return C.isFunction(E[F])}).sort()};C.extend=function(E){d(s.call(arguments,1),function(F){for(var G in F){E[G]=F[G]}});return E};C.defaults=function(E){d(s.call(arguments,1),function(F){for(var G in F){if(E[G]==null){E[G]=F[G]}}});return E};C.clone=function(E){return C.isArray(E)?E.slice():C.extend({},E)};C.tap=function(F,E){E(F);return F};C.isEqual=function(F,E){if(F===E){return true}var I=typeof(F),K=typeof(E);if(I!=K){return false}if(F==E){return true}if((!F&&E)||(F&&!E)){return false}if(F._chain){F=F._wrapped}if(E._chain){E=E._wrapped}if(F.isEqual){return F.isEqual(E)}if(C.isDate(F)&&C.isDate(E)){return F.getTime()===E.getTime()}if(C.isNaN(F)&&C.isNaN(E)){return false}if(C.isRegExp(F)&&C.isRegExp(E)){return F.source===E.source&&F.global===E.global&&F.ignoreCase===E.ignoreCase&&F.multiline===E.multiline}if(I!=="object"){return false}if(F.length&&(F.length!==E.length)){return false}var G=C.keys(F),J=C.keys(E);if(G.length!=J.length){return false}for(var H in F){if(!(H in E)||!C.isEqual(F[H],E[H])){return false}}return true};C.isEmpty=function(F){if(C.isArray(F)||C.isString(F)){return F.length===0}for(var E in F){if(o.call(F,E)){return false}}return true};C.isElement=function(E){return !!(E&&E.nodeType==1)};C.isArray=c||function(E){return v.call(E)==="[object Array]"};C.isArguments=function(E){return !!(E&&o.call(E,"callee"))};C.isFunction=function(E){return !!(E&&E.constructor&&E.call&&E.apply)};C.isString=function(E){return !!(E===""||(E&&E.charCodeAt&&E.substr))};C.isNumber=function(E){return !!(E===0||(E&&E.toExponential&&E.toFixed))};C.isNaN=function(E){return E!==E};C.isBoolean=function(E){return E===true||E===false};C.isDate=function(E){return !!(E&&E.getTimezoneOffset&&E.setUTCFullYear)};C.isRegExp=function(E){return !!(E&&E.test&&E.exec&&(E.ignoreCase||E.ignoreCase===false))};C.isNull=function(E){return E===null};C.isUndefined=function(E){return E===void 0};C.noConflict=function(){u._=r;return this};C.identity=function(E){return E};C.times=function(H,G,F){for(var E=0;E/g,interpolate:/<%=([\s\S]+?)%>/g};C.template=function(H,G){var I=C.templateSettings;var E="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+H.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(I.interpolate,function(J,K){return"',"+K.replace(/\\'/g,"'")+",'"}).replace(I.evaluate||null,function(J,K){return"');"+K.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";var F=new Function("obj",E);return G?F(G):F};var g=function(E){this._wrapped=E};C.prototype=g.prototype;var n=function(F,E){return E?C(F).chain():F};var q=function(E,F){g.prototype[E]=function(){var G=s.call(arguments);w.call(G,this._wrapped);return n(F.apply(C,G),this._chain)}};C.mixin(C);d(["pop","push","reverse","shift","sort","splice","unshift"],function(E){var F=i[E];g.prototype[E]=function(){F.apply(this._wrapped,arguments);return n(this._wrapped,this._chain)}});d(["concat","join","slice"],function(E){var F=i[E];g.prototype[E]=function(){return n(F.apply(this._wrapped,arguments),this._chain)}});g.prototype.chain=function(){this._chain=true;return this};g.prototype.value=function(){return this._wrapped}})();(function(){var o=this;var n=o.Backbone;var b;if(typeof exports!=="undefined"){b=exports}else{b=o.Backbone={}}b.VERSION="0.5.0-pre";var w=o._;if(!w&&(typeof require!=="undefined")){w=require("underscore")._}var e=o.jQuery||o.Zepto;b.noConflict=function(){o.Backbone=n;return this};b.emulateHTTP=false;b.emulateJSON=false;b.Events={bind:function(y,A){var x=this._callbacks||(this._callbacks={});var z=x[y]||(x[y]=[]);z.push(A);return this},unbind:function(A,C){var z;if(!A){this._callbacks={}}else{if(z=this._callbacks){if(!C){z[A]=[]}else{var B=z[A];if(!B){return this}for(var y=0,x=B.length;y').hide().appendTo("body")[0].contentWindow;this.saveLocation(z)}if(this._hasPushState){e(window).bind("popstate",this.checkUrl)}else{if("onhashchange" in window&&!B){e(window).bind("hashchange",this.checkUrl)}else{setInterval(this.checkUrl,this.interval)}}this.fragment=z;j=true;var x=this.loadUrl()||this.loadUrl(window.location.hash);if(this._wantsPushState&&!this._hasPushState&&window.location.pathname!=this.options.root){this.fragment=this.getFragment(null,true);window.location=this.options.root+"#"+this.fragment}else{return x}},route:function(x,y){this.handlers.unshift({route:x,callback:y})},checkUrl:function(y){var x=this.getFragment();if(x==this.fragment&&this.iframe){x=this.getFragment(this.iframe.location.hash)}if(x==this.fragment||x==decodeURIComponent(this.fragment)){return false}if(this.iframe){this.saveLocation(x)}this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(z){var y=this.fragment=this.getFragment(z);var x=w.any(this.handlers,function(A){if(A.route.test(y)){A.callback(y);return true}});return x},saveLocation:function(x){x=(x||"").replace(l,"");if(this.fragment==x||this.fragment==decodeURIComponent(x)){return}if(this._hasPushState){var y=window.location;if(x.indexOf(this.options.root)!=0){x=this.options.root+x}this.fragment=x;window.history.pushState({},document.title,y.protocol+"//"+y.host+x)}else{window.location.hash=this.fragment=x;if(this.iframe&&(x!=this.getFragment(this.iframe.location.hash))){this.iframe.document.open().close();this.iframe.location.hash=x}}}});b.View=function(x){this.cid=w.uniqueId("view");this._configure(x||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments)};var k=function(x){return e(x,this.el)};var a=/^(\S+)\s*(.*)$/;var s=["model","collection","el","id","attributes","className","tagName"];w.extend(b.View.prototype,b.Events,{tagName:"div",$:k,initialize:function(){},render:function(){return this},remove:function(){e(this.el).remove();return this},make:function(y,x,A){var z=document.createElement(y);if(x){e(z).attr(x)}if(A){e(z).html(A)}return z},delegateEvents:function(B){if(!(B||(B=this.events))){return}e(this.el).unbind(".delegateEvents"+this.cid);for(var A in B){var C=this[B[A]];if(!C){throw new Error('Event "'+B[A]+'" does not exist')}var z=A.match(a);var y=z[1],x=z[2];C=w.bind(C,this);y+=".delegateEvents"+this.cid;if(x===""){e(this.el).bind(y,C)}else{e(this.el).delegate(x,y,C)}}},_configure:function(z){if(this.options){z=w.extend({},this.options,z)}for(var A=0,y=s.length;A/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}}).call(this); \ No newline at end of file +(function(h,n){function g(a,e,f){if(f===n&&a.nodeType===1)if(f="data-"+e.replace(aa,"$1-$2").toLowerCase(),f=a.getAttribute(f),typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:!b.isNaN(f)?parseFloat(f):J.test(f)?b.parseJSON(f):f}catch(i){}b.data(a,e,f)}else f=n;return f}function l(a){for(var e in a)if(e!=="toJSON")return!1;return!0}function p(a,e,f){var i=e+"defer",m=e+"queue",t=e+"mark",c=b.data(a,i,n,!0);c&&(f==="queue"||!b.data(a,m,n,!0))&&(f==="mark"||!b.data(a,t,n,!0))&& +setTimeout(function(){!b.data(a,m,n,!0)&&!b.data(a,t,n,!0)&&(b.removeData(a,i,!0),c.resolve())},0)}function j(){return!1}function o(){return!0}function D(a,e,f){var i=b.extend({},f[0]);i.type=a;i.originalEvent={};i.liveFired=n;b.event.handle.call(e,i);i.isDefaultPrevented()&&f[0].preventDefault()}function x(a){var e,f,i,m,t,c,d,k,h,j,g,q=[];m=[];t=b._data(this,"events");if(!(a.liveFired===this||!t||!t.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(g=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+ +"(\\.|$)"));a.liveFired=this;var p=t.live.slice(0);for(d=0;df)break;a.currentTarget=m.elem;a.data=m.handleObj.data;a.handleObj=m.handleObj;g=m.handleObj.origHandler.apply(m.elem,arguments);if(g===!1||a.isPropagationStopped())if(f=m.level,g===!1&&(e=!1),a.isImmediatePropagationStopped())break}return e}}function s(a,e){return(a&&a!=="*"?a+".":"")+e.replace(Ra,"`").replace(Sa,"&")}function v(a,e,f){e=e||0;if(b.isFunction(e))return b.grep(a,function(a,b){return!!e.call(a,b,a)===f}); +else if(e.nodeType)return b.grep(a,function(a){return a===e===f});else if(typeof e==="string"){var i=b.grep(a,function(a){return a.nodeType===1});if(Ta.test(e))return b.filter(e,i,!f);else e=b.filter(e,i)}return b.grep(a,function(a){return b.inArray(a,e)>=0===f})}function w(a,e){if(e.nodeType===1&&b.hasData(a)){var f=b.expando,i=b.data(a),m=b.data(e,i);if(i=i[f]){var t=i.events,m=m[f]=b.extend({},i);if(t){delete m.handle;m.events={};for(var c in t){f=0;for(i=t[c].length;f").appendTo("body"),f=e.css("display");e.remove();if(f==="none"||f===""){if(!O)O=r.createElement("iframe"),O.frameBorder=O.width=O.height=0;r.body.appendChild(O);if(!ba||!O.createElement)ba=(O.contentWindow||O.contentDocument).document, +ba.write("");e=ba.createElement(a);ba.body.appendChild(e);f=b.css(e,"display");r.body.removeChild(O)}la[a]=f}return la[a]}function P(a){return b.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var r=h.document,k=h.navigator,q=h.location,b=function(){function a(){if(!e.isReady){try{r.documentElement.doScroll("left")}catch(b){setTimeout(a,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,m)},b=h.jQuery,i=h.$,m,c=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, +d=/\S/,j=/^\s+/,g=/\s+$/,q=/\d/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,l=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,A=/(?:^|:|,)(?:\s*\[)+/g,D=/(webkit)[ \/]([\w.]+)/,H=/(opera)(?:.*version)?[ \/]([\w.]+)/,E=/(msie) ([\w.]+)/,x=/(mozilla)(?:.*? rv:([\w.]+))?/,R=k.userAgent,fa,X,Ya=Object.prototype.toString,ma=Object.prototype.hasOwnProperty,na=Array.prototype.push,ca=Array.prototype.slice,wa=String.prototype.trim,v=Array.prototype.indexOf, +s={};e.fn=e.prototype={constructor:e,init:function(a,b,f){var i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!b&&r.body)return this.context=r,this[0]=r.body,this.selector=a,this.length=1,this;if(typeof a==="string")if((i=a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?[null,a,null]:c.exec(a))&&(i[1]||!b))if(i[1])return f=(b=b instanceof e?b[0]:b)?b.ownerDocument||b:r,(a=p.exec(a))?e.isPlainObject(b)?(a=[r.createElement(a[1])],e.fn.attr.call(a, +b,!0)):a=[f.createElement(a[1])]:(a=e.buildFragment([i[1]],[f]),a=(a.cacheable?e.clone(a.fragment):a.fragment).childNodes),e.merge(this,a);else{if((b=r.getElementById(i[2]))&&b.parentNode){if(b.id!==i[2])return f.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else return!b||b.jquery?(b||f).find(a):this.constructor(b).find(a);else if(e.isFunction(a))return f.ready(a);if(a.selector!==n)this.selector=a.selector,this.context=a.context;return e.makeArray(a,this)},selector:"", +jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return ca.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,f){var i=this.constructor();e.isArray(a)?na.apply(i,a):e.merge(i,a);i.prevObject=this;i.context=this.context;if(b==="find")i.selector=this.selector+(this.selector?" ":"")+f;else if(b)i.selector=this.selector+"."+b+"("+f+")";return i},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(); +fa.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ca.apply(this,arguments),"slice",ca.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(e,b){return a.call(e,b,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:na,sort:[].sort,splice:[].splice};e.fn.init.prototype=e.fn;e.extend=e.fn.extend=function(){var a, +b,f,i,m,c=arguments[0]||{},t=1,d=arguments.length,R=!1;typeof c==="boolean"&&(R=c,c=arguments[1]||{},t=2);typeof c!=="object"&&!e.isFunction(c)&&(c={});d===t&&(c=this,--t);for(;t0||(fa.resolveWith(r,[e]),e.fn.trigger&&e(r).trigger("ready").unbind("ready"))}},bindReady:function(){if(!fa){fa=e._Deferred();if(r.readyState==="complete")return setTimeout(e.ready,1);if(r.addEventListener)r.addEventListener("DOMContentLoaded",X,!1),h.addEventListener("load",e.ready,!1);else if(r.attachEvent){r.attachEvent("onreadystatechange", +X);h.attachEvent("onload",e.ready);var b=!1;try{b=h.frameElement==null}catch(f){}r.documentElement.doScroll&&b&&a()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!q.test(a)||isNaN(a)},type:function(a){return a==null?String(a):s[Ya.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1; +if(a.constructor&&!ma.call(a,"constructor")&&!ma.call(a.constructor.prototype,"isPrototypeOf"))return!1;for(var b in a);return b===n||ma.call(a,b)},isEmptyObject:function(a){for(var e in a)return!1;return!0},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=e.trim(a);if(h.JSON&&h.JSON.parse)return h.JSON.parse(a);if(o.test(a.replace(u,"@").replace(l,"]").replace(A,"")))return(new Function("return "+a))();e.error("Invalid JSON: "+a)},parseXML:function(a,b,f){h.DOMParser? +(f=new DOMParser,b=f.parseFromString(a,"text/xml")):(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a));f=b.documentElement;(!f||!f.nodeName||f.nodeName==="parsererror")&&e.error("Invalid XML: "+a);return b},noop:function(){},globalEval:function(a){a&&d.test(a)&&(h.execScript||function(a){h.eval.call(h,a)})(a)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,f){var i,m=0,c=a.length,t=c===n||e.isFunction(a);if(f)if(t)for(i in a){if(b.apply(a[i], +f)===!1)break}else for(;m0&&a[0]&&a[d-1]||d===0||e.isArray(a)))for(;t1?E.call(arguments, +0):b;--c||d.resolveWith(d,E.call(f,0))}}var f=arguments,i=0,m=f.length,c=m,d=m<=1&&a&&b.isFunction(a.promise)?a:b.Deferred();if(m>1){for(;i
    a"; +f=a.getElementsByTagName("*");i=a.getElementsByTagName("a")[0];if(!f||!f.length||!i)return{};m=r.createElement("select");c=m.appendChild(r.createElement("option"));f=a.getElementsByTagName("input")[0];d={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat, +checkOn:f.value==="on",optSelected:c.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};f.checked=!0;d.noCloneChecked=f.cloneNode(!0).checked;m.disabled=!0;d.optDisabled=!c.disabled;try{delete a.test}catch(j){d.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function V(){d.noCloneEvent=!1;a.detachEvent("onclick", +V)}),a.cloneNode(!0).fireEvent("onclick"));f=r.createElement("input");f.value="t";f.setAttribute("type","radio");d.radioValue=f.value==="t";f.setAttribute("checked","checked");a.appendChild(f);i=r.createDocumentFragment();i.appendChild(a.firstChild);d.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked;a.innerHTML="";a.style.width=a.style.paddingLeft="1px";i=r.createElement("body");m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(k in m)i.style[k]=m[k];i.appendChild(a); +b.insertBefore(i,b.firstChild);d.appendChecked=f.checked;d.boxModel=a.offsetWidth===2;if("zoom"in a.style)a.style.display="inline",a.style.zoom=1,d.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",d.shrinkWrapBlocks=a.offsetWidth!==2;a.innerHTML="
    t
    ";m=a.getElementsByTagName("td");f=m[0].offsetHeight===0;m[0].style.display="";m[1].style.display="none";d.reliableHiddenOffsets= +f&&m[0].offsetHeight===0;a.innerHTML="";if(r.defaultView&&r.defaultView.getComputedStyle)f=r.createElement("div"),f.style.width="0",f.style.marginRight="0",a.appendChild(f),d.reliableMarginRight=(parseInt((r.defaultView.getComputedStyle(f,null)||{marginRight:0}).marginRight,10)||0)===0;i.innerHTML="";b.removeChild(i);if(a.attachEvent)for(k in{submit:1,change:1,focusin:1})b="on"+k,f=b in a,f||(a.setAttribute(b,"return;"),f=typeof a[b]==="function"),d[k+"Bubbles"]=f;return d}();b.boxModel=b.support.boxModel; +var J=/^(?:\{.*\}|\[.*\])$/,aa=/([a-z])([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?b.cache[a[b.expando]]:a[b.expando];return!!a&&!l(a)},data:function(a,e,f,i){if(b.acceptData(a)){var m=b.expando,c=typeof e==="string",d=a.nodeType,k=d?b.cache:a,j=d?a[b.expando]:a[b.expando]&&b.expando;if(j&&(!i||!j||k[j][m])||!(c&&f===n)){if(!j)d?a[b.expando]= +j=++b.uuid:j=b.expando;if(!k[j]&&(k[j]={},!d))k[j].toJSON=b.noop;if(typeof e==="object"||typeof e==="function")i?k[j][m]=b.extend(k[j][m],e):k[j]=b.extend(k[j],e);a=k[j];i&&(a[m]||(a[m]={}),a=a[m]);f!==n&&(a[b.camelCase(e)]=f);return e==="events"&&!a[e]?a[m]&&a[m].events:c?a[b.camelCase(e)]:a}}},removeData:function(a,e,f){if(b.acceptData(a)){var i=b.expando,m=a.nodeType,c=m?b.cache:a,d=m?a[b.expando]:b.expando;if(c[d]){if(e){var k=f?c[d][i]:c[d];if(k&&(delete k[e],!l(k)))return}if(f&&(delete c[d][i], +!l(c[d])))return;e=c[d][i];b.support.deleteExpando||c!=h?delete c[d]:c[d]=null;if(e){c[d]={};if(!m)c[d].toJSON=b.noop;c[d][i]=e}else m&&(b.support.deleteExpando?delete a[b.expando]:a.removeAttribute?a.removeAttribute(b.expando):a[b.expando]=null)}}},_data:function(a,e,f){return b.data(a,e,f,!0)},acceptData:function(a){if(a.nodeName){var e=b.noData[a.nodeName.toLowerCase()];if(e)return!(e===!0||a.getAttribute("classid")!==e)}return!0}});b.fn.extend({data:function(a,e){var f=null;if(typeof a==="undefined"){if(this.length&& +(f=b.data(this[0]),this[0].nodeType===1))for(var i=this[0].attributes,m,c=0,d=i.length;c-1)return!0;return!1},val:function(a){var e,f,i=this[0];if(!arguments.length)return i?(e=b.valHooks[i.nodeName.toLowerCase()]||b.valHooks[i.type])&&"get"in e&&(f=e.get(i,"value"))!==n?f:(i.value||"").replace(Za,""):n;var m=b.isFunction(a);return this.each(function(f){var i=b(this);if(this.nodeType===1&&(f=m?a.call(this,f,i.val()):a,f==null?f="":typeof f==="number"?f+="":b.isArray(f)&&(f=b.map(f,function(a){return a== +null?"":a+""})),e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type],!e||!("set"in e)||e.set(this,f,"value")===n))this.value=f})}});b.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var e,f=a.selectedIndex,i=[],m=a.options,a=a.type==="select-one";if(f<0)return null;for(var c=a?f:0,d=a?f+1:m.length;c=0});if(!f.length)a.selectedIndex=-1;return f}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,e,f,i){var m=a.nodeType;if(!a||m===3||m===8||m===2)return n;if(i&&e in b.attrFn)return b(a)[e](f); +if(!("getAttribute"in a))return b.prop(a,e,f);var c,e=(m=m!==1||!b.isXMLDoc(a))&&b.attrFix[e]||e,i=b.attrHooks[e];if(!i)if(ya.test(e)&&(typeof f==="boolean"||f===n||f.toLowerCase()===e.toLowerCase()))i=za;else if(S&&(b.nodeName(a,"form")||cb.test(e)))i=S;return f!==n?f===null?(b.removeAttr(a,e),n):i&&"set"in i&&m&&(c=i.set(a,f,e))!==n?c:(a.setAttribute(e,""+f),f):i&&"get"in i&&m?i.get(a,e):(c=a.getAttribute(e),c===null?n:c)},removeAttr:function(a,e){var f;if(a.nodeType===1&&(e=b.attrFix[e]||e,b.support.getSetAttribute? +a.removeAttribute(e):(b.attr(a,e,""),a.removeAttributeNode(a.getAttributeNode(e))),ya.test(e)&&(f=b.propFix[e]||e)in a))a[f]=!1},attrHooks:{type:{set:function(a,e){if($a.test(a.nodeName)&&a.parentNode)b.error("type property can't be changed");else if(!b.support.radioValue&&e==="radio"&&b.nodeName(a,"input")){var f=a.value;a.setAttribute("type",e);if(f)a.value=f;return e}}},tabIndex:{get:function(a){var b=a.getAttributeNode("tabIndex");return b&&b.specified?parseInt(b.value,10):ab.test(a.nodeName)|| +bb.test(a.nodeName)&&a.href?0:n}}},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(a,e,f){var i=a.nodeType;if(!a||i===3||i===8||i===2)return n;var c,e=(i!==1||!b.isXMLDoc(a))&&b.propFix[e]||e,i=b.propHooks[e];return f!==n?i&&"set"in i&&(c=i.set(a,f,e))!==n?c:a[e]= +f:i&&"get"in i&&(c=i.get(a,e))!==n?c:a[e]},propHooks:{}});za={get:function(a,e){return a[b.propFix[e]||e]?e.toLowerCase():n},set:function(a,e,f){var i;e===!1?b.removeAttr(a,f):(i=b.propFix[f]||f,i in a&&(a[i]=e),a.setAttribute(f,f.toLowerCase()));return f}};b.attrHooks.value={get:function(a,e){return S&&b.nodeName(a,"button")?S.get(a,e):a.value},set:function(a,e,f){if(S&&b.nodeName(a,"button"))return S.set(a,e,f);a.value=e}};if(!b.support.getSetAttribute)b.attrFix=b.propFix,S=b.attrHooks.name=b.valHooks.button= +{get:function(a,b){var f;return(f=a.getAttributeNode(b))&&f.nodeValue!==""?f.nodeValue:n},set:function(a,b,f){if(a=a.getAttributeNode(f))return a.nodeValue=b}},b.each(["width","height"],function(a,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(a,b){if(b==="")return a.setAttribute(e,"auto"),b}})});b.support.hrefNormalized||b.each(["href","src","width","height"],function(a,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(a){a=a.getAttribute(e,2);return a===null?n:a}})});if(!b.support.style)b.attrHooks.style= +{get:function(a){return a.style.cssText.toLowerCase()||n},set:function(a,b){return a.style.cssText=""+b}};if(!b.support.optSelected)b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(){}});b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}});b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(a,e){if(b.isArray(e))return a.checked=b.inArray(b(a).val(), +e)>=0}})});var ja=/\.(.*)$/,pa=/^(?:textarea|input|select)$/i,Ra=/\./g,Sa=/ /g,db=/[^\w\s.|`]/g,eb=function(a){return a.replace(db,"\\$&")};b.event={add:function(a,e,f,i){if(!(a.nodeType===3||a.nodeType===8)){if(f===!1)f=j;else if(!f)return;var c,d;if(f.handler)c=f,f=c.handler;if(!f.guid)f.guid=b.guid++;if(d=b._data(a)){var k=d.events,h=d.handle;if(!k)d.events=k={};if(!h)d.handle=h=function(a){return typeof b!=="undefined"&&(!a||b.event.triggered!==a.type)?b.event.handle.apply(h.elem,arguments):n}; +h.elem=a;for(var e=e.split(" "),g,q=0,p;g=e[q++];){d=c?b.extend({},c):{handler:f,data:i};g.indexOf(".")>-1?(p=g.split("."),g=p.shift(),d.namespace=p.slice(0).sort().join(".")):(p=[],d.namespace="");d.type=g;if(!d.guid)d.guid=f.guid;var o=k[g],u=b.event.special[g]||{};if(!o&&(o=k[g]=[],!u.setup||u.setup.call(a,i,p,h)===!1))a.addEventListener?a.addEventListener(g,h,!1):a.attachEvent&&a.attachEvent("on"+g,h);if(u.add&&(u.add.call(a,d),!d.handler.guid))d.handler.guid=f.guid;o.push(d);b.event.global[g]= +!0}a=null}}},global:{},remove:function(a,e,f,i){if(!(a.nodeType===3||a.nodeType===8)){f===!1&&(f=j);var c,d,k=0,h,g,q,p,o,u,l=b.hasData(a)&&b._data(a),A=l&&l.events;if(l&&A){if(e&&e.type)f=e.handler,e=e.type;if(!e||typeof e==="string"&&e.charAt(0)===".")for(c in e=e||"",A)b.event.remove(a,c+e);else{for(e=e.split(" ");c=e[k++];)if(p=c,h=c.indexOf(".")<0,g=[],h||(g=c.split("."),c=g.shift(),q=RegExp("(^|\\.)"+b.map(g.slice(0).sort(),eb).join("\\.(?:.*\\.)?")+"(\\.|$)")),o=A[c])if(f){p=b.event.special[c]|| +{};for(d=i||0;d=0&&(c=c.slice(0,-1),k=!0);c.indexOf(".")>=0&&(d=c.split("."),c=d.shift(),d.sort());if(f&&!b.event.customEvent[c]||b.event.global[c]){a=typeof a==="object"?a[b.expando]?a:new b.Event(c,a):new b.Event(c);a.type=c;a.exclusive=k;a.namespace=d.join(".");a.namespace_re=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)");if(i||!f)a.preventDefault(),a.stopPropagation();if(f){if(!(f.nodeType=== +3||f.nodeType===8)){a.result=n;a.target=f;e=e?b.makeArray(e):[];e.unshift(a);d=f;i=c.indexOf(":")<0?"on"+c:"";do{k=b._data(d,"handle");a.currentTarget=d;k&&k.apply(d,e);if(i&&b.acceptData(d)&&d[i]&&d[i].apply(d,e)===!1)a.result=!1,a.preventDefault();d=d.parentNode||d.ownerDocument||d===a.target.ownerDocument&&h}while(d&&!a.isPropagationStopped());if(!a.isDefaultPrevented()){var j,d=b.event.special[c]||{};if((!d._default||d._default.call(f.ownerDocument,a)===!1)&&!(c==="click"&&b.nodeName(f,"a"))&& +b.acceptData(f)){try{if(i&&f[c])(j=f[i])&&(f[i]=null),b.event.triggered=c,f[c]()}catch(g){}j&&(f[i]=j);b.event.triggered=n}}return a.result}}else b.each(b.cache,function(){var f=this[b.expando];f&&f.events&&f.events[c]&&b.event.trigger(a,e,f.handle.elem)})}},handle:function(a){var a=b.event.fix(a||h.event),e=((b._data(this,"events")||{})[a.type]||[]).slice(0),f=!a.exclusive&&!a.namespace,i=Array.prototype.slice.call(arguments,0);i[0]=a;a.currentTarget=this;for(var c=0,d=e.length;c-1?b.map(a.options,function(a){return a.selected}).join("-"):"";else if(b.nodeName(a,"select"))f=a.selectedIndex;return f},ga=function(a,e){var f=a.target,i,c;if(pa.test(f.nodeName)&&!f.readOnly&&(i=b._data(f,"_change_data"),c=Ca(f),(a.type!=="focusout"||f.type!=="radio")&&b._data(f,"_change_data",c),!(i===n||c===i)))if(i!= +null||c)a.type="change",a.liveFired=n,b.event.trigger(a,e,f)};b.event.special.change={filters:{focusout:ga,beforedeactivate:ga,click:function(a){var e=a.target,f=b.nodeName(e,"input")?e.type:"";(f==="radio"||f==="checkbox"||b.nodeName(e,"select"))&&ga.call(this,a)},keydown:function(a){var e=a.target,f=b.nodeName(e,"input")?e.type:"";(a.keyCode===13&&!b.nodeName(e,"textarea")||a.keyCode===32&&(f==="checkbox"||f==="radio")||f==="select-multiple")&&ga.call(this,a)},beforeactivate:function(a){a=a.target; +b._data(a,"_change_data",Ca(a))}},setup:function(){if(this.type==="file")return!1;for(var a in da)b.event.add(this,a+".specialChange",da[a]);return pa.test(this.nodeName)},teardown:function(){b.event.remove(this,".specialChange");return pa.test(this.nodeName)}};da=b.event.special.change.filters;da.focus=da.beforeactivate}b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(a,e){function f(a){var f=b.event.fix(a);f.type=e;f.originalEvent={};b.event.trigger(f,null,f.target);f.isDefaultPrevented()&& +a.preventDefault()}var i=0;b.event.special[e]={setup:function(){i++===0&&r.addEventListener(a,f,!0)},teardown:function(){--i===0&&r.removeEventListener(a,f,!0)}}});b.each(["bind","one"],function(a,e){b.fn[e]=function(a,i,c){var d;if(typeof a==="object"){for(var k in a)this[e](k,i,a[k],c);return this}if(arguments.length===2||i===!1)c=i,i=n;e==="one"?(d=function(a){b(this).unbind(a,d);return c.apply(this,arguments)},d.guid=c.guid||b.guid++):d=c;if(a==="unload"&&e!=="one")this.one(a,i,c);else{k=0;for(var j= +this.length;k0?this.bind(e,a,b):this.trigger(e)};b.attrFn&&(b.attrFn[e]= +!0)});(function(){function a(a,b,e,f,i,c){for(var i=0,d=f.length;i0){k=m;break}}m=m[a]}f[i]=k}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=0,c=Object.prototype.toString,d=!1,k=!0,j=/\\/g,h=/\W/;[0,0].sort(function(){k=!1;return 0});var g=function(a,b,e,i){var e=e||[],d=b=b||r;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string")return e;var k,j,h,t,o,u=!0,n=g.isXML(b),y=[],A=a;do if(f.exec(""),k=f.exec(A))if(A=k[3],y.push(k[1]),k[2]){t= +k[3];break}while(k);if(y.length>1&&p.exec(a))if(y.length===2&&q.relative[y[0]])j=E(y[0]+y[1],b);else for(j=q.relative[y[0]]?[b]:g(y.shift(),b);y.length;)a=y.shift(),q.relative[a]&&(a+=y.shift()),j=E(a,j);else if(!i&&y.length>1&&b.nodeType===9&&!n&&q.match.ID.test(y[0])&&!q.match.ID.test(y[y.length-1])&&(k=g.find(y.shift(),b,n),b=k.expr?g.filter(k.expr,k.set)[0]:k.set[0]),b){k=i?{expr:y.pop(),set:l(i)}:g.find(y.pop(),y.length===1&&(y[0]==="~"||y[0]==="+")&&b.parentNode?b.parentNode:b,n);j=k.expr?g.filter(k.expr, +k.set):k.set;for(y.length>0?h=l(j):u=!1;y.length;)k=o=y.pop(),q.relative[o]?k=y.pop():o="",k==null&&(k=b),q.relative[o](h,k,n)}else h=[];h||(h=j);h||g.error(o||a);if(c.call(h)==="[object Array]")if(u)if(b&&b.nodeType===1)for(a=0;h[a]!=null;a++)h[a]&&(h[a]===!0||h[a].nodeType===1&&g.contains(b,h[a]))&&e.push(j[a]);else for(a=0;h[a]!=null;a++)h[a]&&h[a].nodeType===1&&e.push(j[a]);else e.push.apply(e,h);else l(h,e);t&&(g(t,d,e,i),g.uniqueSort(e));return e};g.uniqueSort=function(a){if(D&&(d=k,a.sort(D), +d))for(var b=1;b0};g.find=function(a,b,e){var f;if(!a)return[];for(var i=0,c=q.order.length;i":function(a,b){var e,f=typeof b==="string",i=0,c=a.length;if(f&&!h.test(b))for(b=b.toLowerCase();i=0)?e||f.push(d):e&&(b[c]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]=== +"nth"){a[2]||g.error(a[0]);a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}else a[2]&&g.error(a[0]);a[0]=i++;return a},ATTR:function(a,b,e,f,i,c){b=a[1]=a[1].replace(j,"");!c&&q.attrMap[b]&&(a[1]=q.attrMap[b]);a[4]=(a[4]||a[5]||"").replace(j,"");a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,b,e,i,c){if(a[1]==="not")if((f.exec(a[3])||"").length>1|| +/^\w/.test(a[3]))a[3]=g(a[3],null,null,b);else return a=g.filter(a[3],b,e,1^c),e||i.push.apply(i,a),!1;else if(q.match.POS.test(a[0])||q.match.CHILD.test(a[0]))return!0;return a},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild}, +has:function(a,b,e){return!!g(e[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),e=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===e&&(b===e||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()=== +"input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a=== +a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,e,f){return b===f.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,e){return be[3]-0},nth:function(a,b,e){return e[3]-0===b},eq:function(a,b,e){return e[3]-0===b}},filter:{PSEUDO:function(a,b,e,f){var i=b[1],c=q.filters[i];if(c)return c(a,e,b,f);else if(i==="contains")return(a.textContent||a.innerText||g.getText([a])||"").indexOf(b[3])>= +0;else if(i==="not"){b=b[3];e=0;for(f=b.length;e=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var e=b[1],e=q.attrHandle[e]?q.attrHandle[e](a):a[e]!=null?a[e]:a.getAttribute(e),f=e+"",i=b[2],c=b[4];return e==null?i==="!=":i==="="?f===c:i==="*="?f.indexOf(c)>= +0:i==="~="?(" "+f+" ").indexOf(c)>=0:!c?f&&e!==!1:i==="!="?f!==c:i==="^="?f.indexOf(c)===0:i==="$="?f.substr(f.length-c.length)===c:i==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1},POS:function(a,b,e,f){var i=q.setFilters[b[2]];if(i)return i(a,e,b,f)}}},p=q.match.POS,o=function(a,b){return"\\"+(b-0+1)},u;for(u in q.match)q.match[u]=RegExp(q.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source),q.leftMatch[u]=RegExp(/(^(?:.|\r|\n)*?)/.source+q.match[u].source.replace(/\\(\d+)/g,o));var l=function(a, +b){a=Array.prototype.slice.call(a,0);return b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(A){l=function(a,b){var e=0,f=b||[];if(c.call(a)==="[object Array]")Array.prototype.push.apply(f,a);else if(typeof a.length==="number")for(var i=a.length;e";e.insertBefore(a,e.firstChild);if(r.getElementById(b))q.find.ID=function(a,b,e){if(typeof b.getElementById!=="undefined"&&!e)return(b=b.getElementById(a[1]))? +b.id===a[1]||typeof b.getAttributeNode!=="undefined"&&b.getAttributeNode("id").nodeValue===a[1]?[b]:n:[]},q.filter.ID=function(a,b){var e=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&e&&e.nodeValue===b};e.removeChild(a);e=a=null})();(function(){var a=r.createElement("div");a.appendChild(r.createComment(""));if(a.getElementsByTagName("*").length>0)q.find.TAG=function(a,b){var e=b.getElementsByTagName(a[1]);if(a[1]==="*"){for(var f=[],i=0;e[i];i++)e[i].nodeType=== +1&&f.push(e[i]);e=f}return e};a.innerHTML="";if(a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#")q.attrHandle.href=function(a){return a.getAttribute("href",2)};a=null})();r.querySelectorAll&&function(){var a=g,b=r.createElement("div");b.innerHTML="

    ";if(!(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)){g=function(b,e,f,i){e=e||r;if(!i&&!g.isXML(e)){var c=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b); +if(c&&(e.nodeType===1||e.nodeType===9))if(c[1])return l(e.getElementsByTagName(b),f);else if(c[2]&&q.find.CLASS&&e.getElementsByClassName)return l(e.getElementsByClassName(c[2]),f);if(e.nodeType===9){if(b==="body"&&e.body)return l([e.body],f);else if(c&&c[3]){var d=e.getElementById(c[3]);if(d&&d.parentNode){if(d.id===c[3])return l([d],f)}else return l([],f)}try{return l(e.querySelectorAll(b),f)}catch(m){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var c=e,k=(d=e.getAttribute("id"))|| +"__sizzle__",j=e.parentNode,h=/^\s*[+~]/.test(b);d?k=k.replace(/'/g,"\\$&"):e.setAttribute("id",k);if(h&&j)e=e.parentNode;try{if(!h||j)return l(e.querySelectorAll("[id='"+k+"'] "+b),f)}catch(t){}finally{d||c.removeAttribute("id")}}}return a(b,e,f,i)};for(var e in a)g[e]=a[e];b=null}}();(function(){var a=r.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var e=!b.call(r.createElement("div"),"div"),f=!1;try{b.call(r.documentElement,"[test!='']:sizzle")}catch(i){f= +!0}g.matchesSelector=function(a,i){i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!g.isXML(a))try{if(f||!q.match.PSEUDO.test(i)&&!/!=/.test(i)){var c=b.call(a,i);if(c||!e||a.document&&a.document.nodeType!==11)return c}}catch(d){}return g(i,null,null,[a]).length>0}}})();(function(){var a=r.createElement("div");a.innerHTML="
    ";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0&&(a.lastChild.className="e",a.getElementsByClassName("e").length!== +1))q.order.splice(1,0,"CLASS"),q.find.CLASS=function(a,b,e){if(typeof b.getElementsByClassName!=="undefined"&&!e)return b.getElementsByClassName(a[1])},a=null})();g.contains=r.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:r.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return!1};g.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?a.nodeName!=="HTML":!1};var E=function(a,b){for(var e, +f=[],i="",c=b.nodeType?[b]:b;e=q.match.PSEUDO.exec(a);)i+=e[0],a=a.replace(q.match.PSEUDO,"");a=q.relative[a]?a+"*":a;e=0;for(var d=c.length;e0)for(k=d;k0:this.filter(a).length>0)},closest:function(a,e){var f=[],i,c,d=this[0];if(b.isArray(a)){var k,j={},h=1;if(d&&a.length){for(i=0,c=a.length;i-1:b(d).is(i))&&f.push({selector:k,elem:d,level:h});d=d.parentNode;h++}}return f}k=Da.test(a)|| +typeof a!=="string"?b(a,e||this.context):0;for(i=0,c=this.length;i-1:b.find.matchesSelector(d,a)){f.push(d);break}else if(d=d.parentNode,!d||!d.ownerDocument||d===e||d.nodeType===11)break;f=f.length>1?b.unique(f):f;return this.pushStack(f,"closest",a)},index:function(a){return!a||typeof a==="string"?b.inArray(this[0],a?b(a):this.parent().children()):b.inArray(a.jquery?a[0]:a,this)},add:function(a,e){var f=typeof a==="string"?b(a,e):b.makeArray(a&&a.nodeType? +[a]:a),i=b.merge(this.get(),f);return this.pushStack(!f[0]||!f[0].parentNode||f[0].parentNode.nodeType===11||!i[0]||!i[0].parentNode||i[0].parentNode.nodeType===11?i:b.unique(i))},andSelf:function(){return this.add(this.prevObject)}});b.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return b.dir(a,"parentNode")},parentsUntil:function(a,e,f){return b.dir(a,"parentNode",f)},next:function(a){return b.nth(a,2,"nextSibling")},prev:function(a){return b.nth(a, +2,"previousSibling")},nextAll:function(a){return b.dir(a,"nextSibling")},prevAll:function(a){return b.dir(a,"previousSibling")},nextUntil:function(a,e,f){return b.dir(a,"nextSibling",f)},prevUntil:function(a,e,f){return b.dir(a,"previousSibling",f)},siblings:function(a){return b.sibling(a.parentNode.firstChild,a)},children:function(a){return b.sibling(a.firstChild)},contents:function(a){return b.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:b.makeArray(a.childNodes)}},function(a, +e){b.fn[a]=function(f,i){var c=b.map(this,e,f),d=ib.call(arguments);fb.test(a)||(i=f);i&&typeof i==="string"&&(c=b.filter(i,c));c=this.length>1&&!jb[a]?b.unique(c):c;if((this.length>1||hb.test(i))&&gb.test(a))c=c.reverse();return this.pushStack(c,a,d.join(","))}});b.extend({filter:function(a,e,f){f&&(a=":not("+a+")");return e.length===1?b.find.matchesSelector(e[0],a)?[e[0]]:[]:b.find.matches(a,e)},dir:function(a,e,f){for(var i=[],a=a[e];a&&a.nodeType!==9&&(f===n||a.nodeType!==1||!b(a).is(f));)a.nodeType=== +1&&i.push(a),a=a[e];return i},nth:function(a,b,f){for(var b=b||1,i=0;a;a=a[f])if(a.nodeType===1&&++i===b)break;return a},sibling:function(a,b){for(var f=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&f.push(a);return f}});var kb=/ jQuery\d+="(?:\d+|null)"/g,ra=/^\s+/,Ea=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Fa=/<([\w:]+)/,lb=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};C.optgroup=C.option;C.tbody=C.tfoot=C.colgroup=C.caption=C.thead;C.th=C.td;if(!b.support.htmlSerialize)C._default=[1,"div
    ","
    "];b.fn.extend({text:function(a){return b.isFunction(a)? +this.each(function(e){var f=b(this);f.text(a.call(this,e,f.text()))}):typeof a!=="object"&&a!==n?this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a)):b.text(this)},wrapAll:function(a){if(b.isFunction(a))return this.each(function(e){b(this).wrapAll(a.call(this,e))});if(this[0]){var e=b(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]);e.map(function(){for(var a=this;a.firstChild&&a.firstChild.nodeType===1;)a=a.firstChild;return a}).append(this)}return this}, +wrapInner:function(a){return b.isFunction(a)?this.each(function(e){b(this).wrapInner(a.call(this,e))}):this.each(function(){var e=b(this),f=e.contents();f.length?f.wrapAll(a):e.append(a)})},wrap:function(a){return this.each(function(){b(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments, +!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});else if(arguments.length){var a=b(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});else if(arguments.length){var a= +this.pushStack(this,"after",arguments);a.push.apply(a,b(arguments[0]).toArray());return a}},remove:function(a,e){for(var f=0,i;(i=this[f])!=null;f++)if(!a||b.filter(a,[i]).length)!e&&i.nodeType===1&&(b.cleanData(i.getElementsByTagName("*")),b.cleanData([i])),i.parentNode&&i.parentNode.removeChild(i);return this},empty:function(){for(var a=0,e;(e=this[a])!=null;a++)for(e.nodeType===1&&b.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(a,e){a= +a==null?!1:a;e=e==null?a:e;return this.map(function(){return b.clone(this,a,e)})},html:function(a){if(a===n)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(kb,""):null;else if(typeof a==="string"&&!Ga.test(a)&&(b.support.leadingWhitespace||!ra.test(a))&&!C[(Fa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ea,"<$1>");try{for(var e=0,f=this.length;e1&&c0?this.clone(!0):this).get();b(f[c])[e](k);i=i.concat(k)}return this.pushStack(i,a,f.selector)}}});b.extend({clone:function(a,e,f){var i=a.cloneNode(!0),c,d,k;if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!b.isXMLDoc(a)){z(a,i);c=I(a);d=I(i);for(k=0;c[k];++k)z(c[k],d[k])}if(e&&(w(a,i),f)){c=I(a);d=I(i);for(k=0;c[k];++k)w(c[k],d[k])}return i},clean:function(a,e,f,i){e= +e||r;typeof e.createElement==="undefined"&&(e=e.ownerDocument||e[0]&&e[0].ownerDocument||r);for(var c=[],d,k=0,j;(j=a[k])!=null;k++)if(typeof j==="number"&&(j+=""),j){if(typeof j==="string")if(mb.test(j)){j=j.replace(Ea,"<$1>");d=(Fa.exec(j)||["",""])[1].toLowerCase();var h=C[d]||C._default,g=h[0],q=e.createElement("div");for(q.innerHTML=h[1]+j+h[2];g--;)q=q.lastChild;if(!b.support.tbody){g=lb.test(j);h=d==="table"&&!g?q.firstChild&&q.firstChild.childNodes:h[1]===""&&!g?q.childNodes:[]; +for(d=h.length-1;d>=0;--d)b.nodeName(h[d],"tbody")&&!h[d].childNodes.length&&h[d].parentNode.removeChild(h[d])}!b.support.leadingWhitespace&&ra.test(j)&&q.insertBefore(e.createTextNode(ra.exec(j)[0]),q.firstChild);j=q.childNodes}else j=e.createTextNode(j);var p;if(!b.support.appendChecked)if(j[0]&&typeof(p=j.length)==="number")for(d=0;d=0)return b+"px"}else return b}}});if(!b.support.opacity)b.cssHooks.opacity={get:function(a,b){return ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,e){var f=a.style,c=a.currentStyle;f.zoom=1;var d=b.isNaN(e)?"":"alpha(opacity="+e*100+")",c=c&&c.filter||f.filter||"";f.filter=Ia.test(c)?c.replace(Ia,d):c+" "+d}};b(function(){if(!b.support.reliableMarginRight)b.cssHooks.marginRight={get:function(a,e){var f; +b.swap(a,{display:"inline-block"},function(){f=e?Y(a,"margin-right","marginRight"):a.style.marginRight});return f}}});r.defaultView&&r.defaultView.getComputedStyle&&(Ka=function(a,e){var f,c,e=e.replace(qb,"-$1").toLowerCase();if(!(c=a.ownerDocument.defaultView))return n;if(c=c.getComputedStyle(a,null))f=c.getPropertyValue(e),f===""&&!b.contains(a.ownerDocument.documentElement,a)&&(f=b.style(a,e));return f});r.documentElement.currentStyle&&(ha=function(a,b){var f,c=a.currentStyle&&a.currentStyle[b], +d=a.runtimeStyle&&a.runtimeStyle[b],k=a.style;if(!Ja.test(c)&&rb.test(c)){f=k.left;if(d)a.runtimeStyle.left=a.currentStyle.left;k.left=b==="fontSize"?"1em":c||0;c=k.pixelLeft+"px";k.left=f;if(d)a.runtimeStyle.left=d}return c===""?"auto":c});Y=Ka||ha;if(b.expr&&b.expr.filters)b.expr.filters.hidden=function(a){var e=a.offsetHeight;return a.offsetWidth===0&&e===0||!b.support.reliableHiddenOffsets&&(a.style.display||b.css(a,"display"))==="none"},b.expr.filters.visible=function(a){return!b.expr.filters.hidden(a)}; +var wb=/%20/g,Xa=/\[\]$/,La=/\r?\n/g,xb=/#.*$/,yb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,zb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Ab=/^(?:GET|HEAD)$/,Bb=/^\/\//,Ma=/\?/,Cb=/)<[^<]*)*<\/script>/gi,Db=/^(?:select|textarea)/i,ua=/\s+/,Eb=/([?&])_=[^&]*/,Na=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Oa=b.fn.load,ka={},Pa={},T,U;try{T=q.href}catch(Kb){T=r.createElement("a"),T.href="",T=T.href}U=Na.exec(T.toLowerCase())|| +[];b.fn.extend({load:function(a,e,f){if(typeof a!=="string"&&Oa)return Oa.apply(this,arguments);else if(!this.length)return this;var c=a.indexOf(" ");if(c>=0)var d=a.slice(c,a.length),a=a.slice(0,c);c="GET";e&&(b.isFunction(e)?(f=e,e=n):typeof e==="object"&&(e=b.param(e,b.ajaxSettings.traditional),c="POST"));var k=this;b.ajax({url:a,type:c,dataType:"html",data:e,complete:function(a,e,c){c=a.responseText;a.isResolved()&&(a.done(function(a){c=a}),k.html(d?b("
    ").append(c.replace(Cb,"")).find(d): +c));f&&k.each(f,[c,e,a])}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Db.test(this.nodeName)||zb.test(this.type))}).map(function(a,e){var f=b(this).val();return f==null?null:b.isArray(f)?b.map(f,function(a){return{name:e.name,value:a.replace(La,"\r\n")}}):{name:e.name,value:f.replace(La,"\r\n")}}).get()}}); +b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,e){b.fn[e]=function(a){return this.bind(e,a)}});b.each(["get","post"],function(a,e){b[e]=function(a,c,d,k){b.isFunction(c)&&(k=k||d,d=c,c=n);return b.ajax({type:e,url:a,data:c,success:d,dataType:k})}});b.extend({getScript:function(a,e){return b.get(a,n,e,"script")},getJSON:function(a,e,f){return b.get(a,e,f,"json")},ajaxSetup:function(a,e){e?b.extend(!0,a,b.ajaxSettings,e):(e=a,a=b.extend(!0,b.ajaxSettings, +e));for(var f in{context:1,url:1})f in e?a[f]=e[f]:f in b.ajaxSettings&&(a[f]=b.ajaxSettings[f]);return a},ajaxSettings:{url:T,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|widget):$/.test(U[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML", +text:"responseText"},converters:{"* text":h.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML}},ajaxPrefilter:G(ka),ajaxTransport:G(Pa),ajax:function(a,e){function f(a,e,f,d){if(E!==2){E=2;H&&clearTimeout(H);D=n;l=d||"";s.readyState=a?4:0;var o,u,A;if(f){var d=c,r=s,v=d.contents,J=d.dataTypes,I=d.responseFields,B,w,N,aa;for(w in I)w in f&&(r[I[w]]=f[w]);for(;J[0]==="*";)J.shift(),B===n&&(B=d.mimeType||r.getResponseHeader("content-type"));if(B)for(w in v)if(v[w]&&v[w].test(B)){J.unshift(w); +break}if(J[0]in f)N=J[0];else{for(w in f){if(!J[0]||d.converters[w+" "+J[0]]){N=w;break}aa||(aa=w)}N=N||aa}N?(N!==J[0]&&J.unshift(N),f=f[N]):f=void 0}else f=n;if(a>=200&&a<300||a===304){if(c.ifModified){if(B=s.getResponseHeader("Last-Modified"))b.lastModified[p]=B;if(B=s.getResponseHeader("Etag"))b.etag[p]=B}if(a===304)e="notmodified",o=!0;else try{B=c;B.dataFilter&&(f=B.dataFilter(f,B.dataType));var L=B.dataTypes;w={};var z,V,Q=L.length,P,C=L[0],K,M,F,G,W;for(z=1;z0&&(H=setTimeout(function(){s.abort("timeout")},c.timeout));try{E=1,D.send(o,f)}catch(I){status<2?f(-1,I):b.error(I)}}else f(-1,"No Transport");return s},param:function(a,e){var f= +[],d=function(a,e){e=b.isFunction(e)?e():e;f[f.length]=encodeURIComponent(a)+"="+encodeURIComponent(e)};if(e===n)e=b.ajaxSettings.traditional;if(b.isArray(a)||a.jquery&&!b.isPlainObject(a))b.each(a,function(){d(this.name,this.value)});else for(var k in a)c(k,a[k],e,d);return f.join("&").replace(wb,"+")}});b.extend({active:0,lastModified:{},etag:{}});var Fb=b.now(),ia=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+Fb++}});b.ajaxPrefilter("json jsonp", +function(a,e,f){e=a.contentType==="application/x-www-form-urlencoded"&&typeof a.data==="string";if(a.dataTypes[0]==="jsonp"||a.jsonp!==!1&&(ia.test(a.url)||e&&ia.test(a.data))){var c,d=a.jsonpCallback=b.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,k=h[d],j=a.url,g=a.data,q="$1"+d+"$2";a.jsonp!==!1&&(j=j.replace(ia,q),a.url===j&&(e&&(g=g.replace(ia,q)),a.data===g&&(j+=(/\?/.test(j)?"&":"?")+a.jsonp+"="+d)));a.url=j;a.data=g;h[d]=function(a){c=[a]};f.always(function(){h[d]=k;if(c&& +b.isFunction(k))h[d](c[0])});a.converters["script json"]=function(){c||b.error(d+" was not called");return c[0]};a.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){b.globalEval(a);return a}}});b.ajaxPrefilter("script",function(a){if(a.cache===n)a.cache=!1;if(a.crossDomain)a.type="GET",a.global=!1});b.ajaxTransport("script", +function(a){if(a.crossDomain){var b,c=r.head||r.getElementsByTagName("head")[0]||r.documentElement;return{send:function(d,k){b=r.createElement("script");b.async="async";if(a.scriptCharset)b.charset=a.scriptCharset;b.src=a.url;b.onload=b.onreadystatechange=function(a,d){if(d||!b.readyState||/loaded|complete/.test(b.readyState))b.onload=b.onreadystatechange=null,c&&b.parentNode&&c.removeChild(b),b=n,d||k(200,"success")};c.insertBefore(b,c.firstChild)},abort:function(){if(b)b.onload(0,1)}}}});var sa= +h.ActiveXObject?function(){for(var a in Z)Z[a](0,1)}:!1,Gb=0,Z;b.ajaxSettings.xhr=h.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&u()))a:{try{a=new h.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}a=void 0}return a}:u;(function(a){b.extend(b.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})})(b.ajaxSettings.xhr());b.support.ajax&&b.ajaxTransport(function(a){if(!a.crossDomain||b.support.cors){var e;return{send:function(c,d){var k=a.xhr(),j,g;a.username?k.open(a.type,a.url,a.async,a.username, +a.password):k.open(a.type,a.url,a.async);if(a.xhrFields)for(g in a.xhrFields)k[g]=a.xhrFields[g];a.mimeType&&k.overrideMimeType&&k.overrideMimeType(a.mimeType);!a.crossDomain&&!c["X-Requested-With"]&&(c["X-Requested-With"]="XMLHttpRequest");try{for(g in c)k.setRequestHeader(g,c[g])}catch(q){}k.send(a.hasContent&&a.data||null);e=function(c,f){var h,g,q,p,o;try{if(e&&(f||k.readyState===4)){e=n;if(j)k.onreadystatechange=b.noop,sa&&delete Z[j];if(f)k.readyState!==4&&k.abort();else{h=k.status;q=k.getAllResponseHeaders(); +p={};if((o=k.responseXML)&&o.documentElement)p.xml=o;p.text=k.responseText;try{g=k.statusText}catch(u){g=""}!h&&a.isLocal&&!a.crossDomain?h=p.text?200:404:h===1223&&(h=204)}}}catch(l){f||d(-1,l)}p&&d(h,g,p,q)};!a.async||k.readyState===4?e():(j=++Gb,sa&&(Z||(Z={},b(h).unload(sa)),Z[j]=e),k.onreadystatechange=e)},abort:function(){e&&e(0,1)}}}});var la={},O,ba,Hb=/^(?:toggle|show|hide)$/,Ib=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,$,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width", +"marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ea,ta=h.webkitRequestAnimationFrame||h.mozRequestAnimationFrame||h.oRequestAnimationFrame;b.fn.extend({show:function(a,e,c){if(a||a===0)return this.animate(B("show",3),a,e,c);else{for(var c=0,d=this.length;c=k.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();k.animatedProperties[this.prop]=!0;for(j in k.animatedProperties)k.animatedProperties[j]!==!0&&(c=!1);if(c){k.overflow!=null&&!b.support.shrinkWrapBlocks&&b.each(["","X","Y"],function(a,b){d.style["overflow"+b]=k.overflow[a]});k.hide&&b(d).hide();if(k.hide||k.show)for(var h in k.animatedProperties)b.style(d, +h,k.orig[h]);k.complete.call(d)}return!1}else k.duration==Infinity?this.now=e:(a=e-this.startTime,this.state=a/k.duration,this.pos=b.easing[k.animatedProperties[this.prop]](this.state,a,0,1,k.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}};b.extend(b.fx,{tick:function(){for(var a=b.timers,e=0;e
    "; +a.insertBefore(e,a.firstChild);c=e.firstChild;d=c.firstChild;k=c.nextSibling.firstChild.firstChild;this.doesNotAddBorder=d.offsetTop!==5;this.doesAddBorderForTableAndCells=k.offsetTop===5;d.style.position="fixed";d.style.top="20px";this.supportsFixedPosition=d.offsetTop===20||d.offsetTop===15;d.style.position=d.style.top="";c.style.overflow="hidden";c.style.position="relative";this.subtractsBorderForOverflowNotVisible=d.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(e); +b.offset.initialize=b.noop},bodyOffset:function(a){var e=a.offsetTop,c=a.offsetLeft;b.offset.initialize();b.offset.doesNotIncludeMarginInBodyOffset&&(e+=parseFloat(b.css(a,"marginTop"))||0,c+=parseFloat(b.css(a,"marginLeft"))||0);return{top:e,left:c}},setOffset:function(a,e,c){var d=b.css(a,"position");if(d==="static")a.style.position="relative";var k=b(a),j=k.offset(),h=b.css(a,"top"),g=b.css(a,"left"),q={},p={};(d==="absolute"||d==="fixed")&&b.inArray("auto",[h,g])>-1?(p=k.position(),d=p.top,g= +p.left):(d=parseFloat(h)||0,g=parseFloat(g)||0);b.isFunction(e)&&(e=e.call(a,c,j));if(e.top!=null)q.top=e.top-j.top+d;if(e.left!=null)q.left=e.left-j.left+g;"using"in e?e.using.call(a,q):k.css(q)}};b.fn.extend({position:function(){if(!this[0])return null;var a=this[0],e=this.offsetParent(),c=this.offset(),d=Qa.test(e[0].nodeName)?{top:0,left:0}:e.offset();c.top-=parseFloat(b.css(a,"marginTop"))||0;c.left-=parseFloat(b.css(a,"marginLeft"))||0;d.top+=parseFloat(b.css(e[0],"borderTopWidth"))||0;d.left+= +parseFloat(b.css(e[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||r.body;a&&!Qa.test(a.nodeName)&&b.css(a,"position")==="static";)a=a.offsetParent;return a})}});b.each(["Left","Top"],function(a,e){var c="scroll"+e;b.fn[c]=function(e){var d,k;if(e===n){d=this[0];return!d?null:(k=P(d))?"pageXOffset"in k?k[a?"pageYOffset":"pageXOffset"]:b.support.boxModel&&k.document.documentElement[c]||k.document.body[c]: +d[c]}return this.each(function(){(k=P(this))?k.scrollTo(!a?e:b(k).scrollLeft(),a?e:b(k).scrollTop()):this[c]=e})}});b.each(["Height","Width"],function(a,e){var c=e.toLowerCase();b.fn["inner"+e]=function(){return this[0]?parseFloat(b.css(this[0],c,"padding")):null};b.fn["outer"+e]=function(a){return this[0]?parseFloat(b.css(this[0],c,a?"margin":"border")):null};b.fn[c]=function(a){var d=this[0];if(!d)return a==null?null:this;if(b.isFunction(a))return this.each(function(e){var d=b(this);d[c](a.call(this, +e,d[c]()))});if(b.isWindow(d)){var k=d.document.documentElement["client"+e];return d.document.compatMode==="CSS1Compat"&&k||d.document.body["client"+e]||k}else return d.nodeType===9?Math.max(d.documentElement["client"+e],d.body["scroll"+e],d.documentElement["scroll"+e],d.body["offset"+e],d.documentElement["offset"+e]):a===n?(d=b.css(d,c),k=parseFloat(d),b.isNaN(k)?d:k):this.css(c,typeof a==="string"?a:a+"px")}});h.jQuery=h.$=b})(window); +(function(h,n){function g(g,j){var o=g.nodeName.toLowerCase();if("area"===o){var o=g.parentNode,n=o.name;if(!g.href||!n||o.nodeName.toLowerCase()!=="map")return!1;o=h("img[usemap=#"+n+"]")[0];return!!o&&l(o)}return(/input|select|textarea|button|object/.test(o)?!g.disabled:"a"==o?g.href||j:j)&&l(g)}function l(g){return!h(g).parents().andSelf().filter(function(){return h.curCSS(this,"visibility")==="hidden"||h.expr.filters.hidden(this)}).length}h.ui=h.ui||{};h.ui.version||(h.extend(h.ui,{version:"1.8.13", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),h.fn.extend({_focus:h.fn.focus,focus:function(g,j){return typeof g==="number"?this.each(function(){var o=this;setTimeout(function(){h(o).focus(); +j&&j.call(o)},g)}):this._focus.apply(this,arguments)},scrollParent:function(){var g;g=h.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(h.curCSS(this,"position",1))&&/(auto|scroll)/.test(h.curCSS(this,"overflow",1)+h.curCSS(this,"overflow-y",1)+h.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(h.curCSS(this,"overflow",1)+h.curCSS(this, +"overflow-y",1)+h.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!g.length?h(document):g},zIndex:function(g){if(g!==n)return this.css("zIndex",g);if(this.length)for(var g=h(this[0]),j;g.length&&g[0]!==document;){j=g.css("position");if(j==="absolute"||j==="relative"||j==="fixed")if(j=parseInt(g.css("zIndex"),10),!isNaN(j)&&j!==0)return j;g=g.parent()}return 0},disableSelection:function(){return this.bind((h.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection", +function(g){g.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),h.each(["Width","Height"],function(g,j){function o(j,g,p,o){h.each(l,function(){g-=parseFloat(h.curCSS(j,"padding"+this,!0))||0;p&&(g-=parseFloat(h.curCSS(j,"border"+this+"Width",!0))||0);o&&(g-=parseFloat(h.curCSS(j,"margin"+this,!0))||0)});return g}var l=j==="Width"?["Left","Right"]:["Top","Bottom"],x=j.toLowerCase(),s={innerWidth:h.fn.innerWidth,innerHeight:h.fn.innerHeight,outerWidth:h.fn.outerWidth, +outerHeight:h.fn.outerHeight};h.fn["inner"+j]=function(g){return g===n?s["inner"+j].call(this):this.each(function(){h(this).css(x,o(this,g)+"px")})};h.fn["outer"+j]=function(g,p){return typeof g!=="number"?s["outer"+j].call(this,g):this.each(function(){h(this).css(x,o(this,g,!0,p)+"px")})}}),h.extend(h.expr[":"],{data:function(g,j,o){return!!h.data(g,o[3])},focusable:function(p){return g(p,!isNaN(h.attr(p,"tabindex")))},tabbable:function(p){var j=h.attr(p,"tabindex"),o=isNaN(j);return(o||j>=0)&&g(p, +!o)}}),h(function(){var g=document.body,j=g.appendChild(j=document.createElement("div"));h.extend(j.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});h.support.minHeight=j.offsetHeight===100;h.support.selectstart="onselectstart"in j;g.removeChild(j).style.display="none"}),h.extend(h.ui,{plugin:{add:function(g,j,o){var g=h.ui[g].prototype,l;for(l in o)g.plugins[l]=g.plugins[l]||[],g.plugins[l].push([j,o[l]])},call:function(g,j,h){if((j=g.plugins[j])&&g.element[0].parentNode)for(var l= +0;l0)return!0;g[o]=1;l=g[o]>0;g[o]=0;return l},isOverAxis:function(g,j,h){return g>j&&g0?g.left-l:Math.max(g.left-o.collisionPosition.left, +g.left)},top:function(g,l){var n=h(window),n=l.collisionPosition.top+l.collisionHeight-n.height()-n.scrollTop();g.top=n>0?g.top-n:Math.max(g.top-l.collisionPosition.top,g.top)}},flip:{left:function(g,l){if(l.at[0]!=="center"){var n=h(window),n=l.collisionPosition.left+l.collisionWidth-n.width()-n.scrollLeft(),p=l.my[0]==="left"?-l.elemWidth:l.my[0]==="right"?l.elemWidth:0,s=l.at[0]==="left"?l.targetWidth:-l.targetWidth,v=-2*l.offset[0];g.left+=l.collisionPosition.left<0?p+s+v:n>0?p+s+v:0}},top:function(g, +l){if(l.at[1]!=="center"){var n=h(window),n=l.collisionPosition.top+l.collisionHeight-n.height()-n.scrollTop(),p=l.my[1]==="top"?-l.elemHeight:l.my[1]==="bottom"?l.elemHeight:0,s=l.at[1]==="top"?l.targetHeight:-l.targetHeight,v=-2*l.offset[1];g.top+=l.collisionPosition.top<0?p+s+v:n>0?p+s+v:0}}}};if(!h.offset.setOffset)h.offset.setOffset=function(g,l){if(/static/.test(h.curCSS(g,"position")))g.style.position="relative";var n=h(g),p=n.offset(),s=parseInt(h.curCSS(g,"top",!0),10)||0,v=parseInt(h.curCSS(g, +"left",!0),10)||0,p={top:l.top-p.top+s,left:l.left-p.left+v};"using"in l?l.using.call(g,p):n.css(p)},h.fn.offset=function(g){var l=this[0];return!l||!l.ownerDocument?null:g?this.each(function(){h.offset.setOffset(this,g)}):p.call(this)}})(jQuery); +(function(h){var n=0;h.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var g=this,l=this.element[0].ownerDocument,n;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(j){if(!g.options.disabled&&!g.element.attr("readonly")){n=!1;var l= +h.ui.keyCode;switch(j.keyCode){case l.PAGE_UP:g._move("previousPage",j);break;case l.PAGE_DOWN:g._move("nextPage",j);break;case l.UP:g._move("previous",j);j.preventDefault();break;case l.DOWN:g._move("next",j);j.preventDefault();break;case l.ENTER:case l.NUMPAD_ENTER:g.menu.active&&(n=!0,j.preventDefault());case l.TAB:if(!g.menu.active)break;g.menu.select(j);break;case l.ESCAPE:g.element.val(g.term);g.close(j);break;default:clearTimeout(g.searching),g.searching=setTimeout(function(){if(g.term!=g.element.val())g.selectedItem= +null,g.search(null,j)},g.options.delay)}}}).bind("keypress.autocomplete",function(g){n&&(n=!1,g.preventDefault())}).bind("focus.autocomplete",function(){if(!g.options.disabled)g.selectedItem=null,g.previous=g.element.val()}).bind("blur.autocomplete",function(j){if(!g.options.disabled)clearTimeout(g.searching),g.closing=setTimeout(function(){g.close(j);g._change(j)},150)});this._initSource();this.response=function(){return g._response.apply(g,arguments)};this.menu=h("
      ").addClass("ui-autocomplete").appendTo(h(this.options.appendTo|| +"body",l)[0]).mousedown(function(j){var l=g.menu.element[0];h(j.target).closest(".ui-menu-item").length||setTimeout(function(){h(document).one("mousedown",function(j){j.target!==g.element[0]&&j.target!==l&&!h.ui.contains(l,j.target)&&g.close()})},1);setTimeout(function(){clearTimeout(g.closing)},13)}).menu({focus:function(j,h){var l=h.item.data("item.autocomplete");!1!==g._trigger("focus",j,{item:l})&&/^key/.test(j.originalEvent.type)&&g.element.val(l.value)},selected:function(j,h){var n=h.item.data("item.autocomplete"), +p=g.previous;if(g.element[0]!==l.activeElement)g.element.focus(),g.previous=p,setTimeout(function(){g.previous=p;g.selectedItem=n},1);!1!==g._trigger("select",j,{item:n})&&g.element.val(n.value);g.term=g.element.val();g.close(j);g.selectedItem=n},blur:function(){g.menu.element.is(":visible")&&g.element.val()!==g.term&&g.element.val(g.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");h.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); +this.menu.element.remove();h.Widget.prototype.destroy.call(this)},_setOption:function(g,l){h.Widget.prototype._setOption.apply(this,arguments);g==="source"&&this._initSource();g==="appendTo"&&this.menu.element.appendTo(h(l||"body",this.element[0].ownerDocument)[0]);g==="disabled"&&l&&this.xhr&&this.xhr.abort()},_initSource:function(){var g=this,l,p;h.isArray(this.options.source)?(l=this.options.source,this.source=function(g,n){n(h.ui.autocomplete.filter(l,g.term))}):typeof this.options.source==="string"? +(p=this.options.source,this.source=function(j,l){g.xhr&&g.xhr.abort();g.xhr=h.ajax({url:p,data:j,dataType:"json",autocompleteRequest:++n,success:function(g){this.autocompleteRequest===n&&l(g)},error:function(){this.autocompleteRequest===n&&l([])}})}):this.source=this.options.source},search:function(g,h){g=g!=null?g:this.element.val();this.term=this.element.val();if(g.length").data("item.autocomplete",l).append(h("").text(l.label)).appendTo(g)},_move:function(g,h){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(g)||this.menu.last()&& +/^next/.test(g))this.element.val(this.term),this.menu.deactivate();else this.menu[g](h);else this.search(null,h)},widget:function(){return this.menu.element}});h.extend(h.ui.autocomplete,{escapeRegex:function(g){return g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(g,l){var n=RegExp(h.ui.autocomplete.escapeRegex(l),"i");return h.grep(g,function(g){return n.test(g.label||g.value||g)})}})})(jQuery); +(function(h){h.widget("ui.menu",{_create:function(){var n=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(g){h(g.target).closest(".ui-menu-item a").length&&(g.preventDefault(),n.select(g))});this.refresh()},refresh:function(){var n=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(g){n.activate(g,h(this).parent())}).mouseleave(function(){n.deactivate()})},activate:function(h,g){this.deactivate();if(this.hasScroll()){var l=g.offset().top-this.element.offset().top,p=this.element.scrollTop(),j=this.element.height();l<0?this.element.scrollTop(p+l):l>=j&&this.element.scrollTop(p+l-j+g.height())}this.active=g.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",h,{item:g})},deactivate:function(){if(this.active)this.active.children("a").removeClass("ui-state-hover").removeAttr("id"), +this._trigger("blur"),this.active=null},next:function(h){this.move("next",".ui-menu-item:first",h)},previous:function(h){this.move("prev",".ui-menu-item:last",h)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(h,g,l){this.active?(h=this.active[h+"All"](".ui-menu-item").eq(0),h.length?this.activate(l,h):this.activate(l,this.element.children(g))):this.activate(l,this.element.children(g))}, +nextPage:function(n){if(this.hasScroll())if(!this.active||this.last())this.activate(n,this.element.children(".ui-menu-item:first"));else{var g=this.active.offset().top,l=this.element.height(),p=this.element.children(".ui-menu-item").filter(function(){var j=h(this).offset().top-g-l+h(this).height();return j<10&&j>-10});p.length||(p=this.element.children(".ui-menu-item:last"));this.activate(n,p)}else this.activate(n,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}, +previousPage:function(n){if(this.hasScroll())if(!this.active||this.first())this.activate(n,this.element.children(".ui-menu-item:last"));else{var g=this.active.offset().top,l=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var n=h(this).offset().top-g+l-h(this).height();return n<10&&n>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(n,result)}else this.activate(n,this.element.children(".ui-menu-item").filter(!this.active|| +this.first()?":last":":first"))},hasScroll:function(){return this.element.height()=h.computed&&(h={value:c,computed:d})});return h.value};c.min=function(d, +g,b){if(!g&&c.isArray(d))return Math.min.apply(Math,d);var h={computed:Infinity};u(d,function(c,d,k){d=g?g.call(b,c,d,k):c;dk?1:0}),"value")};c.sortedIndex=function(d,g,b){for(var b=b||c.identity,h=0,j=d.length;h>1;b(d[l])=0})})};c.zip=function(){for(var d=j.call(arguments),g=c.max(c.pluck(d,"length")),b=Array(g),h=0;h=0;b--)d=[c[b].apply(this,d)];return d[0]}};c.keys=G||function(c){if(c!==Object(c))throw new TypeError("Invalid object");var d=[],b;for(b in c)x.call(c,b)&&(d[d.length]=b);return d};c.values=function(d){return c.map(d,c.identity)};c.functions=c.methods=function(d){return c.filter(c.keys(d),function(g){return c.isFunction(d[g])}).sort()}; +c.extend=function(c){u(j.call(arguments,1),function(d){for(var b in d)c[b]=d[b]});return c};c.defaults=function(c){u(j.call(arguments,1),function(d){for(var b in d)c[b]==null&&(c[b]=d[b])});return c};c.clone=function(d){return c.isArray(d)?d.slice():c.extend({},d)};c.tap=function(c,d){d(c);return c};c.isEqual=function(d,g){if(d===g)return!0;var b=typeof d;if(b!=typeof g)return!1;if(d==g)return!0;if(!d&&g||d&&!g)return!1;if(d._chain)d=d._wrapped;if(g._chain)g=g._wrapped;if(d.isEqual)return d.isEqual(g); +if(c.isDate(d)&&c.isDate(g))return d.getTime()===g.getTime();if(c.isNaN(d)&&c.isNaN(g))return!1;if(c.isRegExp(d)&&c.isRegExp(g))return d.source===g.source&&d.global===g.global&&d.ignoreCase===g.ignoreCase&&d.multiline===g.multiline;if(b!=="object")return!1;if(d.length&&d.length!==g.length)return!1;var b=c.keys(d),h=c.keys(g);if(b.length!=h.length)return!1;for(var j in d)if(!(j in g)||!c.isEqual(d[j],g[j]))return!1;return!0};c.isEmpty=function(d){if(c.isArray(d)||c.isString(d))return d.length===0; +for(var g in d)if(x.call(d,g))return!1;return!0};c.isElement=function(c){return!!(c&&c.nodeType==1)};c.isArray=p||function(c){return D.call(c)==="[object Array]"};c.isArguments=function(c){return!(!c||!x.call(c,"callee"))};c.isFunction=function(c){return!(!c||!c.constructor||!c.call||!c.apply)};c.isString=function(c){return!!(c===""||c&&c.charCodeAt&&c.substr)};c.isNumber=function(c){return!!(c===0||c&&c.toExponential&&c.toFixed)};c.isNaN=function(c){return c!==c};c.isBoolean=function(c){return c=== +!0||c===!1};c.isDate=function(c){return!(!c||!c.getTimezoneOffset||!c.setUTCFullYear)};c.isRegExp=function(c){return!(!c||!c.test||!c.exec||!(c.ignoreCase||c.ignoreCase===!1))};c.isNull=function(c){return c===null};c.isUndefined=function(c){return c===void 0};c.noConflict=function(){h._=n;return this};c.identity=function(c){return c};c.times=function(c,d,b){for(var g=0;g/g,interpolate:/<%=([\s\S]+?)%>/g};c.template=function(d,g){var b=c.templateSettings,b="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+d.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(b.interpolate,function(b,c){return"',"+c.replace(/\\'/g,"'")+",'"}).replace(b.evaluate||null,function(b,c){return"');"+c.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g, +"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",b=new Function("obj",b);return g?b(g):b};var L=function(c){this._wrapped=c};c.prototype=L.prototype;var P=function(d,g){return g?c(d).chain():d},r=function(d,g){L.prototype[d]=function(){var b=j.call(arguments);o.call(b,this._wrapped);return P(g.apply(c,b),this._chain)}};c.mixin(c);u("pop,push,reverse,shift,sort,splice,unshift".split(","),function(c){var d=l[c];L.prototype[c]=function(){d.apply(this._wrapped,arguments);return P(this._wrapped, +this._chain)}});u(["concat","join","slice"],function(c){var d=l[c];L.prototype[c]=function(){return P(d.apply(this._wrapped,arguments),this._chain)}});L.prototype.chain=function(){this._chain=!0;return this};L.prototype.value=function(){return this._wrapped}})(); +(function(){var h=this,n=h.Backbone,g;g=typeof exports!=="undefined"?exports:h.Backbone={};g.VERSION="0.5.0-pre";var l=h._;if(!l&&typeof require!=="undefined")l=require("underscore")._;var p=h.jQuery||h.Zepto;g.noConflict=function(){h.Backbone=n;return this};g.emulateHTTP=!1;g.emulateJSON=!1;g.Events={bind:function(d,c){var g=this._callbacks||(this._callbacks={});(g[d]||(g[d]=[])).push(c);return this},unbind:function(d,c){var g;if(d){if(g=this._callbacks)if(c){g=g[d];if(!g)return this;for(var h=0, +j=g.length;h/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},has:function(d){return this.attributes[d]!=null},set:function(d,c){c||(c={});if(!d)return this;if(d.attributes)d=d.attributes;var g=this.attributes,h=this._escapedAttributes;if(!c.silent&&this.validate&&!this._performValidation(d,c))return!1;if(this.idAttribute in d)this.id=d[this.idAttribute];var j=this._changing;this._changing= +!0;for(var n in d){var o=d[n];if(!l.isEqual(g[n],o))g[n]=o,delete h[n],this._changed=!0,c.silent||this.trigger("change:"+n,this,o,c)}!j&&!c.silent&&this._changed&&this.change(c);this._changing=!1;return this},unset:function(d,c){if(!(d in this.attributes))return this;c||(c={});var g={};g[d]=void 0;if(!c.silent&&this.validate&&!this._performValidation(g,c))return!1;delete this.attributes[d];delete this._escapedAttributes[d];d==this.idAttribute&&delete this.id;this._changed=!0;c.silent||(this.trigger("change:"+ +d,this,void 0,c),this.change(c));return this},clear:function(d){d||(d={});var c=this.attributes,g={},h;for(h in c)g[h]=void 0;if(!d.silent&&this.validate&&!this._performValidation(g,d))return!1;this.attributes={};this._escapedAttributes={};this._changed=!0;if(!d.silent){for(h in c)this.trigger("change:"+h,this,void 0,d);this.change(d)}return this},fetch:function(d){d||(d={});var c=this,h=d.success;d.success=function(g,j,l){if(!c.set(c.parse(g,l),d))return!1;h&&h(c,g)};d.error=G(d.error,c,d);return(this.sync|| +g.sync).call(this,"read",this,d)},save:function(d,c){c||(c={});if(d&&!this.set(d,c))return!1;var h=this,j=c.success;c.success=function(d,g,l){if(!h.set(h.parse(d,l),c))return!1;j&&j(h,d,l)};c.error=G(c.error,h,c);var l=this.isNew()?"create":"update";return(this.sync||g.sync).call(this,l,this,c)},destroy:function(d){d||(d={});if(this.isNew())return this.trigger("destroy",this,this.collection,d);var c=this,h=d.success;d.success=function(g){c.trigger("destroy",c,c.collection,d);h&&h(c,g)};d.error=G(d.error, +c,d);return(this.sync||g.sync).call(this,"delete",this,d)},url:function(){var d=M(this.collection)||this.urlRoot||F();return this.isNew()?d:d+(d.charAt(d.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(d){return d},clone:function(){return new this.constructor(this)},isNew:function(){return this.id==null},change:function(d){this.trigger("change",this,d);this._previousAttributes=l.clone(this.attributes);this._changed=!1},hasChanged:function(d){return d?this._previousAttributes[d]!= +this.attributes[d]:this._changed},changedAttributes:function(d){d||(d=this.attributes);var c=this._previousAttributes,g=!1,h;for(h in d)l.isEqual(c[h],d[h])||(g=g||{},g[h]=d[h]);return g},previous:function(d){return!d||!this._previousAttributes?null:this._previousAttributes[d]},previousAttributes:function(){return l.clone(this._previousAttributes)},_performValidation:function(d,c){var g=this.validate(d);return g?(c.error?c.error(this,g,c):this.trigger("error",this,g,c),!1):!0}});g.Collection=function(d, +c){c||(c={});if(c.comparator)this.comparator=c.comparator;l.bindAll(this,"_onModelEvent","_removeReference");this._reset();d&&this.reset(d,{silent:!0});this.initialize.apply(this,arguments)};l.extend(g.Collection.prototype,g.Events,{model:g.Model,initialize:function(){},toJSON:function(){return this.map(function(d){return d.toJSON()})},add:function(d,c){if(l.isArray(d))for(var g=0,h=d.length;g').hide().appendTo("body")[0].contentWindow,this.saveLocation(d);this._hasPushState?p(window).bind("popstate",this.checkUrl):"onhashchange"in window&& +!c?p(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);this.fragment=d;v=!0;d=this.loadUrl()||this.loadUrl(window.location.hash);if(this._wantsPushState&&!this._hasPushState&&window.location.pathname!=this.options.root)this.fragment=this.getFragment(null,!0),window.location=this.options.root+"#"+this.fragment;else return d},route:function(d,c){this.handlers.unshift({route:d,callback:c})},checkUrl:function(){var d=this.getFragment();d==this.fragment&&this.iframe&&(d= +this.getFragment(this.iframe.location.hash));if(d==this.fragment||d==decodeURIComponent(this.fragment))return!1;this.iframe&&this.saveLocation(d);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(d){var c=this.fragment=this.getFragment(d);return l.any(this.handlers,function(d){if(d.route.test(c))return d.callback(c),!0})},saveLocation:function(d){d=(d||"").replace(x,"");if(!(this.fragment==d||this.fragment==decodeURIComponent(d)))if(this._hasPushState){var c=window.location;d.indexOf(this.options.root)!= +0&&(d=this.options.root+d);this.fragment=d;window.history.pushState({},document.title,c.protocol+"//"+c.host+d)}else if(window.location.hash=this.fragment=d,this.iframe&&d!=this.getFragment(this.iframe.location.hash))this.iframe.document.open().close(),this.iframe.location.hash=d}});g.View=function(d){this.cid=l.uniqueId("view");this._configure(d||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments)};var w=/^(\S+)\s*(.*)$/,z="model,collection,el,id,attributes,className,tagName".split(","); +l.extend(g.View.prototype,g.Events,{tagName:"div",$:function(d){return p(d,this.el)},initialize:function(){},render:function(){return this},remove:function(){p(this.el).remove();return this},make:function(d,c,g){d=document.createElement(d);c&&p(d).attr(c);g&&p(d).html(g);return d},delegateEvents:function(d){if(d||(d=this.events)){p(this.el).unbind(".delegateEvents"+this.cid);for(var c in d){var g=this[d[c]];if(!g)throw Error('Event "'+d[c]+'" does not exist');var h=c.match(w),j=h[1],h=h[2],g=l.bind(g, +this);j+=".delegateEvents"+this.cid;h===""?p(this.el).bind(j,g):p(this.el).delegate(h,j,g)}}},_configure:function(d){this.options&&(d=l.extend({},this.options,d));for(var c=0,g=z.length;c0){g-=1}if(h.type=="facet"&&g<0){g+=1}}else{if(d.skipToFacet&&h.type=="text"&&f==c&&g>=0){c=0;g=0}}var b,e=Math.min(f,c+g);if(h.type=="text"){if(e>=0&&e=f||e<0){b=_.last(this.inputViews);b.enableEdit()}else{b=this.facetViews[e];b.enableEdit();b.setCursorAtEnd(g||d.startAtEnd)}}else{b=this.inputViews[e];b.enableEdit()}}}if(d.selectText){b.selectText()}this.resizeFacets()},maybeFocusSearch:function(b){if(a(b.target).is(".VS-search-box")||a(b.target).is(".VS-search-inner")||b.type=="keydown"){this.focusSearch(b)}},focusSearch:function(d,c){var b=this.inputViews[this.inputViews.length-1];b.enableEdit(c);if(!c){b.setCursorAtEnd(-1)}if(d.type=="keydown"){b.keydown(d);b.box.trigger("keydown")}_.defer(_.bind(function(){if(!this.$("input:focus").length){b.enableEdit(c)}},this))},highlightSearch:function(c){if(a(c.target).is(".VS-search-box")||a(c.target).is(".VS-search-inner")||c.type=="keydown"){var b=this.inputViews[this.inputViews.length-1];b.startTripleClickTimer();this.focusSearch(c,true)}},maybeTripleClick:function(c){var b=this.inputViews[this.inputViews.length-1];return b.maybeTripleClick(c)},addFocus:function(){this.app.options.callbacks.focus();this.$(".VS-search-box").addClass("VS-focus")},removeFocus:function(){var b=_.any(this.facetViews.concat(this.inputViews),function(c){return c.isFocused()});if(!b){this.$(".VS-search-box").removeClass("VS-focus")}},showFacetCategoryMenu:function(c){c.preventDefault();c.stopPropagation();if(this.facetCategoryMenu&&this.facetCategoryMenu.modes.open=="is"){return this.facetCategoryMenu.close()}var b=[{title:"Account",onClick:_.bind(this.addFacet,this,"account","")},{title:"Project",onClick:_.bind(this.addFacet,this,"project","")},{title:"Filter",onClick:_.bind(this.addFacet,this,"filter","")},{title:"Access",onClick:_.bind(this.addFacet,this,"access","")}];var d=this.facetCategoryMenu||(this.facetCategoryMenu=new dc.ui.Menu({items:b,standalone:true}));this.$(".VS-icon-search").after(d.render().open().content);return false}})})();(function(){var a=jQuery;VS.ui.SearchFacet=Backbone.View.extend({type:"facet",className:"search_facet",events:{"click .category":"selectFacet","keydown input":"keydown","mousedown input":"enableEdit","mouseover .VS-icon-cancel":"showDelete","mouseout .VS-icon-cancel":"hideDelete","click .VS-icon-cancel":"remove"},initialize:function(b){this.flags={canClose:false};_.bindAll(this,"set","keydown","deselectFacet","deferDisableEdit")},render:function(){a(this.el).html(JST.search_facet({model:this.model}));this.setMode("not","editing");this.setMode("not","selected");this.box=this.$("input");this.box.val(this.model.get("value"));this.box.bind("blur",this.deferDisableEdit);this.box.bind("input propertychange",this.keydown);this.setupAutocomplete();return this},calculateSize:function(){this.box.autoGrowInput();this.box.unbind("updated.autogrow");this.box.bind("updated.autogrow",_.bind(this.moveAutocomplete,this))},resize:function(b){this.box.trigger("resize.autogrow",b)},setupAutocomplete:function(){this.box.autocomplete({source:_.bind(this.autocompleteValues,this),minLength:0,delay:0,autoFocus:true,position:{offset:"0 5"},select:_.bind(function(d,c){d.preventDefault();var b=this.model.get("value");this.set(c.item.value);if(b!=c.item.value||this.box.val()!=c.item.value){this.search(d)}return false},this)});this.box.autocomplete("widget").addClass("VS-interface")},moveAutocomplete:function(){var b=this.box.data("autocomplete");if(b){b.menu.element.position({my:"left top",at:"left bottom",of:this.box.data("autocomplete").element,collision:"flip",offset:"0 5"})}},searchAutocomplete:function(c){var b=this.box.data("autocomplete");if(b){var d=b.menu.element;b.search();d.outerWidth(Math.max(d.width("").outerWidth(),b.element.outerWidth()))}},closeAutocomplete:function(){var b=this.box.data("autocomplete");if(b){b.close()}},autocompleteValues:function(d,f){var c=this.model.get("category");var e=this.model.get("value");var b=d.term;this.options.app.options.callbacks.valueMatches(c,b,function(h){h=h||[];if(b&&e!=b){var g=VS.utils.inflector.escapeRegExp(b||"");var i=new RegExp("\\b"+g,"i");h=a.grep(h,function(j){return i.test(j)||i.test(j.value)||i.test(j.label)})}f(_.sortBy(h,function(j){if(j==e||j.value==e){return""}else{return j}}))})},set:function(b){if(!b){return}this.model.set({value:b})},search:function(c,b){if(!b){b=1}this.closeAutocomplete();this.options.app.searchBox.searchEvent(c);_.defer(_.bind(function(){this.options.app.searchBox.focusNextFacet(this,b,{viewPosition:this.options.order})},this))},enableEdit:function(){if(this.modes.editing!="is"){this.setMode("is","editing");this.deselectFacet();if(this.box.val()==""){this.box.val(this.model.get("value"))}}this.flags.canClose=false;this.options.app.searchBox.disableFacets(this);this.options.app.searchBox.addFocus();_.defer(_.bind(function(){this.options.app.searchBox.addFocus()},this));this.resize();this.searchAutocomplete();this.box.focus()},deferDisableEdit:function(){this.flags.canClose=true;_.delay(_.bind(function(){if(this.flags.canClose&&!this.box.is(":focus")&&this.modes.editing=="is"&&this.modes.selected!="is"){this.disableEdit()}},this),250)},disableEdit:function(){var b=VS.utils.inflector.trim(this.box.val());if(b!=this.model.get("value")){this.set(b)}this.flags.canClose=false;this.box.selectRange(0,0);this.box.blur();this.setMode("not","editing");this.closeAutocomplete();this.options.app.searchBox.removeFocus()},selectFacet:function(c){if(c){c.preventDefault()}var b=this.options.app.searchBox.allSelected();if(this.modes.selected=="is"){return}if(this.box.is(":focus")){this.box.setCursorPosition(0);this.box.blur()}this.flags.canClose=false;this.closeAutocomplete();this.setMode("is","selected");this.setMode("not","editing");if(!b||c){a(document).unbind("keydown.facet",this.keydown);a(document).unbind("click.facet",this.deselectFacet);_.defer(_.bind(function(){a(document).unbind("keydown.facet").bind("keydown.facet",this.keydown);a(document).unbind("click.facet").one("click.facet",this.deselectFacet)},this));this.options.app.searchBox.disableFacets(this);this.options.app.searchBox.addFocus()}return false},deselectFacet:function(b){if(b){b.preventDefault()}if(this.modes.selected=="is"){this.setMode("not","selected");this.closeAutocomplete();this.options.app.searchBox.removeFocus()}a(document).unbind("keydown.facet",this.keydown);a(document).unbind("click.facet",this.deselectFacet);return false},isFocused:function(){return this.box.is(":focus")},showDelete:function(){a(this.el).addClass("search_facet_maybe_delete")},hideDelete:function(){a(this.el).removeClass("search_facet_maybe_delete")},setCursorAtEnd:function(b){if(b==-1){this.box.setCursorPosition(this.box.val().length)}else{this.box.setCursorPosition(0)}},remove:function(c){var b=this.model.get("value");this.deselectFacet();this.disableEdit();this.options.app.searchQuery.remove(this.model);if(b){this.search(c,-1)}else{this.options.app.searchBox.renderFacets();this.options.app.searchBox.focusNextFacet(this,-1,{viewPosition:this.options.order})}},selectText:function(){this.box.selectRange(0,this.box.val().length)},keydown:function(c){var b=VS.app.hotkeys.key(c);if(b=="enter"&&this.box.val()){this.disableEdit();this.search(c)}else{if(b=="left"){if(this.modes.selected=="is"){this.deselectFacet();this.options.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1})}else{if(this.box.getCursorPosition()==0&&!this.box.getSelection().length){this.selectFacet()}}}else{if(b=="right"){if(this.modes.selected=="is"){c.preventDefault();this.deselectFacet();this.setCursorAtEnd(0);this.enableEdit()}else{if(this.box.getCursorPosition()==this.box.val().length){c.preventDefault();this.disableEdit();this.options.app.searchBox.focusNextFacet(this,1)}}}else{if(VS.app.hotkeys.shift&&b=="tab"){c.preventDefault();this.options.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1,skipToFacet:true,selectText:true})}else{if(b=="tab"){c.preventDefault();this.options.app.searchBox.focusNextFacet(this,1,{skipToFacet:true,selectText:true})}else{if(VS.app.hotkeys.command&&(c.which==97||c.which==65)){c.preventDefault();this.options.app.searchBox.selectAllFacets();return false}else{if(VS.app.hotkeys.printable(c)&&this.modes.selected=="is"){this.options.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1});this.remove(c)}else{if(b=="backspace"){if(this.modes.selected=="is"){c.preventDefault();this.remove(c)}else{if(this.box.getCursorPosition()==0&&!this.box.getSelection().length){c.preventDefault();this.selectFacet()}}}}}}}}}}this.resize(c);if(c.which==null){this.searchAutocomplete(c);_.defer(_.bind(this.resize,this,c))}}})})();(function(){var a=jQuery;VS.ui.SearchInput=Backbone.View.extend({type:"text",className:"search_input",events:{"keypress input":"keypress","keydown input":"keydown","click input":"maybeTripleClick","dblclick input":"startTripleClickTimer"},initialize:function(){this.app=this.options.app;this.flags={canClose:false};_.bindAll(this,"removeFocus","addFocus","moveAutocomplete","deferDisableEdit")},render:function(){a(this.el).html(JST.search_input({}));this.setMode("not","editing");this.setMode("not","selected");this.box=this.$("input");this.box.autoGrowInput();this.box.bind("updated.autogrow",this.moveAutocomplete);this.box.bind("blur",this.deferDisableEdit);this.box.bind("focus",this.addFocus);this.setupAutocomplete();return this},setupAutocomplete:function(){this.box.autocomplete({minLength:1,delay:50,autoFocus:true,position:{offset:"0 -1"},source:_.bind(this.autocompleteValues,this),select:_.bind(function(f,d){f.preventDefault();f.stopPropagation();var c=this.addTextFacetRemainder(d.item.value);var b=this.options.position+(c?1:0);this.app.searchBox.addFacet(d.item.value,"",b);return false},this)});this.box.data("autocomplete")._renderMenu=function(c,b){var d="";_.each(b,_.bind(function(f,e){if(f.category&&f.category!=d){c.append('
    • '+f.category+"
    • ");d=f.category}this._renderItem(c,f)},this))};this.box.autocomplete("widget").addClass("VS-interface")},autocompleteValues:function(d,f){var b=d.term;var e=b.match(/\w+$/);var c=VS.utils.inflector.escapeRegExp(e&&e[0]||" ");this.app.options.callbacks.facetMatches(function(h){h=h||[];var i=new RegExp("^"+c,"i");var g=a.grep(h,function(j){return j&&i.test(j.label||j)});f(_.sortBy(g,function(j){if(j.label){return j.category+"-"+j.label}else{return j}}))})},closeAutocomplete:function(){var b=this.box.data("autocomplete");if(b){b.close()}},moveAutocomplete:function(){var b=this.box.data("autocomplete");if(b){b.menu.element.position({my:"left top",at:"left bottom",of:this.box.data("autocomplete").element,collision:"none",offset:"0 -1"})}},searchAutocomplete:function(c){var b=this.box.data("autocomplete");if(b){var d=b.menu.element;b.search();d.outerWidth(Math.max(d.width("").outerWidth(),b.element.outerWidth()))}},addTextFacetRemainder:function(e){var d=this.box.val();var c=d.match(/\b(\w+)$/);var b=new RegExp(c[0],"i");if(c&&e.search(b)==0){d=d.replace(/\b(\w+)$/,"")}d=d.replace("^s+|s+$","");if(d){this.app.searchBox.addFacet("text",d,this.options.position)}return d},enableEdit:function(b){this.addFocus();if(b){this.selectText()}this.box.focus()},addFocus:function(){this.flags.canClose=false;if(!this.app.searchBox.allSelected()){this.app.searchBox.disableFacets(this)}this.app.searchBox.addFocus();this.setMode("is","editing");this.setMode("not","selected");this.searchAutocomplete()},disableEdit:function(){this.box.blur();this.removeFocus()},removeFocus:function(){this.flags.canClose=false;this.app.searchBox.removeFocus();this.setMode("not","editing");this.setMode("not","selected");this.closeAutocomplete()},deferDisableEdit:function(){this.flags.canClose=true;_.delay(_.bind(function(){if(this.flags.canClose&&!this.box.is(":focus")&&this.modes.editing=="is"){this.disableEdit()}},this),250)},startTripleClickTimer:function(){this.tripleClickTimer=setTimeout(_.bind(function(){this.tripleClickTimer=null},this),500)},maybeTripleClick:function(b){if(!!this.tripleClickTimer){b.preventDefault();this.app.searchBox.selectAllFacets();return false}},isFocused:function(){return this.box.is(":focus")},value:function(){return this.box.val()},setCursorAtEnd:function(b){if(b==-1){this.box.setCursorPosition(this.box.val().length)}else{this.box.setCursorPosition(0)}},selectText:function(){this.box.selectRange(0,this.box.val().length);if(!this.app.searchBox.allSelected()){this.box.focus()}else{this.setMode("is","selected")}},search:function(c,b){if(!b){b=0}this.closeAutocomplete();this.app.searchBox.searchEvent(c);_.defer(_.bind(function(){this.app.searchBox.focusNextFacet(this,b)},this))},keypress:function(h){var c=VS.app.hotkeys.key(h);if(c=="enter"){return this.search(h,100)}else{if(VS.app.hotkeys.colon(h)){this.box.trigger("resize.autogrow",h);var g=this.box.val();var f=this.options.callbacks.facetMatches()||[];var i=_.map(f,function(e){if(e.label){return e.label}else{return e}});if(_.contains(i,g)){h.preventDefault();var d=this.addTextFacetRemainder(g);var b=this.options.position+(d?1:0);this.app.searchBox.addFacet(g,"",b);return false}}else{if(c=="backspace"){if(this.box.getCursorPosition()==0&&!this.box.getSelection().length){h.preventDefault();h.stopPropagation();h.stopImmediatePropagation();this.app.searchBox.resizeFacets();return false}}}}},keydown:function(g){var c=VS.app.hotkeys.key(g);if(c=="left"){if(this.box.getCursorPosition()==0){g.preventDefault();this.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1})}}else{if(c=="right"){if(this.box.getCursorPosition()==this.box.val().length){g.preventDefault();this.app.searchBox.focusNextFacet(this,1,{selectFacet:true})}}else{if(VS.app.hotkeys.shift&&c=="tab"){g.preventDefault();this.app.searchBox.focusNextFacet(this,-1,{selectText:true})}else{if(c=="tab"){g.preventDefault();var f=this.box.val();if(f.length){var d=this.addTextFacetRemainder(f);var b=this.options.position+(d?1:0);this.app.searchBox.addFacet(f,"",b)}else{this.app.searchBox.focusNextFacet(this,0,{skipToFacet:true,selectText:true})}}else{if(VS.app.hotkeys.command&&String.fromCharCode(g.which).toLowerCase()=="a"){g.preventDefault();this.app.searchBox.selectAllFacets();return false}else{if(c=="backspace"&&!this.app.searchBox.allSelected()){if(this.box.getCursorPosition()==0&&!this.box.getSelection().length){g.preventDefault();this.app.searchBox.focusNextFacet(this,-1,{backspace:true});return false}}}}}}}this.box.trigger("resize.autogrow",g)}})})();(function(){var a=jQuery;Backbone.View.prototype.setMode=function(c,b){this.modes||(this.modes={});if(this.modes[b]===c){return}a(this.el).setMode(c,b);this.modes[b]=c}})();(function(){var a=jQuery;VS.app.hotkeys={KEYS:{"16":"shift","17":"command","91":"command","93":"command","224":"command","13":"enter","37":"left","38":"upArrow","39":"right","40":"downArrow","46":"delete","8":"backspace","9":"tab","188":"comma"},initialize:function(){_.bindAll(this,"down","up","blur");a(document).bind("keydown",this.down);a(document).bind("keyup",this.up);a(window).bind("blur",this.blur)},down:function(c){var b=this.KEYS[c.which];if(b){this[b]=true}},up:function(c){var b=this.KEYS[c.which];if(b){this[b]=false}},blur:function(c){for(var b in this.KEYS){this[this.KEYS[b]]=false}},key:function(b){return this.KEYS[b.which]},colon:function(c){var b=c.which;return b&&String.fromCharCode(b)==":"},printable:function(c){var b=c.which;if(c.type=="keydown"){if(b==32||(b>=48&&b<=90)||(b>=96&&b<=111)||(b>=186&&b<=192)||(b>=219&&b<=222)){return true}}else{if((b>=32&&b<=126)||(b>=160&&b<=500)||(String.fromCharCode(b)==":")){return true}}return false}}})();(function(){var a=jQuery;VS.utils.inflector={trim:function(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")},escapeRegExp:function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")}}})();(function(){var b=jQuery;b.fn.extend({setMode:function(d,e){e=e||"mode";var c=new RegExp("\\w+_"+e+"(\\s|$)","g");var f=(d===null)?"":d+"_"+e;this.each(function(){this.className=(this.className.replace(c,"")+" "+f).replace(/\s\s/g," ")});return f},autoGrowInput:function(){return this.each(function(){var e=b(this);var d=b("
      ").css({opacity:0,top:-9999,left:-9999,position:"absolute",whiteSpace:"nowrap"}).addClass("VS-input-width-tester").addClass("VS-interface");var c="keydown.autogrow keypress.autogrow resize.autogrow change.autogrow";e.next(".VS-input-width-tester").remove();e.after(d);e.unbind(c).bind(c,function(h,i){if(i){h=i}var g=e.val();if(VS.app.hotkeys.key(h)=="backspace"){var f=e.getCursorPosition();if(f>0){g=g.slice(0,f-1)+g.slice(f,g.length)}}else{if(VS.app.hotkeys.printable(h)&&!VS.app.hotkeys.command){g+=String.fromCharCode(h.which)}}g=g.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">");d.html(g);e.width(d.width()+3);e.trigger("updated.autogrow")});e.trigger("resize.autogrow")})},getCursorPosition:function(){var d=0;var e=this.get(0);if(document.selection){e.focus();var f=document.selection.createRange();var c=document.selection.createRange().text.length;f.moveStart("character",-e.value.length);d=f.text.length-c}else{if(e&&b(e).is(":visible")&&e.selectionStart!=null){d=e.selectionStart}}return d},setCursorPosition:function(c){return this.each(function(){return b(this).selectRange(c,c)})},selectRange:function(d,c){return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(d,c)}else{if(this.createTextRange){var e=this.createTextRange();e.collapse(true);e.moveEnd("character",c);e.moveStart("character",d);if(c-d>=0){e.select()}}}})},getSelection:function(){var e=this[0];if(e.selectionStart!=null){var h=e.selectionStart;var c=e.selectionEnd;return{start:h,end:c,length:c-h,text:e.value.substr(h,c-h)}}else{if(document.selection){var d=document.selection.createRange();if(d){var f=e.createTextRange();var g=f.duplicate();f.moveToBookmark(d.getBookmark());g.setEndPoint("EndToStart",f);var h=g.text.length;var c=h+d.text.length;return{start:h,end:c,length:c-h,text:d.text}}}}return{start:0,end:0,length:0}}});if(b.browser.msie&&false){window.console={};var a;window.console.log=function(f){if(_.isArray(f)){var d=f[0];var e=_.map(f.slice(1),function(g){return JSON.stringify(g)}).join(" - ")}if(!a){a=b("
        ").css({position:"fixed",bottom:10,left:10,zIndex:20000,width:b("body").width()-80,border:"1px solid #000",padding:"10px",backgroundColor:"#fff",fontFamily:"arial,helvetica,sans-serif",fontSize:"11px"});b("body").append(a)}var c=b("
      1. "+d+" - "+e+"
      2. ").css({borderBottom:"1px solid #999999"});a.find("ol").append(c);_.delay(function(){c.fadeOut(500)},5000)}}})();(function(){var a=jQuery;VS.app.SearchParser={ALL_FIELDS:/('.+?'|".+?"|[^'"\s]{2}\S*):\s*('.+?'|".+?"|[^'"\s]\S*)/g,CATEGORY:/('.+?'|".+?"|[^'"\s]{2}\S*):\s*/,parse:function(b,d){var c=this._extractAllFacets(b,d);b.searchQuery.reset(c);return c},_extractAllFacets:function(b,g){var f=[];var c=g;while(g){var d,e;c=g;var h=this._extractNextField(g);if(!h){d="text";e=this._extractSearchText(g);g=VS.utils.inflector.trim(g.replace(e,""))}else{if(h.indexOf(":")!=-1){d=h.match(this.CATEGORY)[1].replace(/(^['"]|['"]$)/g,"");e=h.replace(this.CATEGORY,"").replace(/(^['"]|['"]$)/g,"");g=VS.utils.inflector.trim(g.replace(h,""))}else{if(h.indexOf(":")==-1){d="text";e=h;g=VS.utils.inflector.trim(g.replace(e,""))}}}if(d&&e){var i=new VS.model.SearchFacet({category:d,value:VS.utils.inflector.trim(e),app:b});f.push(i)}if(c==g){break}}return f},_extractNextField:function(d){var b=/^\s*(\S+)\s+(?=\w+:\s?(('.+?'|".+?")|([^'"]{2}\S*)))/;var c=d.match(b);if(c&&c.length>=1){return c[1]}else{return this._extractFirstField(d)}},_extractFirstField:function(c){var b=c.match(this.ALL_FIELDS);return b&&b.length&&b[0]},_extractSearchText:function(b){b=b||"";var c=VS.utils.inflector.trim(b.replace(this.ALL_FIELDS,""));return c}}})();(function(){var a=jQuery;VS.model.SearchFacet=Backbone.Model.extend({serialize:function(){var b=this.quoteCategory(this.get("category"));var c=VS.utils.inflector.trim(this.get("value"));if(!c){return""}if(!_.contains(this.get("app").options.unquotable||[],b)&&b!="text"){c=this.quoteValue(c)}if(b!="text"){b=b+": "}else{b=""}return b+c},quoteCategory:function(d){var e=(/"/).test(d);var b=(/'/).test(d);var c=(/\s/).test(d);if(e&&!b){return"'"+d+"'"}else{if(c||(b&&!e)){return'"'+d+'"'}else{return d}}},quoteValue:function(d){var c=(/"/).test(d);var b=(/'/).test(d);if(c&&!b){return"'"+d+"'"}else{return'"'+d+'"'}}})})();(function(){var a=jQuery;VS.model.SearchQuery=Backbone.Collection.extend({model:VS.model.SearchFacet,serialize:function(){return this.map(function(b){return b.serialize()}).join(" ")},facets:function(){return this.map(function(c){var b={};b[c.get("category")]=c.get("value");return b})},find:function(b){var c=this.detect(function(d){return d.get("category")==b});return c&&c.get("value")},count:function(b){return this.select(function(c){return c.get("category")==b}).length},values:function(b){var c=this.select(function(d){return d.get("category")==b});return _.map(c,function(d){return d.get("value")})},has:function(b,c){return this.any(function(e){var d=e.get("category")==b;if(!c){return d}return d&&e.get("value")==c})},withoutCategory:function(b){return this.map(function(c){if(c.get("category")!=b){return c.serialize()}}).join(" ")}})})();(function(){window.JST=window.JST||{};window.JST.search_box=_.template('');window.JST.search_facet=_.template('<% if (model.has(\'category\')) { %>\n
        <%= model.get(\'category\') %>:
        \n<% } %>\n\n
        \n \n
        \n\n
        ');window.JST.search_input=_.template('')})(); \ No newline at end of file +/* + VisualSearch.js 0.2.1 + (c) 2011 Samuel Clay, @samuelclay, DocumentCloud Inc. + VisualSearch.js may be freely distributed under the MIT license. + For all details and documentation: + http://documentcloud.github.com/visualsearch +*/ +(function(){var c=jQuery;if(!window.VS)window.VS={};if(!VS.app)VS.app={};if(!VS.ui)VS.ui={};if(!VS.model)VS.model={};if(!VS.utils)VS.utils={};VS.VERSION="0.2.1";VS.VisualSearch=function(a){var b={container:"",query:"",unquotable:[],callbacks:{search:c.noop,focus:c.noop,blur:c.noop,facetMatches:c.noop,valueMatches:c.noop}};this.options=_.extend({},b,a);this.options.callbacks=_.extend({},b.callbacks,a.callbacks);VS.app.hotkeys.initialize();this.searchQuery=new VS.model.SearchQuery;this.searchBox=new VS.ui.SearchBox({app:this}); +if(a.container)a=this.searchBox.render().el,c(this.options.container).html(a);this.searchBox.value(this.options.query||"");c(window).bind("unload",function(){});return this};VS.init=function(a){return new VS.VisualSearch(a)}})(); +(function(){var c=jQuery;VS.ui.SearchBox=Backbone.View.extend({id:"search",events:{"click .VS-cancel-search-box":"clearSearch","mousedown .VS-search-box":"maybeFocusSearch","dblclick .VS-search-box":"highlightSearch","click .VS-search-box":"maybeTripleClick"},initialize:function(){this.app=this.options.app;this.flags={allSelected:!1};this.facetViews=[];this.inputViews=[];_.bindAll(this,"renderFacets","_maybeDisableFacets","disableFacets","deselectAllFacets");this.app.searchQuery.bind("reset",this.renderFacets); +c(document).bind("keydown",this._maybeDisableFacets)},render:function(){c(this.el).append(JST.search_box({}));c(document.body).setMode("no","search");return this},value:function(a){return a==null?this.serialize():this.setQuery(a)},serialize:function(){var a=[],b=this.inputViews.length;this.app.searchQuery.each(_.bind(function(b,c){a.push(this.inputViews[c].value());a.push(b.serialize())},this));b&&a.push(this.inputViews[b-1].value());return _.compact(a).join(" ")},setQuery:function(a){this.currentQuery= +a;VS.app.SearchParser.parse(this.app,a)},viewPosition:function(a){a=_.indexOf(a.type=="facet"?this.facetViews:this.inputViews,a);a==-1&&(a=0);return a},searchEvent:function(a){var b=this.value();this.focusSearch(a);this.value(b);this.app.options.callbacks.search(b,this.app.searchQuery)},addFacet:function(a,b,c){a=VS.utils.inflector.trim(a);b=VS.utils.inflector.trim(b||"");if(a){var e=new VS.model.SearchFacet({category:a,value:b||"",app:this.app});this.app.searchQuery.add(e,{at:c});this.renderFacets(); +var d=_.detect(this.facetViews,function(a){if(a.model==e)return!0});_.defer(function(){d.enableEdit()})}},renderFacets:function(){this.facetViews=[];this.inputViews=[];this.$(".VS-search-inner").empty();this.app.searchQuery.each(_.bind(function(a,b){this.renderFacet(a,b)},this));this.renderSearchInput()},renderFacet:function(a,b){var c=new VS.ui.SearchFacet({app:this.app,model:a,order:b});this.renderSearchInput();this.facetViews.push(c);this.$(".VS-search-inner").children().eq(b*2).after(c.render().el); +c.calculateSize();_.defer(_.bind(c.calculateSize,c));return c},renderSearchInput:function(){var a=new VS.ui.SearchInput({position:this.inputViews.length,app:this.app});this.$(".VS-search-inner").append(a.render().el);this.inputViews.push(a)},clearSearch:function(a){var b=_.bind(function(){this.disableFacets();this.value("");this.flags.allSelected=!1;this.focusSearch(a)},this);this.app.options.callbacks.clearSearch?this.app.options.callbacks.clearSearch(b):b()},selectAllFacets:function(){this.flags.allSelected= +!0;c(document).one("click.selectAllFacets",this.deselectAllFacets);_.each(this.facetViews,function(a){a.selectFacet()});_.each(this.inputViews,function(a){a.selectText()})},allSelected:function(a){if(a)this.flags.allSelected=!1;return this.flags.allSelected},deselectAllFacets:function(a){this.disableFacets();if(this.$(a.target).is(".category,input")){var b=c(a.target).closest(".search_facet,.search_input"),g=_.detect(this.facetViews.concat(this.inputViews),function(a){return a.el==b[0]});g.type== +"facet"?g.selectFacet():g.type=="input"&&_.defer(function(){g.enableEdit(!0)})}},disableFacets:function(a){_.each(this.inputViews,function(b){b&&b!=a&&(b.modes.editing=="is"||b.modes.selected=="is")&&b.disableEdit()});_.each(this.facetViews,function(b){if(b&&b!=a&&(b.modes.editing=="is"||b.modes.selected=="is"))b.disableEdit(),b.deselectFacet()});this.flags.allSelected=!1;this.removeFocus();c(document).unbind("click.selectAllFacets")},resizeFacets:function(a){_.each(this.facetViews,function(b){(!a|| +b==a)&&b.resize()})},_maybeDisableFacets:function(a){if(this.flags.allSelected&&VS.app.hotkeys.key(a)=="backspace")return a.preventDefault(),this.clearSearch(a),!1;else this.flags.allSelected&&VS.app.hotkeys.printable(a)&&this.clearSearch(a)},focusNextFacet:function(a,b,c){var c=c||{},e=this.facetViews.length,d=c.viewPosition||this.viewPosition(a);c.skipToFacet?c.skipToFacet&&a.type=="text"&&e==d&&b>=0&&(b=d=0):(a.type=="text"&&b>0&&(b-=1),a.type=="facet"&&b<0&&(b+=1));var f,d=Math.min(e,d+b);a.type== +"text"?(d>=0&&d=e||d<0?(f=_.last(this.inputViews),f.enableEdit()):(f=this.facetViews[d],f.enableEdit(),f.setCursorAtEnd(b||c.startAtEnd)):(f=this.inputViews[d],f.enableEdit()));c.selectText&&f.selectText();this.resizeFacets()},maybeFocusSearch:function(a){(c(a.target).is(".VS-search-box")|| +c(a.target).is(".VS-search-inner")||a.type=="keydown")&&this.focusSearch(a)},focusSearch:function(a,b){var c=this.inputViews[this.inputViews.length-1];c.enableEdit(b);b||c.setCursorAtEnd(-1);a.type=="keydown"&&(c.keydown(a),c.box.trigger("keydown"));_.defer(_.bind(function(){this.$("input:focus").length||c.enableEdit(b)},this))},highlightSearch:function(a){if(c(a.target).is(".VS-search-box")||c(a.target).is(".VS-search-inner")||a.type=="keydown")this.inputViews[this.inputViews.length-1].startTripleClickTimer(), +this.focusSearch(a,!0)},maybeTripleClick:function(a){return this.inputViews[this.inputViews.length-1].maybeTripleClick(a)},addFocus:function(){this.app.options.callbacks.focus();this.$(".VS-search-box").addClass("VS-focus")},removeFocus:function(){this.app.options.callbacks.blur();_.any(this.facetViews.concat(this.inputViews),function(a){return a.isFocused()})||this.$(".VS-search-box").removeClass("VS-focus")},showFacetCategoryMenu:function(a){a.preventDefault();a.stopPropagation();if(this.facetCategoryMenu&& +this.facetCategoryMenu.modes.open=="is")return this.facetCategoryMenu.close();a=[{title:"Account",onClick:_.bind(this.addFacet,this,"account","")},{title:"Project",onClick:_.bind(this.addFacet,this,"project","")},{title:"Filter",onClick:_.bind(this.addFacet,this,"filter","")},{title:"Access",onClick:_.bind(this.addFacet,this,"access","")}];a=this.facetCategoryMenu||(this.facetCategoryMenu=new dc.ui.Menu({items:a,standalone:!0}));this.$(".VS-icon-search").after(a.render().open().content);return!1}})})(); +(function(){var c=jQuery;VS.ui.SearchFacet=Backbone.View.extend({type:"facet",className:"search_facet",events:{"click .category":"selectFacet","keydown input":"keydown","mousedown input":"enableEdit","mouseover .VS-icon-cancel":"showDelete","mouseout .VS-icon-cancel":"hideDelete","click .VS-icon-cancel":"remove"},initialize:function(){this.flags={canClose:!1};_.bindAll(this,"set","keydown","deselectFacet","deferDisableEdit")},render:function(){c(this.el).html(JST.search_facet({model:this.model})); +this.setMode("not","editing");this.setMode("not","selected");this.box=this.$("input");this.box.val(this.model.get("value"));this.box.bind("blur",this.deferDisableEdit);this.box.bind("input propertychange",this.keydown);this.setupAutocomplete();return this},calculateSize:function(){this.box.autoGrowInput();this.box.unbind("updated.autogrow");this.box.bind("updated.autogrow",_.bind(this.moveAutocomplete,this))},resize:function(a){this.box.trigger("resize.autogrow",a)},setupAutocomplete:function(){this.box.autocomplete({source:_.bind(this.autocompleteValues, +this),minLength:0,delay:0,autoFocus:!0,position:{offset:"0 5"},select:_.bind(function(a,b){a.preventDefault();var c=this.model.get("value");this.set(b.item.value);(c!=b.item.value||this.box.val()!=b.item.value)&&this.search(a);return!1},this),open:_.bind(function(){var a=this.box;this.box.autocomplete("widget").find(".ui-menu-item").each(function(){var b=c(this);b.data("item.autocomplete").value==a.val()&&a.data("autocomplete").menu.activate(new c.Event("mouseover"),b)})},this)});this.box.autocomplete("widget").addClass("VS-interface")}, +moveAutocomplete:function(){var a=this.box.data("autocomplete");a&&a.menu.element.position({my:"left top",at:"left bottom",of:this.box.data("autocomplete").element,collision:"flip",offset:"0 5"})},searchAutocomplete:function(){var a=this.box.data("autocomplete");if(a){var b=a.menu.element;a.search();b.outerWidth(Math.max(b.width("").outerWidth(),a.element.outerWidth()))}},closeAutocomplete:function(){var a=this.box.data("autocomplete");a&&a.close()},autocompleteValues:function(a,b){var g=this.model.get("category"), +e=this.model.get("value"),d=a.term;this.options.app.options.callbacks.valueMatches(g,d,function(a,g){g=g||{};a=a||[];if(d&&e!=d)var h=VS.utils.inflector.escapeRegExp(d||""),i=RegExp("\\b"+h,"i"),a=c.grep(a,function(a){return i.test(a)||i.test(a.value)||i.test(a.label)});g.preserveOrder?b(a):b(_.sortBy(a,function(a){return a==e||a.value==e?"":a}))})},set:function(a){a&&this.model.set({value:a})},search:function(a,b){b||(b=1);this.closeAutocomplete();this.options.app.searchBox.searchEvent(a);_.defer(_.bind(function(){this.options.app.searchBox.focusNextFacet(this, +b,{viewPosition:this.options.order})},this))},enableEdit:function(){this.modes.editing!="is"&&(this.setMode("is","editing"),this.deselectFacet(),this.box.val()==""&&this.box.val(this.model.get("value")));this.flags.canClose=!1;this.options.app.searchBox.disableFacets(this);this.options.app.searchBox.addFocus();_.defer(_.bind(function(){this.options.app.searchBox.addFocus()},this));this.resize();this.searchAutocomplete();this.box.focus()},deferDisableEdit:function(){this.flags.canClose=!0;_.delay(_.bind(function(){this.flags.canClose&& +!this.box.is(":focus")&&this.modes.editing=="is"&&this.modes.selected!="is"&&this.disableEdit()},this),250)},disableEdit:function(){var a=VS.utils.inflector.trim(this.box.val());a!=this.model.get("value")&&this.set(a);this.flags.canClose=!1;this.box.selectRange(0,0);this.box.blur();this.setMode("not","editing");this.closeAutocomplete();this.options.app.searchBox.removeFocus()},selectFacet:function(a){a&&a.preventDefault();var b=this.options.app.searchBox.allSelected();if(this.modes.selected!="is"){this.box.is(":focus")&& +(this.box.setCursorPosition(0),this.box.blur());this.flags.canClose=!1;this.closeAutocomplete();this.setMode("is","selected");this.setMode("not","editing");if(!b||a)c(document).unbind("keydown.facet",this.keydown),c(document).unbind("click.facet",this.deselectFacet),_.defer(_.bind(function(){c(document).unbind("keydown.facet").bind("keydown.facet",this.keydown);c(document).unbind("click.facet").one("click.facet",this.deselectFacet)},this)),this.options.app.searchBox.disableFacets(this),this.options.app.searchBox.addFocus(); +return!1}},deselectFacet:function(a){a&&a.preventDefault();this.modes.selected=="is"&&(this.setMode("not","selected"),this.closeAutocomplete(),this.options.app.searchBox.removeFocus());c(document).unbind("keydown.facet",this.keydown);c(document).unbind("click.facet",this.deselectFacet);return!1},isFocused:function(){return this.box.is(":focus")},showDelete:function(){c(this.el).addClass("search_facet_maybe_delete")},hideDelete:function(){c(this.el).removeClass("search_facet_maybe_delete")},setCursorAtEnd:function(a){a== +-1?this.box.setCursorPosition(this.box.val().length):this.box.setCursorPosition(0)},remove:function(a){var b=this.model.get("value");this.deselectFacet();this.disableEdit();this.options.app.searchQuery.remove(this.model);b?this.search(a,-1):(this.options.app.searchBox.renderFacets(),this.options.app.searchBox.focusNextFacet(this,-1,{viewPosition:this.options.order}))},selectText:function(){this.box.selectRange(0,this.box.val().length)},keydown:function(a){var b=VS.app.hotkeys.key(a);if(b=="enter"&& +this.box.val())this.disableEdit(),this.search(a);else if(b=="left")this.modes.selected=="is"?(this.deselectFacet(),this.options.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1})):this.box.getCursorPosition()==0&&!this.box.getSelection().length&&this.selectFacet();else if(b=="right")this.modes.selected=="is"?(a.preventDefault(),this.deselectFacet(),this.setCursorAtEnd(0),this.enableEdit()):this.box.getCursorPosition()==this.box.val().length&&(a.preventDefault(),this.disableEdit(),this.options.app.searchBox.focusNextFacet(this, +1));else if(VS.app.hotkeys.shift&&b=="tab")a.preventDefault(),this.options.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1,skipToFacet:!0,selectText:!0});else if(b=="tab")a.preventDefault(),this.options.app.searchBox.focusNextFacet(this,1,{skipToFacet:!0,selectText:!0});else if(VS.app.hotkeys.command&&(a.which==97||a.which==65))return a.preventDefault(),this.options.app.searchBox.selectAllFacets(),!1;else VS.app.hotkeys.printable(a)&&this.modes.selected=="is"?(this.options.app.searchBox.focusNextFacet(this, +-1,{startAtEnd:-1}),this.remove(a)):b=="backspace"&&(this.modes.selected=="is"?(a.preventDefault(),this.remove(a)):this.box.getCursorPosition()==0&&!this.box.getSelection().length&&(a.preventDefault(),this.selectFacet()));this.resize(a);a.which==null&&(this.searchAutocomplete(a),_.defer(_.bind(this.resize,this,a)))}})})(); +(function(){var c=jQuery;VS.ui.SearchInput=Backbone.View.extend({type:"text",className:"search_input",events:{"keypress input":"keypress","keydown input":"keydown","click input":"maybeTripleClick","dblclick input":"startTripleClickTimer"},initialize:function(){this.app=this.options.app;this.flags={canClose:!1};_.bindAll(this,"removeFocus","addFocus","moveAutocomplete","deferDisableEdit")},render:function(){c(this.el).html(JST.search_input({}));this.setMode("not","editing");this.setMode("not","selected"); +this.box=this.$("input");this.box.autoGrowInput();this.box.bind("updated.autogrow",this.moveAutocomplete);this.box.bind("blur",this.deferDisableEdit);this.box.bind("focus",this.addFocus);this.setupAutocomplete();return this},setupAutocomplete:function(){this.box.autocomplete({minLength:1,delay:50,autoFocus:!0,position:{offset:"0 -1"},source:_.bind(this.autocompleteValues,this),select:_.bind(function(a,b){a.preventDefault();a.stopPropagation();var c=this.options.position+(this.addTextFacetRemainder(b.item.value)? +1:0);this.app.searchBox.addFacet(b.item.value,"",c);return!1},this)});this.box.data("autocomplete")._renderMenu=function(a,b){var c="";_.each(b,_.bind(function(b){if(b.category&&b.category!=c)a.append('
      3. '+b.category+"
      4. "),c=b.category;this._renderItem(a,b)},this))};this.box.autocomplete("widget").addClass("VS-interface")},autocompleteValues:function(a,b){var g=a.term.match(/\w+$/),e=VS.utils.inflector.escapeRegExp(g&&g[0]||" ");this.app.options.callbacks.facetMatches(function(a, +g){var g=g||{},a=a||[],j=RegExp("^"+e,"i"),h=c.grep(a,function(a){return a&&j.test(a.label||a)});g.preserveOrder?b(h):b(_.sortBy(h,function(a){return a.label?a.category+"-"+a.label:a}))})},closeAutocomplete:function(){var a=this.box.data("autocomplete");a&&a.close()},moveAutocomplete:function(){var a=this.box.data("autocomplete");a&&a.menu.element.position({my:"left top",at:"left bottom",of:this.box.data("autocomplete").element,collision:"none",offset:"0 -1"})},searchAutocomplete:function(){var a= +this.box.data("autocomplete");if(a){var b=a.menu.element;a.search();b.outerWidth(Math.max(b.width("").outerWidth(),a.element.outerWidth()))}},addTextFacetRemainder:function(a){var b=this.box.val(),c=b.match(/\b(\w+)$/),e=RegExp(c[0],"i");c&&a.search(e)==0&&(b=b.replace(/\b(\w+)$/,""));(b=b.replace("^s+|s+$",""))&&this.app.searchBox.addFacet("text",b,this.options.position);return b},enableEdit:function(a){this.addFocus();a&&this.selectText();this.box.focus()},addFocus:function(){this.flags.canClose= +!1;this.app.searchBox.allSelected()||this.app.searchBox.disableFacets(this);this.app.searchBox.addFocus();this.setMode("is","editing");this.setMode("not","selected");this.searchAutocomplete()},disableEdit:function(){this.box.blur();this.removeFocus()},removeFocus:function(){this.flags.canClose=!1;this.app.searchBox.removeFocus();this.setMode("not","editing");this.setMode("not","selected");this.closeAutocomplete()},deferDisableEdit:function(){this.flags.canClose=!0;_.delay(_.bind(function(){this.flags.canClose&& +!this.box.is(":focus")&&this.modes.editing=="is"&&this.disableEdit()},this),250)},startTripleClickTimer:function(){this.tripleClickTimer=setTimeout(_.bind(function(){this.tripleClickTimer=null},this),500)},maybeTripleClick:function(a){if(this.tripleClickTimer)return a.preventDefault(),this.app.searchBox.selectAllFacets(),!1},isFocused:function(){return this.box.is(":focus")},value:function(){return this.box.val()},setCursorAtEnd:function(a){a==-1?this.box.setCursorPosition(this.box.val().length): +this.box.setCursorPosition(0)},selectText:function(){this.box.selectRange(0,this.box.val().length);this.app.searchBox.allSelected()?this.setMode("is","selected"):this.box.focus()},search:function(a,b){b||(b=0);this.closeAutocomplete();this.app.searchBox.searchEvent(a);_.defer(_.bind(function(){this.app.searchBox.focusNextFacet(this,b)},this))},keypress:function(a){var b=VS.app.hotkeys.key(a);if(b=="enter")return this.search(a,100);else if(VS.app.hotkeys.colon(a)){this.box.trigger("resize.autogrow", +a);var b=this.box.val(),c=this.options.callbacks.facetMatches()||[],c=_.map(c,function(a){return a.label?a.label:a});if(_.contains(c,b))return a.preventDefault(),a=this.options.position+(this.addTextFacetRemainder(b)?1:0),this.app.searchBox.addFacet(b,"",a),!1}else if(b=="backspace"&&this.box.getCursorPosition()==0&&!this.box.getSelection().length)return a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation(),this.app.searchBox.resizeFacets(),!1},keydown:function(a){var b=VS.app.hotkeys.key(a); +if(b=="left")this.box.getCursorPosition()==0&&(a.preventDefault(),this.app.searchBox.focusNextFacet(this,-1,{startAtEnd:-1}));else if(b=="right")this.box.getCursorPosition()==this.box.val().length&&(a.preventDefault(),this.app.searchBox.focusNextFacet(this,1,{selectFacet:!0}));else if(VS.app.hotkeys.shift&&b=="tab")a.preventDefault(),this.app.searchBox.focusNextFacet(this,-1,{selectText:!0});else if(b=="tab")if(a.preventDefault(),b=this.box.val(),b.length){var c=this.options.position+(this.addTextFacetRemainder(b)? +1:0);this.app.searchBox.addFacet(b,"",c)}else this.app.searchBox.focusNextFacet(this,0,{skipToFacet:!0,selectText:!0});else if(VS.app.hotkeys.command&&String.fromCharCode(a.which).toLowerCase()=="a")return a.preventDefault(),this.app.searchBox.selectAllFacets(),!1;else if(b=="backspace"&&!this.app.searchBox.allSelected()&&this.box.getCursorPosition()==0&&!this.box.getSelection().length)return a.preventDefault(),this.app.searchBox.focusNextFacet(this,-1,{backspace:!0}),!1;this.box.trigger("resize.autogrow", +a)}})})();(function(){var c=jQuery;Backbone.View.prototype.setMode=function(a,b){this.modes||(this.modes={});this.modes[b]!==a&&(c(this.el).setMode(a,b),this.modes[b]=a)}})(); +(function(){var c=jQuery;VS.app.hotkeys={KEYS:{16:"shift",17:"command",91:"command",93:"command",224:"command",13:"enter",37:"left",38:"upArrow",39:"right",40:"downArrow",46:"delete",8:"backspace",9:"tab",188:"comma"},initialize:function(){_.bindAll(this,"down","up","blur");c(document).bind("keydown",this.down);c(document).bind("keyup",this.up);c(window).bind("blur",this.blur)},down:function(a){(a=this.KEYS[a.which])&&(this[a]=!0)},up:function(a){(a=this.KEYS[a.which])&&(this[a]=!1)},blur:function(){for(var a in this.KEYS)this[this.KEYS[a]]= +!1},key:function(a){return this.KEYS[a.which]},colon:function(a){return(a=a.which)&&String.fromCharCode(a)==":"},printable:function(a){var b=a.which;if(a.type=="keydown"){if(b==32||b>=48&&b<=90||b>=96&&b<=111||b>=186&&b<=192||b>=219&&b<=222)return!0}else if(b>=32&&b<=126||b>=160&&b<=500||String.fromCharCode(b)==":")return!0;return!1}}})(); +(function(){VS.utils.inflector={trim:function(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")},escapeRegExp:function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")}}})(); +(function(){var c=jQuery;c.fn.extend({setMode:function(a,b){var b=b||"mode",c=RegExp("\\w+_"+b+"(\\s|$)","g"),e=a===null?"":a+"_"+b;this.each(function(){this.className=(this.className.replace(c,"")+" "+e).replace(/\s\s/g," ")});return e},autoGrowInput:function(){return this.each(function(){var a=c(this),b=c("
        ").css({opacity:0,top:-9999,left:-9999,position:"absolute",whiteSpace:"nowrap"}).addClass("VS-input-width-tester").addClass("VS-interface");a.next(".VS-input-width-tester").remove();a.after(b); +a.unbind("keydown.autogrow keypress.autogrow resize.autogrow change.autogrow").bind("keydown.autogrow keypress.autogrow resize.autogrow change.autogrow",function(c,e){e&&(c=e);var d=a.val();if(VS.app.hotkeys.key(c)=="backspace"){var f=a.getCursorPosition();f>0&&(d=d.slice(0,f-1)+d.slice(f,d.length))}else VS.app.hotkeys.printable(c)&&!VS.app.hotkeys.command&&(d+=String.fromCharCode(c.which));d=d.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">");b.html(d);a.width(b.width()+ +3);a.trigger("updated.autogrow")});a.trigger("resize.autogrow")})},getCursorPosition:function(){var a=0,b=this.get(0);if(document.selection){b.focus();var a=document.selection.createRange(),g=document.selection.createRange().text.length;a.moveStart("character",-b.value.length);a=a.text.length-g}else if(b&&c(b).is(":visible")&&b.selectionStart!=null)a=b.selectionStart;return a},setCursorPosition:function(a){return this.each(function(){return c(this).selectRange(a,a)})},selectRange:function(a,b){return this.each(function(){if(this.setSelectionRange)this.focus(), +this.setSelectionRange(a,b);else if(this.createTextRange){var c=this.createTextRange();c.collapse(!0);c.moveEnd("character",b);c.moveStart("character",a);b-a>=0&&c.select()}})},getSelection:function(){var a=this[0];if(a.selectionStart!=null){var b=a.selectionStart,c=a.selectionEnd;return{start:b,end:c,length:c-b,text:a.value.substr(b,c-b)}}else if(document.selection){var e=document.selection.createRange();if(e)return a=a.createTextRange(),b=a.duplicate(),a.moveToBookmark(e.getBookmark()),b.setEndPoint("EndToStart", +a),b=b.text.length,c=b+e.text.length,{start:b,end:c,length:c-b,text:e.text}}return{start:0,end:0,length:0}}})})(); +(function(){VS.app.SearchParser={ALL_FIELDS:/('.+?'|".+?"|[^'"\s]{2}\S*):\s*('.+?'|".+?"|[^'"\s]\S*)/g,CATEGORY:/('.+?'|".+?"|[^'"\s]{2}\S*):\s*/,parse:function(c,a){var b=this._extractAllFacets(c,a);c.searchQuery.reset(b);return b},_extractAllFacets:function(c,a){for(var b=[],g=a;a;){var e,d,g=a,f=this._extractNextField(a);f?f.indexOf(":")!=-1?(e=f.match(this.CATEGORY)[1].replace(/(^['"]|['"]$)/g,""),d=f.replace(this.CATEGORY,"").replace(/(^['"]|['"]$)/g,""),a=VS.utils.inflector.trim(a.replace(f, +""))):f.indexOf(":")==-1&&(e="text",d=f,a=VS.utils.inflector.trim(a.replace(d,""))):(e="text",d=this._extractSearchText(a),a=VS.utils.inflector.trim(a.replace(d,"")));e&&d&&(f=new VS.model.SearchFacet({category:e,value:VS.utils.inflector.trim(d),app:c}),b.push(f));if(g==a)break}return b},_extractNextField:function(c){var a=c.match(/^\s*(\S+)\s+(?=\w+:\s?(('.+?'|".+?")|([^'"]{2}\S*)))/);return a&&a.length>=1?a[1]:this._extractFirstField(c)},_extractFirstField:function(c){return(c=c.match(this.ALL_FIELDS))&& +c.length&&c[0]},_extractSearchText:function(c){return VS.utils.inflector.trim((c||"").replace(this.ALL_FIELDS,""))}}})(); +(function(){VS.model.SearchFacet=Backbone.Model.extend({serialize:function(){var c=this.quoteCategory(this.get("category")),a=VS.utils.inflector.trim(this.get("value"));if(!a)return"";if(!_.contains(this.get("app").options.unquotable||[],c)&&c!="text")a=this.quoteValue(a);c!="text"?c+=": ":c="";return c+a},quoteCategory:function(c){var a=/"/.test(c),b=/'/.test(c),g=/\s/.test(c);return a&&!b?"'"+c+"'":g||b&&!a?'"'+c+'"':c},quoteValue:function(c){var a=/"/.test(c),b=/'/.test(c);return a&&!b?"'"+c+"'": +'"'+c+'"'}})})(); +(function(){VS.model.SearchQuery=Backbone.Collection.extend({model:VS.model.SearchFacet,serialize:function(){return this.map(function(c){return c.serialize()}).join(" ")},facets:function(){return this.map(function(c){var a={};a[c.get("category")]=c.get("value");return a})},find:function(c){var a=this.detect(function(a){return a.get("category")==c});return a&&a.get("value")},count:function(c){return this.select(function(a){return a.get("category")==c}).length},values:function(c){var a=this.select(function(a){return a.get("category")== +c});return _.map(a,function(a){return a.get("value")})},has:function(c,a){return this.any(function(b){var g=b.get("category")==c;return!a?g:g&&b.get("value")==a})},withoutCategory:function(c){return this.map(function(a){if(a.get("category")!=c)return a.serialize()}).join(" ")}})})(); +(function(){window.JST=window.JST||{};window.JST.search_box=_.template('');window.JST.search_facet=_.template('<% if (model.has(\'category\')) { %>\n
        <%= model.get(\'category\') %>:
        \n<% } %>\n\n
        \n \n
        \n\n
        '); +window.JST.search_input=_.template('')})(); diff --git a/build-min/visualsearch.js.gz b/build-min/visualsearch.js.gz index 6905fdc..4a87c2a 100644 Binary files a/build-min/visualsearch.js.gz and b/build-min/visualsearch.js.gz differ diff --git a/build-min/visualsearch_templates.js b/build-min/visualsearch_templates.js index de80b17..0787a0b 100644 --- a/build-min/visualsearch_templates.js +++ b/build-min/visualsearch_templates.js @@ -1 +1,2 @@ -(function(){window.JST=window.JST||{};window.JST.search_box=_.template('');window.JST.search_facet=_.template('<% if (model.has(\'category\')) { %>\n
        <%= model.get(\'category\') %>:
        \n<% } %>\n\n
        \n \n
        \n\n
        ');window.JST.search_input=_.template('')})(); \ No newline at end of file +(function(){window.JST=window.JST||{};window.JST.search_box=_.template('');window.JST.search_facet=_.template('<% if (model.has(\'category\')) { %>\n
        <%= model.get(\'category\') %>:
        \n<% } %>\n\n
        \n \n
        \n\n
        '); +window.JST.search_input=_.template('')})(); diff --git a/build-min/visualsearch_templates.js.gz b/build-min/visualsearch_templates.js.gz index c56c174..e9eda43 100644 Binary files a/build-min/visualsearch_templates.js.gz and b/build-min/visualsearch_templates.js.gz differ diff --git a/build/dependencies.js b/build/dependencies.js index 5485e79..74d6c67 100644 --- a/build/dependencies.js +++ b/build/dependencies.js @@ -10046,7 +10046,6 @@ $.widget( "ui.autocomplete", { search: function( value, event ) { value = value != null ? value : this.element.val(); -// console.log(['search', value, event && event.type]); // always save the actual value, not the one passed as an argument this.term = this.element.val(); @@ -10134,7 +10133,7 @@ $.widget( "ui.autocomplete", { }, this.options.position )); if ( this.options.autoFocus ) { - this.menu.next( new $.Event("mouseover") ); + this.menu.next( new $.Event("mouseover") ); } }, diff --git a/build/visualsearch-datauri.css b/build/visualsearch-datauri.css index b06a80b..1ae6ed2 100644 --- a/build/visualsearch-datauri.css +++ b/build/visualsearch-datauri.css @@ -61,6 +61,9 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ .VS-search input { display: block; border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; outline: none; margin: 0; padding: 4px; background: transparent; @@ -122,7 +125,7 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ position: absolute; right: 9px; top: 8px; } - + /* ================ */ /* = Search Facet = */ /* ================ */ @@ -172,7 +175,7 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ line-height: 16px; padding: 5px 0 5px 4px; height: 16px; - width: auto; + width: auto; z-index: 100; position: relative; padding-top: 1px; @@ -206,10 +209,10 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ .VS-search .search_facet.search_facet_maybe_delete input { color: darkred; } - + /* ================ */ /* = Search Input = */ -/* ================ */ +/* ================ */ .VS-search .search_input { height: 28px; @@ -229,7 +232,7 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ .VS-search .search_input.is_editing input { color: #202020; } - + /* ================ */ /* = Autocomplete = */ /* ================ */ @@ -292,4 +295,3 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ list-style: none; width: auto; } - \ No newline at end of file diff --git a/build/visualsearch.css b/build/visualsearch.css index bc9c69b..f4f4043 100644 --- a/build/visualsearch.css +++ b/build/visualsearch.css @@ -7,7 +7,7 @@ .VS-search .VS-icon-cancel { width: 11px; height: 11px; background-position: center 0; - background-image: url(../images/embed/icons/cancel_search.png?1308683855); + background-image: url(../images/embed/icons/cancel_search.png?1311104738); cursor: pointer; } .VS-search .VS-icon-cancel:hover { @@ -15,7 +15,7 @@ } .VS-search .VS-icon-search { width: 12px; height: 12px; - background-image: url(../images/embed/icons/search_glyph.png?1308683855); + background-image: url(../images/embed/icons/search_glyph.png?1311104738); } /*------------------------------ RESET + DEFAULT STYLES ---------------------------------*/ @@ -61,6 +61,9 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ .VS-search input { display: block; border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; outline: none; margin: 0; padding: 4px; background: transparent; @@ -122,7 +125,7 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ position: absolute; right: 9px; top: 8px; } - + /* ================ */ /* = Search Facet = */ /* ================ */ @@ -172,7 +175,7 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ line-height: 16px; padding: 5px 0 5px 4px; height: 16px; - width: auto; + width: auto; z-index: 100; position: relative; padding-top: 1px; @@ -206,10 +209,10 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ .VS-search .search_facet.search_facet_maybe_delete input { color: darkred; } - + /* ================ */ /* = Search Input = */ -/* ================ */ +/* ================ */ .VS-search .search_input { height: 28px; @@ -229,7 +232,7 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ .VS-search .search_input.is_editing input { color: #202020; } - + /* ================ */ /* = Autocomplete = */ /* ================ */ @@ -292,4 +295,3 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ list-style: none; width: auto; } - \ No newline at end of file diff --git a/build/visualsearch.js b/build/visualsearch.js index d0da34e..f4a92d8 100644 --- a/build/visualsearch.js +++ b/build/visualsearch.js @@ -5,7 +5,7 @@ // The annotated source HTML is generated by // [Docco](http://jashkenas.github.com/docco/). -/** @license VisualSearch.js 0.2.0 +/** @license VisualSearch.js 0.2.1 * (c) 2011 Samuel Clay, @samuelclay, DocumentCloud Inc. * VisualSearch.js may be freely distributed under the MIT license. * For all details and documentation: @@ -24,7 +24,7 @@ if (!VS.utils) VS.utils = {}; // Sets the version for VisualSearch to be used programatically elsewhere. - VS.VERSION = '0.2.0'; + VS.VERSION = '0.2.1'; VS.VisualSearch = function(options) { var defaults = { @@ -34,6 +34,7 @@ callbacks : { search : $.noop, focus : $.noop, + blur : $.noop, facetMatches : $.noop, valueMatches : $.noop } @@ -433,6 +434,7 @@ VS.ui.SearchBox = Backbone.View.extend({ // User is no longer focused on anything in the search box. removeFocus : function() { + this.app.options.callbacks.blur(); var focus = _.any(this.facetViews.concat(this.inputViews), function(view) { return view.isFocused(); }); @@ -547,6 +549,15 @@ VS.ui.SearchFacet = Backbone.View.extend({ this.search(e); } return false; + }, this), + open : _.bind(function(e, ui) { + var box = this.box; + this.box.autocomplete('widget').find('.ui-menu-item').each(function() { + var $value = $(this); + if ($value.data('item.autocomplete')['value'] == box.val()) { + box.data('autocomplete').menu.activate(new $.Event("mouseover"), $value); + } + }); }, this) }); @@ -596,14 +607,17 @@ VS.ui.SearchFacet = Backbone.View.extend({ // Search terms used in the autocomplete menu. These are specific to the facet, // and only match for the facet's category. The values are then matched on the // first letter of any word in matches, and finally sorted according to the - // value's own category. + // value's own category. You can pass `preserveOrder` as an option in the + // `facetMatches` callback to skip any further ordering done client-side. autocompleteValues : function(req, resp) { var category = this.model.get('category'); var value = this.model.get('value'); var searchTerm = req.term; - this.options.app.options.callbacks.valueMatches(category, searchTerm, function(matches) { + this.options.app.options.callbacks.valueMatches(category, searchTerm, function(matches, options) { + options = options || {}; matches = matches || []; + if (searchTerm && value != searchTerm) { var re = VS.utils.inflector.escapeRegExp(searchTerm || ''); var matcher = new RegExp('\\b' + re, 'i'); @@ -613,11 +627,15 @@ VS.ui.SearchFacet = Backbone.View.extend({ matcher.test(item.label); }); } - - resp(_.sortBy(matches, function(match) { - if (match == value || match.value == value) return ''; - else return match; - })); + + if (options.preserveOrder) { + resp(matches); + } else { + resp(_.sortBy(matches, function(match) { + if (match == value || match.value == value) return ''; + else return match; + })); + } }); }, @@ -861,6 +879,7 @@ VS.ui.SearchFacet = Backbone.View.extend({ }); })(); + (function() { var $ = jQuery; // Handle namespaced jQuery @@ -943,23 +962,30 @@ VS.ui.SearchInput = Backbone.View.extend({ // Search terms used in the autocomplete menu. The values are matched on the // first letter of any word in matches, and finally sorted according to the - // value's own category. + // value's own category. You can pass `preserveOrder` as an option in the + // `facetMatches` callback to skip any further ordering done client-side. autocompleteValues : function(req, resp) { var searchTerm = req.term; var lastWord = searchTerm.match(/\w+$/); // Autocomplete only last word. var re = VS.utils.inflector.escapeRegExp(lastWord && lastWord[0] || ' '); - this.app.options.callbacks.facetMatches(function(prefixes) { + this.app.options.callbacks.facetMatches(function(prefixes, options) { + options = options || {}; prefixes = prefixes || []; + // Only match from the beginning of the word. var matcher = new RegExp('^' + re, 'i'); var matches = $.grep(prefixes, function(item) { return item && matcher.test(item.label || item); }); - resp(_.sortBy(matches, function(match) { - if (match.label) return match.category + '-' + match.label; - else return match; - })); + if (options.preserveOrder) { + resp(matches); + } else { + resp(_.sortBy(matches, function(match) { + if (match.label) return match.category + '-' + match.label; + else return match; + })); + } }); }, @@ -1226,6 +1252,7 @@ VS.ui.SearchInput = Backbone.View.extend({ }); })(); + (function(){ var $ = jQuery; // Handle namespaced jQuery diff --git a/vendor/jquery.ui.autocomplete.js b/vendor/jquery.ui.autocomplete.js index 7af8f98..bdd8093 100755 --- a/vendor/jquery.ui.autocomplete.js +++ b/vendor/jquery.ui.autocomplete.js @@ -281,7 +281,6 @@ $.widget( "ui.autocomplete", { search: function( value, event ) { value = value != null ? value : this.element.val(); -// console.log(['search', value, event && event.type]); // always save the actual value, not the one passed as an argument this.term = this.element.val(); @@ -369,7 +368,7 @@ $.widget( "ui.autocomplete", { }, this.options.position )); if ( this.options.autoFocus ) { - this.menu.next( new $.Event("mouseover") ); + this.menu.next( new $.Event("mouseover") ); } },