(function(c,d){function g(a,b,f){if(f===d&&a.nodeType===1){f=a.getAttribute("data-"+b);if(typeof f==="string"){try{f=f==="true"?true:f==="false"?false:f==="null"?null:!e.isNaN(f)?parseFloat(f):ya.test(f)?e.parseJSON(f):f}catch(h){}e.data(a,b,f)}else f=d}return f}function i(a){for(var b in a)if(b!=="toJSON")return false;return true}function j(){return false}function n(){return true}function q(a,b,f){var h=e.extend({},f[0]);h.type=a;h.originalEvent={};h.liveFired=d;e.event.handle.call(b,h);h.isDefaultPrevented()&&
f[0].preventDefault()}function C(a){var b,f,h,k,m,o,u,s,t,A,N,W=[];k=[];m=e._data(this,"events");if(!(a.liveFired===this||!m||!m.live||a.target.disabled||a.button&&a.type==="click")){if(a.namespace)N=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var R=m.live.slice(0);for(u=0;u<R.length;u++){m=R[u];m.origType.replace(Ca,"")===a.type?k.push(m.selector):R.splice(u--,1)}k=e(a.target).closest(k,a.currentTarget);s=0;for(t=k.length;s<t;s++){A=k[s];for(u=0;u<R.length;u++){m=
R[u];if(A.selector===m.selector&&(!N||N.test(m.namespace))&&!A.elem.disabled){o=A.elem;h=null;if(m.preType==="mouseenter"||m.preType==="mouseleave"){a.type=m.preType;h=e(a.relatedTarget).closest(m.selector)[0]}if(!h||h!==o)W.push({elem:o,handleObj:m,level:A.level})}}}s=0;for(t=W.length;s<t;s++){k=W[s];if(f&&k.level>f)break;a.currentTarget=k.elem;a.data=k.handleObj.data;a.handleObj=k.handleObj;N=k.handleObj.origHandler.apply(k.elem,arguments);if(N===false||a.isPropagationStopped()){f=k.level;if(N===
false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function G(a,b){return(a&&a!=="*"?a+".":"")+b.replace(hb,"`").replace(ib,"&")}function H(a,b,f){if(e.isFunction(b))return e.grep(a,function(k,m){return!!b.call(k,m,k)===f});else if(b.nodeType)return e.grep(a,function(k){return k===b===f});else if(typeof b==="string"){var h=e.grep(a,function(k){return k.nodeType===1});if(jb.test(b))return e.filter(b,h,!f);else b=e.filter(b,h)}return e.grep(a,function(k){return e.inArray(k,b)>=0===
f})}function F(a,b){if(!(b.nodeType!==1||!e.hasData(a))){var f=e.expando,h=e.data(a),k=e.data(b,h);if(h=h[f]){var m=h.events;k=k[f]=e.extend({},h);if(m){delete k.handle;k.events={};for(var o in m){f=0;for(h=m[o].length;f<h;f++)e.event.add(b,o+(m[o][f].namespace?".":"")+m[o][f].namespace,m[o][f],m[o][f].data)}}}}}function y(a,b){if(b.nodeType===1){var f=b.nodeName.toLowerCase();b.clearAttributes();b.mergeAttributes(a);if(f==="object")b.outerHTML=a.outerHTML;else if(f==="input"&&(a.type==="checkbox"||
a.type==="radio")){if(a.checked)b.defaultChecked=b.checked=a.checked;if(b.value!==a.value)b.value=a.value}else if(f==="option")b.selected=a.defaultSelected;else if(f==="input"||f==="textarea")b.defaultValue=a.defaultValue;b.removeAttribute(e.expando)}}function K(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function P(a,b){b.src?e.ajax({url:b.src,async:false,dataType:"script"}):e.globalEval(b.text||b.textContent||b.innerHTML||"");
b.parentNode&&b.parentNode.removeChild(b)}function Z(a,b,f){var h=b==="width"?a.offsetWidth:a.offsetHeight;if(f==="border")return h;e.each(b==="width"?kb:lb,function(){f||(h-=parseFloat(e.css(a,"padding"+this))||0);if(f==="margin")h+=parseFloat(e.css(a,"margin"+this))||0;else h-=parseFloat(e.css(a,"border"+this+"Width"))||0});return h}function Y(a){return function(b,f){if(typeof b!=="string"){f=b;b="*"}if(e.isFunction(f))for(var h=b.toLowerCase().split(Pa),k=0,m=h.length,o,u;k<m;k++){o=h[k];if(u=
/^\+/.test(o))o=o.substr(1)||"*";o=a[o]=a[o]||[];o[u?"unshift":"push"](f)}}}function S(a,b,f,h,k,m){k=k||b.dataTypes[0];m=m||{};m[k]=true;k=a[k];for(var o=0,u=k?k.length:0,s=a===Ka,t;o<u&&(s||!t);o++){t=k[o](b,f,h);if(typeof t==="string")if(!s||m[t])t=d;else{b.dataTypes.unshift(t);t=S(a,b,f,h,t,m)}}if((s||!t)&&!m["*"])t=S(a,b,f,h,"*",m);return t}function I(a,b,f,h){if(e.isArray(b)&&b.length)e.each(b,function(m,o){f||mb.test(a)?h(a,o):I(a+"["+(typeof o==="object"||e.isArray(o)?m:"")+"]",o,f,h)});else if(!f&&
b!=null&&typeof b==="object")if(e.isArray(b)||e.isEmptyObject(b))h(a,"");else for(var k in b)I(a+"["+k+"]",b[k],f,h);else h(a,b)}function ba(){e(c).unload(function(){for(var a in ua)ua[a](0,1)})}function aa(){try{return new c.XMLHttpRequest}catch(a){}}function ea(a,b){var f={};e.each(Qa.concat.apply([],Qa.slice(0,b)),function(){f[this]=a});return f}function O(a){if(!La[a]){var b=e("<"+a+">").appendTo("body"),f=b.css("display");b.remove();if(f==="none"||f==="")f="block";La[a]=f}return La[a]}function T(a){return e.isWindow(a)?
a:a.nodeType===9?a.defaultView||a.parentWindow:false}var D=c.document,e=function(){function a(){if(!b.isReady){try{D.documentElement.doScroll("left")}catch(p){setTimeout(a,1);return}b.ready()}}var b=function(p,E){return new b.fn.init(p,E,k)},f=c.jQuery,h=c.$,k,m=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,o=/\S/,u=/^\s+/,s=/\s+$/,t=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,N=/^[\],:{}\s]*$/,W=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,R=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,X=/(?:^|:|,)(?:\s*\[)+/g,
fa=/(webkit)[ \/]([\w.]+)/,ca=/(opera)(?:.*version)?[ \/]([\w.]+)/,ha=/(msie) ([\w.]+)/,ma=/(mozilla)(?:.*? rv:([\w.]+))?/,l=navigator.userAgent,r,x,v=Object.prototype.toString,w=Object.prototype.hasOwnProperty,z=Array.prototype.push,L=Array.prototype.slice,J=String.prototype.trim,V=Array.prototype.indexOf,ia={};b.fn=b.prototype={constructor:b,init:function(p,E,B){var M;if(!p)return this;if(p.nodeType){this.context=this[0]=p;this.length=1;return this}if(p==="body"&&!E&&D.body){this.context=D;this[0]=
D.body;this.selector="body";this.length=1;return this}if(typeof p==="string")if((M=m.exec(p))&&(M[1]||!E))if(M[1]){B=(E=E instanceof b?E[0]:E)?E.ownerDocument||E:D;if(p=A.exec(p))if(b.isPlainObject(E)){p=[D.createElement(p[1])];b.fn.attr.call(p,E,true)}else p=[B.createElement(p[1])];else{p=b.buildFragment([M[1]],[B]);p=(p.cacheable?b.clone(p.fragment):p.fragment).childNodes}return b.merge(this,p)}else{if((E=D.getElementById(M[2]))&&E.parentNode){if(E.id!==M[2])return B.find(p);this.length=1;this[0]=
E}this.context=D;this.selector=p;return this}else return!E||E.jquery?(E||B).find(p):this.constructor(E).find(p);else if(b.isFunction(p))return B.ready(p);if(p.selector!==d){this.selector=p.selector;this.context=p.context}return b.makeArray(p,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return L.call(this,0)},get:function(p){return p==null?this.toArray():p<0?this[this.length+p]:this[p]},pushStack:function(p,E,B){var M=this.constructor();b.isArray(p)?
z.apply(M,p):b.merge(M,p);M.prevObject=this;M.context=this.context;if(E==="find")M.selector=this.selector+(this.selector?" ":"")+B;else if(E)M.selector=this.selector+"."+E+"("+B+")";return M},each:function(p,E){return b.each(this,p,E)},ready:function(p){b.bindReady();r.done(p);return this},eq:function(p){return p===-1?this.slice(p):this.slice(p,+p+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(L.apply(this,arguments),"slice",L.call(arguments).join(","))},
map:function(p){return this.pushStack(b.map(this,function(E,B){return p.call(E,B,E)}))},end:function(){return this.prevObject||this.constructor(null)},push:z,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var p,E,B,M,U,Q=arguments[0]||{},da=1,ja=arguments.length,pa=false;if(typeof Q==="boolean"){pa=Q;Q=arguments[1]||{};da=2}if(typeof Q!=="object"&&!b.isFunction(Q))Q={};if(ja===da){Q=this;--da}for(;da<ja;da++)if((p=arguments[da])!=null)for(E in p){B=Q[E];M=
p[E];if(Q!==M)if(pa&&M&&(b.isPlainObject(M)||(U=b.isArray(M)))){if(U){U=false;B=B&&b.isArray(B)?B:[]}else B=B&&b.isPlainObject(B)?B:{};Q[E]=b.extend(pa,B,M)}else if(M!==d)Q[E]=M}return Q};b.extend({noConflict:function(p){c.$=h;if(p)c.jQuery=f;return b},isReady:false,readyWait:1,ready:function(p){p===true&&b.readyWait--;if(!b.readyWait||p!==true&&!b.isReady){if(!D.body)return setTimeout(b.ready,1);b.isReady=true;if(!(p!==true&&--b.readyWait>0)){r.resolveWith(D,[b]);b.fn.trigger&&b(D).trigger("ready").unbind("ready")}}},
bindReady:function(){if(!r){r=b._Deferred();if(D.readyState==="complete")return setTimeout(b.ready,1);if(D.addEventListener){D.addEventListener("DOMContentLoaded",x,false);c.addEventListener("load",b.ready,false)}else if(D.attachEvent){D.attachEvent("onreadystatechange",x);c.attachEvent("onload",b.ready);var p=false;try{p=c.frameElement==null}catch(E){}D.documentElement.doScroll&&p&&a()}}},isFunction:function(p){return b.type(p)==="function"},isArray:Array.isArray||function(p){return b.type(p)===
"array"},isWindow:function(p){return p&&typeof p==="object"&&"setInterval"in p},isNaN:function(p){return p==null||!t.test(p)||isNaN(p)},type:function(p){return p==null?String(p):ia[v.call(p)]||"object"},isPlainObject:function(p){if(!p||b.type(p)!=="object"||p.nodeType||b.isWindow(p))return false;if(p.constructor&&!w.call(p,"constructor")&&!w.call(p.constructor.prototype,"isPrototypeOf"))return false;for(var E in p);return E===d||w.call(p,E)},isEmptyObject:function(p){for(var E in p)return false;return true},
error:function(p){throw p;},parseJSON:function(p){if(typeof p!=="string"||!p)return null;p=b.trim(p);if(N.test(p.replace(W,"@").replace(R,"]").replace(X,"")))return c.JSON&&c.JSON.parse?c.JSON.parse(p):(new Function("return "+p))();else b.error("Invalid JSON: "+p)},parseXML:function(p,E,B){if(c.DOMParser){B=new DOMParser;E=B.parseFromString(p,"text/xml")}else{E=new ActiveXObject("Microsoft.XMLDOM");E.async="false";E.loadXML(p)}B=E.documentElement;if(!B||!B.nodeName||B.nodeName==="parsererror")b.error("Invalid XML: "+
p);return E},noop:function(){},globalEval:function(p){if(p&&o.test(p)){var E=D.head||D.getElementsByTagName("head")[0]||D.documentElement,B=D.createElement("script");if(b.support.scriptEval())B.appendChild(D.createTextNode(p));else B.text=p;E.insertBefore(B,E.firstChild);E.removeChild(B)}},nodeName:function(p,E){return p.nodeName&&p.nodeName.toUpperCase()===E.toUpperCase()},each:function(p,E,B){var M,U=0,Q=p.length,da=Q===d||b.isFunction(p);if(B)if(da)for(M in p){if(E.apply(p[M],B)===false)break}else for(;U<
Q;){if(E.apply(p[U++],B)===false)break}else if(da)for(M in p){if(E.call(p[M],M,p[M])===false)break}else for(B=p[0];U<Q&&E.call(B,U,B)!==false;B=p[++U]);return p},trim:J?function(p){return p==null?"":J.call(p)}:function(p){return p==null?"":p.toString().replace(u,"").replace(s,"")},makeArray:function(p,E){var B=E||[];if(p!=null){var M=b.type(p);p.length==null||M==="string"||M==="function"||M==="regexp"||b.isWindow(p)?z.call(B,p):b.merge(B,p)}return B},inArray:function(p,E){if(E.indexOf)return E.indexOf(p);
for(var B=0,M=E.length;B<M;B++)if(E[B]===p)return B;return-1},merge:function(p,E){var B=p.length,M=0;if(typeof E.length==="number")for(var U=E.length;M<U;M++)p[B++]=E[M];else for(;E[M]!==d;)p[B++]=E[M++];p.length=B;return p},grep:function(p,E,B){var M=[],U;B=!!B;for(var Q=0,da=p.length;Q<da;Q++){U=!!E(p[Q],Q);B!==U&&M.push(p[Q])}return M},map:function(p,E,B){for(var M=[],U,Q=0,da=p.length;Q<da;Q++){U=E(p[Q],Q,B);if(U!=null)M[M.length]=U}return M.concat.apply([],M)},guid:1,proxy:function(p,E,B){if(arguments.length===
2)if(typeof E==="string"){B=p;p=B[E];E=d}else if(E&&!b.isFunction(E)){B=E;E=d}if(!E&&p)E=function(){return p.apply(B||this,arguments)};if(p)E.guid=p.guid=p.guid||E.guid||b.guid++;return E},access:function(p,E,B,M,U,Q){var da=p.length;if(typeof E==="object"){for(var ja in E)b.access(p,ja,E[ja],M,U,B);return p}if(B!==d){M=!Q&&M&&b.isFunction(B);for(ja=0;ja<da;ja++)U(p[ja],E,M?B.call(p[ja],ja,U(p[ja],E)):B,Q);return p}return da?U(p[0],E):d},now:function(){return(new Date).getTime()},uaMatch:function(p){p=
p.toLowerCase();p=fa.exec(p)||ca.exec(p)||ha.exec(p)||p.indexOf("compatible")<0&&ma.exec(p)||[];return{browser:p[1]||"",version:p[2]||"0"}},sub:function(){function p(B,M){return new p.fn.init(B,M)}b.extend(true,p,this);p.superclass=this;p.fn=p.prototype=this();p.fn.constructor=p;p.subclass=this.subclass;p.fn.init=function(B,M){if(M&&M instanceof b&&!(M instanceof p))M=p(M);return b.fn.init.call(this,B,M,E)};p.fn.init.prototype=p.fn;var E=p(D);return p},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),
function(p,E){ia["[object "+E+"]"]=E.toLowerCase()});l=b.uaMatch(l);if(l.browser){b.browser[l.browser]=true;b.browser.version=l.version}if(b.browser.webkit)b.browser.safari=true;if(V)b.inArray=function(p,E){return V.call(E,p)};if(o.test("\u00a0")){u=/^[\s\xA0]+/;s=/[\s\xA0]+$/}k=b(D);if(D.addEventListener)x=function(){D.removeEventListener("DOMContentLoaded",x,false);b.ready()};else if(D.attachEvent)x=function(){if(D.readyState==="complete"){D.detachEvent("onreadystatechange",x);b.ready()}};return b}(),
ga="then done fail isResolved isRejected promise".split(" "),ka=[].slice;e.extend({_Deferred:function(){var a=[],b,f,h,k={done:function(){if(!h){var m=arguments,o,u,s,t,A;if(b){A=b;b=0}o=0;for(u=m.length;o<u;o++){s=m[o];t=e.type(s);if(t==="array")k.done.apply(k,s);else t==="function"&&a.push(s)}A&&k.resolveWith(A[0],A[1])}return this},resolveWith:function(m,o){if(!h&&!b&&!f){o=o||[];f=1;try{for(;a[0];)a.shift().apply(m,o)}finally{b=[m,o];f=0}}return this},resolve:function(){k.resolveWith(this,arguments);
return this},isResolved:function(){return!!(f||b)},cancel:function(){h=1;a=[];return this}};return k},Deferred:function(a){var b=e._Deferred(),f=e._Deferred(),h;e.extend(b,{then:function(k,m){b.done(k).fail(m);return this},fail:f.done,rejectWith:f.resolveWith,reject:f.resolve,isRejected:f.isResolved,promise:function(k){if(k==null){if(h)return h;h=k={}}for(var m=ga.length;m--;)k[ga[m]]=b[ga[m]];return k}});b.done(f.cancel).fail(b.cancel);delete b.cancel;a&&a.call(b,b);return b},when:function(a){function b(u){return function(s){f[u]=
arguments.length>1?ka.call(arguments,0):s;--m||o.resolveWith(o,ka.call(f,0))}}var f=arguments,h=0,k=f.length,m=k,o=k<=1&&a&&e.isFunction(a.promise)?a:e.Deferred();if(k>1){for(;h<k;h++)if(f[h]&&e.isFunction(f[h].promise))f[h].promise().then(b(h),o.reject);else--m;m||o.resolveWith(o,f)}else if(o!==a)o.resolveWith(o,k?[a]:[]);return o.promise()}});(function(){e.support={};var a=D.createElement("div");a.style.display="none";a.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var b=a.getElementsByTagName("*"),f=a.getElementsByTagName("a")[0],h=D.createElement("select"),k=h.appendChild(D.createElement("option")),m=a.getElementsByTagName("input")[0];if(!(!b||!b.length||!f)){e.support={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,
checkOn:m.value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true,reliableMarginRight:true};m.checked=true;e.support.noCloneChecked=m.cloneNode(true).checked;h.disabled=true;e.support.optDisabled=!k.disabled;var o=null;e.support.scriptEval=function(){if(o===null){var s=D.documentElement,t=D.createElement("script"),A="script"+e.now();try{t.appendChild(D.createTextNode("window."+
A+"=1;"))}catch(N){}s.insertBefore(t,s.firstChild);if(c[A]){o=true;delete c[A]}else o=false;s.removeChild(t)}return o};try{delete a.test}catch(u){e.support.deleteExpando=false}if(!a.addEventListener&&a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function s(){e.support.noCloneEvent=false;a.detachEvent("onclick",s)});a.cloneNode(true).fireEvent("onclick")}a=D.createElement("div");a.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";b=D.createDocumentFragment();b.appendChild(a.firstChild);
e.support.checkClone=b.cloneNode(true).cloneNode(true).lastChild.checked;e(function(){var s=D.createElement("div"),t=D.getElementsByTagName("body")[0];if(t){s.style.width=s.style.paddingLeft="1px";t.appendChild(s);e.boxModel=e.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;e.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="<div style='width:4px;'></div>";e.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
var A=s.getElementsByTagName("td");e.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";e.support.reliableHiddenOffsets=e.support.reliableHiddenOffsets&&A[0].offsetHeight===0;s.innerHTML="";if(D.defaultView&&D.defaultView.getComputedStyle){s.style.width="1px";s.style.marginRight="0";e.support.reliableMarginRight=(parseInt(D.defaultView.getComputedStyle(s,null).marginRight,10)||0)===0}t.removeChild(s).style.display="none"}});b=function(s){var t=D.createElement("div");
s="on"+s;if(!t.attachEvent)return true;var A=s in t;if(!A){t.setAttribute(s,"return;");A=typeof t[s]==="function"}return A};e.support.submitBubbles=b("submit");e.support.changeBubbles=b("change");a=b=f=null}})();var ya=/^(?:\{.*\}|\[.*\])$/;e.extend({cache:{},uuid:0,expando:"jQuery"+(e.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(a){a=a.nodeType?e.cache[a[e.expando]]:a[e.expando];return!!a&&!i(a)},data:function(a,
b,f,h){if(e.acceptData(a)){var k=e.expando,m=typeof b==="string",o=a.nodeType,u=o?e.cache:a,s=o?a[e.expando]:a[e.expando]&&e.expando;if(!((!s||h&&s&&!u[s][k])&&m&&f===d)){if(!s)if(o)a[e.expando]=s=++e.uuid;else s=e.expando;if(!u[s]){u[s]={};if(!o)u[s].toJSON=e.noop}if(typeof b==="object"||typeof b==="function")if(h)u[s][k]=e.extend(u[s][k],b);else u[s]=e.extend(u[s],b);a=u[s];if(h){a[k]||(a[k]={});a=a[k]}if(f!==d)a[b]=f;if(b==="events"&&!a[b])return a[k]&&a[k].events;return m?a[b]:a}}},removeData:function(a,
b,f){if(e.acceptData(a)){var h=e.expando,k=a.nodeType,m=k?e.cache:a,o=k?a[e.expando]:e.expando;if(m[o]){if(b){var u=f?m[o][h]:m[o];if(u){delete u[b];if(!i(u))return}}if(f){delete m[o][h];if(!i(m[o]))return}b=m[o][h];if(e.support.deleteExpando||m!=c)delete m[o];else m[o]=null;if(b){m[o]={};if(!k)m[o].toJSON=e.noop;m[o][h]=b}else if(k)if(e.support.deleteExpando)delete a[e.expando];else if(a.removeAttribute)a.removeAttribute(e.expando);else a[e.expando]=null}}},_data:function(a,b,f){return e.data(a,
b,f,true)},acceptData:function(a){if(a.nodeName){var b=e.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});e.fn.extend({data:function(a,b){var f=null;if(typeof a==="undefined"){if(this.length){f=e.data(this[0]);if(this[0].nodeType===1)for(var h=this[0].attributes,k,m=0,o=h.length;m<o;m++){k=h[m].name;if(k.indexOf("data-")===0){k=k.substr(5);g(this[0],k,f[k])}}}return f}else if(typeof a==="object")return this.each(function(){e.data(this,a)});var u=
a.split(".");u[1]=u[1]?"."+u[1]:"";if(b===d){f=this.triggerHandler("getData"+u[1]+"!",[u[0]]);if(f===d&&this.length){f=e.data(this[0],a);f=g(this[0],a,f)}return f===d&&u[1]?this.data(u[0]):f}else return this.each(function(){var s=e(this),t=[u[0],b];s.triggerHandler("setData"+u[1]+"!",t);e.data(this,a,b);s.triggerHandler("changeData"+u[1]+"!",t)})},removeData:function(a){return this.each(function(){e.removeData(this,a)})}});e.extend({queue:function(a,b,f){if(a){b=(b||"fx")+"queue";var h=e._data(a,
b);if(!f)return h||[];if(!h||e.isArray(f))h=e._data(a,b,e.makeArray(f));else h.push(f);return h}},dequeue:function(a,b){b=b||"fx";var f=e.queue(a,b),h=f.shift();if(h==="inprogress")h=f.shift();if(h){b==="fx"&&f.unshift("inprogress");h.call(a,function(){e.dequeue(a,b)})}f.length||e.removeData(a,b+"queue",true)}});e.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===d)return e.queue(this[0],a);return this.each(function(){var f=e.queue(this,a,b);a==="fx"&&f[0]!=="inprogress"&&e.dequeue(this,
a)})},dequeue:function(a){return this.each(function(){e.dequeue(this,a)})},delay:function(a,b){a=e.fx?e.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var f=this;setTimeout(function(){e.dequeue(f,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Da=/[\n\t\r]/g,za=/\s+/,nb=/\r/g,ob=/^(?:href|src|style)$/,pb=/^(?:button|input)$/i,qb=/^(?:button|input|object|select|textarea)$/i,rb=/^a(?:rea)?$/i,Ra=/^(?:radio|checkbox)$/i;e.props={"for":"htmlFor","class":"className",readonly:"readOnly",
maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};e.fn.extend({attr:function(a,b){return e.access(this,a,b,true,e.attr)},removeAttr:function(a){return this.each(function(){e.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(e.isFunction(a))return this.each(function(t){var A=e(this);A.addClass(a.call(this,t,A.attr("class")))});if(a&&typeof a==="string")for(var b=(a||
"").split(za),f=0,h=this.length;f<h;f++){var k=this[f];if(k.nodeType===1)if(k.className){for(var m=" "+k.className+" ",o=k.className,u=0,s=b.length;u<s;u++)if(m.indexOf(" "+b[u]+" ")<0)o+=" "+b[u];k.className=e.trim(o)}else k.className=a}return this},removeClass:function(a){if(e.isFunction(a))return this.each(function(s){var t=e(this);t.removeClass(a.call(this,s,t.attr("class")))});if(a&&typeof a==="string"||a===d)for(var b=(a||"").split(za),f=0,h=this.length;f<h;f++){var k=this[f];if(k.nodeType===
1&&k.className)if(a){for(var m=(" "+k.className+" ").replace(Da," "),o=0,u=b.length;o<u;o++)m=m.replace(" "+b[o]+" "," ");k.className=e.trim(m)}else k.className=""}return this},toggleClass:function(a,b){var f=typeof a,h=typeof b==="boolean";if(e.isFunction(a))return this.each(function(k){var m=e(this);m.toggleClass(a.call(this,k,m.attr("class"),b),b)});return this.each(function(){if(f==="string")for(var k,m=0,o=e(this),u=b,s=a.split(za);k=s[m++];){u=h?u:!o.hasClass(k);o[u?"addClass":"removeClass"](k)}else if(f===
"undefined"||f==="boolean"){this.className&&e._data(this,"__className__",this.className);this.className=this.className||a===false?"":e._data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,f=this.length;b<f;b++)if((" "+this[b].className+" ").replace(Da," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(e.nodeName(b,"option")){var f=b.attributes.value;return!f||f.specified?b.value:b.text}if(e.nodeName(b,"select")){f=
b.selectedIndex;var h=[],k=b.options;b=b.type==="select-one";if(f<0)return null;for(var m=b?f:0,o=b?f+1:k.length;m<o;m++){var u=k[m];if(u.selected&&(e.support.optDisabled?!u.disabled:u.getAttribute("disabled")===null)&&(!u.parentNode.disabled||!e.nodeName(u.parentNode,"optgroup"))){a=e(u).val();if(b)return a;h.push(a)}}if(b&&!h.length&&k.length)return e(k[f]).val();return h}if(Ra.test(b.type)&&!e.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(nb,"")}return d}var s=
e.isFunction(a);return this.each(function(t){var A=e(this),N=a;if(this.nodeType===1){if(s)N=a.call(this,t,A.val());if(N==null)N="";else if(typeof N==="number")N+="";else if(e.isArray(N))N=e.map(N,function(R){return R==null?"":R+""});if(e.isArray(N)&&Ra.test(this.type))this.checked=e.inArray(A.val(),N)>=0;else if(e.nodeName(this,"select")){var W=e.makeArray(N);e("option",this).each(function(){this.selected=e.inArray(e(this).val(),W)>=0});if(!W.length)this.selectedIndex=-1}else this.value=N}})}});e.extend({attrFn:{val:true,
css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,f,h){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return d;if(h&&b in e.attrFn)return e(a)[b](f);h=a.nodeType!==1||!e.isXMLDoc(a);var k=f!==d;b=h&&e.props[b]||b;if(a.nodeType===1){var m=ob.test(b);if((b in a||a[b]!==d)&&h&&!m){if(k){b==="type"&&pb.test(a.nodeName)&&a.parentNode&&e.error("type property can't be changed");if(f===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=f}if(e.nodeName(a,
"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:qb.test(a.nodeName)||rb.test(a.nodeName)&&a.href?0:d;return a[b]}if(!e.support.style&&h&&b==="style"){if(k)a.style.cssText=""+f;return a.style.cssText}k&&a.setAttribute(b,""+f);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return d;a=!e.support.hrefNormalized&&h&&m?a.getAttribute(b,2):a.getAttribute(b);return a===null?d:a}if(k)a[b]=f;return a[b]}});
var Ca=/\.(.*)$/,Ma=/^(?:textarea|input|select)$/i,hb=/\./g,ib=/ /g,sb=/[^\w\s.|`]/g,tb=function(a){return a.replace(sb,"\\$&")};e.event={add:function(a,b,f,h){if(!(a.nodeType===3||a.nodeType===8)){try{if(e.isWindow(a)&&a!==c&&!a.frameElement)a=c}catch(k){}if(f===false)f=j;else if(!f)return;var m,o;if(f.handler){m=f;f=m.handler}if(!f.guid)f.guid=e.guid++;if(o=e._data(a)){var u=o.events,s=o.handle;if(!u)o.events=u={};if(!s)o.handle=s=function(X){return typeof e!=="undefined"&&e.event.triggered!==X.type?
e.event.handle.apply(s.elem,arguments):d};s.elem=a;b=b.split(" ");for(var t,A=0,N;t=b[A++];){o=m?e.extend({},m):{handler:f,data:h};if(t.indexOf(".")>-1){N=t.split(".");t=N.shift();o.namespace=N.slice(0).sort().join(".")}else{N=[];o.namespace=""}o.type=t;if(!o.guid)o.guid=f.guid;var W=u[t],R=e.event.special[t]||{};if(!W){W=u[t]=[];if(!R.setup||R.setup.call(a,h,N,s)===false)if(a.addEventListener)a.addEventListener(t,s,false);else a.attachEvent&&a.attachEvent("on"+t,s)}if(R.add){R.add.call(a,o);if(!o.handler.guid)o.handler.guid=
f.guid}W.push(o);e.event.global[t]=true}a=null}}},global:{},remove:function(a,b,f,h){if(!(a.nodeType===3||a.nodeType===8)){if(f===false)f=j;var k,m,o=0,u,s,t,A,N,W,R=e.hasData(a)&&e._data(a),X=R&&R.events;if(R&&X){if(b&&b.type){f=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(k in X)e.event.remove(a,k+b)}else{for(b=b.split(" ");k=b[o++];){A=k;u=k.indexOf(".")<0;s=[];if(!u){s=k.split(".");k=s.shift();t=RegExp("(^|\\.)"+e.map(s.slice(0).sort(),tb).join("\\.(?:.*\\.)?")+
"(\\.|$)")}if(N=X[k])if(f){A=e.event.special[k]||{};for(m=h||0;m<N.length;m++){W=N[m];if(f.guid===W.guid){if(u||t.test(W.namespace)){h==null&&N.splice(m--,1);A.remove&&A.remove.call(a,W)}if(h!=null)break}}if(N.length===0||h!=null&&N.length===1){if(!A.teardown||A.teardown.call(a,s)===false)e.removeEvent(a,k,R.handle);delete X[k]}}else for(m=0;m<N.length;m++){W=N[m];if(u||t.test(W.namespace)){e.event.remove(a,A,W.handler,m);N.splice(m--,1)}}}if(e.isEmptyObject(X)){if(b=R.handle)b.elem=null;delete R.events;
delete R.handle;e.isEmptyObject(R)&&e.removeData(a,d,true)}}}}},trigger:function(a,b,f,h){var k=a.type||a;if(!h){a=typeof a==="object"?a[e.expando]?a:e.extend(e.Event(k),a):e.Event(k);if(k.indexOf("!")>=0){a.type=k=k.slice(0,-1);a.exclusive=true}if(!f){a.stopPropagation();e.event.global[k]&&e.each(e.cache,function(){var N=this[e.expando];N&&N.events&&N.events[k]&&e.event.trigger(a,b,N.handle.elem)})}if(!f||f.nodeType===3||f.nodeType===8)return d;a.result=d;a.target=f;b=e.makeArray(b);b.unshift(a)}a.currentTarget=
f;(h=e._data(f,"handle"))&&h.apply(f,b);h=f.parentNode||f.ownerDocument;try{if(!(f&&f.nodeName&&e.noData[f.nodeName.toLowerCase()]))if(f["on"+k]&&f["on"+k].apply(f,b)===false){a.result=false;a.preventDefault()}}catch(m){}if(!a.isPropagationStopped()&&h)e.event.trigger(a,b,h,true);else if(!a.isDefaultPrevented()){var o;h=a.target;var u=k.replace(Ca,""),s=e.nodeName(h,"a")&&u==="click",t=e.event.special[u]||{};if((!t._default||t._default.call(f,a)===false)&&!s&&!(h&&h.nodeName&&e.noData[h.nodeName.toLowerCase()])){try{if(h[u]){if(o=
h["on"+u])h["on"+u]=null;e.event.triggered=a.type;h[u]()}}catch(A){}if(o)h["on"+u]=o;e.event.triggered=d}}},handle:function(a){var b,f,h,k;f=[];var m=e.makeArray(arguments);a=m[0]=e.event.fix(a||c.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){h=a.type.split(".");a.type=h.shift();f=h.slice(0).sort();h=RegExp("(^|\\.)"+f.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||f.join(".");k=e._data(this,"events");f=(k||{})[a.type];if(k&&f){f=f.slice(0);k=0;for(var o=f.length;k<
o;k++){var u=f[k];if(b||h.test(u.namespace)){a.handler=u.handler;a.data=u.data;a.handleObj=u;u=u.handler.apply(this,m);if(u!==d){a.result=u;if(u===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[e.expando])return a;var b=a;a=e.Event(b);for(var f=this.props.length,h;f;){h=this.props[--f];a[h]=b[h]}if(!a.target)a.target=a.srcElement||D;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=D.documentElement;f=D.body;a.pageX=a.clientX+(b&&b.scrollLeft||f&&f.scrollLeft||0)-(b&&b.clientLeft||f&&f.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
f&&f.scrollTop||0)-(b&&b.clientTop||f&&f.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==d)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:e.proxy,special:{ready:{setup:e.bindReady,teardown:e.noop},live:{add:function(a){e.event.add(this,G(a.origType,a.selector),e.extend({},a,{handler:C,guid:a.handler.guid}))},remove:function(a){e.event.remove(this,
G(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,f){if(e.isWindow(this))this.onbeforeunload=f},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};e.removeEvent=D.removeEventListener?function(a,b,f){a.removeEventListener&&a.removeEventListener(b,f,false)}:function(a,b,f){a.detachEvent&&a.detachEvent("on"+b,f)};e.Event=function(a){if(!this.preventDefault)return new e.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type;this.isDefaultPrevented=a.defaultPrevented||
a.returnValue===false||a.getPreventDefault&&a.getPreventDefault()?n:j}else this.type=a;this.timeStamp=e.now();this[e.expando]=true};e.Event.prototype={preventDefault:function(){this.isDefaultPrevented=n;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=n;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
n;this.stopPropagation()},isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j};var Sa=function(a){var b=a.relatedTarget;try{if(!(b&&b!==D&&!b.parentNode)){for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;e.event.handle.apply(this,arguments)}}}catch(f){}},Ta=function(a){a.type=a.data;e.event.handle.apply(this,arguments)};e.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){e.event.special[a]={setup:function(f){e.event.add(this,b,f&&f.selector?Ta:Sa,
a)},teardown:function(f){e.event.remove(this,b,f&&f.selector?Ta:Sa)}}});if(!e.support.submitBubbles)e.event.special.submit={setup:function(){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){e.event.add(this,"click.specialSubmit",function(a){var b=a.target,f=b.type;if((f==="submit"||f==="image")&&e(b).closest("form").length)q("submit",this,arguments)});e.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,f=b.type;if((f==="text"||f==="password")&&e(b).closest("form").length&&
a.keyCode===13)q("submit",this,arguments)})}else return false},teardown:function(){e.event.remove(this,".specialSubmit")}};if(!e.support.changeBubbles){var Aa,Ua=function(a){var b=a.type,f=a.value;if(b==="radio"||b==="checkbox")f=a.checked;else if(b==="select-multiple")f=a.selectedIndex>-1?e.map(a.options,function(h){return h.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")f=a.selectedIndex;return f},Ea=function(a,b){var f=a.target,h,k;if(!(!Ma.test(f.nodeName)||f.readOnly)){h=
e._data(f,"_change_data");k=Ua(f);if(a.type!=="focusout"||f.type!=="radio")e._data(f,"_change_data",k);if(!(h===d||k===h))if(h!=null||k){a.type="change";a.liveFired=d;e.event.trigger(a,b,f)}}};e.event.special.change={filters:{focusout:Ea,beforedeactivate:Ea,click:function(a){var b=a.target,f=b.type;if(f==="radio"||f==="checkbox"||b.nodeName.toLowerCase()==="select")Ea.call(this,a)},keydown:function(a){var b=a.target,f=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&
(f==="checkbox"||f==="radio")||f==="select-multiple")Ea.call(this,a)},beforeactivate:function(a){a=a.target;e._data(a,"_change_data",Ua(a))}},setup:function(){if(this.type==="file")return false;for(var a in Aa)e.event.add(this,a+".specialChange",Aa[a]);return Ma.test(this.nodeName)},teardown:function(){e.event.remove(this,".specialChange");return Ma.test(this.nodeName)}};Aa=e.event.special.change.filters;Aa.focus=Aa.beforeactivate}D.addEventListener&&e.each({focus:"focusin",blur:"focusout"},function(a,
b){function f(k){var m=e.event.fix(k);m.type=b;m.originalEvent={};e.event.trigger(m,null,m.target);m.isDefaultPrevented()&&k.preventDefault()}var h=0;e.event.special[b]={setup:function(){h++===0&&D.addEventListener(a,f,true)},teardown:function(){--h===0&&D.removeEventListener(a,f,true)}}});e.each(["bind","one"],function(a,b){e.fn[b]=function(f,h,k){if(typeof f==="object"){for(var m in f)this[b](m,h,f[m],k);return this}if(e.isFunction(h)||h===false){k=h;h=d}var o=b==="one"?e.proxy(k,function(s){e(this).unbind(s,
o);return k.apply(this,arguments)}):k;if(f==="unload"&&b!=="one")this.one(f,h,k);else{m=0;for(var u=this.length;m<u;m++)e.event.add(this[m],f,o,h)}return this}});e.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var f in a)this.unbind(f,a[f]);else{f=0;for(var h=this.length;f<h;f++)e.event.remove(this[f],a,b)}return this},delegate:function(a,b,f,h){return this.live(b,f,h,a)},undelegate:function(a,b,f){return arguments.length===0?this.unbind("live"):this.die(b,null,f,a)},
trigger:function(a,b){return this.each(function(){e.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var f=e.Event(a);f.preventDefault();f.stopPropagation();e.event.trigger(f,b,this[0]);return f.result}},toggle:function(a){for(var b=arguments,f=1;f<b.length;)e.proxy(a,b[f++]);return this.click(e.proxy(a,function(h){var k=(e._data(this,"lastToggle"+a.guid)||0)%f;e._data(this,"lastToggle"+a.guid,k+1);h.preventDefault();return b[k].apply(this,arguments)||false}))},hover:function(a,
b){return this.mouseenter(a).mouseleave(b||a)}});var Va={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};e.each(["live","die"],function(a,b){e.fn[b]=function(f,h,k,m){var o,u=0,s,t,A=m||this.selector;m=m?this:e(this.context);if(typeof f==="object"&&!f.preventDefault){for(o in f)m[b](o,h,f[o],A);return this}if(e.isFunction(h)){k=h;h=d}for(f=(f||"").split(" ");(o=f[u++])!=null;){s=Ca.exec(o);t="";if(s){t=s[0];o=o.replace(Ca,"")}if(o==="hover")f.push("mouseenter"+t,"mouseleave"+
t);else{s=o;if(o==="focus"||o==="blur"){f.push(Va[o]+t);o+=t}else o=(Va[o]||o)+t;if(b==="live"){t=0;for(var N=m.length;t<N;t++)e.event.add(m[t],"live."+G(o,A),{data:h,selector:A,handler:k,origType:o,origHandler:k,preType:s})}else m.unbind("live."+G(o,A),k)}}return this}});e.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(a,b){e.fn[b]=
function(f,h){if(h==null){h=f;f=null}return arguments.length>0?this.bind(b,f,h):this.trigger(b)};if(e.attrFn)e.attrFn[b]=true});(function(){function a(l,r,x,v,w,z){w=0;for(var L=v.length;w<L;w++){var J=v[w];if(J){var V=false;for(J=J[l];J;){if(J.sizcache===x){V=v[J.sizset];break}if(J.nodeType===1&&!z){J.sizcache=x;J.sizset=w}if(J.nodeName.toLowerCase()===r){V=J;break}J=J[l]}v[w]=V}}}function b(l,r,x,v,w,z){w=0;for(var L=v.length;w<L;w++){var J=v[w];if(J){var V=false;for(J=J[l];J;){if(J.sizcache===
x){V=v[J.sizset];break}if(J.nodeType===1){if(!z){J.sizcache=x;J.sizset=w}if(typeof r!=="string"){if(J===r){V=true;break}}else if(t.filter(r,[J]).length>0){V=J;break}}J=J[l]}v[w]=V}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,h=0,k=Object.prototype.toString,m=false,o=true,u=/\\/g,s=/\W/;[0,0].sort(function(){o=false;return 0});var t=function(l,r,x,v){x=x||[];var w=r=r||D;if(r.nodeType!==1&&r.nodeType!==
9)return[];if(!l||typeof l!=="string")return x;var z,L,J,V,ia,p=true,E=t.isXML(r),B=[],M=l;do{f.exec("");if(z=f.exec(M)){M=z[3];B.push(z[1]);if(z[2]){V=z[3];break}}}while(z);if(B.length>1&&N.exec(l))if(B.length===2&&A.relative[B[0]])L=ma(B[0]+B[1],r);else for(L=A.relative[B[0]]?[r]:t(B.shift(),r);B.length;){l=B.shift();if(A.relative[l])l+=B.shift();L=ma(l,L)}else{if(!v&&B.length>1&&r.nodeType===9&&!E&&A.match.ID.test(B[0])&&!A.match.ID.test(B[B.length-1])){z=t.find(B.shift(),r,E);r=z.expr?t.filter(z.expr,
z.set)[0]:z.set[0]}if(r){z=v?{expr:B.pop(),set:X(v)}:t.find(B.pop(),B.length===1&&(B[0]==="~"||B[0]==="+")&&r.parentNode?r.parentNode:r,E);L=z.expr?t.filter(z.expr,z.set):z.set;if(B.length>0)J=X(L);else p=false;for(;B.length;){z=ia=B.pop();if(A.relative[ia])z=B.pop();else ia="";if(z==null)z=r;A.relative[ia](J,z,E)}}else J=[]}J||(J=L);J||t.error(ia||l);if(k.call(J)==="[object Array]")if(p)if(r&&r.nodeType===1)for(l=0;J[l]!=null;l++){if(J[l]&&(J[l]===true||J[l].nodeType===1&&t.contains(r,J[l])))x.push(L[l])}else for(l=
0;J[l]!=null;l++)J[l]&&J[l].nodeType===1&&x.push(L[l]);else x.push.apply(x,J);else X(J,x);if(V){t(V,w,x,v);t.uniqueSort(x)}return x};t.uniqueSort=function(l){if(ca){m=o;l.sort(ca);if(m)for(var r=1;r<l.length;r++)l[r]===l[r-1]&&l.splice(r--,1)}return l};t.matches=function(l,r){return t(l,null,null,r)};t.matchesSelector=function(l,r){return t(r,null,null,[l]).length>0};t.find=function(l,r,x){var v;if(!l)return[];for(var w=0,z=A.order.length;w<z;w++){var L,J=A.order[w];if(L=A.leftMatch[J].exec(l)){var V=
L[1];L.splice(1,1);if(V.substr(V.length-1)!=="\\"){L[1]=(L[1]||"").replace(u,"");v=A.find[J](L,r,x);if(v!=null){l=l.replace(A.match[J],"");break}}}}v||(v=typeof r.getElementsByTagName!=="undefined"?r.getElementsByTagName("*"):[]);return{set:v,expr:l}};t.filter=function(l,r,x,v){for(var w,z,L=l,J=[],V=r,ia=r&&r[0]&&t.isXML(r[0]);l&&r.length;){for(var p in A.filter)if((w=A.leftMatch[p].exec(l))!=null&&w[2]){var E,B,M=A.filter[p];B=w[1];z=false;w.splice(1,1);if(B.substr(B.length-1)!=="\\"){if(V===J)J=
[];if(A.preFilter[p])if(w=A.preFilter[p](w,V,x,J,v,ia)){if(w===true)continue}else z=E=true;if(w)for(var U=0;(B=V[U])!=null;U++)if(B){E=M(B,w,U,V);var Q=v^!!E;if(x&&E!=null)if(Q)z=true;else V[U]=false;else if(Q){J.push(B);z=true}}if(E!==d){x||(V=J);l=l.replace(A.match[p],"");if(!z)return[];break}}}if(l===L)if(z==null)t.error(l);else break;L=l}return V};t.error=function(l){throw"Syntax error, unrecognized expression: "+l;};var A=t.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},
leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(l){return l.getAttribute("href")},type:function(l){return l.getAttribute("type")}},relative:{"+":function(l,r){var x=typeof r==="string",v=x&&!s.test(r);x=x&&!v;if(v)r=r.toLowerCase();v=0;for(var w=l.length,z;v<w;v++)if(z=l[v]){for(;(z=z.previousSibling)&&z.nodeType!==1;);l[v]=x||z&&z.nodeName.toLowerCase()===r?z||false:z===r}x&&t.filter(r,l,true)},">":function(l,r){var x,v=typeof r==="string",w=0,z=l.length;if(v&&
!s.test(r))for(r=r.toLowerCase();w<z;w++){if(x=l[w]){x=x.parentNode;l[w]=x.nodeName.toLowerCase()===r?x:false}}else{for(;w<z;w++)if(x=l[w])l[w]=v?x.parentNode:x.parentNode===r;v&&t.filter(r,l,true)}},"":function(l,r,x){var v,w=h++,z=b;if(typeof r==="string"&&!s.test(r)){v=r=r.toLowerCase();z=a}z("parentNode",r,w,l,v,x)},"~":function(l,r,x){var v,w=h++,z=b;if(typeof r==="string"&&!s.test(r)){v=r=r.toLowerCase();z=a}z("previousSibling",r,w,l,v,x)}},find:{ID:function(l,r,x){if(typeof r.getElementById!==
"undefined"&&!x)return(l=r.getElementById(l[1]))&&l.parentNode?[l]:[]},NAME:function(l,r){if(typeof r.getElementsByName!=="undefined"){for(var x=[],v=r.getElementsByName(l[1]),w=0,z=v.length;w<z;w++)v[w].getAttribute("name")===l[1]&&x.push(v[w]);return x.length===0?null:x}},TAG:function(l,r){if(typeof r.getElementsByTagName!=="undefined")return r.getElementsByTagName(l[1])}},preFilter:{CLASS:function(l,r,x,v,w,z){l=" "+l[1].replace(u,"")+" ";if(z)return l;z=0;for(var L;(L=r[z])!=null;z++)if(L)if(w^
(L.className&&(" "+L.className+" ").replace(/[\t\n\r]/g," ").indexOf(l)>=0))x||v.push(L);else if(x)r[z]=false;return false},ID:function(l){return l[1].replace(u,"")},TAG:function(l){return l[1].replace(u,"").toLowerCase()},CHILD:function(l){if(l[1]==="nth"){l[2]||t.error(l[0]);l[2]=l[2].replace(/^\+|\s*/g,"");var r=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(l[2]==="even"&&"2n"||l[2]==="odd"&&"2n+1"||!/\D/.test(l[2])&&"0n+"+l[2]||l[2]);l[2]=r[1]+(r[2]||1)-0;l[3]=r[3]-0}else l[2]&&t.error(l[0]);l[0]=h++;return l},
ATTR:function(l,r,x,v,w,z){r=l[1]=l[1].replace(u,"");if(!z&&A.attrMap[r])l[1]=A.attrMap[r];l[4]=(l[4]||l[5]||"").replace(u,"");if(l[2]==="~=")l[4]=" "+l[4]+" ";return l},PSEUDO:function(l,r,x,v,w){if(l[1]==="not")if((f.exec(l[3])||"").length>1||/^\w/.test(l[3]))l[3]=t(l[3],null,null,r);else{l=t.filter(l[3],r,x,true^w);x||v.push.apply(v,l);return false}else if(A.match.POS.test(l[0])||A.match.CHILD.test(l[0]))return true;return l},POS:function(l){l.unshift(true);return l}},filters:{enabled:function(l){return l.disabled===
false&&l.type!=="hidden"},disabled:function(l){return l.disabled===true},checked:function(l){return l.checked===true},selected:function(l){return l.selected===true},parent:function(l){return!!l.firstChild},empty:function(l){return!l.firstChild},has:function(l,r,x){return!!t(x[3],l).length},header:function(l){return/h\d/i.test(l.nodeName)},text:function(l){var r=l.getAttribute("type");l=l.type;return"text"===l&&(r===l||r===null)},radio:function(l){return"radio"===l.type},checkbox:function(l){return"checkbox"===
l.type},file:function(l){return"file"===l.type},password:function(l){return"password"===l.type},submit:function(l){return"submit"===l.type},image:function(l){return"image"===l.type},reset:function(l){return"reset"===l.type},button:function(l){return"button"===l.type||l.nodeName.toLowerCase()==="button"},input:function(l){return/input|select|textarea|button/i.test(l.nodeName)}},setFilters:{first:function(l,r){return r===0},last:function(l,r,x,v){return r===v.length-1},even:function(l,r){return r%2===
0},odd:function(l,r){return r%2===1},lt:function(l,r,x){return r<x[3]-0},gt:function(l,r,x){return r>x[3]-0},nth:function(l,r,x){return x[3]-0===r},eq:function(l,r,x){return x[3]-0===r}},filter:{PSEUDO:function(l,r,x,v){var w=r[1],z=A.filters[w];if(z)return z(l,x,r,v);else if(w==="contains")return(l.textContent||l.innerText||t.getText([l])||"").indexOf(r[3])>=0;else if(w==="not"){r=r[3];x=0;for(v=r.length;x<v;x++)if(r[x]===l)return false;return true}else t.error(w)},CHILD:function(l,r){var x=r[1],
v=l;switch(x){case "only":case "first":for(;v=v.previousSibling;)if(v.nodeType===1)return false;if(x==="first")return true;v=l;case "last":for(;v=v.nextSibling;)if(v.nodeType===1)return false;return true;case "nth":x=r[2];var w=r[3];if(x===1&&w===0)return true;var z=r[0],L=l.parentNode;if(L&&(L.sizcache!==z||!l.nodeIndex)){var J=0;for(v=L.firstChild;v;v=v.nextSibling)if(v.nodeType===1)v.nodeIndex=++J;L.sizcache=z}v=l.nodeIndex-w;return x===0?v===0:v%x===0&&v/x>=0}},ID:function(l,r){return l.nodeType===
1&&l.getAttribute("id")===r},TAG:function(l,r){return r==="*"&&l.nodeType===1||l.nodeName.toLowerCase()===r},CLASS:function(l,r){return(" "+(l.className||l.getAttribute("class"))+" ").indexOf(r)>-1},ATTR:function(l,r){var x=r[1];x=A.attrHandle[x]?A.attrHandle[x](l):l[x]!=null?l[x]:l.getAttribute(x);var v=x+"",w=r[2],z=r[4];return x==null?w==="!=":w==="="?v===z:w==="*="?v.indexOf(z)>=0:w==="~="?(" "+v+" ").indexOf(z)>=0:!z?v&&x!==false:w==="!="?v!==z:w==="^="?v.indexOf(z)===0:w==="$="?v.substr(v.length-
z.length)===z:w==="|="?v===z||v.substr(0,z.length+1)===z+"-":false},POS:function(l,r,x,v){var w=A.setFilters[r[2]];if(w)return w(l,x,r,v)}}},N=A.match.POS,W=function(l,r){return"\\"+(r-0+1)},R;for(R in A.match){A.match[R]=RegExp(A.match[R].source+/(?![^\[]*\])(?![^\(]*\))/.source);A.leftMatch[R]=RegExp(/(^(?:.|\r|\n)*?)/.source+A.match[R].source.replace(/\\(\d+)/g,W))}var X=function(l,r){l=Array.prototype.slice.call(l,0);if(r){r.push.apply(r,l);return r}return l};try{Array.prototype.slice.call(D.documentElement.childNodes,
0)}catch(fa){X=function(l,r){var x=0,v=r||[];if(k.call(l)==="[object Array]")Array.prototype.push.apply(v,l);else if(typeof l.length==="number")for(var w=l.length;x<w;x++)v.push(l[x]);else for(;l[x];x++)v.push(l[x]);return v}}var ca,ha;if(D.documentElement.compareDocumentPosition)ca=function(l,r){if(l===r){m=true;return 0}if(!l.compareDocumentPosition||!r.compareDocumentPosition)return l.compareDocumentPosition?-1:1;return l.compareDocumentPosition(r)&4?-1:1};else{ca=function(l,r){var x,v,w=[],z=
[];x=l.parentNode;v=r.parentNode;var L=x;if(l===r){m=true;return 0}else if(x===v)return ha(l,r);else if(x){if(!v)return 1}else return-1;for(;L;){w.unshift(L);L=L.parentNode}for(L=v;L;){z.unshift(L);L=L.parentNode}x=w.length;v=z.length;for(L=0;L<x&&L<v;L++)if(w[L]!==z[L])return ha(w[L],z[L]);return L===x?ha(l,z[L],-1):ha(w[L],r,1)};ha=function(l,r,x){if(l===r)return x;for(l=l.nextSibling;l;){if(l===r)return-1;l=l.nextSibling}return 1}}t.getText=function(l){for(var r="",x,v=0;l[v];v++){x=l[v];if(x.nodeType===
3||x.nodeType===4)r+=x.nodeValue;else if(x.nodeType!==8)r+=t.getText(x.childNodes)}return r};(function(){var l=D.createElement("div"),r="script"+(new Date).getTime(),x=D.documentElement;l.innerHTML="<a name='"+r+"'/>";x.insertBefore(l,x.firstChild);if(D.getElementById(r)){A.find.ID=function(v,w,z){if(typeof w.getElementById!=="undefined"&&!z)return(w=w.getElementById(v[1]))?w.id===v[1]||typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id").nodeValue===v[1]?[w]:d:[]};A.filter.ID=function(v,
w){var z=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&z&&z.nodeValue===w}}x.removeChild(l);x=l=null})();(function(){var l=D.createElement("div");l.appendChild(D.createComment(""));if(l.getElementsByTagName("*").length>0)A.find.TAG=function(r,x){var v=x.getElementsByTagName(r[1]);if(r[1]==="*"){for(var w=[],z=0;v[z];z++)v[z].nodeType===1&&w.push(v[z]);v=w}return v};l.innerHTML="<a href='#'></a>";if(l.firstChild&&typeof l.firstChild.getAttribute!=="undefined"&&
l.firstChild.getAttribute("href")!=="#")A.attrHandle.href=function(r){return r.getAttribute("href",2)};l=null})();D.querySelectorAll&&function(){var l=t,r=D.createElement("div");r.innerHTML="<p class='TEST'></p>";if(!(r.querySelectorAll&&r.querySelectorAll(".TEST").length===0)){t=function(v,w,z,L){w=w||D;if(!L&&!t.isXML(w)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(v);if(J&&(w.nodeType===1||w.nodeType===9))if(J[1])return X(w.getElementsByTagName(v),z);else if(J[2]&&A.find.CLASS&&w.getElementsByClassName)return X(w.getElementsByClassName(J[2]),
z);if(w.nodeType===9){if(v==="body"&&w.body)return X([w.body],z);else if(J&&J[3]){var V=w.getElementById(J[3]);if(V&&V.parentNode){if(V.id===J[3])return X([V],z)}else return X([],z)}try{return X(w.querySelectorAll(v),z)}catch(ia){}}else if(w.nodeType===1&&w.nodeName.toLowerCase()!=="object"){J=w;var p=(V=w.getAttribute("id"))||"__sizzle__",E=w.parentNode,B=/^\s*[+~]/.test(v);if(V)p=p.replace(/'/g,"\\$&");else w.setAttribute("id",p);if(B&&E)w=w.parentNode;try{if(!B||E)return X(w.querySelectorAll("[id='"+
p+"'] "+v),z)}catch(M){}finally{V||J.removeAttribute("id")}}}return l(v,w,z,L)};for(var x in l)t[x]=l[x];r=null}}();(function(){var l=D.documentElement,r=l.matchesSelector||l.mozMatchesSelector||l.webkitMatchesSelector||l.msMatchesSelector;if(r){var x=!r.call(D.createElement("div"),"div"),v=false;try{r.call(D.documentElement,"[test!='']:sizzle")}catch(w){v=true}t.matchesSelector=function(z,L){L=L.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!t.isXML(z))try{if(v||!A.match.PSEUDO.test(L)&&!/!=/.test(L)){var J=
r.call(z,L);if(J||!x||z.document&&z.document.nodeType!==11)return J}}catch(V){}return t(L,null,null,[z]).length>0}}})();(function(){var l=D.createElement("div");l.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!l.getElementsByClassName||l.getElementsByClassName("e").length===0)){l.lastChild.className="e";if(l.getElementsByClassName("e").length!==1){A.order.splice(1,0,"CLASS");A.find.CLASS=function(r,x,v){if(typeof x.getElementsByClassName!=="undefined"&&!v)return x.getElementsByClassName(r[1])};
l=null}}})();t.contains=D.documentElement.contains?function(l,r){return l!==r&&(l.contains?l.contains(r):true)}:D.documentElement.compareDocumentPosition?function(l,r){return!!(l.compareDocumentPosition(r)&16)}:function(){return false};t.isXML=function(l){return(l=(l?l.ownerDocument||l:0).documentElement)?l.nodeName!=="HTML":false};var ma=function(l,r){for(var x,v=[],w="",z=r.nodeType?[r]:r;x=A.match.PSEUDO.exec(l);){w+=x[0];l=l.replace(A.match.PSEUDO,"")}l=A.relative[l]?l+"*":l;x=0;for(var L=z.length;x<
L;x++)t(l,z[x],v);return t.filter(w,v)};e.find=t;e.expr=t.selectors;e.expr[":"]=e.expr.filters;e.unique=t.uniqueSort;e.text=t.getText;e.isXMLDoc=t.isXML;e.contains=t.contains})();var ub=/Until$/,vb=/^(?:parents|prevUntil|prevAll)/,wb=/,/,jb=/^.[^:#\[\.,]*$/,xb=Array.prototype.slice,yb=e.expr.match.POS,zb={children:true,contents:true,next:true,prev:true};e.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),f=0,h=0,k=this.length;h<k;h++){f=b.length;e.find(a,this[h],b);if(h>0)for(var m=
f;m<b.length;m++)for(var o=0;o<f;o++)if(b[o]===b[m]){b.splice(m--,1);break}}return b},has:function(a){var b=e(a);return this.filter(function(){for(var f=0,h=b.length;f<h;f++)if(e.contains(this,b[f]))return true})},not:function(a){return this.pushStack(H(this,a,false),"not",a)},filter:function(a){return this.pushStack(H(this,a,true),"filter",a)},is:function(a){return!!a&&e.filter(a,this).length>0},closest:function(a,b){var f=[],h,k,m=this[0];if(e.isArray(a)){var o,u={},s=1;if(m&&a.length){h=0;for(k=
a.length;h<k;h++){o=a[h];u[o]||(u[o]=e.expr.match.POS.test(o)?e(o,b||this.context):o)}for(;m&&m.ownerDocument&&m!==b;){for(o in u){h=u[o];if(h.jquery?h.index(m)>-1:e(m).is(h))f.push({selector:o,elem:m,level:s})}m=m.parentNode;s++}}return f}o=yb.test(a)?e(a,b||this.context):null;h=0;for(k=this.length;h<k;h++)for(m=this[h];m;)if(o?o.index(m)>-1:e.find.matchesSelector(m,a)){f.push(m);break}else{m=m.parentNode;if(!m||!m.ownerDocument||m===b)break}f=f.length>1?e.unique(f):f;return this.pushStack(f,"closest",
a)},index:function(a){if(!a||typeof a==="string")return e.inArray(this[0],a?e(a):this.parent().children());return e.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var f=typeof a==="string"?e(a,b):e.makeArray(a),h=e.merge(this.get(),f);return this.pushStack(!f[0]||!f[0].parentNode||f[0].parentNode.nodeType===11||!h[0]||!h[0].parentNode||h[0].parentNode.nodeType===11?h:e.unique(h))},andSelf:function(){return this.add(this.prevObject)}});e.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==
11?a:null},parents:function(a){return e.dir(a,"parentNode")},parentsUntil:function(a,b,f){return e.dir(a,"parentNode",f)},next:function(a){return e.nth(a,2,"nextSibling")},prev:function(a){return e.nth(a,2,"previousSibling")},nextAll:function(a){return e.dir(a,"nextSibling")},prevAll:function(a){return e.dir(a,"previousSibling")},nextUntil:function(a,b,f){return e.dir(a,"nextSibling",f)},prevUntil:function(a,b,f){return e.dir(a,"previousSibling",f)},siblings:function(a){return e.sibling(a.parentNode.firstChild,
a)},children:function(a){return e.sibling(a.firstChild)},contents:function(a){return e.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:e.makeArray(a.childNodes)}},function(a,b){e.fn[a]=function(f,h){var k=e.map(this,b,f),m=xb.call(arguments);ub.test(a)||(h=f);if(h&&typeof h==="string")k=e.filter(h,k);k=this.length>1&&!zb[a]?e.unique(k):k;if((this.length>1||wb.test(h))&&vb.test(a))k=k.reverse();return this.pushStack(k,a,m.join(","))}});e.extend({filter:function(a,b,f){if(f)a=":not("+
a+")";return b.length===1?e.find.matchesSelector(b[0],a)?[b[0]]:[]:e.find.matches(a,b)},dir:function(a,b,f){var h=[];for(a=a[b];a&&a.nodeType!==9&&(f===d||a.nodeType!==1||!e(a).is(f));){a.nodeType===1&&h.push(a);a=a[b]}return h},nth:function(a,b,f){b=b||1;for(var h=0;a;a=a[f])if(a.nodeType===1&&++h===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 Ab=/ jQuery\d+="(?:\d+|null)"/g,Na=/^\s+/,Wa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
Xa=/<([\w:]+)/,Bb=/<tbody/i,Cb=/<|&#?\w+;/,Ya=/<(?:script|object|embed|option|style)/i,Za=/checked\s*(?:[^=]|=\s*.checked.)/i,la={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};la.optgroup=la.option;la.tbody=la.tfoot=la.colgroup=
la.caption=la.thead;la.th=la.td;if(!e.support.htmlSerialize)la._default=[1,"div<div>","</div>"];e.fn.extend({text:function(a){if(e.isFunction(a))return this.each(function(b){var f=e(this);f.text(a.call(this,b,f.text()))});if(typeof a!=="object"&&a!==d)return this.empty().append((this[0]&&this[0].ownerDocument||D).createTextNode(a));return e.text(this)},wrapAll:function(a){if(e.isFunction(a))return this.each(function(f){e(this).wrapAll(a.call(this,f))});if(this[0]){var b=e(a,this[0].ownerDocument).eq(0).clone(true);
this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var f=this;f.firstChild&&f.firstChild.nodeType===1;)f=f.firstChild;return f}).append(this)}return this},wrapInner:function(a){if(e.isFunction(a))return this.each(function(b){e(this).wrapInner(a.call(this,b))});return this.each(function(){var b=e(this),f=b.contents();f.length?f.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){e(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){e.nodeName(this,
"body")||e(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=e(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,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,e(arguments[0]).toArray());return a}},remove:function(a,b){for(var f=0,h;(h=this[f])!=null;f++)if(!a||e.filter(a,[h]).length){if(!b&&h.nodeType===1){e.cleanData(h.getElementsByTagName("*"));e.cleanData([h])}h.parentNode&&
h.parentNode.removeChild(h)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&e.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return e.clone(this,a,b)})},html:function(a){if(a===d)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ab,""):null;else if(typeof a==="string"&&!Ya.test(a)&&(e.support.leadingWhitespace||!Na.test(a))&&
!la[(Xa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Wa,"<$1></$2>");try{for(var b=0,f=this.length;b<f;b++)if(this[b].nodeType===1){e.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(h){this.empty().append(a)}}else e.isFunction(a)?this.each(function(k){var m=e(this);m.html(a.call(this,k,m.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(e.isFunction(a))return this.each(function(b){var f=e(this),h=f.html();f.replaceWith(a.call(this,
b,h))});if(typeof a!=="string")a=e(a).detach();return this.each(function(){var b=this.nextSibling,f=this.parentNode;e(this).remove();b?e(b).before(a):e(f).append(a)})}else return this.length?this.pushStack(e(e.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,true)},domManip:function(a,b,f){var h,k,m,o=a[0],u=[];if(!e.support.checkClone&&arguments.length===3&&typeof o==="string"&&Za.test(o))return this.each(function(){e(this).domManip(a,b,f,true)});if(e.isFunction(o))return this.each(function(A){var N=
e(this);a[0]=o.call(this,A,b?N.html():d);N.domManip(a,b,f)});if(this[0]){h=o&&o.parentNode;h=e.support.parentNode&&h&&h.nodeType===11&&h.childNodes.length===this.length?{fragment:h}:e.buildFragment(a,this,u);m=h.fragment;if(k=m.childNodes.length===1?m=m.firstChild:m.firstChild){b=b&&e.nodeName(k,"tr");k=0;for(var s=this.length,t=s-1;k<s;k++)f.call(b?e.nodeName(this[k],"table")?this[k].getElementsByTagName("tbody")[0]||this[k].appendChild(this[k].ownerDocument.createElement("tbody")):this[k]:this[k],
h.cacheable||s>1&&k<t?e.clone(m,true,true):m)}u.length&&e.each(u,P)}return this}});e.buildFragment=function(a,b,f){var h,k,m;b=b&&b[0]?b[0].ownerDocument||b[0]:D;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===D&&a[0].charAt(0)==="<"&&!Ya.test(a[0])&&(e.support.checkClone||!Za.test(a[0]))){k=true;if(m=e.fragments[a[0]])if(m!==1)h=m}if(!h){h=b.createDocumentFragment();e.clean(a,b,h,f)}if(k)e.fragments[a[0]]=m?h:1;return{fragment:h,cacheable:k}};e.fragments={};e.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){e.fn[a]=function(f){var h=[];f=e(f);var k=this.length===1&&this[0].parentNode;if(k&&k.nodeType===11&&k.childNodes.length===1&&f.length===1){f[b](this[0]);return this}else{k=0;for(var m=f.length;k<m;k++){var o=(k>0?this.clone(true):this).get();e(f[k])[b](o);h=h.concat(o)}return this.pushStack(h,a,f.selector)}}});e.extend({clone:function(a,b,f){var h=a.cloneNode(true),k,m,o;if((!e.support.noCloneEvent||
!e.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!e.isXMLDoc(a)){y(a,h);k=K(a);m=K(h);for(o=0;k[o];++o)y(k[o],m[o])}if(b){F(a,h);if(f){k=K(a);m=K(h);for(o=0;k[o];++o)F(k[o],m[o])}}return h},clean:function(a,b,f,h){b=b||D;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||D;for(var k=[],m=0,o;(o=a[m])!=null;m++){if(typeof o==="number")o+="";if(o){if(typeof o==="string"&&!Cb.test(o))o=b.createTextNode(o);else if(typeof o==="string"){o=o.replace(Wa,"<$1></$2>");
var u=(Xa.exec(o)||["",""])[1].toLowerCase(),s=la[u]||la._default,t=s[0],A=b.createElement("div");for(A.innerHTML=s[1]+o+s[2];t--;)A=A.lastChild;if(!e.support.tbody){t=Bb.test(o);u=u==="table"&&!t?A.firstChild&&A.firstChild.childNodes:s[1]==="<table>"&&!t?A.childNodes:[];for(s=u.length-1;s>=0;--s)e.nodeName(u[s],"tbody")&&!u[s].childNodes.length&&u[s].parentNode.removeChild(u[s])}!e.support.leadingWhitespace&&Na.test(o)&&A.insertBefore(b.createTextNode(Na.exec(o)[0]),A.firstChild);o=A.childNodes}if(o.nodeType)k.push(o);
else k=e.merge(k,o)}}if(f)for(m=0;k[m];m++)if(h&&e.nodeName(k[m],"script")&&(!k[m].type||k[m].type.toLowerCase()==="text/javascript"))h.push(k[m].parentNode?k[m].parentNode.removeChild(k[m]):k[m]);else{k[m].nodeType===1&&k.splice.apply(k,[m+1,0].concat(e.makeArray(k[m].getElementsByTagName("script"))));f.appendChild(k[m])}return k},cleanData:function(a){for(var b,f,h=e.cache,k=e.expando,m=e.event.special,o=e.support.deleteExpando,u=0,s;(s=a[u])!=null;u++)if(!(s.nodeName&&e.noData[s.nodeName.toLowerCase()]))if(f=
s[e.expando]){if((b=h[f]&&h[f][k])&&b.events){for(var t in b.events)m[t]?e.event.remove(s,t):e.removeEvent(s,t,b.handle);if(b.handle)b.handle.elem=null}if(o)delete s[e.expando];else s.removeAttribute&&s.removeAttribute(e.expando);delete h[f]}}});var $a=/alpha\([^)]*\)/i,Db=/opacity=([^)]*)/,Eb=/-([a-z])/ig,Fb=/([A-Z]|^ms)/g,ab=/^-?\d+(?:px)?$/i,Gb=/^-?\d/,Hb={position:"absolute",visibility:"hidden",display:"block"},kb=["Left","Right"],lb=["Top","Bottom"],va,qa,Fa,Ib=function(a,b){return b.toUpperCase()};
e.fn.css=function(a,b){if(arguments.length===2&&b===d)return this;return e.access(this,a,b,true,function(f,h,k){return k!==d?e.style(f,h,k):e.css(f,h)})};e.extend({cssHooks:{opacity:{get:function(a,b){if(b){var f=va(a,"opacity","opacity");return f===""?"1":f}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":e.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,f,h){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var k,
m=e.camelCase(b),o=a.style,u=e.cssHooks[m];b=e.cssProps[m]||m;if(f!==d){if(!(typeof f==="number"&&isNaN(f)||f==null)){if(typeof f==="number"&&!e.cssNumber[m])f+="px";if(!u||!("set"in u)||(f=u.set(a,f))!==d)try{o[b]=f}catch(s){}}}else{if(u&&"get"in u&&(k=u.get(a,false,h))!==d)return k;return o[b]}}},css:function(a,b,f){var h,k=e.camelCase(b),m=e.cssHooks[k];b=e.cssProps[k]||k;if(m&&"get"in m&&(h=m.get(a,true,f))!==d)return h;else if(va)return va(a,b,k)},swap:function(a,b,f){var h={},k;for(k in b){h[k]=
a.style[k];a.style[k]=b[k]}f.call(a);for(k in b)a.style[k]=h[k]},camelCase:function(a){return a.replace(Eb,Ib)}});e.curCSS=e.css;e.each(["height","width"],function(a,b){e.cssHooks[b]={get:function(f,h,k){var m;if(h){if(f.offsetWidth!==0)m=Z(f,b,k);else e.swap(f,Hb,function(){m=Z(f,b,k)});if(m<=0){m=va(f,b,b);if(m==="0px"&&Fa)m=Fa(f,b,b);if(m!=null)return m===""||m==="auto"?"0px":m}if(m<0||m==null){m=f.style[b];return m===""||m==="auto"?"0px":m}return typeof m==="string"?m:m+"px"}},set:function(f,
h){if(ab.test(h)){h=parseFloat(h);if(h>=0)return h+"px"}else return h}}});if(!e.support.opacity)e.cssHooks.opacity={get:function(a,b){return Db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var f=a.style;f.zoom=1;var h=e.isNaN(b)?"":"alpha(opacity="+b*100+")",k=f.filter||"";f.filter=$a.test(k)?k.replace($a,h):f.filter+" "+h}};e(function(){if(!e.support.reliableMarginRight)e.cssHooks.marginRight={get:function(a,b){var f;
e.swap(a,{display:"inline-block"},function(){f=b?va(a,"margin-right","marginRight"):a.style.marginRight});return f}}});if(D.defaultView&&D.defaultView.getComputedStyle)qa=function(a,b,f){var h;f=f.replace(Fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return d;if(b=b.getComputedStyle(a,null)){h=b.getPropertyValue(f);if(h===""&&!e.contains(a.ownerDocument.documentElement,a))h=e.style(a,f)}return h};if(D.documentElement.currentStyle)Fa=function(a,b){var f,h=a.currentStyle&&a.currentStyle[b],
k=a.runtimeStyle&&a.runtimeStyle[b],m=a.style;if(!ab.test(h)&&Gb.test(h)){f=m.left;if(k)a.runtimeStyle.left=a.currentStyle.left;m.left=b==="fontSize"?"1em":h||0;h=m.pixelLeft+"px";m.left=f;if(k)a.runtimeStyle.left=k}return h===""?"auto":h};va=qa||Fa;if(e.expr&&e.expr.filters){e.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!e.support.reliableHiddenOffsets&&(a.style.display||e.css(a,"display"))==="none"};e.expr.filters.visible=function(a){return!e.expr.filters.hidden(a)}}var Jb=
/%20/g,mb=/\[\]$/,bb=/\r?\n/g,Kb=/#.*$/,Lb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Mb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Nb=/^(?:GET|HEAD)$/,Ob=/^\/\//,cb=/\?/,Pb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Qb=/^(?:select|textarea)/i,Pa=/\s+/,Rb=/([?&])_=[^&]*/,Sb=/(^|\-)([a-z])/g,Tb=function(a,b,f){return b+f.toUpperCase()},db=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,eb=e.fn.load,Ka={},fb={},ra,sa;try{ra=D.location.href}catch(ac){ra=
D.createElement("a");ra.href="";ra=ra.href}sa=db.exec(ra.toLowerCase())||[];e.fn.extend({load:function(a,b,f){if(typeof a!=="string"&&eb)return eb.apply(this,arguments);else if(!this.length)return this;var h=a.indexOf(" ");if(h>=0){var k=a.slice(h,a.length);a=a.slice(0,h)}h="GET";if(b)if(e.isFunction(b)){f=b;b=d}else if(typeof b==="object"){b=e.param(b,e.ajaxSettings.traditional);h="POST"}var m=this;e.ajax({url:a,type:h,dataType:"html",data:b,complete:function(o,u,s){s=o.responseText;if(o.isResolved()){o.done(function(t){s=
t});m.html(k?e("<div>").append(s.replace(Pb,"")).find(k):s)}f&&m.each(f,[s,u,o])}});return this},serialize:function(){return e.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?e.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Qb.test(this.nodeName)||Mb.test(this.type))}).map(function(a,b){var f=e(this).val();return f==null?null:e.isArray(f)?e.map(f,function(h){return{name:b.name,value:h.replace(bb,
"\r\n")}}):{name:b.name,value:f.replace(bb,"\r\n")}}).get()}});e.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){e.fn[b]=function(f){return this.bind(b,f)}});e.each(["get","post"],function(a,b){e[b]=function(f,h,k,m){if(e.isFunction(h)){m=m||k;k=h;h=d}return e.ajax({type:b,url:f,data:h,success:k,dataType:m})}});e.extend({getScript:function(a,b){return e.get(a,d,b,"script")},getJSON:function(a,b,f){return e.get(a,b,f,"json")},ajaxSetup:function(a,b){if(b)e.extend(true,
a,e.ajaxSettings,b);else{b=a;a=e.extend(true,e.ajaxSettings,b)}for(var f in{context:1,url:1})if(f in b)a[f]=b[f];else if(f in e.ajaxSettings)a[f]=e.ajaxSettings[f];return a},ajaxSettings:{url:ra,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|widget):$/.test(sa[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":c.String,"text html":true,"text json":e.parseJSON,"text xml":e.parseXML}},ajaxPrefilter:Y(Ka),ajaxTransport:Y(fb),ajax:function(a,b){function f(v,w,z,L){if(ca!==2){ca=2;X&&clearTimeout(X);R=d;N=L||"";l.readyState=v?4:0;var J,V,ia;if(z){L=h;var p=l,E=L.contents,B=L.dataTypes,M=L.responseFields,U,Q,da,ja;for(Q in M)if(Q in z)p[M[Q]]=z[Q];for(;B[0]==="*";){B.shift();if(U===d)U=L.mimeType||p.getResponseHeader("content-type")}if(U)for(Q in E)if(E[Q]&&
E[Q].test(U)){B.unshift(Q);break}if(B[0]in z)da=B[0];else{for(Q in z){if(!B[0]||L.converters[Q+" "+B[0]]){da=Q;break}ja||(ja=Q)}da=da||ja}if(da){da!==B[0]&&B.unshift(da);z=z[da]}else z=void 0}else z=d;z=z;if(v>=200&&v<300||v===304){if(h.ifModified){if(U=l.getResponseHeader("Last-Modified"))e.lastModified[t]=U;if(U=l.getResponseHeader("Etag"))e.etag[t]=U}if(v===304){w="notmodified";J=true}else try{U=h;z=z;if(U.dataFilter)z=U.dataFilter(z,U.dataType);var pa=U.dataTypes;Q={};var Ba,Ga,Ub=pa.length,Ha,
na=pa[0],wa,Oa,oa,ta,xa;for(Ba=1;Ba<Ub;Ba++){if(Ba===1)for(Ga in U.converters)if(typeof Ga==="string")Q[Ga.toLowerCase()]=U.converters[Ga];wa=na;na=pa[Ba];if(na==="*")na=wa;else if(wa!=="*"&&wa!==na){Oa=wa+" "+na;oa=Q[Oa]||Q["* "+na];if(!oa){xa=d;for(ta in Q){Ha=ta.split(" ");if(Ha[0]===wa||Ha[0]==="*")if(xa=Q[Ha[1]+" "+na]){ta=Q[ta];if(ta===true)oa=xa;else if(xa===true)oa=ta;break}}}oa||xa||e.error("No conversion from "+Oa.replace(" "," to "));if(oa!==true)z=oa?oa(z):xa(ta(z))}}V=z;w="success";J=
true}catch(Vb){w="parsererror";ia=Vb}}else{ia=w;if(!w||v){w="error";if(v<0)v=0}}l.status=v;l.statusText=w;J?o.resolveWith(k,[V,w,l]):o.rejectWith(k,[l,w,ia]);l.statusCode(s);s=d;if(ha)m.trigger("ajax"+(J?"Success":"Error"),[l,h,J?V:ia]);u.resolveWith(k,[l,w]);if(ha){m.trigger("ajaxComplete",[l,h]);--e.active||e.event.trigger("ajaxStop")}}}if(typeof a==="object"){b=a;a=d}b=b||{};var h=e.ajaxSetup({},b),k=h.context||h,m=k!==h&&(k.nodeType||k instanceof e)?e(k):e.event,o=e.Deferred(),u=e._Deferred(),
s=h.statusCode||{},t,A={},N,W,R,X,fa,ca=0,ha,ma,l={readyState:0,setRequestHeader:function(v,w){ca||(A[v.toLowerCase().replace(Sb,Tb)]=w);return this},getAllResponseHeaders:function(){return ca===2?N:null},getResponseHeader:function(v){var w;if(ca===2){if(!W)for(W={};w=Lb.exec(N);)W[w[1].toLowerCase()]=w[2];w=W[v.toLowerCase()]}return w===d?null:w},overrideMimeType:function(v){if(!ca)h.mimeType=v;return this},abort:function(v){v=v||"abort";R&&R.abort(v);f(0,v);return this}};o.promise(l);l.success=
l.done;l.error=l.fail;l.complete=u.done;l.statusCode=function(v){if(v){var w;if(ca<2)for(w in v)s[w]=[s[w],v[w]];else{w=v[l.status];l.then(w,w)}}return this};h.url=((a||h.url)+"").replace(Kb,"").replace(Ob,sa[1]+"//");h.dataTypes=e.trim(h.dataType||"*").toLowerCase().split(Pa);if(h.crossDomain==null){fa=db.exec(h.url.toLowerCase());h.crossDomain=!!(fa&&(fa[1]!=sa[1]||fa[2]!=sa[2]||(fa[3]||(fa[1]==="http:"?80:443))!=(sa[3]||(sa[1]==="http:"?80:443))))}if(h.data&&h.processData&&typeof h.data!=="string")h.data=
e.param(h.data,h.traditional);S(Ka,h,b,l);if(ca===2)return false;ha=h.global;h.type=h.type.toUpperCase();h.hasContent=!Nb.test(h.type);ha&&e.active++===0&&e.event.trigger("ajaxStart");if(!h.hasContent){if(h.data)h.url+=(cb.test(h.url)?"&":"?")+h.data;t=h.url;if(h.cache===false){fa=e.now();var r=h.url.replace(Rb,"$1_="+fa);h.url=r+(r===h.url?(cb.test(h.url)?"&":"?")+"_="+fa:"")}}if(h.data&&h.hasContent&&h.contentType!==false||b.contentType)A["Content-Type"]=h.contentType;if(h.ifModified){t=t||h.url;
if(e.lastModified[t])A["If-Modified-Since"]=e.lastModified[t];if(e.etag[t])A["If-None-Match"]=e.etag[t]}A.Accept=h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(h.dataTypes[0]!=="*"?", */*; q=0.01":""):h.accepts["*"];for(ma in h.headers)l.setRequestHeader(ma,h.headers[ma]);if(h.beforeSend&&(h.beforeSend.call(k,l,h)===false||ca===2)){l.abort();return false}for(ma in{success:1,error:1,complete:1})l[ma](h[ma]);if(R=S(fb,h,b,l)){l.readyState=1;ha&&m.trigger("ajaxSend",[l,h]);if(h.async&&
h.timeout>0)X=setTimeout(function(){l.abort("timeout")},h.timeout);try{ca=1;R.send(A,f)}catch(x){status<2?f(-1,x):e.error(x)}}else f(-1,"No Transport");return l},param:function(a,b){var f=[],h=function(m,o){o=e.isFunction(o)?o():o;f[f.length]=encodeURIComponent(m)+"="+encodeURIComponent(o)};if(b===d)b=e.ajaxSettings.traditional;if(e.isArray(a)||a.jquery&&!e.isPlainObject(a))e.each(a,function(){h(this.name,this.value)});else for(var k in a)I(k,a[k],b,h);return f.join("&").replace(Jb,"+")}});e.extend({active:0,
lastModified:{},etag:{}});var Wb=e.now(),Ia=/(\=)\?(&|$)|\?\?/i;e.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return e.expando+"_"+Wb++}});e.ajaxPrefilter("json jsonp",function(a,b,f){var h=typeof a.data==="string";if(a.dataTypes[0]==="jsonp"||b.jsonpCallback||b.jsonp!=null||a.jsonp!==false&&(Ia.test(a.url)||h&&Ia.test(a.data))){var k,m=a.jsonpCallback=e.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,o=c[m];b=a.url;var u=a.data,s="$1"+m+"$2",t=function(){c[m]=o;k&&e.isFunction(o)&&
c[m](k[0])};if(a.jsonp!==false){b=b.replace(Ia,s);if(a.url===b){if(h)u=u.replace(Ia,s);if(a.data===u)b+=(/\?/.test(b)?"&":"?")+a.jsonp+"="+m}}a.url=b;a.data=u;c[m]=function(A){k=[A]};f.then(t,t);a.converters["script json"]=function(){k||e.error(m+" was not called");return k[0]};a.dataTypes[0]="json";return"script"}});e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){e.globalEval(a);
return a}}});e.ajaxPrefilter("script",function(a){if(a.cache===d)a.cache=false;if(a.crossDomain){a.type="GET";a.global=false}});e.ajaxTransport("script",function(a){if(a.crossDomain){var b,f=D.head||D.getElementsByTagName("head")[0]||D.documentElement;return{send:function(h,k){b=D.createElement("script");b.async="async";if(a.scriptCharset)b.charset=a.scriptCharset;b.src=a.url;b.onload=b.onreadystatechange=function(m,o){if(!b.readyState||/loaded|complete/.test(b.readyState)){b.onload=b.onreadystatechange=
null;f&&b.parentNode&&f.removeChild(b);b=d;o||k(200,"success")}};f.insertBefore(b,f.firstChild)},abort:function(){b&&b.onload(0,1)}}}});var Xb=e.now(),ua;e.ajaxSettings.xhr=c.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&aa()))a:{try{a=new c.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}a=void 0}return a}:aa;qa=e.ajaxSettings.xhr();e.support.ajax=!!qa;e.support.cors=qa&&"withCredentials"in qa;qa=d;e.support.ajax&&e.ajaxTransport(function(a){if(!a.crossDomain||e.support.cors){var b;return{send:function(f,
h){var k=a.xhr(),m,o;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(o in a.xhrFields)k[o]=a.xhrFields[o];a.mimeType&&k.overrideMimeType&&k.overrideMimeType(a.mimeType);if(!a.crossDomain&&!f["X-Requested-With"])f["X-Requested-With"]="XMLHttpRequest";try{for(o in f)k.setRequestHeader(o,f[o])}catch(u){}k.send(a.hasContent&&a.data||null);b=function(s,t){var A,N,W,R,X;try{if(b&&(t||k.readyState===4)){b=d;if(m){k.onreadystatechange=e.noop;delete ua[m]}if(t)k.readyState!==
4&&k.abort();else{A=k.status;W=k.getAllResponseHeaders();R={};if((X=k.responseXML)&&X.documentElement)R.xml=X;R.text=k.responseText;try{N=k.statusText}catch(fa){N=""}if(!A&&a.isLocal&&!a.crossDomain)A=R.text?200:404;else if(A===1223)A=204}}}catch(ca){t||h(-1,ca)}R&&h(A,N,R,W)};if(!a.async||k.readyState===4)b();else{if(!ua){ua={};ba()}m=Xb++;k.onreadystatechange=ua[m]=b}},abort:function(){b&&b(0,1)}}}});var La={},Yb=/^(?:toggle|show|hide)$/,Zb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Ja,Qa=[["height","marginTop",
"marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];e.fn.extend({show:function(a,b,f){if(a||a===0)return this.animate(ea("show",3),a,b,f);else{f=0;for(var h=this.length;f<h;f++){a=this[f];b=a.style.display;if(!e._data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&e.css(a,"display")==="none"&&e._data(a,"olddisplay",O(a.nodeName))}for(f=0;f<h;f++){a=this[f];b=a.style.display;if(b===""||b==="none")a.style.display=e._data(a,
"olddisplay")||""}return this}},hide:function(a,b,f){if(a||a===0)return this.animate(ea("hide",3),a,b,f);else{a=0;for(b=this.length;a<b;a++){f=e.css(this[a],"display");f!=="none"&&!e._data(this[a],"olddisplay")&&e._data(this[a],"olddisplay",f)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:e.fn.toggle,toggle:function(a,b,f){var h=typeof a==="boolean";if(e.isFunction(a)&&e.isFunction(b))this._toggle.apply(this,arguments);else a==null||h?this.each(function(){var k=h?a:e(this).is(":hidden");
e(this)[k?"show":"hide"]()}):this.animate(ea("toggle",3),a,b,f);return this},fadeTo:function(a,b,f,h){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,f,h)},animate:function(a,b,f,h){var k=e.speed(b,f,h);if(e.isEmptyObject(a))return this.each(k.complete);return this[k.queue===false?"each":"queue"](function(){var m=e.extend({},k),o,u=this.nodeType===1,s=u&&e(this).is(":hidden"),t=this;for(o in a){var A=e.camelCase(o);if(o!==A){a[A]=a[o];delete a[o];o=A}if(a[o]==="hide"&&
s||a[o]==="show"&&!s)return m.complete.call(this);if(u&&(o==="height"||o==="width")){m.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(e.css(this,"display")==="inline"&&e.css(this,"float")==="none")if(e.support.inlineBlockNeedsLayout)if(O(this.nodeName)==="inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(e.isArray(a[o])){(m.specialEasing=m.specialEasing||{})[o]=a[o][1];a[o]=a[o][0]}}if(m.overflow!=
null)this.style.overflow="hidden";m.curAnim=e.extend({},a);e.each(a,function(N,W){var R=new e.fx(t,m,N);if(Yb.test(W))R[W==="toggle"?s?"show":"hide":W](a);else{var X=Zb.exec(W),fa=R.cur();if(X){var ca=parseFloat(X[2]),ha=X[3]||(e.cssNumber[N]?"":"px");if(ha!=="px"){e.style(t,N,(ca||1)+ha);fa=(ca||1)/R.cur()*fa;e.style(t,N,fa+ha)}if(X[1])ca=(X[1]==="-="?-1:1)*ca+fa;R.custom(fa,ca,ha)}else R.custom(fa,W,"")}});return true})},stop:function(a,b){var f=e.timers;a&&this.queue([]);this.each(function(){for(var h=
f.length-1;h>=0;h--)if(f[h].elem===this){b&&f[h](true);f.splice(h,1)}});b||this.dequeue();return this}});e.each({slideDown:ea("show",1),slideUp:ea("hide",1),slideToggle:ea("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){e.fn[a]=function(f,h,k){return this.animate(b,f,h,k)}});e.extend({speed:function(a,b,f){var h=a&&typeof a==="object"?e.extend({},a):{complete:f||!f&&b||e.isFunction(a)&&a,duration:a,easing:f&&b||b&&!e.isFunction(b)&&b};h.duration=
e.fx.off?0:typeof h.duration==="number"?h.duration:h.duration in e.fx.speeds?e.fx.speeds[h.duration]:e.fx.speeds._default;h.old=h.complete;h.complete=function(){h.queue!==false&&e(this).dequeue();e.isFunction(h.old)&&h.old.call(this)};return h},easing:{linear:function(a,b,f,h){return f+h*a},swing:function(a,b,f,h){return(-Math.cos(a*Math.PI)/2+0.5)*h+f}},timers:[],fx:function(a,b,f){this.options=b;this.elem=a;this.prop=f;if(!b.orig)b.orig={}}});e.fx.prototype={update:function(){this.options.step&&
this.options.step.call(this.elem,this.now,this);(e.fx.step[this.prop]||e.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=e.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,f){function h(o){return k.step(o)}var k=this,m=e.fx;this.startTime=e.now();this.start=a;this.end=b;this.unit=f||this.unit||(e.cssNumber[this.prop]?"":"px");this.now=this.start;
this.pos=this.state=0;h.elem=this.elem;if(h()&&e.timers.push(h)&&!Ja)Ja=setInterval(m.tick,m.interval)},show:function(){this.options.orig[this.prop]=e.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());e(this.elem).show()},hide:function(){this.options.orig[this.prop]=e.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=e.now(),f=true;if(a||b>=this.options.duration+this.startTime){this.now=
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var h in this.options.curAnim)if(this.options.curAnim[h]!==true)f=false;if(f){if(this.options.overflow!=null&&!e.support.shrinkWrapBlocks){var k=this.elem,m=this.options;e.each(["","X","Y"],function(u,s){k.style["overflow"+s]=m.overflow[u]})}this.options.hide&&e(this.elem).hide();if(this.options.hide||this.options.show)for(var o in this.options.curAnim)e.style(this.elem,o,this.options.orig[o]);this.options.complete.call(this.elem)}return false}else{a=
b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(e.easing.swing?"swing":"linear");this.pos=e.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};e.extend(e.fx,{tick:function(){for(var a=e.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||e.fx.stop()},interval:13,stop:function(){clearInterval(Ja);Ja=null},speeds:{slow:600,
fast:200,_default:400},step:{opacity:function(a){e.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(e.expr&&e.expr.filters)e.expr.filters.animated=function(a){return e.grep(e.timers,function(b){return a===b.elem}).length};var $b=/^t(?:able|d|h)$/i,gb=/^(?:body|html)$/i;e.fn.offset="getBoundingClientRect"in D.documentElement?function(a){var b=
this[0],f;if(a)return this.each(function(o){e.offset.setOffset(this,a,o)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return e.offset.bodyOffset(b);try{f=b.getBoundingClientRect()}catch(h){}var k=b.ownerDocument,m=k.documentElement;if(!f||!e.contains(m,b))return f?{top:f.top,left:f.left}:{top:0,left:0};b=k.body;k=T(k);return{top:f.top+(k.pageYOffset||e.support.boxModel&&m.scrollTop||b.scrollTop)-(m.clientTop||b.clientTop||0),left:f.left+(k.pageXOffset||e.support.boxModel&&m.scrollLeft||
b.scrollLeft)-(m.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(t){e.offset.setOffset(this,a,t)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return e.offset.bodyOffset(b);e.offset.initialize();var f,h=b.offsetParent,k=b.ownerDocument,m=k.documentElement,o=k.body;f=(k=k.defaultView)?k.getComputedStyle(b,null):b.currentStyle;for(var u=b.offsetTop,s=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==m;){if(e.offset.supportsFixedPosition&&f.position===
"fixed")break;f=k?k.getComputedStyle(b,null):b.currentStyle;u-=b.scrollTop;s-=b.scrollLeft;if(b===h){u+=b.offsetTop;s+=b.offsetLeft;if(e.offset.doesNotAddBorder&&!(e.offset.doesAddBorderForTableAndCells&&$b.test(b.nodeName))){u+=parseFloat(f.borderTopWidth)||0;s+=parseFloat(f.borderLeftWidth)||0}h=b.offsetParent}if(e.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){u+=parseFloat(f.borderTopWidth)||0;s+=parseFloat(f.borderLeftWidth)||0}f=f}if(f.position==="relative"||f.position===
"static"){u+=o.offsetTop;s+=o.offsetLeft}if(e.offset.supportsFixedPosition&&f.position==="fixed"){u+=Math.max(m.scrollTop,o.scrollTop);s+=Math.max(m.scrollLeft,o.scrollLeft)}return{top:u,left:s}};e.offset={initialize:function(){var a=D.body,b=D.createElement("div"),f,h,k,m=parseFloat(e.css(a,"marginTop"))||0;e.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
a.insertBefore(b,a.firstChild);f=b.firstChild;h=f.firstChild;k=f.nextSibling.firstChild.firstChild;this.doesNotAddBorder=h.offsetTop!==5;this.doesAddBorderForTableAndCells=k.offsetTop===5;h.style.position="fixed";h.style.top="20px";this.supportsFixedPosition=h.offsetTop===20||h.offsetTop===15;h.style.position=h.style.top="";f.style.overflow="hidden";f.style.position="relative";this.subtractsBorderForOverflowNotVisible=h.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==m;a.removeChild(b);
e.offset.initialize=e.noop},bodyOffset:function(a){var b=a.offsetTop,f=a.offsetLeft;e.offset.initialize();if(e.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(e.css(a,"marginTop"))||0;f+=parseFloat(e.css(a,"marginLeft"))||0}return{top:b,left:f}},setOffset:function(a,b,f){var h=e.css(a,"position");if(h==="static")a.style.position="relative";var k=e(a),m=k.offset(),o=e.css(a,"top"),u=e.css(a,"left"),s=(h==="absolute"||h==="fixed")&&e.inArray("auto",[o,u])>-1;h={};var t={};if(s)t=k.position();
o=s?t.top:parseInt(o,10)||0;u=s?t.left:parseInt(u,10)||0;if(e.isFunction(b))b=b.call(a,f,m);if(b.top!=null)h.top=b.top-m.top+o;if(b.left!=null)h.left=b.left-m.left+u;"using"in b?b.using.call(a,h):k.css(h)}};e.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),f=this.offset(),h=gb.test(b[0].nodeName)?{top:0,left:0}:b.offset();f.top-=parseFloat(e.css(a,"marginTop"))||0;f.left-=parseFloat(e.css(a,"marginLeft"))||0;h.top+=parseFloat(e.css(b[0],"borderTopWidth"))||
0;h.left+=parseFloat(e.css(b[0],"borderLeftWidth"))||0;return{top:f.top-h.top,left:f.left-h.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||D.body;a&&!gb.test(a.nodeName)&&e.css(a,"position")==="static";)a=a.offsetParent;return a})}});e.each(["Left","Top"],function(a,b){var f="scroll"+b;e.fn[f]=function(h){var k=this[0],m;if(!k)return null;if(h!==d)return this.each(function(){if(m=T(this))m.scrollTo(!a?h:e(m).scrollLeft(),a?h:e(m).scrollTop());else this[f]=h});
else return(m=T(k))?"pageXOffset"in m?m[a?"pageYOffset":"pageXOffset"]:e.support.boxModel&&m.document.documentElement[f]||m.document.body[f]:k[f]}});e.each(["Height","Width"],function(a,b){var f=b.toLowerCase();e.fn["inner"+b]=function(){return this[0]?parseFloat(e.css(this[0],f,"padding")):null};e.fn["outer"+b]=function(h){return this[0]?parseFloat(e.css(this[0],f,h?"margin":"border")):null};e.fn[f]=function(h){var k=this[0];if(!k)return h==null?null:this;if(e.isFunction(h))return this.each(function(o){var u=
e(this);u[f](h.call(this,o,u[f]()))});if(e.isWindow(k)){var m=k.document.documentElement["client"+b];return k.document.compatMode==="CSS1Compat"&&m||k.document.body["client"+b]||m}else if(k.nodeType===9)return Math.max(k.documentElement["client"+b],k.body["scroll"+b],k.documentElement["scroll"+b],k.body["offset"+b],k.documentElement["offset"+b]);else if(h===d){k=e.css(k,f);m=parseFloat(k);return e.isNaN(m)?k:m}else return this.css(f,typeof h==="string"?h:h+"px")}});c.jQuery=c.$=e})(window);
var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};
jaaulde.utils.cookies=function(){var c={hoursToLive:8760,path:"/ac",domain:"searchdial.com",secure:false},d=function(i){return typeof i!=="object"||i===null?c:{hoursToLive:typeof i.hoursToLive==="number"?i.hoursToLive:c.hoursToLive,path:typeof i.path==="string"&&i.path!=""?i.path:c.path,domain:typeof i.domain==="string"&&i.domain!=""?i.domain:c.domain,secure:typeof i.secure==="boolean"&&i.secure!=""?i.secure:c.secure}},g=function(){};g.prototype.set=function(i,j,n){if(typeof j==="undefined"||j===
null){if(typeof n!=="object"||n===null)n={};j="";n.hoursToLive=-8760}n=n;n=d(n);var q;if(n.hoursToLive!==0){q=n.hoursToLive;var C=new Date;C.setTime(C.getTime()+q*60*60*1E3);q="; expires="+C.toGMTString()}else q="";n=q+"; path="+n.path+"; domain="+n.domain+(n.secure?"; secure":"");document.cookie=i+"="+escape(j)+n};g.prototype.del=function(i,j){if(typeof j!=="object"||j===null)j={};this.set(i,null,j)};g.prototype.setOptions=function(i){if(typeof i!=="object")i=null;c=d(i)};return new g}();
(function(c){function d(y){if(c.facebox.settings.inited)return true;else c.facebox.settings.inited=true;c(document).trigger("init.facebox");j();var K=c.facebox.settings.imageTypes.join("|");c.facebox.settings.imageTypesRegexp=RegExp(".("+K+")$","i");y&&c.extend(c.facebox.settings,y);c("body").append(c.facebox.settings.faceboxHtml);var P=[new Image,new Image];P[0].src=c.facebox.settings.closeImage;P[1].src=c.facebox.settings.loadingImage;c("#facebox").find(".b:first, .bl").each(function(){P.push(new Image);
P.slice(-1).src=c(this).css("background-image").replace(/url\((.+)\)/,"$1")});c("#facebox .close").click(c.facebox.close);c("#facebox .close_image").attr("src",c.facebox.settings.closeImage)}function g(){var y,K;if(self.pageYOffset){K=self.pageYOffset;y=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){K=document.documentElement.scrollTop;y=document.documentElement.scrollLeft}else if(document.body){K=document.body.scrollTop;y=document.body.scrollLeft}return[y,
K]}function i(){var y;if(self.innerHeight)y=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)y=document.documentElement.clientHeight;else if(document.body)y=document.body.clientHeight;return y}function j(){var y=c.facebox.settings;y.loadingImage=y.loading_image||y.loadingImage;y.closeImage=y.close_image||y.closeImage;y.imageTypes=y.image_types||y.imageTypes;y.faceboxHtml=y.facebox_html||y.faceboxHtml}function n(y,K){if(y.match(/#/)){var P=window.location.href.split("#")[0];
P=y.replace(P,"");P!="#"&&c.facebox.reveal(c(P).html(),K)}else y.match(c.facebox.settings.imageTypesRegexp)?q(y,K):C(y,K)}function q(y,K){var P=new Image;P.onload=function(){c.facebox.reveal('<div class="image"><img src="'+P.src+'" /></div>',K)};P.src=y}function C(y,K){c.get(y,function(P){c.facebox.reveal(P,K)})}function G(){return c.facebox.settings.overlay==false||c.facebox.settings.opacity===null}function H(){if(!G()){c("#facebox_overlay").length==0&&c("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');
c("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",c.facebox.settings.opacity).click(function(){c(document).trigger("close.facebox")}).fadeIn(200);return false}}function F(){if(!G()){c("#facebox_overlay").fadeOut(200,function(){c("#facebox_overlay").removeClass("facebox_overlayBG");c("#facebox_overlay").addClass("facebox_hide");c("#facebox_overlay").remove()});return false}}c.facebox=function(y,K){c.facebox.loading();if(y.ajax)C(y.ajax,K);else if(y.image)q(y.image,K);else if(y.div)n(y.div,
K);else c.isFunction(y)?y.call(c):c.facebox.reveal(y,K)};c.extend(c.facebox,{settings:{opacity:0.2,overlay:true,loadingImage:"/facebox/loading.gif",closeImage:"/facebox/closelabel.png",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <div class="content">         </div>         <a href="#" class="close"><img src="/facebox/closelabel.png" title="close" class="close_image" /></a>       </div>     </div>'},loading:function(){d();
if(c("#facebox .loading").length==1)return true;H();c("#facebox .content").empty();c("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+c.facebox.settings.loadingImage+'"/></div>');c("#facebox").css({top:g()[1]+i()/10,left:c(window).width()/2-205}).show();c(document).bind("keydown.facebox",function(y){y.keyCode==27&&c.facebox.close();return true});c(document).trigger("loading.facebox")},reveal:function(y,K){c(document).trigger("beforeReveal.facebox");K&&c("#facebox .content").addClass(K);
c("#facebox .content").append(y);c("#facebox .loading").remove();c("#facebox .body").children().fadeIn("normal");c("#facebox").css("left",c(window).width()/2-c("#facebox .popup").width()/2);c(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},close:function(){c(document).trigger("close.facebox");return false}});c.fn.facebox=function(y){if(c(this).length!=0){d(y);return this.bind("click.facebox",function(){c.facebox.loading(true);var K=this.rel.match(/facebox\[?\.(\w+)\]?/);if(K)K=
K[1];n(this.href,K);return false})}};c(document).bind("close.facebox",function(){c(document).unbind("keydown.facebox");c("#facebox").fadeOut(function(){c("#facebox .content").removeClass().addClass("content");c("#facebox .loading").remove();c(document).trigger("afterClose.facebox")});F()})})(jQuery);
(function(c,d){function g(i){return!c(i).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.11",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}});c.fn.extend({_focus:c.fn.focus,focus:function(i,j){return typeof i==="number"?this.each(function(){var n=this;setTimeout(function(){c(n).focus();j&&j.call(n)},i)}):this._focus.apply(this,arguments)},scrollParent:function(){var i;i=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!i.length?c(document):i},zIndex:function(i){if(i!==d)return this.css("zIndex",i);if(this.length){i=c(this[0]);for(var j;i.length&&i[0]!==document;){j=i.css("position");
if(j==="absolute"||j==="relative"||j==="fixed"){j=parseInt(i.css("zIndex"),10);if(!isNaN(j)&&j!==0)return j}i=i.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(i){i.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(i,j){function n(H,F,y,K){c.each(q,function(){F-=parseFloat(c.curCSS(H,"padding"+this,true))||0;if(y)F-=parseFloat(c.curCSS(H,
"border"+this+"Width",true))||0;if(K)F-=parseFloat(c.curCSS(H,"margin"+this,true))||0});return F}var q=j==="Width"?["Left","Right"]:["Top","Bottom"],C=j.toLowerCase(),G={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+j]=function(H){if(H===d)return G["inner"+j].call(this);return this.each(function(){c(this).css(C,n(this,H)+"px")})};c.fn["outer"+j]=function(H,F){if(typeof H!=="number")return G["outer"+j].call(this,H);return this.each(function(){c(this).css(C,
n(this,H,true,F)+"px")})}});c.extend(c.expr[":"],{data:function(i,j,n){return!!c.data(i,n[3])},focusable:function(i){var j=i.nodeName.toLowerCase(),n=c.attr(i,"tabindex");if("area"===j){j=i.parentNode;n=j.name;if(!i.href||!n||j.nodeName.toLowerCase()!=="map")return false;i=c("img[usemap=#"+n+"]")[0];return!!i&&g(i)}return(/input|select|textarea|button|object/.test(j)?!i.disabled:"a"==j?i.href||!isNaN(n):!isNaN(n))&&g(i)},tabbable:function(i){var j=c.attr(i,"tabindex");return(isNaN(j)||j>=0)&&c(i).is(":focusable")}});
c(function(){var i=document.body,j=i.appendChild(j=document.createElement("div"));c.extend(j.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=j.offsetHeight===100;c.support.selectstart="onselectstart"in j;i.removeChild(j).style.display="none"});c.extend(c.ui,{plugin:{add:function(i,j,n){i=c.ui[i].prototype;for(var q in n){i.plugins[q]=i.plugins[q]||[];i.plugins[q].push([j,n[q]])}},call:function(i,j,n){if((j=i.plugins[j])&&i.element[0].parentNode)for(var q=0;q<j.length;q++)i.options[j[q][0]]&&
j[q][1].apply(i.element,n)}},contains:function(i,j){return document.compareDocumentPosition?i.compareDocumentPosition(j)&16:i!==j&&i.contains(j)},hasScroll:function(i,j){if(c(i).css("overflow")==="hidden")return false;var n=j&&j==="left"?"scrollLeft":"scrollTop",q=false;if(i[n]>0)return true;i[n]=1;q=i[n]>0;i[n]=0;return q},isOverAxis:function(i,j,n){return i>j&&i<j+n},isOver:function(i,j,n,q,C,G){return c.ui.isOverAxis(i,n,C)&&c.ui.isOverAxis(j,q,G)}})}})(jQuery);
(function(c,d){if(c.cleanData){var g=c.cleanData;c.cleanData=function(j){for(var n=0,q;(q=j[n])!=null;n++)c(q).triggerHandler("remove");g(j)}}else{var i=c.fn.remove;c.fn.remove=function(j,n){return this.each(function(){if(!n)if(!j||c.filter(j,[this]).length)c("*",this).add([this]).each(function(){c(this).triggerHandler("remove")});return i.call(c(this),j,n)})}}c.widget=function(j,n,q){var C=j.split(".")[0],G;j=j.split(".")[1];G=C+"-"+j;if(!q){q=n;n=c.Widget}c.expr[":"][G]=function(H){return!!c.data(H,
j)};c[C]=c[C]||{};c[C][j]=function(H,F){arguments.length&&this._createWidget(H,F)};n=new n;n.options=c.extend(true,{},n.options);c[C][j].prototype=c.extend(true,n,{namespace:C,widgetName:j,widgetEventPrefix:c[C][j].prototype.widgetEventPrefix||j,widgetBaseClass:G},q);c.widget.bridge(j,c[C][j])};c.widget.bridge=function(j,n){c.fn[j]=function(q){var C=typeof q==="string",G=Array.prototype.slice.call(arguments,1),H=this;q=!C&&G.length?c.extend.apply(null,[true,q].concat(G)):q;if(C&&q.charAt(0)==="_")return H;
C?this.each(function(){var F=c.data(this,j),y=F&&c.isFunction(F[q])?F[q].apply(F,G):F;if(y!==F&&y!==d){H=y;return false}}):this.each(function(){var F=c.data(this,j);F?F.option(q||{})._init():c.data(this,j,new n(q,this))});return H}};c.Widget=function(j,n){arguments.length&&this._createWidget(j,n)};c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(j,n){c.data(n,this.widgetName,this);this.element=c(n);this.options=c.extend(true,{},this.options,
this._getCreateOptions(),j);var q=this;this.element.bind("remove."+this.widgetName,function(){q.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return c.metadata&&c.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(j,n){var q=j;if(arguments.length===0)return c.extend({},this.options);if(typeof j==="string"){if(n===d)return this.options[j];q={};q[j]=n}this._setOptions(q);return this},_setOptions:function(j){var n=this;c.each(j,function(q,C){n._setOption(q,C)});return this},_setOption:function(j,n){this.options[j]=n;if(j==="disabled")this.widget()[n?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",n);return this},
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(j,n,q){var C=this.options[j];n=c.Event(n);n.type=(j===this.widgetEventPrefix?j:this.widgetEventPrefix+j).toLowerCase();q=q||{};if(n.originalEvent){j=c.event.props.length;for(var G;j;){G=c.event.props[--j];n[G]=n.originalEvent[G]}}this.element.trigger(n,q);return!(c.isFunction(C)&&C.call(this.element[0],n,q)===false||n.isDefaultPrevented())}}})(jQuery);
(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(g){return d._mouseDown(g)}).bind("click."+this.widgetName,function(g){if(true===c.data(g.target,d.widgetName+".preventClickEvent")){c.removeData(g.target,d.widgetName+".preventClickEvent");g.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=
d.originalEvent||{};if(!d.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(d);this._mouseDownEvent=d;var g=this,i=d.which==1,j=typeof this.options.cancel=="string"?c(d.target).parents().add(d.target).filter(this.options.cancel).length:false;if(!i||j||!this._mouseCapture(d))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){g.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=
this._mouseStart(d)!==false;if(!this._mouseStarted){d.preventDefault();return true}}true===c.data(d.target,this.widgetName+".preventClickEvent")&&c.removeData(d.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(n){return g._mouseMove(n)};this._mouseUpDelegate=function(n){return g._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);d.preventDefault();return d.originalEvent.mouseHandled=
true}},_mouseMove:function(d){if(c.browser.msie&&!(document.documentMode>=9)&&!d.button)return this._mouseUp(d);if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,d)!==false)?this._mouseDrag(d):this._mouseUp(d);return!this._mouseStarted},_mouseUp:function(d){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;d.target==this._mouseDownEvent.target&&c.data(d.target,this.widgetName+".preventClickEvent",true);this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(c){c.widget("ui.sortable",c.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var d=this.items.length-1;d>=0;d--)this.items[d].item.removeData("sortable-item");return this},_setOption:function(d,g){if(d==="disabled"){this.options[d]=
g;this.widget()[g?"addClass":"removeClass"]("ui-sortable-disabled")}else c.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(d,g){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(d);var i=null,j=this;c(d.target).parents().each(function(){if(c.data(this,"sortable-item")==j){i=c(this);return false}});if(c.data(d.target,"sortable-item")==j)i=c(d.target);if(!i)return false;if(this.options.handle&&!g){var n=false;
c(this.options.handle,i).find("*").andSelf().each(function(){if(this==d.target)n=true});if(!n)return false}this.currentItem=i;this._removeCurrentsFromItems();return true},_mouseStart:function(d,g,i){g=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(d);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-
this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");c.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();g.containment&&this._setContainment();if(g.cursor){if(c("body").css("cursor"))this._storedCursor=c("body").css("cursor");c("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=
document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",d,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!i)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",d,this._uiHash(this));if(c.ui.ddmanager)c.ui.ddmanager.current=this;c.ui.ddmanager&&!g.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,d);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(d);
return true},_mouseDrag:function(d){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var g=this.options,i=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-d.pageY<g.scrollSensitivity)this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+g.scrollSpeed;else if(d.pageY-this.overflowOffset.top<
g.scrollSensitivity)this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-g.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-d.pageX<g.scrollSensitivity)this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+g.scrollSpeed;else if(d.pageX-this.overflowOffset.left<g.scrollSensitivity)this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-g.scrollSpeed}else{if(d.pageY-c(document).scrollTop()<g.scrollSensitivity)i=c(document).scrollTop(c(document).scrollTop()-
g.scrollSpeed);else if(c(window).height()-(d.pageY-c(document).scrollTop())<g.scrollSensitivity)i=c(document).scrollTop(c(document).scrollTop()+g.scrollSpeed);if(d.pageX-c(document).scrollLeft()<g.scrollSensitivity)i=c(document).scrollLeft(c(document).scrollLeft()-g.scrollSpeed);else if(c(window).width()-(d.pageX-c(document).scrollLeft())<g.scrollSensitivity)i=c(document).scrollLeft(c(document).scrollLeft()+g.scrollSpeed)}i!==false&&c.ui.ddmanager&&!g.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,
d)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(g=this.items.length-1;g>=0;g--){i=this.items[g];var j=i.item[0],n=this._intersectsWithPointer(i);if(n)if(j!=this.currentItem[0]&&this.placeholder[n==1?"next":"prev"]()[0]!=j&&!c.ui.contains(this.placeholder[0],j)&&(this.options.type=="semi-dynamic"?!c.ui.contains(this.element[0],
j):true)){this.direction=n==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(i))this._rearrange(d,i);else break;this._trigger("change",d,this._uiHash());break}}this._contactContainers(d);c.ui.ddmanager&&c.ui.ddmanager.drag(this,d);this._trigger("sort",d,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,g){if(d){c.ui.ddmanager&&!this.options.dropBehaviour&&c.ui.ddmanager.drop(this,d);if(this.options.revert){var i=this,j=i.placeholder.offset();
i.reverting=true;c(this.helper).animate({left:j.left-this.offset.parent.left-i.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:j.top-this.offset.parent.top-i.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){i._clear(d)})}else this._clear(d,g);return false}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):
this.currentItem.show();for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("deactivate",null,this._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger("out",null,this._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();c.extend(this,
{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?c(this.domPosition.prev).after(this.currentItem):c(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(d){var g=this._getItemsAsjQuery(d&&d.connected),i=[];d=d||{};c(g).each(function(){var j=(c(d.item||this).attr(d.attribute||"id")||"").match(d.expression||/(.+)[-=_](.+)/);if(j)i.push((d.key||j[1]+"[]")+"="+(d.key&&d.expression?j[1]:j[2]))});!i.length&&d.key&&i.push(d.key+"=");return i.join("&")},
toArray:function(d){var g=this._getItemsAsjQuery(d&&d.connected),i=[];d=d||{};g.each(function(){i.push(c(d.item||this).attr(d.attribute||"id")||"")});return i},_intersectsWith:function(d){var g=this.positionAbs.left,i=g+this.helperProportions.width,j=this.positionAbs.top,n=j+this.helperProportions.height,q=d.left,C=q+d.width,G=d.top,H=G+d.height,F=this.offset.click.top,y=this.offset.click.left;F=j+F>G&&j+F<H&&g+y>q&&g+y<C;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||
this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>d[this.floating?"width":"height"]?F:q<g+this.helperProportions.width/2&&i-this.helperProportions.width/2<C&&G<j+this.helperProportions.height/2&&n-this.helperProportions.height/2<H},_intersectsWithPointer:function(d){var g=c.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height);d=c.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width);g=g&&d;d=this._getDragVerticalDirection();
var i=this._getDragHorizontalDirection();if(!g)return false;return this.floating?i&&i=="right"||d=="down"?2:1:d&&(d=="down"?2:1)},_intersectsWithSides:function(d){var g=c.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top+d.height/2,d.height);d=c.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left+d.width/2,d.width);var i=this._getDragVerticalDirection(),j=this._getDragHorizontalDirection();return this.floating&&j?j=="right"&&d||j=="left"&&!d:i&&(i=="down"&&g||i=="up"&&!g)},
_getDragVerticalDirection:function(){var d=this.positionAbs.top-this.lastPositionAbs.top;return d!=0&&(d>0?"down":"up")},_getDragHorizontalDirection:function(){var d=this.positionAbs.left-this.lastPositionAbs.left;return d!=0&&(d>0?"right":"left")},refresh:function(d){this._refreshItems(d);this.refreshPositions();return this},_connectWith:function(){var d=this.options;return d.connectWith.constructor==String?[d.connectWith]:d.connectWith},_getItemsAsjQuery:function(d){var g=[],i=[],j=this._connectWith();
if(j&&d)for(d=j.length-1;d>=0;d--)for(var n=c(j[d]),q=n.length-1;q>=0;q--){var C=c.data(n[q],"sortable");if(C&&C!=this&&!C.options.disabled)i.push([c.isFunction(C.options.items)?C.options.items.call(C.element):c(C.options.items,C.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),C])}i.push([c.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):c(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
this]);for(d=i.length-1;d>=0;d--)i[d][0].each(function(){g.push(this)});return c(g)},_removeCurrentsFromItems:function(){for(var d=this.currentItem.find(":data(sortable-item)"),g=0;g<this.items.length;g++)for(var i=0;i<d.length;i++)d[i]==this.items[g].item[0]&&this.items.splice(g,1)},_refreshItems:function(d){this.items=[];this.containers=[this];var g=this.items,i=[[c.isFunction(this.options.items)?this.options.items.call(this.element[0],d,{item:this.currentItem}):c(this.options.items,this.element),
this]],j=this._connectWith();if(j)for(var n=j.length-1;n>=0;n--)for(var q=c(j[n]),C=q.length-1;C>=0;C--){var G=c.data(q[C],"sortable");if(G&&G!=this&&!G.options.disabled){i.push([c.isFunction(G.options.items)?G.options.items.call(G.element[0],d,{item:this.currentItem}):c(G.options.items,G.element),G]);this.containers.push(G)}}for(n=i.length-1;n>=0;n--){d=i[n][1];j=i[n][0];C=0;for(q=j.length;C<q;C++){G=c(j[C]);G.data("sortable-item",d);g.push({item:G,instance:d,width:0,height:0,left:0,top:0})}}},refreshPositions:function(d){if(this.offsetParent&&
this.helper)this.offset.parent=this._getParentOffset();for(var g=this.items.length-1;g>=0;g--){var i=this.items[g],j=this.options.toleranceElement?c(this.options.toleranceElement,i.item):i.item;if(!d){i.width=j.outerWidth();i.height=j.outerHeight()}j=j.offset();i.left=j.left;i.top=j.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(g=this.containers.length-1;g>=0;g--){j=this.containers[g].element.offset();this.containers[g].containerCache.left=
j.left;this.containers[g].containerCache.top=j.top;this.containers[g].containerCache.width=this.containers[g].element.outerWidth();this.containers[g].containerCache.height=this.containers[g].element.outerHeight()}return this},_createPlaceholder:function(d){var g=d||this,i=g.options;if(!i.placeholder||i.placeholder.constructor==String){var j=i.placeholder;i.placeholder={element:function(){var n=c(document.createElement(g.currentItem[0].nodeName)).addClass(j||g.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
if(!j)n.style.visibility="hidden";return n},update:function(n,q){if(!(j&&!i.forcePlaceholderSize)){q.height()||q.height(g.currentItem.innerHeight()-parseInt(g.currentItem.css("paddingTop")||0,10)-parseInt(g.currentItem.css("paddingBottom")||0,10));q.width()||q.width(g.currentItem.innerWidth()-parseInt(g.currentItem.css("paddingLeft")||0,10)-parseInt(g.currentItem.css("paddingRight")||0,10))}}}}g.placeholder=c(i.placeholder.element.call(g.element,g.currentItem));g.currentItem.after(g.placeholder);
i.placeholder.update(g,g.placeholder)},_contactContainers:function(d){for(var g=null,i=null,j=this.containers.length-1;j>=0;j--)if(!c.ui.contains(this.currentItem[0],this.containers[j].element[0]))if(this._intersectsWith(this.containers[j].containerCache)){if(!(g&&c.ui.contains(this.containers[j].element[0],g.element[0]))){g=this.containers[j];i=j}}else if(this.containers[j].containerCache.over){this.containers[j]._trigger("out",d,this._uiHash(this));this.containers[j].containerCache.over=0}if(g)if(this.containers.length===
1){this.containers[i]._trigger("over",d,this._uiHash(this));this.containers[i].containerCache.over=1}else if(this.currentContainer!=this.containers[i]){g=1E4;j=null;for(var n=this.positionAbs[this.containers[i].floating?"left":"top"],q=this.items.length-1;q>=0;q--)if(c.ui.contains(this.containers[i].element[0],this.items[q].item[0])){var C=this.items[q][this.containers[i].floating?"left":"top"];if(Math.abs(C-n)<g){g=Math.abs(C-n);j=this.items[q]}}if(j||this.options.dropOnEmpty){this.currentContainer=
this.containers[i];j?this._rearrange(d,j,null,true):this._rearrange(d,null,this.containers[i].element,true);this._trigger("change",d,this._uiHash());this.containers[i]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[i]._trigger("over",d,this._uiHash(this));this.containers[i].containerCache.over=1}}},_createHelper:function(d){var g=this.options;d=c.isFunction(g.helper)?c(g.helper.apply(this.element[0],[d,this.currentItem])):
g.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||c(g.appendTo!="parent"?g.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(d[0].style.width==""||g.forceHelperSize)d.width(this.currentItem.width());if(d[0].style.height==
""||g.forceHelperSize)d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(d){if(typeof d=="string")d=d.split(" ");if(c.isArray(d))d={left:+d[0],top:+d[1]||0};if("left"in d)this.offset.click.left=d.left+this.margins.left;if("right"in d)this.offset.click.left=this.helperProportions.width-d.right+this.margins.left;if("top"in d)this.offset.click.top=d.top+this.margins.top;if("bottom"in d)this.offset.click.top=this.helperProportions.height-d.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
this.helper.offsetParent();var d=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0])){d.left+=this.scrollParent.scrollLeft();d.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&c.browser.msie)d={top:0,left:0};return{top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var d=this.currentItem.position();return{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions=
{width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent")d.containment=this.helper[0].parentNode;if(d.containment=="document"||d.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,c(d.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c(d.containment=="document"?document:window).height()||
document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(d.containment)){var g=c(d.containment)[0];d=c(d.containment).offset();var i=c(g).css("overflow")!="hidden";this.containment=[d.left+(parseInt(c(g).css("borderLeftWidth"),10)||0)+(parseInt(c(g).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(c(g).css("borderTopWidth"),10)||0)+(parseInt(c(g).css("paddingTop"),10)||0)-this.margins.top,d.left+(i?Math.max(g.scrollWidth,
g.offsetWidth):g.offsetWidth)-(parseInt(c(g).css("borderLeftWidth"),10)||0)-(parseInt(c(g).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(i?Math.max(g.scrollHeight,g.offsetHeight):g.offsetHeight)-(parseInt(c(g).css("borderTopWidth"),10)||0)-(parseInt(c(g).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,g){if(!g)g=this.position;var i=d=="absolute"?1:-1,j=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=
document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,n=/(html|body)/i.test(j[0].tagName);return{top:g.top+this.offset.relative.top*i+this.offset.parent.top*i-(c.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():n?0:j.scrollTop())*i),left:g.left+this.offset.relative.left*i+this.offset.parent.left*i-(c.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
n?0:j.scrollLeft())*i)}},_generatePosition:function(d){var g=this.options,i=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=/(html|body)/i.test(i[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var n=d.pageX,q=d.pageY;if(this.originalPosition){if(this.containment){if(d.pageX-
this.offset.click.left<this.containment[0])n=this.containment[0]+this.offset.click.left;if(d.pageY-this.offset.click.top<this.containment[1])q=this.containment[1]+this.offset.click.top;if(d.pageX-this.offset.click.left>this.containment[2])n=this.containment[2]+this.offset.click.left;if(d.pageY-this.offset.click.top>this.containment[3])q=this.containment[3]+this.offset.click.top}if(g.grid){q=this.originalPageY+Math.round((q-this.originalPageY)/g.grid[1])*g.grid[1];q=this.containment?!(q-this.offset.click.top<
this.containment[1]||q-this.offset.click.top>this.containment[3])?q:!(q-this.offset.click.top<this.containment[1])?q-g.grid[1]:q+g.grid[1]:q;n=this.originalPageX+Math.round((n-this.originalPageX)/g.grid[0])*g.grid[0];n=this.containment?!(n-this.offset.click.left<this.containment[0]||n-this.offset.click.left>this.containment[2])?n:!(n-this.offset.click.left<this.containment[0])?n-g.grid[0]:n+g.grid[0]:n}}return{top:q-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(c.browser.safari&&
this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():j?0:i.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(c.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:i.scrollLeft())}},_rearrange:function(d,g,i,j){i?i[0].appendChild(this.placeholder[0]):g.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?g.item[0]:g.item[0].nextSibling);this.counter=
this.counter?++this.counter:1;var n=this,q=this.counter;window.setTimeout(function(){q==n.counter&&n.refreshPositions(!j)},0)},_clear:function(d,g){this.reverting=false;var i=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var j in this._storedCSS)if(this._storedCSS[j]=="auto"||this._storedCSS[j]=="static")this._storedCSS[j]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();
this.fromOutside&&!g&&i.push(function(n){this._trigger("receive",n,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!g)i.push(function(n){this._trigger("update",n,this._uiHash())});if(!c.ui.contains(this.element[0],this.currentItem[0])){g||i.push(function(n){this._trigger("remove",n,this._uiHash())});for(j=this.containers.length-1;j>=0;j--)if(c.ui.contains(this.containers[j].element[0],
this.currentItem[0])&&!g){i.push(function(n){return function(q){n._trigger("receive",q,this._uiHash(this))}}.call(this,this.containers[j]));i.push(function(n){return function(q){n._trigger("update",q,this._uiHash(this))}}.call(this,this.containers[j]))}}for(j=this.containers.length-1;j>=0;j--){g||i.push(function(n){return function(q){n._trigger("deactivate",q,this._uiHash(this))}}.call(this,this.containers[j]));if(this.containers[j].containerCache.over){i.push(function(n){return function(q){n._trigger("out",
q,this._uiHash(this))}}.call(this,this.containers[j]));this.containers[j].containerCache.over=0}}this._storedCursor&&c("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!g){this._trigger("beforeStop",d,this._uiHash());for(j=0;j<i.length;j++)i[j].call(this,d);this._trigger("stop",d,this._uiHash())}return false}g||
this._trigger("beforeStop",d,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!g){for(j=0;j<i.length;j++)i[j].call(this,d);this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){c.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(d){var g=d||this;return{helper:g.helper,placeholder:g.placeholder||c([]),position:g.position,
originalPosition:g.originalPosition,offset:g.positionAbs,item:g.currentItem,sender:d?d.element:null}}});c.extend(c.ui.sortable,{version:"1.8.11"})})(jQuery);
(function(c){c.fn.extend({autocomplete:function(d,g){var i=typeof d=="string";g=c.extend({},c.Autocompleter.defaults,{url:i?d:null,data:i?null:d,delay:i?c.Autocompleter.defaults.delay:10,max:g&&!g.scroll?10:150},g);g.highlight=g.highlight||function(j){return j};g.formatMatch=g.formatMatch||g.formatItem;return this.each(function(){new c.Autocompleter(this,g)})},result:function(d){return this.bind("result",d)},search:function(d){return this.trigger("search",[d])},flushCache:function(){return this.trigger("flushCache")},
setOptions:function(d){return this.trigger("setOptions",[d])},unautocomplete:function(){return this.trigger("unautocomplete")}});c.Autocompleter=function(d,g){function i(){var O=aa.selected();if(!O)return false;var T=O.result;Z=T;if(g.multiple){var D=n(y.val());if(D.length>1){var e=g.multipleSeparator.length,ga=c(d).selection().start,ka,ya=0;c.each(D,function(Da,za){ya+=za.length;if(ga<=ya){ka=Da;return false}ya+=e});D[ka]=T;T=D.join(g.multipleSeparator)}T+=g.multipleSeparator}y.val(T);C();y.trigger("result",
[O.data,O.value]);return true}function j(O,T){if(I==F.DEL)aa.hide();else{var D=y.val();if(!(!T&&D==Z)){Z=D;D=q(D);var e=false;if(g.firstWordOnly){var ga=c(d).selection().start,ka=c(d).val().indexOf(" ");if(ka>-1&&ga>ka)e=true}if(D.length>=g.minChars&&!e){y.addClass(g.loadingClass);g.matchCase||(D=D.toLowerCase());H(D,G,C)}else{y.removeClass(g.loadingClass);aa.hide()}}}}function n(O){if(!O)return[""];if(!g.multiple)return[c.trim(O)];return c.map(O.split(g.multipleSeparator),function(T){return c.trim(O).length?
c.trim(T):null})}function q(O){if(!g.multiple)return O;var T=n(O);if(T.length==1)return T[0];T=c(d).selection().start;T=T==O.length?n(O):n(O.replace(O.substring(T),""));return T[T.length-1]}function C(){aa.visible();aa.hide();clearTimeout(P);y.removeClass(g.loadingClass);g.mustMatch&&y.search(function(O){if(!O)if(g.multiple){O=n(y.val()).slice(0,-1);y.val(O.join(g.multipleSeparator)+(O.length?g.multipleSeparator:""))}else{y.val("");y.trigger("result",null)}})}function G(O,T){if(T&&T.length&&S){y.removeClass(g.loadingClass);
aa.display(T,O);var D=T[0].value;if(g.autoFill&&q(y.val()).toLowerCase()==O.toLowerCase()&&I!=F.BACKSPACE){y.val(y.val()+D.substring(q(Z).length));c(d).selection(Z.length,Z.length+D.length)}aa.show()}else C()}function H(O,T,D){g.matchCase||(O=O.toLowerCase());var e=SearchDial.getAutocompleteEntries(O);if(e&&e.length){D=[];for(var ga=0;ga<e.length;ga++)e[ga].toLowerCase().indexOf(O.toLowerCase())===0&&D.push({value:e[ga],data:[e[ga]],result:e[ga]});T(O,D)}else D(O)}var F={UP:38,DOWN:40,DEL:46,TAB:9,
RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8,SPACE:32},y=c(d).attr("autocomplete","off").addClass(g.inputClass),K=c(g.container),P,Z="",Y=c.Autocompleter.Cache(g),S=0,I,ba={mouseDownOnSelect:false},aa=c.Autocompleter.Select(g,d,i,ba,K),ea;c.browser.opera&&c(d.form).bind("submit.autocomplete",function(){if(ea)return ea=false});y.bind((c.browser.opera?"keypress":"keydown")+".autocomplete",function(O){S=1;I=O.keyCode;switch(O.keyCode){case F.UP:O.preventDefault();aa.visible()?aa.prev():
j(0,true);break;case F.DOWN:O.preventDefault();aa.visible()?aa.next():j(0,true);break;case F.PAGEUP:O.preventDefault();aa.visible()?aa.pageUp():j(0,true);break;case F.PAGEDOWN:O.preventDefault();aa.visible()?aa.pageDown():j(0,true);break;case g.multiple&&g.multipleSeparator==" "&&F.SPACE:case g.multiple&&c.trim(g.multipleSeparator)==","&&F.COMMA:case F.TAB:case F.RETURN:if(i())if(O.keyCode!=F.RETURN){O.preventDefault();return false}break;case F.ESC:aa.hide();break;default:clearTimeout(P);P=setTimeout(j,
g.delay)}}).focus(function(){S++}).blur(function(){S=0;if(!ba.mouseDownOnSelect){clearTimeout(P);P=setTimeout(C,200)}}).click(function(){S++>1&&!aa.visible()&&j(0,true)}).bind("search",function(){function O(D,e){var ga;if(e&&e.length)for(var ka=0;ka<e.length;ka++)if(e[ka].result.toLowerCase()==D.toLowerCase()){ga=e[ka];break}typeof T=="function"?T(ga):y.trigger("result",ga&&[ga.data,ga.value])}var T=arguments.length>1?arguments[1]:null;c.each(n(y.val()),function(D,e){H(e,O,O)})}).bind("flushCache",
function(){Y.flush()}).bind("setOptions",function(O,T){c.extend(g,T);"data"in T&&Y.populate()}).bind("unautocomplete",function(){aa.unbind();y.unbind();c(d.form).unbind(".autocomplete")})};c.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:0,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(d){return d[0]},formatMatch:null,autoFill:false,width:0,
widthModifier:2,multiple:true,multipleSeparator:" ",highlight:function(d,g){return d.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+g.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","i"),"<strong>$1</strong>")},scroll:true,container:"#sfi",firstWordOnly:true,scrollHeight:180};c.Autocompleter.Cache=function(d){function g(G,H){d.matchCase||(G=G.toLowerCase());var F=G.indexOf(H);if(d.matchContains=="word")F=G.toLowerCase().search("\\b"+H.toLowerCase());if(F==-1)return false;
return F==0||d.matchContains}function i(G,H){C>d.cacheLength&&n();q[G]||C++;q[G]=H}function j(){if(!d.data)return false;var G={},H=0;if(!d.url)d.cacheLength=1;G[""]=[];for(var F=0,y=d.data.length;F<y;F++){var K=d.data[F];K=typeof K=="string"?[K]:K;var P=d.formatMatch(K,F+1,d.data.length);if(P!==false){var Z=P.charAt(0).toLowerCase();G[Z]||(G[Z]=[]);K={value:P,data:K,result:d.formatResult&&d.formatResult(K)||P};G[Z].push(K);H++<d.max&&G[""].push(K)}}c.each(G,function(Y,S){d.cacheLength++;i(Y,S)})}
function n(){q={};C=0}var q={},C=0;setTimeout(j,25);return{flush:n,add:i,populate:j,load:function(G){if(!d.cacheLength||!C)return null;if(!d.url&&d.matchContains){var H=[],F;for(F in q)if(F.length>0){var y=q[F];c.each(y,function(K,P){g(P.value,G)&&H.push(P)})}return H}else if(q[G])return q[G];else if(d.matchSubset)for(F=G.length-1;F>=d.minChars;F--)if(y=q[G.substr(0,F)]){H=[];c.each(y,function(K,P){if(g(P.value,G))H[H.length]=P});return H}return null}}};c.Autocompleter.Select=function(d,g,i,j,n){function q(){if(Z){Y=
c("<div/>").hide().addClass(d.resultsClass).css("position","absolute").appendTo(document.body);S=c("<ul/>").appendTo(Y).mouseover(function(I){if(C(I).nodeName&&C(I).nodeName.toUpperCase()=="LI"){y=c("li",S).removeClass(H.ACTIVE).index(C(I));c(C(I)).addClass(H.ACTIVE)}}).click(function(I){c(C(I)).addClass(H.ACTIVE);i();g.focus()}).mousedown(function(){j.mouseDownOnSelect=true}).mouseup(function(){j.mouseDownOnSelect=false});d.width>0&&Y.css("width",d.width);Z=false}}function C(I){for(I=I.target;I&&
I.tagName!="LI";)I=I.parentNode;if(!I)return[];return I}function G(I){F.slice(y,y+1).removeClass(H.ACTIVE);y+=I;if(y<0)y=F.size()-1;else if(y>=F.size())y=0;I=F.slice(y,y+1).addClass(H.ACTIVE);if(d.scroll){var ba=0;F.slice(0,y).each(function(){ba+=this.offsetHeight});if(ba+I[0].offsetHeight-S.scrollTop()>S[0].clientHeight)S.scrollTop(ba+I[0].offsetHeight-S.innerHeight());else ba<S.scrollTop()&&S.scrollTop(ba)}}var H={ACTIVE:"ac_over"},F,y=-1,K,P="",Z=true,Y,S;return{display:function(I,ba){q();K=I;
P=ba;S.empty();for(var aa=d.max&&d.max<K.length?d.max:K.length,ea=0;ea<aa;ea++)if(K[ea]){var O=d.formatItem(K[ea].data,ea+1,aa,K[ea].value,P);if(O!==false){var T="",D=SearchDial.getEntryByKeyword(O);if(D!=null){T='<div class="title"><span>'+d.highlight(O,P)+" &rarr;</span>";T+=D.length>5&&D[5]!=""?'<img src="'+D[5]+'" width="16" height="16" />':'<img src="'+SearchDial.getFaviconForUrl(D[0])+'" width="16" height="16" />';T+=D[1]+'</div><div class="content">'+D[0]+'</div><a href="'+D[0]+'" class="gobutton" title="Open website">Go</a><a href="#edit" onclick="showEditShortcut(SearchDial.getEntryByKeyword(\''+
O+'\'));return false;" class="editbutton" title="Edit shortcut">Edit</a>'}else T=d.highlight(O,P);O=c("<li/>").html(T).addClass(ea%2==0?"ac_even":"ac_odd").appendTo(S)[0];c.data(O,"ac_data",K[ea])}}F=S.find("li");if(d.selectFirst){F.slice(0,1).addClass(H.ACTIVE);y=0}c.fn.bgiframe&&S.bgiframe()},next:function(){G(1)},prev:function(){G(-1)},pageUp:function(){y!=0&&y-8<0?G(-y):G(-8)},pageDown:function(){y!=F.size()-1&&y+8>F.size()?G(F.size()-1-y):G(8)},hide:function(){Y&&Y.hide();F&&F.removeClass(H.ACTIVE);
y=-1},visible:function(){return Y&&Y.is(":visible")},current:function(){return this.visible()&&(F.filter("."+H.ACTIVE)[0]||d.selectFirst&&F[0])},show:function(){var I=n.offset();Y.css({width:typeof d.width=="string"||d.width>0?d.width:n.width()+d.widthModifier,top:I.top+n.get(0).offsetHeight,left:I.left}).show();if(d.scroll){S.scrollTop(0);S.css({maxHeight:d.scrollHeight,overflow:"auto"});if(c.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var ba=0;F.each(function(){ba+=this.offsetHeight});
I=ba>d.scrollHeight;S.css("height",I?d.scrollHeight:ba);I||F.width(S.width()-parseInt(F.css("padding-left"))-parseInt(F.css("padding-right")))}}},selected:function(){var I=F&&F.filter("."+H.ACTIVE).removeClass(H.ACTIVE);return I&&I.length&&c.data(I[0],"ac_data")},emptyList:function(){S&&S.empty()},unbind:function(){Y&&Y.remove()}}};c.fn.selection=function(d,g){if(d!==undefined)return this.each(function(){if(this.createTextRange){var C=this.createTextRange();if(g===undefined||d==g)C.move("character",
d);else{C.collapse(true);C.moveStart("character",d);C.moveEnd("character",g)}C.select()}else if(this.setSelectionRange)this.setSelectionRange(d,g);else if(this.selectionStart){this.selectionStart=d;this.selectionEnd=g}});var i=this[0];if(i.createTextRange){var j=document.selection.createRange(),n=i.value,q=j.text.length;j.text="<->";j=i.value.indexOf("<->");i.value=n;this.selection(j,j+q);return{start:j,end:j+q}}else if(i.selectionStart!==undefined)return{start:i.selectionStart,end:i.selectionEnd}}})(jQuery);
(function(c,d,g){function i(F){F=F||location.href;return"#"+F.replace(/^[^#]*#?(.*)$/,"$1")}var j="hashchange",n=document,q,C=c.event.special,G=n.documentMode,H="on"+j in d&&(G===g||G>7);c.fn[j]=function(F){return F?this.bind(j,F):this.trigger(j)};c.fn[j].delay=50;C[j]=c.extend(C[j],{setup:function(){if(H)return false;c(q.start)},teardown:function(){if(H)return false;c(q.stop)}});q=function(){function F(){var I=i(),ba=S(P);if(I!==P){Y(P=I,ba);c(d).trigger(j)}else if(ba!==P)location.href=location.href.replace(/#.*/,
"")+ba;K=setTimeout(F,c.fn[j].delay)}var y={},K,P=i(),Z=function(I){return I},Y=Z,S=Z;y.start=function(){K||F()};y.stop=function(){K&&clearTimeout(K);K=g};c.browser.msie&&!H&&function(){var I,ba;y.start=function(){if(!I){ba=(ba=c.fn[j].src)&&ba+i();I=c('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){ba||Y(i());F()}).attr("src",ba||"javascript:0").insertAfter("body")[0].contentWindow;n.onpropertychange=function(){try{if(event.propertyName==="title")I.document.title=n.title}catch(aa){}}}};
y.stop=Z;S=function(){return i(I.location.href)};Y=function(aa,ea){var O=I.document,T=c.fn[j].domain;if(aa!==ea){O.title=n.title;O.open();T&&O.write('<script>document.domain="'+T+'"<\/script>');O.close();I.location.hash=aa}}}();return y}()})(jQuery,this);var JSON;JSON||(JSON={});
(function(){function c(H){return H<10?"0"+H:H}function d(H){j.lastIndex=0;return j.test(H)?'"'+H.replace(j,function(F){var y=C[F];return typeof y==="string"?y:"\\u"+("0000"+F.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+H+'"'}function g(H,F){var y,K,P,Z,Y=n,S,I=F[H];if(I&&typeof I==="object"&&typeof I.toJSON==="function")I=I.toJSON(H);if(typeof G==="function")I=G.call(F,H,I);switch(typeof I){case "string":return d(I);case "number":return isFinite(I)?String(I):"null";case "boolean":case "null":return String(I);
case "object":if(!I)return"null";n+=q;S=[];if(Object.prototype.toString.apply(I)==="[object Array]"){Z=I.length;for(y=0;y<Z;y+=1)S[y]=g(y,I)||"null";P=S.length===0?"[]":n?"[\n"+n+S.join(",\n"+n)+"\n"+Y+"]":"["+S.join(",")+"]";n=Y;return P}if(G&&typeof G==="object"){Z=G.length;for(y=0;y<Z;y+=1){K=G[y];if(typeof K==="string")if(P=g(K,I))S.push(d(K)+(n?": ":":")+P)}}else for(K in I)if(Object.hasOwnProperty.call(I,K))if(P=g(K,I))S.push(d(K)+(n?": ":":")+P);P=S.length===0?"{}":n?"{\n"+n+S.join(",\n"+n)+
"\n"+Y+"}":"{"+S.join(",")+"}";n=Y;return P}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+c(this.getUTCMonth()+1)+"-"+c(this.getUTCDate())+"T"+c(this.getUTCHours())+":"+c(this.getUTCMinutes())+":"+c(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var i=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,q,C={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},G;if(typeof JSON.stringify!=="function")JSON.stringify=function(H,F,y){var K;q=n="";if(typeof y==="number")for(K=0;K<y;K+=1)q+=" ";else if(typeof y==="string")q=y;if((G=F)&&typeof F!=="function"&&(typeof F!=="object"||typeof F.length!=="number"))throw Error("JSON.stringify");return g("",
{"":H})};if(typeof JSON.parse!=="function")JSON.parse=function(H,F){function y(P,Z){var Y,S,I=P[Z];if(I&&typeof I==="object")for(Y in I)if(Object.hasOwnProperty.call(I,Y)){S=y(I,Y);if(S!==undefined)I[Y]=S;else delete I[Y]}return F.call(P,Z,I)}var K;H=String(H);i.lastIndex=0;if(i.test(H))H=H.replace(i,function(P){return"\\u"+("0000"+P.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(H.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){K=eval("("+H+")");return typeof F==="function"?y({"":K},""):K}throw new SyntaxError("JSON.parse");}})();
var originalTitle=null,currentButtons=null,googleLoadTimeout=null,className=document.all&&typeof window.JSON=="undefined"?"className":"class",SearchDial={AUTOCOMPLETE_MAX_ENTRIES:10,TOTAL_COLORS:25,keywordCache:{},autocompleteCache:{},willUpdateACCookie:false,SEARCH_BUTTON:1,EXT_BUTTON:2,EXT2_BUTTON:3,EXT3_BUTTON:4,isChrome:/chrome/.test(navigator.userAgent.toLowerCase()),getEntryByKeyword:function(c){if(c!=null)c=c.toLowerCase();if(typeof SearchDial.keywordCache[c]=="undefined"){var d=localStorage.getItem(userPrefix+
"key-"+c);if(d!=null)SearchDial.keywordCache[c]=JSON.parse(d)}if(typeof SearchDial.keywordCache[c]=="string"){if(typeof SearchDial.keywordCache[SearchDial.keywordCache[c]]=="undefined"){d=JSON.parse(localStorage.getItem(userPrefix+"key-"+SearchDial.keywordCache[c].toLowerCase()));SearchDial.keywordCache[SearchDial.keywordCache[c]]=d}return SearchDial.keywordCache[SearchDial.keywordCache[c]]}return SearchDial.keywordCache[c]},getEntryByUrl:function(c){c=localStorage.getItem(userPrefix+"url-"+c);if(c==
null)return null;return SearchDial.getEntryByKeyword(c)},getKeywordsByUrl:function(c){c=localStorage.getItem(userPrefix+"url-"+c);if(c==null)return null;c=SearchDial.getEntryByKeyword(c);if(c!=null)c=c[2].replace(",",", ");return c},removeEntryByUrl:function(c){var d=localStorage.getItem(userPrefix+"url-"+c);if(d!=null){d=SearchDial.getEntryByKeyword(d);localStorage.removeItem(userPrefix+"url-"+c);c=d[2].split(",");CH.get("defaultProvider")==c[0]&&CH.set("defaultProvider","");for(d=0;d<c.length;d++){var g=
c[d].toLowerCase();localStorage.removeItem(userPrefix+"key-"+g);delete SearchDial.keywordCache[g];SearchDial.removeFromAC(g);HitHandler.kill(g)}SearchDial.removeButton(c[0]);SearchDial.removeSearchButton(c[0])}},removeButton:function(c){var d=document.getElementById("button-"+c);d&&d.parentNode.removeChild(d);localStorage.removeItem(userPrefix+"cache");d=localStorage.getItem(userPrefix+"buttons").split(",");for(var g=-1,i=0;i<d.length&&g<0;i++)if(d[i]==c)g=i;if(g>-1){for(c=CH.get("columns");g+c<d.length;){d[g]=
d[g+c];g+=c}if(g==d.length-1)d.length-=1;else d[g]="";localStorage.setItem(userPrefix+"buttons",d.join(","))}},removeSearchButton:function(c){var d=document.getElementById("sbutton-"+c);d&&d.parentNode.removeChild(d);(d=document.getElementById("ebutton-"+c))&&d.parentNode.removeChild(d);d=localStorage.getItem(userPrefix+"sbuttons").split(",");for(var g=-1,i=0;i<d.length&&g<0;i++)if(d[i]==c)g=i;if(g>-1){d.splice(g,1);localStorage.setItem(userPrefix+"sbuttons",d.join(","))}},addEntry:function(c,d,g,
i,j){if(typeof d=="undefined")d=true;if(typeof g=="undefined")g=-1;if(typeof i=="undefined")i=false;if(typeof j=="undefined")j=-1;SearchDial.removeEntryByUrl(c[0]);c[2]=c[2].replace(" ","");var n=c[2].split(",");localStorage.setItem(userPrefix+"url-"+c[0],n[0]);localStorage.setItem(userPrefix+"key-"+n[0].toLowerCase(),JSON.stringify(c));for(c=1;c<n.length;c++)localStorage.setItem(userPrefix+"key-"+n[c].toLowerCase(),JSON.stringify(n[0]));for(c=0;c<n.length;c++){var q=n[c].toLowerCase();delete SearchDial.keywordCache[q];
SearchDial.addToAC(q);HitHandler.resurrect(q)}if(d){d=localStorage.getItem(userPrefix+"buttons").split(",");if(g<0){g=false;for(c=0;c<d.length&&!g;c++)if(d[c]==""){d[c]=n[0];g=true}g||d.push(n[0])}else{c=CH.get("columns");q=g;do q+=c;while(q<d.length&&d[q]!="");for(;q>=d.length;)d.push("");for(;q>g;){d[q]=d[q-c];q-=c}d[g]=n[0]}localStorage.setItem(userPrefix+"buttons",d.join(","));localStorage.removeItem(userPrefix+"cache");PageHandler.refreshInitialContent()}if(i){i=localStorage.getItem(userPrefix+
"sbuttons").split(",");j<0?i.push(n[0]):i.splice(j,0,n[0]);localStorage.setItem(userPrefix+"sbuttons",i.join(","));if(SearchHandler.isVisible)SearchHandler.createSidebarButtons();else SearchHandler.loadedSidebarButtons=false;if(ExternalHandler.isVisible)ExternalHandler.createButtons();else ExternalHandler.buttonsCreated=false}},saveButtons:function(){for(var c=CH.get("columns"),d=[],g=0;g<c;g++)for(var i=document.getElementById("bc"+g),j=0;j<i.childNodes.length;j++)d[j*c+g]=i.childNodes[j].getAttribute("data-key");
for(g=0;g<d.length;g++)if(typeof d[g]=="undefined")d[g]="";c=d.join(",");localStorage.setItem(userPrefix+"buttons",c);localStorage.removeItem(userPrefix+"cache")},addToAC:function(c,d){var g=c.toLowerCase();d||(d=1);var i=g.substr(0,d),j=localStorage.getItem(userPrefix+"ac-"+i);j=j!=null?JSON.parse(j):[];for(var n=0;n<j.length;n++)if(j[n]==g)return;j.push(c);j.sort();if(j.length>SearchDial.AUTOCOMPLETE_MAX_ENTRIES){g=j[j.length-1];if(g.length>d){g=g.substr(0,d+1);for(n=j.length-1;n>=0&&j[n].indexOf(g)==
0;){SearchDial.addToAC(j[n],d+1);n--}}j.length=SearchDial.AUTOCOMPLETE_MAX_ENTRIES}localStorage.setItem(userPrefix+"ac-"+i,JSON.stringify(j));if(i in SearchDial.autocompleteCache)SearchDial.autocompleteCache[i]=j;SearchDial.updateACCookie()},removeFromAC:function(c,d){var g=c.toLowerCase();d||(d=1);var i=g.substr(0,d),j=localStorage.getItem(userPrefix+"ac-"+i);if(j!=null){j=JSON.parse(j);for(var n=-1,q=0;q<j.length&&n<0;q++)if(j[q]==g)n=q;if(n>-1)if(j.length==SearchDial.AUTOCOMPLETE_MAX_ENTRIES){q=
userPrefix+"ac-"+i;i=[];j=[];for(n=0;n<localStorage.length;n++){var C=localStorage.key(n);if(C.indexOf(q)==0){j[j.length]=C;C=localStorage.getItem(C);C=JSON.parse(C);i=i.concat(C)}}for(q=0;q<j.length;q++){n=j[q].substring((userPrefix+"ac-").length);localStorage.removeItem(j[q]);n in SearchDial.autocompleteCache&&delete SearchDial.autocompleteCache[n]}i.sort();n=null;for(q=0;q<i.length;q++)if(i[q]!=n&&i[q]!=g){SearchDial.addToAC(i[q],d);n=i[q]}}else{j.splice(n,1);C=false;if(d>1){g=g.substr(0,d-1);
g=localStorage.getItem(userPrefix+"ac-"+g);g=JSON.parse(g);var G=true;for(q=0;q<j.length&&G;q++){G=false;for(n=0;n<g.length&&!G;n++)if(g[n]==j[q])G=true}if(G)C=true}if(j.length==0||C){localStorage.removeItem(userPrefix+"ac-"+i);i in SearchDial.autocompleteCache&&delete SearchDial.autocompleteCache[i]}else{localStorage.setItem(userPrefix+"ac-"+i,JSON.stringify(j));if(i in SearchDial.autocompleteCache)SearchDial.autocompleteCache[i]=j}}else d<c.length&&SearchDial.removeFromAC(c,d+1)}SearchDial.updateACCookie()},
getAutocompleteEntries:function(c){if(c!=null)c=c.toLowerCase();for(var d=null,g=0;g<c.length;g++){var i=c.substr(0,g+1);if(!(i in SearchDial.autocompleteCache)){SearchDial.autocompleteCache[i]=localStorage.getItem(userPrefix+"ac-"+i);if(SearchDial.autocompleteCache[i]!=null)SearchDial.autocompleteCache[i]=JSON.parse(SearchDial.autocompleteCache[i])}if(SearchDial.autocompleteCache[i]!=null){d=i;if(SearchDial.autocompleteCache[i].length<SearchDial.AUTOCOMPLETE_MAX_ENTRIES)break}else break}return d!=
null?SearchDial.autocompleteCache[d]:[]},updateACCookie:function(){if(!SearchDial.willUpdateACCookie){SearchDial.willUpdateACCookie=true;window.setTimeout(SearchDial.doUpdateACCookie,0)}},doUpdateACCookie:function(){SearchDial.willUpdateACCookie=false;for(var c=[],d=userPrefix+"url-",g=0;g<localStorage.length;g++){var i=localStorage.key(g);i.indexOf(d)==0&&c.push(localStorage.getItem(i))}d=[];for(g=0;g<c.length;g++){i=SearchDial.getEntryByKeyword(c[g])[2].split(",");for(var j=0;j<i.length;j++)d.push([i[j],
i[j].toLowerCase()])}d.sort(function(n,q){if(n[1]==q[1])return 0;if(n[1]<q[1])return-1;return 1});c=d[0][0];for(g=1;g<d.length;g++)if(c.length+d[g][0].length+1<=4E3)c+=","+d[g][0];else break;jaaulde.utils.cookies.set("ac",c);g=Math.floor((new Date).getTime()/1E3);CH.set("acCookieUpdated",g);if(HitHandler.pendingSave()){HitHandler.updateCookie();HitHandler.saveHits()}},getFaviconForUrl:function(c){return"http://www.google.com/s2/favicons?domain="+c.match(/^https?:\/\/([^:@\/]*)/i)[1]},createButton:function(c,
d){var g=SearchDial.getEntryByKeyword(c);if(g==null)return"";var i=g[2].split(","),j=g[1];if(i.length>1)j=g[2].replace(",",", ")+" \u2192 \n"+j;var n='<a href="'+g[0]+'" id="';n+=d==SearchDial.SEARCH_BUTTON?"sbutton":d==SearchDial.EXT_BUTTON||d==SearchDial.EXT2_BUTTON||d==SearchDial.EXT3_BUTTON?"ebutton":"button";n+="-"+c+'" title="'+j+'" class="b" data-key="'+i[0]+'" data-c="';n+=typeof g[4]!="undefined"&&g[4]>0?g[4]:CH.get("defaultColor");n+='"';n+='><span class="fl"></span>';if(CH.get("buttonKeyword")&&
d!=SearchDial.SEARCH_BUTTON&&d!=SearchDial.EXT2_BUTTON&&d!=SearchDial.EXT3_BUTTON||d==SearchDial.EXT_BUTTON)n+='<span class="kw">'+i[0]+" \u2192 </span>";if(g[5]!="n"){n+='<span class="bi"><img width="16" height="16" src="';n+=typeof g[5]=="undefined"||!g[5]?SearchDial.getFaviconForUrl(g[0]):g[5];n+='" /></span>'}if(d!=SearchDial.EXT3_BUTTON)n+=g[1];n+="</a>";return n},getShortcutTypeAttr:function(c){if(SearchDial.getEntryByUrl(c)==null)return"add";return"edit"}},PageHandler={loadedCss:false,showingPage:false,
currentPage:"",currentPageParam:null,currentPageLoaded:false,ranScript:false,pages:{"":[""],about:["About Search Dial"],gallery:["Shortcut Gallery",true],privacy:["Privacy Policy"],toolbox:["Toolbox",true],options:["Options",true],manage:["Manage Shortcuts",true],"import":["Import Shortcuts",true],"export":["Export Shortcuts",true],contact:["Contact Form"],guide:["Getting Started Guide"],faq:["Frequently Asked Questions"],repair:["Repair",true],changelog:["Change Log"]},scripts:{},loadedScripts:{},
initialPageContent:false,showPage:function(c,d){if(typeof d=="undefined")d=null;if(c==""){PageHandler.initialPageContent||PageHandler.createInitialContent();if(PageHandler.showingPage||SearchHandler.isVisible||ExternalHandler.isVisible){PageHandler.showingPage&&PageHandler.hidePage();SearchHandler.isVisible&&SearchHandler.hideSearch();ExternalHandler.isVisible&&ExternalHandler.hideExternal();CH.get("compactHome")?document.getElementById("hc").setAttribute(className,"search"):document.getElementById("hc").setAttribute(className,
"index");$("#initialcontent").show();$("#q").val("").focus();if(originalTitle!=null)document.title=originalTitle}}else if(c in PageHandler.pages){if(!PageHandler.loadedCss){PageHandler.loadedCss=true;var g=document.getElementsByTagName("head")[0],i=document.createElement("link");i.type="text/css";i.rel="stylesheet";i.href=""+sdVersion+"/pages.css";i.media="screen";g.appendChild(i)}SearchHandler.isVisible&&SearchHandler.hideSearch();ExternalHandler.isVisible&&ExternalHandler.hideExternal();$("#initialcontent").hide();
document.getElementById("hc").setAttribute(className,"search");if(PageHandler.currentPage!=c){PageHandler.currentPageLoaded=false;PageHandler.ranScript=false;if(PageHandler.pages[c][1]&&!(c in PageHandler.loadedScripts)){PageHandler.loadedScripts[c]=true;$.getScript(""+sdVersion+"/"+c+".js",function(){if(PageHandler.currentPage==c&&PageHandler.currentPageLoaded&&!PageHandler.ranScript){PageHandler.ranScript=true;PageHandler.scripts[PageHandler.currentPage].pageLoaded(d)}})}$("#pagecontent").html("").attr(className,
"loading").load(""+sdVersion+"/"+c+".html",function(){if(PageHandler.currentPage==c){PageHandler.currentPageLoaded=true;$("#pagecontent").removeAttr(className);if(PageHandler.currentPage in PageHandler.scripts&&!PageHandler.ranScript){PageHandler.ranScript=true;PageHandler.scripts[PageHandler.currentPage].pageLoaded(d)}}});PageHandler.currentPage=c;if(originalTitle==null)originalTitle=document.title;document.title=PageHandler.pages[c][0]+" - {Search Dial}"}else d!=PageHandler.currentPageParam&&PageHandler.currentPage in
PageHandler.scripts&&PageHandler.scripts[PageHandler.currentPage].pageLoaded(d);PageHandler.currentPageParam=d;if(!PageHandler.showingPage){$("#pagecontent").show();PageHandler.showingPage=true}}},refreshInitialContent:function(){PageHandler.initialPageContent&&PageHandler.createInitialContent()},createInitialContent:function(){PageHandler.initialPageContent=true;var c=CH.get("columns"),d=[],g=document.getElementById("initialcontent");document.getElementById("buttoncontainer");g.setAttribute("data-col",
""+c);for(g=0;g<c;g++)d[g]='<div class="bc" id="bc'+g+'">';currentButtons=localStorage.getItem(userPrefix+"buttons").split(",");var i=0;c=CH.get("columns");for(g=0;g<currentButtons.length;g++){if(currentButtons[g]!="")d[i]+=SearchDial.createButton(currentButtons[g]);i=(i+1)%c}c=d.join("</div>")+"</div>";$("#buttoncontainer").html(c);PageHandler.bindSortable();localStorage.setItem(userPrefix+"cache",c)},bindSortable:function(){$("#buttoncontainer .bc").sortable({opacity:0.6,helper:"clone",items:"> a",
connectWith:".bc, #editdrop",distance:5,stop:function(){SearchDial.saveButtons()}})},redraw:function(){PageHandler.showingPage&&PageHandler.ranScript&&PageHandler.scripts[PageHandler.currentPage].pageLoaded()},hidePage:function(){if(PageHandler.showingPage){$("#pagecontent").hide();PageHandler.showingPage=false}},showMessage:function(c,d){SearchHandler.isVisible&&SearchHandler.hideSearch();ExternalHandler.isVisible&&ExternalHandler.hideExternal();$("#initialcontent").hide();document.getElementById("hc").setAttribute(className,
"search");$("#pagecontent").removeAttr("class").html(d);PageHandler.currentPage=null;PageHandler.currentPageParam=null;if(originalTitle==null)originalTitle=document.title;document.title=c+" - {Search Dial}";if(!PageHandler.showingPage){$("#pagecontent").show();PageHandler.showingPage=true}}},HashHandler={lastValueChecked:null,init:function(){$(window).hashchange(function(){HashHandler.check()})},apply:function(c){HashHandler.lastValueChecked=null;location.hash="#"+c;HashHandler.check()},check:function(){var c=
location.hash;if(c.length>0)c=c.substring(1);if(c!=HashHandler.lastValueChecked){HashHandler.lastValueChecked=c;if(c.indexOf("/")>-1){var d=c.split("/");if(d[0]=="resolve"){d=decodeURIComponent(d[1].replace(/\+/g,"%20"));var g=d.indexOf(" "),i="";if(g>-1){i=d.substring(g);d=d.substring(0,g)}g=SearchDial.getAutocompleteEntries(d);for(var j=false,n="",q=0;q<g.length&&!j;q++)if(g[q].toLowerCase().indexOf(d.toLowerCase())===0){j=true;n=openQuery(g[q]+i,true)}j||(n=openQuery(d+i,true));d=n.split("/")}if(d[0]==
"out"||d[0]=="external"){j=c=decodeURIComponent(d[1]);i="";g=j.indexOf(" ");if(g>-1){i=$.trim(j.substring(g));j=j.substr(0,g)}g=SearchDial.getEntryByKeyword(j);if(g==null){j=CH.get("defaultProvider");if(j!=""){g=SearchDial.getEntryByKeyword(j);i=c}}j=null;if(i!="")if(typeof g[3]!="undefined"&&g[3].length>1){j=encodeURIComponent(i);n=j.replace("%20","+");q=n.replace("+"," ");j=g[3].replace("{searchTerms}",j).replace("{searchTermsPlus}",n).replace("{searchTermsSpace}",q)}else j=g[0];else j=g[0];if(d[0]==
"out"){d=j;if(d.indexOf("http://")==0)d=d.substring(7);PageHandler.showMessage("Redirecting...",'<div class="redirect-message">Redirecting to &laquo;<a href="'+j+'">'+d+"</a>&raquo;...</div>");window.location=j}else{$("#q").val(c);ExternalHandler.showExternal(j,g[1],i)}}else if(d[0]=="search"||d[0]=="sitesearch"){c=decodeURIComponent(d[1]);j=null;$("#q").val(c);g=c.indexOf(" ");if(g>-1){$.trim(c.substring(g));j=c.substr(0,g)}g=SearchDial.getEntryByKeyword(j);SearchHandler.searchTerm=c;if(g!=null){c=
g[0].match(/^https?:\/\/([^:@\/]*)/i);SearchHandler.targetSite=c&&c.length>1?c[1]:null}else SearchHandler.targetSite=null;SearchHandler.doSiteSearch=d[0]=="sitesearch";SearchHandler.execute()}else if(d[0]=="eval"){d=decodeURIComponent(d[1].replace(/\+/g,"%20"));openQuery(d)}else if(d[0]=="browsersearch"){d=decodeURIComponent(d[1].replace(/\+/g,"%20"));HashHandler.apply("search/"+encodeURIComponent(d))}else{i=c.indexOf("/");d=c.substring(0,i);c=c.substring(i+1);PageHandler.showPage(d,c)}}else PageHandler.showPage(c)}}};
function SearchCompleteHandler(){}SearchCompleteHandler.prototype.complete=function(){SearchHandler.searchComplete()};
var SearchHandler={engine:null,searchTerm:null,targetSite:null,doSiteSearch:false,isReady:false,isVisible:false,loadedSidebarButtons:false,currentQuery:null,currentTimeout:null,retryAttempts:0,redraw:function(){SearchHandler.isVisible&&SearchHandler.engine.execute(SearchHandler.searchTerm)},handleTimeout:function(){SearchHandler.currentTimeout=null;if(SearchHandler.retryAttempts<3){SearchHandler.engine.cancelSearch();SearchHandler.engine.execute(SearchHandler.currentQuery);SearchHandler.currentTimeout=
setTimeout(function(){SearchHandler.handleTimeout()},3E3)}SearchHandler.retryAttempts++;SearchHandler.showTimeoutMessage()},showTimeoutMessage:function(){if(googleLoaded){if(SearchHandler.currentQuery!=null)if(SearchHandler.retryAttempts<=3)$("#searcherrormessage").html("The search timed out; retrying ("+SearchHandler.retryAttempts+")...");else{$("#content").removeAttr(className);$("#searcherrormessage").html('The search component is unable to retrieve the search results at the moment; try later or select a different default search provider from the <a href="#options">options page</a>.')}}else{$("#content").removeAttr(className);
$("#searcherrormessage").html('The search component is taking too long to load; you may try to <a href="#" onclick="window.location.reload(false); return false;">reload</a> or select a different default search provider from the <a href="#options">options page</a>.')}$("#searcherror").show()},searchComplete:function(){if(SearchHandler.currentTimeout!=null){clearTimeout(SearchHandler.currentTimeout);SearchHandler.currentTimeout=null}$("#searcherror").hide();$("#content").removeAttr(className);var c=
"";try{var d;d=typeof SearchHandler.engine.$a=="object"?SearchHandler.engine.$a.cursor.estimatedResultCount:typeof SearchHandler.engine.zb=="object"?SearchHandler.engine.zb.cursor.estimatedResultCount:SearchHandler.engine.e[0].h.cursor.estimatedResultCount;c=formatNumber(d)+" result";if(parseInt(d)!=1)c+="s"}catch(g){}$("#searchcount").html(c)},ready:function(c){SearchHandler.engine=c;SearchHandler.isReady=true;var d=new SearchCompleteHandler;c.setSearchCompleteCallback(d,SearchCompleteHandler.prototype.complete);
$("#content").removeAttr(className);$("#searcherror").hide();SearchHandler.searchTerm!=null&&SearchHandler.execute()},hideSearch:function(){if(SearchHandler.isVisible){$("#content").hide();SearchHandler.isVisible=false}},saveSearchButtons:function(){for(var c=[],d=$("#searchsidebar > a"),g=0;g<d.length;g++)c.push(d.get(g).getAttribute("data-key"));c=c.join(",");localStorage.setItem(userPrefix+"sbuttons",c);ExternalHandler.buttonsCreated=false},createSidebarButtons:function(){for(var c=localStorage.getItem(userPrefix+
"sbuttons").split(","),d='<div id="searchsidebarlabel">Search in:</div>',g=0;g<c.length;g++)d+=SearchDial.createButton(c[g],SearchDial.SEARCH_BUTTON);$("#searchsidebar").html(d);$("#searchsidebar").sortable({opacity:0.6,helper:"clone",items:"> a",distance:5,stop:function(){SearchHandler.saveSearchButtons()}});SearchHandler.loadedSidebarButtons=true},execute:function(){if(!SearchHandler.isVisible){PageHandler.showingPage&&PageHandler.hidePage();ExternalHandler.isVisible&&ExternalHandler.hideExternal();
document.getElementById("hc").setAttribute(className,"search");$("#initialcontent").hide();SearchHandler.loadedSidebarButtons||SearchHandler.createSidebarButtons();$("#content").show();SearchHandler.isVisible=true}if(!SearchHandler.isReady)return false;var c=jQuery.trim(SearchHandler.searchTerm);if(SearchHandler.doSiteSearch&&SearchHandler.targetSite!=null){var d=c.indexOf(" ");if(d>-1)c=c.substring(d+1)}d="\u00ab"+c+"\u00bb";for(var g=localStorage.getItem(userPrefix+"sbuttons").split(","),i=0;i<
g.length;i++){var j=document.getElementById("sbutton-"+g[i]);if(j){var n=j.getAttribute("data-key"),q=SearchDial.getEntryByKeyword(n);if(q!=null){var C="";if(typeof q[3]=="undefined"||q[3]=="")C="sitesearch";else if(q=="n")C="search";else{q=typeof q[6]!="undefined"&&q[6]==1;C=CH.get("frameExternal")&&!q?"external":"out"}C=="out"&&CH.get("frameExternal")?j.setAttribute("data-ext","1"):j.removeAttribute("data-ext");j.setAttribute("href","#"+C+"/"+encodeURIComponent(n+" "+c))}else j.setAttribute("href",
"#eval/"+encodeURIComponent(n+" "+c))}}if(SearchHandler.doSiteSearch&&SearchHandler.targetSite!=null){c+=" site:"+SearchHandler.targetSite;d+=" at \u00ab"+SearchHandler.targetSite+"\u00bb"}g="<b>Searching for "+d+'</b><span id="searchcount"></span>';if(SearchHandler.targetSite!=null){g+='<a href="#';g+=SearchHandler.doSiteSearch?"search":"sitesearch";g+="/"+encodeURIComponent(SearchHandler.searchTerm)+'">';g+=SearchHandler.doSiteSearch?"Search all web":"Search only at \u00ab"+SearchHandler.targetSite+
"\u00bb";g+="</a>"}if(SearchHandler.currentTimeout!=null){clearTimeout(SearchHandler.currentTimeout);SearchHandler.currentTimeout=null}$("#searcherror").hide();SearchHandler.currentQuery=c;SearchHandler.retryAttempts=0;SearchHandler.engine.execute(c);SearchHandler.currentTimeout=setTimeout(function(){SearchHandler.handleTimeout()},5500);if(originalTitle==null)originalTitle=document.title;document.title=jQuery.trim(d)+" - {Search Dial}";$("#searchlabel").html(g);$("#content").attr(className,"loading");
return true}},ExternalHandler={isVisible:false,buttonsCreated:false,hideExternal:function(){if(ExternalHandler.isVisible){$("#externalcontent").hide();$("#externalbuttons").hide();$("#externallinkdiv").hide();document.body.removeAttribute(className);document.getElementById("eciframe").setAttribute("src","about:blank");ExternalHandler.isVisible=false}},saveSearchButtons:function(){for(var c=[],d=$("#externalbuttonscontainer > a"),g=0;g<d.length;g++)c.push(d.get(g).getAttribute("data-key"));c=c.join(",");
localStorage.setItem(userPrefix+"sbuttons",c);SearchHandler.loadedSidebarButtons=false},createButtons:function(){var c=localStorage.getItem(userPrefix+"sbuttons").split(","),d='<div id="externallabel">Search in:</div>';d+='<a id="ebuiltin" href="#" title="Search using built-in search" class="b" data-c="5"><span class="fl"></span><span class="bi"><img width="16" height="16" src="/favicon.ico" /></span>Built-in search</a><div id="externalbuttonscontainer">';var g;g=CH.get("externalBar")==0?SearchDial.EXT2_BUTTON:
SearchDial.EXT_BUTTON;for(var i=0;i<c.length;i++)d+=SearchDial.createButton(c[i],g);d+="</div>";$("#externalbuttons").html(d);$("#externalbuttonscontainer").sortable({opacity:0.6,helper:"clone",items:"> a",distance:5,stop:function(){ExternalHandler.saveSearchButtons()}});ExternalHandler.buttonsCreated=true},showExternal:function(c,d,g){PageHandler.showingPage&&PageHandler.hidePage();SearchHandler.isVisible&&SearchHandler.hideSearch();if(!ExternalHandler.isVisible){if(CH.get("externalBar")==0){document.getElementById("hc").setAttribute(className,
"miniexternal");document.body.setAttribute(className,"miniexternal")}else{document.getElementById("hc").setAttribute(className,"external");document.body.setAttribute(className,"external")}$("#externalcontent").show();$("#externalbuttons").show();$("#externallinkdiv").show();ExternalHandler.isVisible=true;ExternalHandler.buttonsCreated||ExternalHandler.createButtons()}document.getElementById("ebuiltin").setAttribute("href","#search/"+encodeURIComponent(g));for(var i=localStorage.getItem(userPrefix+
"sbuttons").split(","),j=0;j<i.length;j++){var n=document.getElementById("ebutton-"+i[j]);if(n){var q=n.getAttribute("data-key"),C=SearchDial.getEntryByKeyword(q);if(C!=null){var G="";if(typeof C[3]=="undefined"||C[3]=="")G="sitesearch";else if(C=="n")G="search";else{C=typeof C[6]!="undefined"&&C[6]==1;G=CH.get("frameExternal")&&!C?"external":"out"}G=="out"&&CH.get("frameExternal")?n.setAttribute("data-ext","1"):n.removeAttribute("data-ext");n.setAttribute("href","#"+G+"/"+encodeURIComponent(q+" "+
g))}else n.setAttribute("href","#eval/"+encodeURIComponent(q+" "+g))}}document.getElementById("externallink").setAttribute("href",c);i=document.getElementById("eciframe");if(!i){i=document.createElement("iframe");i.setAttribute("id","eciframe");document.getElementById("externalcontent").appendChild(i)}i.setAttribute("src",c);try{i.focus()}catch(H){}if(originalTitle==null)originalTitle=document.title;document.title="\u00ab"+g+"\u00bb at \u00ab"+d+"\u00bb - {Search Dial}"}},CH={defaultConf:{defaultColor:5,
columns:3,compactHome:false,buttonKeyword:true,guideTip:true,addTip:true,acCookieUpdated:0,poCookieUpdated:0,update:false,updateTime:0,frameExternal:true,defaultProvider:"",externalBar:0},currentConf:null,get:function(c){if(CH.currentConf==null)CH.currentConf=JSON.parse(localStorage.getItem(userPrefix+"conf"));if(typeof CH.currentConf[c]=="undefined")return CH.defaultConf[c];return CH.currentConf[c]},set:function(c,d){if(CH.currentConf==null)CH.currentConf=JSON.parse(localStorage.getItem(userPrefix+
"conf"));CH.currentConf[c]=d;localStorage.setItem(userPrefix+"conf",JSON.stringify(CH.currentConf))}},defaultLinks=[["http://www.amazon.com/","Amazon","amazon","http://www.amazon.com/gp/search?ie=UTF8&tag=firefshowc-20&index=aps&linkCode=ur2&camp=1789&creative=9325&keywords={searchTerms}"],["http://www.bing.com/","Bing","bing","http://www.bing.com/search?q={searchTerms}&go=&form=QBLH&filt=all&qs=n&sk=",0,"",1],["http://www.ebay.com/","eBay","ebay","http://search.ebay.com/search/search.dll?satitle={searchTerms}",
0,"http://www.ebay.com/favicon.ico"],["http://www.facebook.com/","Facebook","facebook","http://www.facebook.com/search/?q={searchTerms}&src=os"],["http://www.google.com/","Google","google","http://www.google.com/search?q={searchTerms}&ie=utf-8&oe=utf-8",0,"",1],["http://images.google.com/","Google Images","images","http://images.google.com/images?hl=en&q={searchTerms}"],["http://www.imdb.com/","IMDb","imdb","http://www.imdb.com/find?s=all&q={searchTerms}"],["http://maps.google.com/","Google Maps",
"maps","http://maps.google.com/maps?q={searchTerms}",0,"http://maps.gstatic.com/favicon.ico"],["http://news.yahoo.com/","Yahoo! News","news","http://news.search.yahoo.com/news/search?ei=UTF-8&fr=news-us-ss&c=&p={searchTerms}"],["http://twitter.com/","Twitter","twitter","http://search.twitter.com/search?q={searchTerms}",0,"",1],["http://en.wikipedia.org/","Wikipedia","wikipedia","http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search={searchTerms}"],["http://www.youtube.com/","YouTube",
"youtube","http://www.youtube.com/results?search_query={searchTerms}",0,"",1]],defaultSearchButtons=["google","bing","wikipedia","images","news","maps","twitter","youtube","amazon"],HitHandler={currentHits:null,limbo:[],checkHits:function(){if(HitHandler.currentHits==null){var c=localStorage.getItem(userPrefix+"hits");HitHandler.currentHits=c==null?[]:JSON.parse(c)}},count:function(c){HitHandler.checkHits();for(var d=c.toLowerCase(),g=0;g<HitHandler.currentHits.length;g++)if(HitHandler.currentHits[g][0]==
d){HitHandler.currentHits[g][1]++;for(c=g;c>0&&HitHandler.currentHits[c-1][1]<HitHandler.currentHits[g][1];)c--;if(c!=g){g=HitHandler.currentHits.splice(g,1);HitHandler.currentHits.splice(c,0,g[0]);c<10&&HitHandler.updateCookie()}HitHandler.saveHits();return}HitHandler.currentHits.push([c.toLowerCase(),1,c]);HitHandler.currentHits.length<=10&&HitHandler.updateCookie();HitHandler.saveHits()},kill:function(c){HitHandler.checkHits();c=c.toLowerCase();for(var d=0;d<HitHandler.currentHits.length;d++)if(HitHandler.currentHits[d][0].toLowerCase()==
c){HitHandler.limbo.push(HitHandler.currentHits[d]);HitHandler.currentHits.splice(d,1)}},resurrect:function(c){HitHandler.checkHits();c=c.toLowerCase();for(var d=0;d<HitHandler.limbo.length;d++)if(c==HitHandler.limbo[d][0]){HitHandler.currentHits.push(HitHandler.limbo[d]);HitHandler.currentHits.sort(function(g,i){return i[1]-g[1]});HitHandler.limbo.splice(d,1);return true}return false},updateCookie:function(){HitHandler.checkHits();if(HitHandler.currentHits.length>0){for(var c=""+HitHandler.currentHits[0][2],
d=Math.min(10,HitHandler.currentHits.length),g=1;g<d;g++)c+=","+HitHandler.currentHits[g][2];jaaulde.utils.cookies.set("po",c)}c=Math.floor((new Date).getTime()/1E3);CH.set("poCookieUpdated",c)},pendingSave:function(){return HitHandler.limbo.length>0},saveHits:function(){HitHandler.limbo.length=0;localStorage.setItem(userPrefix+"hits",JSON.stringify(HitHandler.currentHits))}},engine=null;
function googleHasLoaded(){if(googleLoadTimeout!=null){clearTimeout(googleLoadTimeout);googleLoadTimeout=null}google.search.Csedr.addOverride("sd_");var c=new google.search.CustomSearchControl("010506677906732736289:suusmndcbn8");c.draw("searchcontent");SearchHandler.ready(c)}function googleTimeout(){googleLoadTimeout=null;SearchHandler.isVisible&&SearchHandler.showTimeoutMessage()}
function checkUpdate(){CH.set("update",false);var c=Math.floor((new Date).getTime()/1E3);if(c>CH.get("updateTime")+86400){CH.set("updateTime",c);window.location.reload(true)}}
$(function(){if(typeof localStorage=="undefined"){var c=document.createElement("div");c.setAttribute(className,"error_message");c.innerHTML="<h1>Error!</h1><div>Your browser doesn't support the HTML 5 Storage Specification</div><div>This specification is supported by most modern browsers (Firefox 3.5+, Safari 4+, IE 8+, Chrome 4+, Opera 11+).</div><div>Update your browser and try again.</div>";var d=document.getElementById("initialcontent");d.insertBefore(c,d.firstChild);d.removeChild(document.getElementById("hud"))}else{documentReady=
true;if(googleLoaded)googleHasLoaded();else googleLoadTimeout=setTimeout(function(){googleTimeout()},5500);HashHandler.init();if(localStorage.getItem(userPrefix+"conf")==null)createDefaultDb();else if(localStorage.getItem(userPrefix+"sbuttons")==null){d=[];for(c=0;c<defaultSearchButtons.length;c++)SearchDial.getEntryByKeyword(defaultSearchButtons[c])!=null&&d.push(defaultSearchButtons[c]);localStorage.setItem(userPrefix+"sbuttons",d.join(","))}if(CH.get("update")||checkUpdateWhenReady)checkUpdate();
CH.get("addTip")&&typeof window.external=="object"&&typeof window.external.AddSearchProvider!="undefined"&&$("#addengine").fadeIn("slow");if(CH.get("guideTip")){c=document.createElement("div");c.setAttribute("id","guide_tip");c.setAttribute(className,"error_message");c.innerHTML='<span><a href="#hide" onclick="hideTip(); return false">hide</a></span><b>New to the site?</b> Check the <a href="#guide" onclick="hideTip(); return true;">Getting Started Guide</a>';d=document.getElementById("initialcontent");
d.insertBefore(c,d.firstChild)}if(CH.get("compactHome")){document.getElementById("hc").setAttribute(className,"search");document.getElementById("initialcontent").setAttribute(className,"compact")}d=Math.floor((new Date).getTime()/1E3);CH.get("acCookieUpdated")+864E3<d&&SearchDial.updateACCookie();CH.get("poCookieUpdated")+864E3<d&&HitHandler.updateCookie();$("#q").autocomplete([]);if(loadedCached){PageHandler.initialPageContent=true;PageHandler.bindSortable()}initialHashCheck(true);$("#editdrop").sortable({receive:function(g,
i){$(i.sender).sortable("cancel");var j=SearchDial.getEntryByKeyword(i.item.attr("data-key"));j!=null&&showEditShortcut(j)}})}});function PageShowHandler(c){c.persisted&&initialHashCheck(false)}try{window.addEventListener("pageshow",PageShowHandler,false)}catch(e$$38){}
function initialHashCheck(c){var d=true,g=false,i=location.hash.substring(1);if(i.indexOf("/")>-1){var j=i.split("/");if(j[0]=="out"||j[0]=="search"||j[0]=="sitesearch"||j[0]=="external"){g=d=true;i=decodeURIComponent(j[1]);$("#q").val(i);if(j[0]=="out"){i=jQuery.trim(i);j=i.indexOf(" ");var n=i;SearchHandler.targetSite=null;if(j>-1){n=i.substr(0,j);j=SearchDial.getEntryByKeyword(n);if(j!=null)if((j=j[0].match(/^https?:\/\/([^:@\/]*)/i))&&j.length>1)SearchHandler.targetSite=j[1]}SearchHandler.searchTerm=
i;SearchHandler.doSiteSearch=false;SearchHandler.execute()}else HashHandler.check()}else HashHandler.check()}else HashHandler.check();if(ExternalHandler.isVisible)g=d=false;d&&c&&!("autofocus"in document.createElement("input"))&&$("#q").focus();g&&$("#q").select()}
function createDefaultDb(){for(var c={},d="",g=0;g<defaultLinks.length;g++){localStorage.setItem(userPrefix+"key-"+defaultLinks[g][2].toLowerCase(),JSON.stringify(defaultLinks[g]));localStorage.setItem(userPrefix+"url-"+defaultLinks[g][0],defaultLinks[g][2]);var i=defaultLinks[g][2].toLowerCase().charAt(0);if(typeof c[i]=="undefined")c[i]=[defaultLinks[g][2]];else c[i].push(defaultLinks[g][2]);if(g>0)d+=",";d+=defaultLinks[g][2]}for(var j in c)localStorage.setItem(userPrefix+"ac-"+j,JSON.stringify(c[j].sort()));
localStorage.setItem(userPrefix+"conf",JSON.stringify(CH.defaultConf));localStorage.setItem(userPrefix+"buttons",d);localStorage.setItem(userPrefix+"sbuttons",defaultSearchButtons.join(","))}
function openQuery(c,d){var g=c,i="",j=g.indexOf(" ");if(j>-1){i=$.trim(g.substring(j));g=g.substr(0,j)}j="";j=SearchDial.getEntryByKeyword(g);var n=false;if(j==null){var q=CH.get("defaultProvider");if(q!=""){j=SearchDial.getEntryByKeyword(q);i=c;n=true}}if(j==null)j="search/"+encodeURIComponent(c);else{if(!n){n=j[2].split(",");for(q=0;q<n.length;q++)if(n[q].toLowerCase()==g.toLowerCase()){HitHandler.count(n[q]);break}}if(i!="")if(typeof j[3]=="undefined"||j[3]=="")j="sitesearch/"+encodeURIComponent(c);
else if(j=="n")j="search/"+encodeURIComponent(c);else{g=typeof j[6]!="undefined"&&j[6]==1;j=CH.get("frameExternal")&&!g?"external/"+encodeURIComponent(c):"out/"+encodeURIComponent(c)}else j="out/"+encodeURIComponent(c)}if(d===true)return j;else HashHandler.apply(j)}function searchSubmit(){$("#q").blur();openQuery($("#q").val());return false}
function showEditShortcut(c,d,g){$(document).one("reveal.facebox",function(){if(d){$("#facebox .editdialogtitle").html("Add shortcut");$("#facebox .editremovebutton").hide();$("#facebox .editoriginalwebsite").val("")}else{$("#facebox .editdialogtitle").html("Edit shortcut");$("#facebox .editremovebutton").show();$("#facebox .editoriginalwebsite").val(c[0])}c[0]==""?$("#facebox .editwebsite").val("http://www."):$("#facebox .editwebsite").val(c[0]);$("#facebox .edittitle").val(c[1]);$("#facebox .editkeywords").val(c[2]);
if(typeof c[3]!="undefined")if(c[3]=="n")$("#facebox .editaction").attr("selectedIndex","1");else if(c[3]!=""){$("#facebox .editaction").attr("selectedIndex","2");$("#facebox .editcustomaction").val(c[3]);$("#facebox .editcustomactiondiv").show()}else{$("#facebox .editaction").attr("selectedIndex","0");$("#facebox .editcustomactiondiv").hide()}else{$("#facebox .editaction").attr("selectedIndex","0");$("#facebox .editcustomactiondiv").hide()}typeof c[4]!="undefined"&&c[4]>0?$("#facebox .color").attr("data-c",
""+c[4]):$("#facebox .color").attr("data-c",""+CH.get("defaultColor"));if(typeof c[5]!="undefined")if(c[5]=="n"){$("#facebox .editicon").attr("selectedIndex","1");$("#facebox .editcustomicondiv").hide()}else if(c[5]!=""){$("#facebox .editicon").attr("selectedIndex","2");$("#facebox .editcustomicon").val(c[5]);$("#facebox .editcustomicondiv").show()}else{$("#facebox .editicon").attr("selectedIndex","0");$("#facebox .editcustomicondiv").hide()}else{$("#facebox .editicon").attr("selectedIndex","0");
$("#facebox .editcustomicondiv").hide()}$("#facebox .editbutton").attr("id","editbutton");$("#facebox .editsbutton").attr("id","editsbutton");$("#facebox .editcustomactionframe").attr("id","editcustomactionframe");if(d){$("#facebox .editbutton").attr("checked","checked");$("#facebox .editsbutton").removeAttr("checked");$("#facebox .editcustomactionframe").removeAttr("checked");$("#facebox .editcolordiv").show()}else{var i=c[2].split(","),j=false;if(document.getElementById("button-"+i[0].toLowerCase()))j=
true;else for(var n=localStorage.getItem(userPrefix+"buttons").split(","),q=0;q<n.length&&!j;q++)if(n[q]==i[0])j=true;n=false;if(document.getElementById("sbutton-"+i[0].toLowerCase()))n=true;else{var C=localStorage.getItem(userPrefix+"sbuttons").split(",");for(q=0;q<C.length&&!n;q++)if(C[q]==i[0])n=true}j?$("#facebox .editbutton").attr("checked","checked"):$("#facebox .editbutton").removeAttr("checked");n?$("#facebox .editsbutton").attr("checked","checked"):$("#facebox .editsbutton").removeAttr("checked");
checkEditButtons(true);typeof c[6]!="undefined"&&c[6]?$("#facebox .editcustomactionframe").attr("checked","checked"):$("#facebox .editcustomactionframe").removeAttr("checked")}c[0]==""&&$("#facebox .editwebsite").focus();g&&window.setTimeout(function(){$("#facebox .editform").submit()},0)});jQuery.facebox({div:"#editdialog"})}
function checkEditButtons(c){var d=$("#facebox .editcolordiv");if($("#facebox .editbutton").is(":checked")||$("#facebox .editsbutton").is(":checked"))if(c)d.show();else d.is(":hidden")&&d.slideDown();else d.hide()}
function searchEditClicked(c){c=$(c.target).parents(".gs-result:first").find(".gs-title:first").get(0);var d=c.getAttribute("href"),g=SearchDial.getEntryByUrl(d);if(g==null){g=jQuery.trim($("#q").val()).split(" ")[0].toLowerCase();c=[d,c.getAttribute("data-noformat"),g];showEditShortcut(c,true)}else showEditShortcut(g)}
function editSubmitted(){for(var c=["editwebsite","editkeywords","edittitle","editcustomaction","editcustomicon"],d=["Website","Keywords","Title","External search","External icon"],g=[],i=0;i<c.length;i++){var j=$("#facebox ."+c[i]);if(j.is(":visible"))if(jQuery.trim(j.val())==""){g.push(d[i]);var n=j.get(0);if(n.nextSibling==null){var q=document.createElement("span");q.setAttribute(className,"warning");n.parentNode.appendChild(q);j.bind("keyup.empty",function(F){var y=$(F.target);if(y.val()!=""){y.unbind("keyup.empty");
F.target.parentNode.removeChild(F.target.nextSibling)}})}}}if(g.length>0){c="The field";if(g.length>1)c+="s";for(i=0;i<g.length;i++){if(i>0)c+=i==g.length-1?" and":",";c+=" '"+g[i]+"'"}c+=" cannot be empty";window.alert(c);return false}j=jQuery.trim($("#facebox .editwebsite").val());n=$("#facebox .editoriginalwebsite").val();if(/^https?:\/\/[^\/]+$/i.test(j))j+="/";if(j!=n){var C=SearchDial.getEntryByUrl(j);if(C!=null)if(!window.confirm("A shortcut for the specified website already exists; do you want to overwrite it?"))return false}q=
$("#facebox .editkeywords").val().replace(" ","");d=q.split(",");g=[];var G=[];for(i=0;i<d.length;i++)if((C=SearchDial.getEntryByKeyword(d[i]))&&C[0]!=n){g.push(d[i]);G.push(C[0])}if(g.length>0){c="The keyword";if(g.length>1)c+="s";for(i=0;i<g.length;i++){if(i>0)c+=i==g.length-1?" and":",";c+=" '"+g[i]+"'"}c+=g.length==1?" is already assigned to another shortcut; do you want to overwrite it?":" are already assigned to other shortcuts; do you want to overwrite them?";if(window.confirm(c))for(i=0;i<
g.length;i++)SearchDial.removeEntryByUrl(G[i]);else return false}g=c=-1;G=false;if(n!="")if(C=SearchDial.getEntryByUrl(n)){C=C[2].split(",");var H=localStorage.getItem(userPrefix+"buttons").split(",");if(CH.get("defaultProvider")==C[0])G=true;for(i=0;i<H.length&&c<0;i++)if(H[i]==C[0])c=i;H=localStorage.getItem(userPrefix+"sbuttons").split(",");for(i=0;i<H.length&&g<0;i++)if(H[i]==C[0])g=i}j!=n&&SearchDial.removeEntryByUrl(n);newEntry=[];newEntry[0]=j;newEntry[1]=$("#facebox .edittitle").val();newEntry[2]=
q;newEntry[3]="";newEntry[4]=0;newEntry[5]="";newEntry[6]=0;i=2;j=$("#facebox .editaction").attr("selectedIndex");if(j=="1"){newEntry[3]="n";i=3}else if(j=="2"){j=jQuery.trim($("#facebox .editcustomaction").val());if(j!=""){newEntry[3]=j;i=3;G&&CH.set("defaultProvider",d[0]);if($("#facebox .editcustomactionframe").is(":checked")){newEntry[6]=1;i=6}}}d=$("#facebox .color").attr("data-c");if(d!=""+CH.get("defaultColor")){newEntry[4]=parseInt(d);i=4;if(newEntry[4]==CH.get("defaultColor"))newEntry[4]=
0}j=$("#facebox .editicon").attr("selectedIndex");d="";if(j=="1")d="n";else if(j=="2"){j=jQuery.trim($("#facebox .editcustomicon").val());if(j!="")d=j}if(d!=""){newEntry[5]=d;i=5}newEntry.length=i+1;i=$("#facebox .editbutton").is(":checked");d=$("#facebox .editsbutton").is(":checked");SearchDial.addEntry(newEntry,i,c,d,g);jQuery(document).trigger("close.facebox");SearchHandler.redraw();PageHandler.redraw();return false}
function editRemove(){var c=$("#facebox .editoriginalwebsite").val();if(confirm("Are you sure you want to remove the shortcut for '"+c+"'?")){SearchDial.removeEntryByUrl(c);jQuery(document).trigger("close.facebox");SearchHandler.redraw()}return false}function checkEditIcon(c){c=$(c.target).parents(".editform");if(c.find(".editicon").val()=="2"){c=c.find(".editcustomicondiv");c.is(":hidden")&&c.slideDown()}else c.find(".editcustomicondiv").hide()}
function checkEditAction(c){c=$(c.target).parents(".editform");if(c.find(".editaction").val()=="2"){c=c.find(".editcustomactiondiv");c.is(":hidden")&&c.slideDown()}else c.find(".editcustomactiondiv").hide()}function checkEditButton(c){c=$(c.target).parents(".editform");if(c.find(".editbutton").val()=="0"){c=c.find(".editcolordiv");c.is(":hidden")&&c.slideDown()}else c.find(".editcolordiv").hide()}
function editColorClicked(c){var d=document.getElementById("editColorPalette");if(!d){d=document.createElement("div");d.setAttribute("id","editColorPalette");for(var g=1;g<=SearchDial.TOTAL_COLORS;g++){var i=document.createElement("a");i.setAttribute(className,"color");i.setAttribute("data-c",""+g);if((g-1)%5==0)i.style.clear="left";d.appendChild(i)}document.body.appendChild(d);$("#editColorPalette a.color").click(function(){var j=this.getAttribute("data-c");$(c).attr("data-c",j);$(document).unbind("click.closePalette");
$("#editColorPalette").hide()})}g=$(c);i=g.offset();$(d).css({top:i.top-$(d).height()+g.height(),left:i.left+g.width()}).show();$(document).unbind("click.closePalette");$(document).one("click.closePalette",function(){$("#editColorPalette").hide()});return false}function resetInput(){var c=document.getElementById("q");c.value="";c.focus();return false}function stopEvent(c){if(!c)c=window.event;try{c.stopPropagation()}catch(d){c.cancelBubble=true}}
function formatNumber(c){if(c.length<4)return c;for(var d=[],g=c.length;g>3;){g-=3;d.unshift(c.substr(g,3))}d.unshift(c.substring(0,g));return d.join(",")}function isNumber(c){return""+parseInt(c)==c}function hideTip(){CH.set("guideTip",false);var c=document.getElementById("guide_tip");c.parentNode.removeChild(c)}function closeAddEngine(){CH.set("addTip",false);$("#addengine").hide();return false}
function addEngine(){try{window.external.AddSearchProvider("http://www.searchdial.com/sd.xml")}catch(c){alert("The installation has failed")}return closeAddEngine()};

